feat!: drop support for Node.js 20, require 22.13.0+ - #8356
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe project minimum Node.js version was raised to 22.13.0, with CI and TypeScript configuration updated accordingly. Documentation and package metadata reflect the new requirement. ESM tests now load package metadata through Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
❌ Deploy Preview for steady-pastelito-09e39e failed.
|
📊 Benchmark resultsComparing with f214e69
|
| // The docs recommend turning this off when running tests to generate precise coverage | ||
| if (process.env.NODE_ENV === 'test') return | ||
|
|
||
| // TODO(serhalp): Consider enabling unconditionally now that we require Node.js 22.12.0+. |
There was a problem hiding this comment.
This would have been a hard-break for 100% of users that are on an older Node.js version, for almost no benefit (deleting two lines of code), so I deferred.
Node.js 20 reached End-of-Life (EOL) in April 2026, three months ago. We require 22.12.0+ specifically because that version added `require(esm)` support. Many of our own packages that Netlify CLI depends on as well as much of the community has been requiring 22.12.0+ in order to modernize and slim down dependency trees.
372db1d to
7e168dd
Compare
| import execa from 'execa' | ||
| import { expect, test } from 'vitest' | ||
|
|
||
| import pkg from '../../package.json' |
There was a problem hiding this comment.
We can switch these to with {type: 'json'} now in theory, but we need to upgrade prettier first.
🤖 I have created a release *beep* *boop* --- ## [27.0.0](v26.2.0...v27.0.0) (2026-07-24) ### ⚠ BREAKING CHANGES * **cli:** document exit codes, usage errors use exit code 2 ([#8329](#8329)) * drop support for Node.js 20, require 22.13.0+ ([#8356](#8356)) ### Features * **cli:** document exit codes, usage errors use exit code 2 ([#8329](#8329)) ([9098467](9098467)) * drop support for Node.js 20, require 22.13.0+ ([#8356](#8356)) ([8943e38](8943e38)) ### Bug Fixes * **cli:** piped --help no longer glues flag names to descriptions ([#8330](#8330)) ([4b87cc7](4b87cc7)) * **init:** fix handling of gitlab repos ([#7945](#7945)) ([f214e69](f214e69)) --- This PR was generated with [Release Please](https://github.com/googleapis/release-please). See [documentation](https://github.com/googleapis/release-please#release-please). Co-authored-by: token-generator-app[bot] <82042599+token-generator-app[bot]@users.noreply.github.com>
Summary
BREAKING: Node.js 20 is no longer supported. 22.13.0 is now the minimum supported version.
Node.js 20 reached End-of-Life (EOL) in April 2026, three months ago.
We require 22.13.0+ specifically because 22.12.0 added
require(esm)support. Many of our own packages that Netlify CLI depends on as well as much of the community has been requiring 22.12.0+ in order to modernize and slim down dependency trees. (We go one further to 22.13.0 because a dependency in our tree already requires^20.19.0 || ^22.13.0 || >=24and cannot be removed or downgraded at this time.)