Skip to content

Update Node.js version and GitHub Actions to latest versions - #251

Open
MangelMaxime wants to merge 3 commits into
devfrom
claude/intelligent-newton-8g3hmz
Open

MangelMaxime wants to merge 3 commits into
devfrom
claude/intelligent-newton-8g3hmz

Conversation

@MangelMaxime

Copy link
Copy Markdown
Member

Summary

This PR modernizes the project's Node.js tooling and CI/CD configuration by upgrading to the latest versions of GitHub Actions and Node.js 22, while simplifying version management through a .nvmrc file.

Key Changes

  • Upgraded GitHub Actions from v2 to v4 for both checkout and setup-node
  • Updated Node.js version from 14 to 22 via new .nvmrc file
  • Switched to node-version-file configuration in GitHub Actions to read version from .nvmrc
  • Removed hardcoded Node.js version constraint from package.json engines field
  • Removed manual npm v7 installation step (no longer needed with modern Node.js)
  • Updated package-lock.json to reflect dependency changes

Implementation Details

  • The .nvmrc file now serves as the single source of truth for the Node.js version across both local development and CI/CD environments
  • This approach is more maintainable than duplicating version information across multiple configuration files
  • Modern GitHub Actions versions provide better performance and security
  • Node.js 22 includes significant improvements and is the current LTS/stable version

https://claude.ai/code/session_014dzXtVc5r3a91n9yGBzit6

claude added 3 commits October 6, 2026 13:52
Dependabot bumps (browserslist #244, @babel/core #249) pulled in
node-releases@2.0.57, which requires node >=18. With engine-strict=true,
npm install failed with EBADENGINE on the Node 14 / npm 7 runners.

Switch CI and Publish to Node 22 (bundled npm), bump checkout/setup-node
to v4, and raise the engines.node floor to match.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014dzXtVc5r3a91n9yGBzit6
Use setup-node's node-version-file so the Node version lives in one
place. setup-node reads volta.node first, so pin it there to 22 and keep
engines.node as the minimum supported version for local development.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014dzXtVc5r3a91n9yGBzit6
.nvmrc is read by setup-node, nvm, fnm and mise, so it is a more
standard single source of truth than a volta field in package.json.

Drop the engines field: it mainly kept npm 6 (which would rewrite the
v2 lockfile) out, which is no longer relevant.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014dzXtVc5r3a91n9yGBzit6

This branch has not been deployed

No deployments
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.

2 participants