Skip to content

Upgrade Node.js requirement from v20 to v22#931

Merged
PeterDaveHello merged 1 commit intoChatGPTBox-dev:masterfrom
PeterDaveHello:Update-node.js-version
Feb 28, 2026
Merged

Upgrade Node.js requirement from v20 to v22#931
PeterDaveHello merged 1 commit intoChatGPTBox-dev:masterfrom
PeterDaveHello:Update-node.js-version

Conversation

@PeterDaveHello
Copy link
Member

@PeterDaveHello PeterDaveHello commented Feb 28, 2026

User description

GitHub Copilot PR summary:

This pull request updates the project's Node.js version requirements from 20 to 22 across the codebase, documentation, and CI/CD workflows. This ensures consistency in development, testing, and deployment environments, and helps avoid compatibility issues.

Node.js version upgrade:

  • Updated Node.js version requirement to 22 in all GitHub Actions workflow files, including pr-tests.yml, pre-release-build.yml, tagged-release.yml, and verify-configs.yml. [1] [2] [3] [4]
  • Added .nvmrc file specifying Node.js version 22 for local development environment consistency.
  • Updated the engines field in package.json to require Node.js version 22 or above.

Documentation update:

  • Changed build troubleshooting instructions in AGENTS.md to specify Node.js 22+ as the required version.

PR Type

Enhancement


Description

  • Update Node.js version requirement from v20 to v22

  • Modify all GitHub Actions workflows to use Node 22

  • Add .nvmrc file for local development consistency

  • Update documentation and package.json engines field


Diagram Walkthrough

flowchart LR
  A["Node.js v20"] -->|upgrade| B["Node.js v22"]
  B --> C["GitHub Actions Workflows"]
  B --> D["package.json engines"]
  B --> E[".nvmrc file"]
  B --> F["AGENTS.md documentation"]
Loading

File Walkthrough

Relevant files
Configuration changes
pr-tests.yml
Update Node.js version to 22                                                         

.github/workflows/pr-tests.yml

  • Updated node-version from 20 to 22 in setup-node action
+1/-1     
pre-release-build.yml
Update Node.js version to 22                                                         

.github/workflows/pre-release-build.yml

  • Updated node-version from 20 to 22 in setup-node action
+1/-1     
tagged-release.yml
Update Node.js version to 22                                                         

.github/workflows/tagged-release.yml

  • Updated node-version from 20 to 22 in setup-node action
+1/-1     
verify-configs.yml
Update Node.js version to 22                                                         

.github/workflows/verify-configs.yml

  • Updated node-version from 20 to 22 in setup-node action
+1/-1     
.nvmrc
Add .nvmrc with Node.js version 22                                             

.nvmrc

  • Created new file specifying Node.js version 22
  • Enables automatic version switching for nvm/fnm users
+1/-0     
package.json
Add engines field requiring Node 22+                                         

package.json

  • Added engines field specifying Node.js version >=22
  • Ensures npm enforces minimum Node.js version during installation
+3/-0     
Documentation
AGENTS.md
Update documentation to Node 22+ requirement                         

AGENTS.md

  • Updated build troubleshooting documentation to specify Node 22+
    requirement
  • Changed from "Node 20+" to "Node 22+" in build failure guidance
+1/-1     

Summary by CodeRabbit

  • Chores
    • Updated minimum Node.js version requirement to 22.x across development, CI/CD workflows, and runtime configurations.

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>
@gemini-code-assist
Copy link

Summary of Changes

Hello, 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

  • Node.js Version Upgrade: The project's Node.js version requirement has been updated from v20 to v22 across various configuration files and documentation.
  • .nvmrc File Added: A new .nvmrc file was introduced to specify Node.js version 22, ensuring consistency for local development environments.
  • Package Configuration Updated: The engines field in package.json and package-lock.json was updated to enforce Node.js version 22 or above.
  • Documentation Refreshed: Build troubleshooting instructions in AGENTS.md were updated to reflect the new Node.js 22+ requirement.

🧠 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
  • .nvmrc
    • Added a new file specifying Node.js version 22.
  • AGENTS.md
    • Updated the required Node.js version from '20+' to '22+' in the build troubleshooting section.
  • package-lock.json
    • Added the 'engines' field to specify a minimum Node.js version of '>=22'.
  • package.json
    • Added the 'engines' field to specify a minimum Node.js version of '>=22'.
