Skip to content

Build a version compatible with Node.js 24#199

Merged
benbalter merged 5 commits intomainfrom
copilot/build-compatibility-nodejs-24
Mar 16, 2026
Merged

Build a version compatible with Node.js 24#199
benbalter merged 5 commits intomainfrom
copilot/build-compatibility-nodejs-24

Conversation

Copy link
Contributor

Copilot AI commented Mar 16, 2026

Summary

Updates the project to be fully compatible with Node.js 24 by updating the runtime, tooling configuration, and dependencies.

Changes

Runtime & Tooling

  • action.yml: Updated runtime from node20 to node22 (the latest GitHub Actions-supported runtime)
  • .tool-versions: Updated from nodejs 16.17.0 to nodejs 24.14.0
  • CI workflows (ci.yml, build.yml): Updated node-version from 16 to 24

Dependencies

  • TypeScript: Updated from >=3.3.1, <4.10.0 to ^5.0.0 (resolved: 5.9.3)
  • @types/node: Updated from ^18.7.13 to ^22.0.0 (resolved: 22.19.15)
  • Jest: Updated from ^28.1.3 to ^29.0.0 (resolved: 29.7.0)
  • ts-jest: Updated from ^28.0.8 to ^29.0.0 (eliminates TypeScript 5.x compatibility warning)
  • babel-jest: Updated from ^28.1.3 to ^29.0.0
  • prettier: Updated from 2.8.3 to ^3.0.0 (required by eslint-plugin-prettier@5.x)
  • eslint-plugin-prettier: Added as explicit devDependency (^5.0.0) — previously only a transitive dependency of eslint-plugin-github, but npm couldn't hoist it due to the prettier 2.x peer dependency mismatch
  • eslint-config-prettier: Added as explicit devDependency (^10.0.0)

Build Output

  • Rebuilt dist/index.js with the updated toolchain
  • Applied prettier 3 trailing comma formatting to source and test files

Testing

All 33 existing tests pass successfully on Node.js 24. No test changes were required beyond prettier 3 formatting.

Security Summary

No security vulnerabilities were discovered in the updated dependencies. All dependency versions were checked against the GitHub Advisory Database.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

- Update action.yml runtime from node20 to node22
- Update .tool-versions from nodejs 16.17.0 to 24.14.0
- Update CI workflows to use node-version 24
- Update TypeScript from <4.10.0 to ^5.0.0
- Update @types/node from ^18 to ^22
- Update Jest from ^28 to ^29 and ts-jest from ^28 to ^29
- Rebuild dist/index.js with updated dependencies

Co-authored-by: benbalter <282759+benbalter@users.noreply.github.com>
Copilot AI linked an issue Mar 16, 2026 that may be closed by this pull request
Copilot AI requested a review from benbalter March 16, 2026 18:56
@benbalter benbalter marked this pull request as ready for review March 16, 2026 19:02
Copilot AI review requested due to automatic review settings March 16, 2026 19:02
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the project for Node.js 24 compatibility by bumping the runtime, CI node versions, and dev dependencies (TypeScript 5, Jest 29, etc.).

Changes:

  • Updated action.yml runtime from node20 to node22 and .tool-versions/CI workflows from Node 16 to 24
  • Bumped dev dependencies (TypeScript, Jest, ts-jest, babel-jest, @types/node) to versions compatible with Node.js 24

Reviewed changes

Copilot reviewed 5 out of 7 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Bumped dev dependency versions for Node 24 compatibility
action.yml Changed GitHub Actions runtime to node22
.tool-versions Updated local Node.js version to 24.14.0
.github/workflows/ci.yml Updated CI node-version from 16 to 24
.github/workflows/build.yml Updated build node-version from 16 to 24

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

You can also share your feedback on Copilot code review. Take the survey.

@benbalter
Copy link
Collaborator

@copilot fix failing tests

…cit dependency

The eslint-plugin-github@4.10.2 depends on eslint-plugin-prettier@5.x which
requires prettier>=3.0.0. With prettier 2.x, npm couldn't hoist the plugin
to the top-level node_modules where ESLint could find it.

- Update prettier from 2.8.3 to ^3.0.0
- Add eslint-plugin-prettier and eslint-config-prettier as explicit devDeps
- Apply prettier 3 trailing comma formatting to source and test files
- Rebuild dist/index.js

Co-authored-by: benbalter <282759+benbalter@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Mar 16, 2026

@copilot fix failing tests

Fixed in a07e01c. The CI failure was caused by ESLint not finding eslint-plugin-prettier — the eslint-plugin-github@4.10.2 (resolved from ^4.3.7) now depends on eslint-plugin-prettier@5.x which requires prettier>=3.0.0. With prettier: "2.8.3", npm couldn't hoist the plugin to the top-level node_modules/ where ESLint looks for it.

Changes:

  • Updated prettier from 2.8.3 to ^3.0.0
  • Added eslint-plugin-prettier and eslint-config-prettier as explicit devDependencies
  • Applied prettier 3 trailing comma formatting to source and test files

Full CI pipeline (build → format → lint → package → test) passes locally with all 33 tests green.

Copilot AI requested a review from benbalter March 16, 2026 19:30
Copilot AI and others added 3 commits March 16, 2026 19:42
Co-authored-by: benbalter <282759+benbalter@users.noreply.github.com>
…tions-workflow

Fix CI failure: mock `setFailed` to prevent `process.exitCode=1` in tests
@benbalter benbalter merged commit c93cb0b into main Mar 16, 2026
4 checks passed
@benbalter benbalter deleted the copilot/build-compatibility-nodejs-24 branch March 16, 2026 19:51
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.

Build a version compatible with nodejs 24

3 participants