Compliance fixes - #13
Merged
Merged
Conversation
There was a problem hiding this comment.
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
.mjsto.tsand add stronger TypeScript typing. - Add
package.jsonexportsfor the package entrypoint and adjust formatting for re-exports. - Update CI workflows to call the new
.tsscripts 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-reachabilityandupdate:reachability-pinnow run.tsscripts vianode. 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-scriptis importingscripts/publish-coverage-comment.tsdirectly. 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.
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.
🟢 Coverage Report
|
Elliot Huffman (elliot-huffman)
approved these changes
Sep 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 ❗
{ "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
Activities Checklist
Code Quality
Testing And Validation
npm run validate:package.Coverage
Security And Safety
Documentation
Release Impact