chore: bump minimum required Node.js version from 18 to 22 - #915
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
WalkthroughThe project now targets Node.js 22. Package requirements and Node.js type definitions were updated. Docker stages and CI workflows now use Node.js 22. The lint workflow also installs native canvas build dependencies. ChangesNode.js 22 Upgrade
Estimated code review effort: 1 (Trivial) | ~3 minutes Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
There was a problem hiding this comment.
I found one blocking CI/runtime consistency issue.
This PR raises the declared/runtime target to Node 22 in package.json, the Dockerfile, and the lint workflow, but .github/workflows/integrate.yaml still runs the full ci_to_main job inside node:20-bookworm (including npm install, npx tsc, npm ci, and npm test). After this change, that job would still be validating Node 20 even though the package now declares engines.node >=22.0.0, so the main integration test path can miss Node-22-specific failures and no longer matches the supported runtime.
Please update the integration workflow container (and its comment) to Node 22 as well, so all CI/runtime paths agree on the new minimum.
Verification performed on the current head:
- GitHub checks for
d4e2ae0a14b6d9d7a0f72852f6985a3c84886679: CodeQL, Analyze, Lint, andci_to_mainare green. - Local Node:
v22.22.2/ npm10.9.7. npm ci --ignore-scripts,npx tsc --noEmit, andnpm run lintpassed.- Full local
npm ci/ tests were blocked by missing system canvas build deps on this runner, so I relied on the GitHub CI result for full install/test coverage.
Summary
package.json(engines), theDockerfile(both build and production stages), and the CI lint workflow.@types/nodefrom^20.16.15to^22.10.5to match the new Node engine version and get accurate type definitions for Node 22.Why
Node 18 has reached end-of-life. This also unblocks upgrading the
invoiceslibrary, whose latest release (6.0.0) requires Node >= 22.Changes
package.json:engines.node>=18.0.0→>=22.0.0;@types/node^20.16.15→^22.10.5Dockerfile:node:20-alpine→node:22-alpine(builder and production stages).github/workflows/code-linter.yaml:node-version18.x→22.xTesting
npm ci— installs cleanly on Node 22npx tsc --noEmit— no type errorsnpm run lint— no lint errors/selland/buyflows end-to-end running on Node 22process.exit, URL parsing, V8/Intl, npm behavior, native module ABI forcanvas, etc.) — no functional breakage found.@types/nodewas the only actionable gap, now fixed by this PR.Summary by CodeRabbit