Upgrade Node.js requirement from v20 to v22#931
Upgrade Node.js requirement from v20 to v22#931PeterDaveHello merged 1 commit intoChatGPTBox-dev:masterfrom
Conversation
Node.js v20 (Iron) will reach end-of-life on April 30, 2026. So we do the follow works: - Update all GitHub Actions workflows to use node-version: 22 - Add engines field to package.json requiring Node >=22 - Update AGENTS.md to document Node 22+ requirement - Add .nvmrc with version 22 for nvm/fnm users Ref: https://github.com/nodejs/Release Co-authored-by: kiloconnect[bot] <240665456+kiloconnect[bot]@users.noreply.github.com>
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request standardizes the Node.js version used across the project by upgrading the minimum required version from 20 to 22. This change impacts development environments, build processes, and documentation, ensuring all components are aligned with the latest supported Node.js LTS release. The update aims to prevent compatibility issues and leverage improvements in the newer Node.js version. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Ignored Files
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: defaults Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR upgrades the Node.js runtime version requirement from 20 to 22 across all CI/CD workflows, configuration files, and documentation. Changes include updating four GitHub Actions workflow files, adding an .nvmrc file, specifying the engine requirement in package.json, and updating build documentation. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Compliance Guide 🔍Below is a summary of compliance checks for this PR:
Compliance status legend🟢 - Fully Compliant🟡 - Partial Compliant 🔴 - Not Compliant ⚪ - Requires Further Human Verification 🏷️ - Compliance label |
|||||||||||||||||||||||
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||
There was a problem hiding this comment.
Pull request overview
This PR upgrades the project’s Node.js requirement to v22 to keep local development, documentation, and CI workflows aligned on a single supported runtime.
Changes:
- Set
package.json(and lockfile metadata) to require Node.js>=22. - Added
.nvmrcfor local environment alignment on Node 22. - Updated GitHub Actions workflows and troubleshooting docs to use/reference Node 22.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Adds an engines.node constraint of >=22. |
| package-lock.json | Updates root package metadata to include engines.node >=22. |
| AGENTS.md | Updates troubleshooting guidance to reflect Node 22+ requirement. |
| .nvmrc | Pins local Node version to 22. |
| .github/workflows/verify-configs.yml | Runs verification job using Node 22. |
| .github/workflows/tagged-release.yml | Uses Node 22 for release build steps. |
| .github/workflows/pre-release-build.yml | Uses Node 22 for pre-release build pipeline. |
| .github/workflows/pr-tests.yml | Uses Node 22 for PR tests/lint/build. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Code Review
This pull request correctly upgrades the project's Node.js requirement from v20 to v22. The changes are consistently applied across package.json, .nvmrc, and documentation. I have one suggestion for package.json to use a more specific version range for the node engine to improve long-term stability and prevent potential issues with future major Node.js releases.
| { | ||
| "name": "chatgptbox", | ||
| "engines": { | ||
| "node": ">=22" |
There was a problem hiding this comment.
Using >=22 for the node engine is a bit too broad and might cause issues with future major Node.js versions (e.g., v23) that could introduce breaking changes. It's generally safer to restrict the version to the current major release. I suggest using a caret range like ^22.0.0 to allow for minor and patch updates within version 22 while preventing automatic adoption of future major versions.
| "node": ">=22" | |
| "node": "^22.0.0" |
User description
GitHub Copilot PR summary:
PR Type
Enhancement
Description
Update Node.js version requirement from v20 to v22
Modify all GitHub Actions workflows to use Node 22
Add
.nvmrcfile for local development consistencyUpdate documentation and
package.jsonengines fieldDiagram Walkthrough
File Walkthrough
pr-tests.yml
Update Node.js version to 22.github/workflows/pr-tests.yml
node-versionfrom 20 to 22 in setup-node actionpre-release-build.yml
Update Node.js version to 22.github/workflows/pre-release-build.yml
node-versionfrom 20 to 22 in setup-node actiontagged-release.yml
Update Node.js version to 22.github/workflows/tagged-release.yml
node-versionfrom 20 to 22 in setup-node actionverify-configs.yml
Update Node.js version to 22.github/workflows/verify-configs.yml
node-versionfrom 20 to 22 in setup-node action.nvmrc
Add .nvmrc with Node.js version 22.nvmrc
package.json
Add engines field requiring Node 22+package.json
enginesfield specifying Node.js version >=22AGENTS.md
Update documentation to Node 22+ requirementAGENTS.md
requirement
Summary by CodeRabbit