feat!: drop support for Node 18 and 20 - #324
Open
cryptodev-2s wants to merge 2 commits into
Open
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Mirrors MetaMask/core#9976, the bottom of core's foundational stack. BREAKING: the supported range moves from ^18.18 || ^20.14 || >=22 to ^22.14.0 || ^24, the same range core adopts. The CI matrix drops to 22 and 24, and constraints.pro is updated to match. This lands before the TypeScript and target/lib changes on purpose. Core sequenced its stack Node, then ESM, then TypeScript, then target/lib, and that order is a dependency chain rather than an arbitrary grouping: raising the runtime floor first is what justifies each step above it, and emitting a higher target is only defensible once the floor guarantees it.
Follows from the runtime floor moving to Node 22. Core makes the same bump in the same PR as its Node drop (MetaMask/core#9976), rather than alongside the TypeScript change, since the types track the supported runtime.
cryptodev-2s
force-pushed
the
migrate/pr2j-drop-node-18-20
branch
from
September 7, 2026 12:31
9118100 to
8f5fc35
Compare
cryptodev-2s
force-pushed
the
migrate/pr2j-drop-node-18-20
branch
from
September 7, 2026 12:31
9118100 to
8f5fc35
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Top of stack #315, on #323. Mirrors MetaMask/core#9976, the bottom of core's foundational stack.
Breaking
engines.node^18.18 || ^20.14 || >=22^22.14.0 || ^24constraints.prois updated to match, soyarn constraintsenforces the new range.Why this one before TypeScript and target/lib
Core sequenced its stack Node → ESM → TypeScript → target/lib, and that order is a dependency chain rather than an arbitrary grouping. Raising the runtime floor first is what justifies each step above it, and bumping the emit target is only defensible once the floor guarantees the runtime supports it.
The remaining two land in that order after this.
Note
Medium Risk
Breaking semver change drops Node 18/20 for all consumers; runtime library code is unchanged, so risk is mainly adoption and CI coverage on 24.x.
Overview
Breaking: Supported Node versions are narrowed from
^18.18 || ^20.14 || >=22to^22.14.0 || ^24, aligned with MetaMask core.package.jsonengines.nodeandconstraints.proenforce the new range viayarn constraints. Dev typings move from@types/node~18 to ^22.13.14 (lockfile updatesundici-typesaccordingly). CIprepare,test, andcompatibility-testmatrices now run on 22.x and 24.x only (18 and 20 removed). The unreleased changelog documents the breaking change.Reviewed by Cursor Bugbot for commit 8f5fc35. Bugbot is set up for automated code reviews on this repo. Configure here.