Ignored Files
  • Ignored by pattern: .github/workflows/** (4)
    • .github/workflows/pr-tests.yml
    • .github/workflows/pre-release-build.yml
    • .github/workflows/tagged-release.yml
    • .github/workflows/verify-configs.yml
Activity
  • No human activity has been recorded on this pull request yet.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 28, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info

Configuration used: defaults

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 817c8de and 6895f6c.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (7)
  • .github/workflows/pr-tests.yml
  • .github/workflows/pre-release-build.yml
  • .github/workflows/tagged-release.yml
  • .github/workflows/verify-configs.yml
  • .nvmrc
  • AGENTS.md
  • package.json

📝 Walkthrough

Walkthrough

This 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

Cohort / File(s) Summary
GitHub Actions Workflows
.github/workflows/pr-tests.yml, .github/workflows/pre-release-build.yml, .github/workflows/tagged-release.yml, .github/workflows/verify-configs.yml
Updated Node.js version from 20 to 22 in setup-node steps across all CI/CD workflows.
Configuration Files
.nvmrc, package.json
Added .nvmrc file specifying Node.js 22 and added engines field to package.json requiring Node.js >=22.
Documentation
AGENTS.md
Updated build guidance to reflect Node.js 22+ requirement (previously 20+).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Suggested labels

dependencies, github_actions, Review effort 2/5

Poem

🐰 Version twenty, now twenty-two,
Node bounces on, forever new,
Workflows spring with modern might,
.nvmrc shines so bright! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately and concisely describes the main change: upgrading the Node.js requirement from v20 to v22 across the entire project.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-code-review
Copy link
Contributor

PR Compliance Guide 🔍

Below is a summary of compliance checks for this PR:

Security Compliance
🟢
No security concerns identified No security vulnerabilities detected by AI analysis. Human verification advised for critical code.
Ticket Compliance
🎫 No ticket provided
  • Create ticket/issue
Codebase Duplication Compliance
Codebase context is not defined

Follow the guide to enable codebase context checks.

Custom Compliance
🟢
Generic: Comprehensive Audit Trails

Objective: To create a detailed and reliable record of critical system actions for security analysis
and compliance.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Meaningful Naming and Self-Documenting Code

Objective: Ensure all identifiers clearly express their purpose and intent, making code
self-documenting

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Robust Error Handling and Edge Case Management

Objective: Ensure comprehensive error handling that provides meaningful context and graceful
degradation

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Error Handling

Objective: To prevent the leakage of sensitive system information through error messages while
providing sufficient detail for internal debugging.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Secure Logging Practices

Objective: To ensure logs are useful for debugging and auditing without exposing sensitive
information like PII, PHI, or cardholder data.

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Generic: Security-First Input Validation and Data Handling

Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent
vulnerabilities

Status: Passed

Learn more about managing compliance generic rules or creating your own custom rules

Compliance status legend 🟢 - Fully Compliant
🟡 - Partial Compliant
🔴 - Not Compliant
⚪ - Requires Further Human Verification
🏷️ - Compliance label

@qodo-code-review
Copy link
Contributor

PR Code Suggestions ✨

Explore these optional code suggestions:

CategorySuggestion                                                                                                                                    Impact
General
Restrict Node.js engine to v22

In package.json, change the engines.node version from ">=22" to "22" to restrict
it to the v22 line, preventing potential issues with future major Node.js
versions.

package.json [3-5]

 "engines": {
-  "node": ">=22"
+  "node": "22"
 },
  • Apply / Chat
Suggestion importance[1-10]: 6

__

Why: The suggestion correctly points out that ">=22" is too permissive and could lead to future compatibility issues, proposing a stricter "22" which aligns with the CI and .nvmrc configurations for better stability.

Low
Use semver wildcard for patch updates

In GitHub Actions, change node-version: 22 to node-version: '22.x' for better
clarity in using the latest patch version.

.github/workflows/pr-tests.yml [35]

-node-version: 22
+node-version: '22.x'
  • Apply / Chat
Suggestion importance[1-10]: 2

__

Why: While using '22.x' is more explicit, the actions/setup-node action already interprets 22 as the latest patch version of Node 22, making this a minor stylistic improvement with no functional change.

Low
  • More

Copy link

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

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 .nvmrc for 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.

@PeterDaveHello PeterDaveHello merged commit edebfa2 into ChatGPTBox-dev:master Feb 28, 2026
6 checks passed
@PeterDaveHello PeterDaveHello deleted the Update-node.js-version branch February 28, 2026 09:32
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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"

Choose a reason for hiding this comment

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

medium

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.

Suggested change
"node": ">=22"
"node": "^22.0.0"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants