Repository navigation
Fully migrate pr-checks to ESM - #4200
Merged
Merged
Conversation
All scripts in `pr-checks` are run with Node24
Contributor
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The migration consistently updates module configuration, entry-point detection, paths, dependencies, tests, and workflow references.
Review effort: Balanced
Findings: None
What changed in this PR
Migrates the independent pr-checks tooling from CommonJS to ESM while retaining tsx execution in CI and local development.
Changes:
- Enables ESM and Node.js 24 for
pr-checks. - Replaces CommonJS entry-point and directory detection.
- Renames remaining ESM-specific files to
.tsand updates configuration and workflows.
| File | Description |
|---|---|
.github/workflows/pr-checks.yml |
Uses the renamed changenotes script. |
eslint.config.mjs |
Removes obsolete .mts patterns. |
package-lock.json |
Locks updated Node.js type dependencies. |
pr-checks/.nvmrc |
Selects Node.js 24. |
pr-checks/bundle-changelog.ts |
Uses the ESM main-module check. |
pr-checks/bundle-metadata.ts |
Uses the ESM main-module check. |
pr-checks/changelog/validate.test.ts |
Imports the renamed validator. |
pr-checks/changelog/validate.ts |
Converts the validator to TypeScript ESM. |
pr-checks/changenotes.ts |
Updates validator imports and usage text. |
pr-checks/check-repo-size.ts |
Uses the ESM main-module check. |
pr-checks/config.ts |
Derives filesystem paths from import.meta.url. |
pr-checks/package.json |
Enables ESM and Node.js 24 typings. |
pr-checks/prepare-changelog.ts |
Uses the ESM main-module check. |
pr-checks/release-branches.ts |
Uses the ESM main-module check. |
pr-checks/rollback-changelog.ts |
Uses the ESM main-module check. |
pr-checks/sync-back.ts |
Uses shared ESM-safe paths and entry detection. |
pr-checks/sync-checks.ts |
Uses the ESM main-module check. |
pr-checks/sync.ts |
Uses shared ESM-safe repository paths. |
pr-checks/tsconfig.json |
Removes obsolete .mts inclusion. |
pr-checks/update-ghes-versions.ts |
Uses the ESM main-module check. |
pr-checks/update-release-branch.ts |
Uses the ESM main-module check. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
The scripts in
pr-checksare independent of the main codebase and are run in CI (or locally) usingnpx. All CI workflows that use scripts frompr-checksinstall Node24. We recently moved some of the scripts over to ESM, but kept CJS by default. This PR migrates the entirepr-checksproject to ESM.Risk assessment
For internal use only. Please select the risk level of this change:
Which use cases does this change impact?
Environments:
How did/will you validate this change?
.test.tsfiles).If something goes wrong after this change is released, what are the mitigation and rollback strategies?
How will you know if something goes wrong after this change is released?
Are there any special considerations for merging or releasing this change?
Merge / deployment checklist