Skip to content

Compliance fixes - #13

Merged
Elliot Huffman (elliot-huffman) merged 5 commits into
mainfrom
compliance-fixes
Sep 16, 2026
Merged

Elliot Huffman (elliot-huffman) merged 5 commits into
mainfrom
compliance-fixes

Conversation

@pr0uxx

@pr0uxx pr0uxx commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

Compliance fixes, removing js/mjs scripts, formatting and exports

Notes For Reviewers

❗Exports was reintroduced as it is the recommended approach per node-js documentation ❗

  • Migrate script to typescript - 17930b0
  • No MJS! only TS! - 17930b0
  • Migrate files config from package.json into .npmingore file - added previously in 54f99fd
  • Migrate import config from package.json into TypeScript config - import added to tsconfig in 54f99fd, removed from package.json in 6ab856d
  • Fix formatting for single exports to be single line instead of multi-line mode - e191b7f
  • ESLint config is using legacy config - using dev utils 3.0.0
  • TypeScript strict compile is disabled, all strict compile options need to be included. - see below
  • TS Config module mode is not pinned to a specific version, please see dev utils v3 for the current versions that are safe to pin - see below
npx tspc -p prod.tsconfig.json --showConfig 
{
    "compilerOptions": {
        "target": "es2024",
        "module": "node20",
        "moduleResolution": "node16",
        "noUncheckedSideEffectImports": true,
        "resolveJsonModule": true,
        "allowJs": false,
        "checkJs": false,
        "sourceMap": false,
        "removeComments": false,
        "isolatedModules": true,
        "verbatimModuleSyntax": true,
        "esModuleInterop": true,
        "forceConsistentCasingInFileNames": true,
        "strict": true,
        "allowUnreachableCode": false,
        "allowUnusedLabels": false,
        "noImplicitAny": true,
        "strictNullChecks": true,
        "strictFunctionTypes": true,
        "strictBindCallApply": true,
        "strictPropertyInitialization": true,
        "strictBuiltinIteratorReturn": true,
        "noImplicitThis": true,
        "useUnknownInCatchVariables": true,
        "alwaysStrict": true,
        "noUnusedLocals": true,
        "noUnusedParameters": true,
        "noImplicitReturns": true,
        "noFallthroughCasesInSwitch": true,
        "noImplicitOverride": true,
        "noPropertyAccessFromIndexSignature": true,
        "noUncheckedIndexedAccess": true,
        "skipLibCheck": true,
        "types": [
            "node"
        ],
        "paths": {
            "#/*": [
                "./src/*"
            ]
        },
        "rootDir": "./src",
        "outDir": "./bin",
        "declaration": true,
        "plugins": [
            {
                "transform": "typia/lib/transform"
            }
        ],
        "declarationMap": false,
        "emitDeclarationOnly": false,
        "moduleDetection": "force",
        "preserveConstEnums": true
    },
    "files": [
        "./src/LogEngine.ts",
        "./src/index.ts",
        "./src/classes/LogSerializable.ts",
        "./src/classes/SerializableAuditLog.ts",
        "./src/classes/SerializableOperationalLog.ts",
        "./src/classes/fileHandlers/LogFileHandler.ts",
        "./src/helpers/Constants.ts",
        "./src/helpers/FileHelpers.ts",
        "./src/helpers/LogHelpers.ts",
        "./src/interfaces/HostConfiguration.ts",
        "./src/interfaces/LogEngine.ts",
        "./src/interfaces/RequestMetadata.ts",
        "./src/interfaces/plugins/ConsoleDestination.ts",
        "./src/interfaces/plugins/FileDestination.ts",
        "./src/interfaces/plugins/LogAnalyticsDestination.ts",
        "./src/interfaces/plugins/LoggingPlugin.ts",
        "./src/plugins/ConsoleDestination.ts",
        "./src/plugins/FileDestination.ts",
        "./src/plugins/LogAnalyticsDestination.ts",
        "./src/plugins/base/LoggingPlugin.ts"
    ],
    "include": [
        "src/**/*.ts"
    ],
    "exclude": [
        "C:/Users/MichaelHoward/source/LogEngine/bin"
    ]
}

Type Of Change

  • Bug fix
  • New feature
  • Refactor
  • Performance improvement
  • Documentation update
  • CI/CD or build change
  • Dependency update

Activities Checklist

