feat!: drop support for Node 18 and 20 - #328
Open
cryptodev-2s wants to merge 2 commits into
Open
Conversation
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.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
Author
|
@metamaskbot publish-preview |
Contributor
|
The following preview build has been published: |
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.
Replaces #324, which GitHub auto-closed as merged during a stack reorder when its head briefly became an ancestor of its base. The changes never reached
main; this carries the same two commits.Mirrors MetaMask/core#9976, the bottom of core's foundational stack.
engines.node^18.18 || ^20.14 || >=22^22.14.0 || ^24@types/node~18.18.14^22.13.14constraints.prois updated soyarn constraintsenforces the new range. Core makes the@types/nodebump in this same PR rather than with its TypeScript change, since the types track the supported runtime.Position in the stack
This now sits below the ESM conversion (#323), so everything up to and including this PR is still a hybrid CJS/ESM build:
That matters for testing. A preview build from here still resolves through
main: ./dist/index.cjswith therequirecondition intact, so it can be consumed bymetamask-extensionas-is. Everything below the ESM cut can therefore be verified against a real downstream consumer before the breaking change lands.Note
Medium Risk
Semver-breaking platform drop affects any consumer still on Node 18 or 20, though the diff touches only metadata, constraints, CI, and types—not runtime library code.
Overview
Breaking: Supported Node is now
^22.14.0 || ^24(aligned with MetaMask core), replacing^18.18 || ^20.14 || >=22.package.jsonengines.nodeand Yarnconstraints.proenforcement are updated together. Dev dependency@types/nodemoves from~18.18.14to^22.13.14, with matchingyarn.lockupdates (undici-typesfollows).CI in
build-lint-test.ymlnow runs prepare, test, and compatibility-test on 22.x and 24.x only (18 and 20 removed). The unreleased changelog documents the breaking change.Reviewed by Cursor Bugbot for commit c44fd50. Bugbot is set up for automated code reviews on this repo. Configure here.