Conversation
There was a problem hiding this comment.
Pull request overview
This PR modernizes the action’s TypeScript/module setup and CI developer workflow by moving to an ESM-oriented project configuration, bundling with esbuild, and migrating unit tests from node:test to Jest + ts-jest.
Changes:
- Switch TypeScript config to ESM (
module: esnext,moduleResolution: bundler) and mark the package as"type": "module". - Replace the previous test build + Node test runner with Jest + ts-jest, updating mocks to use
jest.unstable_mockModule. - Replace
nccbundling with an esbuild-based bundler that emitsdist/index.cjsanddist/post/index.cjs, and update the action entrypoints accordingly.
Reviewed changes
Copilot reviewed 10 out of 16 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tsconfig.test.json | Removed old test compilation config (no longer compiling tests to .test-build). |
| tsconfig.json | Updated TS module settings for ESM-oriented typechecking. |
| test/prek.test.ts | Migrated to Jest + ESM module mocking. |
| test/manifest.test.ts | Migrated to Jest + ESM module mocking; refactored imports/reset behavior. |
| test/install.test.ts | Migrated assertions from assert to Jest expect. |
| test/cache.test.ts | Migrated to Jest + ESM module mocking; simplified mock setup. |
| scripts/build-dist.mjs | Added esbuild-based bundling script producing .cjs outputs. |
| package.json | Switched to ESM package, updated deps, and replaced build/test/bundle scripts. |
| jest.config.mjs | Added ts-jest ESM preset configuration for running TS tests directly. |
| action.yaml | Updated action entrypoints to dist/index.cjs and dist/post/index.cjs. |
| CONTRIBUTING.md | Updated contributor docs to reflect new Jest-based test flow and dist bundling guidance (but filenames need follow-up). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Verification