Code Quality

  • I reviewed my own code.
  • I kept changes focused and removed dead code.
  • I followed repository conventions and naming.
  • I added or updated comments where behavior is non-obvious.

Testing And Validation

  • I ran npm run validate:package.
  • I added or updated tests for the changed behavior.
  • I verified no existing tests regressed.

Coverage

  • Coverage impact is acceptable for this change.
  • If coverage decreased, I explained why in this PR.

Security And Safety

  • I did not introduce secrets, tokens, or credentials.
  • Inputs are validated and error handling is appropriate.
  • Dependency changes were reviewed for risk.

Documentation

  • I updated README/docs when behavior or usage changed.
  • I updated examples if needed.

Release Impact

  • This change is backward compatible.
  • If breaking, I documented migration steps.
  • I considered versioning impact (patch/minor/major).

@pr0uxx pr0uxx self-assigned this Sep 10, 2026
Copilot AI lite review requested due to automatic review settings September 10, 2026 19:50

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR focuses on “compliance fixes” by shifting repository tooling scripts from .mjs to TypeScript, tightening typing in CI helper scripts, and updating package export configuration to align with Node’s recommended exports approach.

Changes:

  • Convert several repository/CI helper scripts from .mjs to .ts and add stronger TypeScript typing.
  • Add package.json exports for the package entrypoint and adjust formatting for re-exports.
  • Update CI workflows to call the new .ts scripts and bump the socketsecurity pin in the reachability workflow.

Reviewed changes

Copilot reviewed 9 out of 12 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/index.ts Reformat re-exports into single-line exports.
scripts/validate-package.ts Add typings for npm pack --json output and adjust formatting.
scripts/update-reachability-pin.ts Add typings for PyPI response and tighten function typing.
scripts/publish-coverage-summary.ts Add typed metric list and adjust coverage report formatting.
scripts/publish-coverage-comment.ts New TypeScript implementation for posting/updating PR coverage comments.
scripts/publish-coverage-comment.mjs Removed prior MJS implementation in favor of TS version.
scripts/coverage-thresholds.ts New TS source for coverage thresholds.
scripts/coverage-thresholds.d.ts Remove standalone declaration file (now expected to be generated/handled differently).
scripts/clean-bin.ts New TS script to remove bin/ output directory.
package.json Add exports and switch npm scripts to execute .ts scripts.
.github/workflows/Test-Unit.yml Update workflow steps to execute/import .ts coverage scripts.
.github/workflows/Security-Reachability.yml Bump socketsecurity version pin.
Suppressed comments (2)

package.json:32

  • validate:package:skip-reachability and update:reachability-pin now run .ts scripts via node. Without an explicit TS loader/build step, these commands will fail at runtime due to TypeScript syntax (interfaces/type annotations) and/or module resolution.
        "validate:package": "npm run update:reachability-pin && npm run validate:package:skip-reachability",
        "validate:package:skip-reachability": "npm run lint && npm run coverage && npm run build:prod && node ./scripts/validate-package.ts",
        "update:reachability-pin": "node ./scripts/update-reachability-pin.ts",
        "prepack": "npm run validate:package",

.github/workflows/Test-Unit.yml:63

  • actions/github-script is importing scripts/publish-coverage-comment.ts directly. The github-script runtime won’t compile TypeScript sources automatically, so this dynamic import is likely to fail unless you switch to importing built JavaScript or introduce a loader step.
          script: |
            const { pathToFileURL } = require('node:url');
            const commentScriptUrl = pathToFileURL(`${process.env.GITHUB_WORKSPACE}/scripts/publish-coverage-comment.ts`);
            const { default: publishCoverageComment } = await import(commentScriptUrl.href);
            await publishCoverageComment({

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread .github/workflows/Test-Unit.yml
Comment thread package.json
The coverage summary publisher was importing the thresholds module from a .js path even though the source file is TypeScript. This update points the import at the actual TypeScript file so the script resolves correctly during execution.
@github-actions

Copy link
Copy Markdown

🟢 Coverage Report

Metric Coverage Threshold Covered
Statements 96.44% 95% 380/394
Branches 88.85% 85% 255/287
Functions 100% 99% 106/106
Lines 96.59% 95% 369/382

@elliot-huffman
Elliot Huffman (elliot-huffman) merged commit 8393303 into main Sep 16, 2026
8 checks passed
@elliot-huffman
Elliot Huffman (elliot-huffman) deleted the compliance-fixes branch September 16, 2026 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants