Skip to content

chore!: Drop Node 18 and 20#9168

Draft
FrederikBolding wants to merge 7 commits into
mainfrom
fb/drop-node-18-and-20
Draft

chore!: Drop Node 18 and 20#9168
FrederikBolding wants to merge 7 commits into
mainfrom
fb/drop-node-18-and-20

Conversation

@FrederikBolding

@FrederikBolding FrederikBolding commented Jun 17, 2026

Copy link
Copy Markdown
Member

Explanation

Node 18 and 20 are EOL, we should not support them anymore. This PR makes a breaking change to every single package in the monorepo. This also reduces the number of jobs we need to run in CI.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Comment on lines +142 to 193
name: Test (22.x)
runs-on: ubuntu-latest
needs: prepare
strategy:
matrix:
package-name: ${{ fromJson(needs.prepare.outputs.child-workspace-package-names) }}
steps:
- name: Checkout and setup environment
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: false
node-version: 20.x
node-version: 22.x
- run: yarn workspace ${{ matrix.package-name }} run test
- name: Require clean working directory
shell: bash
run: |
if ! git diff --exit-code; then
echo "Working tree dirty at end of job"
exit 1
fi

test-22:
name: Test (22.x)
test-24:
name: Test (24.x)
runs-on: ubuntu-latest
needs: prepare
strategy:
matrix:
package-name: ${{ fromJson(needs.prepare.outputs.child-workspace-package-names) }}
steps:
- name: Checkout and setup environment
Comment thread package.json Outdated
},
"engines": {
"node": "^18.18 || >=20"
"node": ">=22"

@Mrtenz Mrtenz Jun 17, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Staged publishing needs at least 22.14.0 IIRC. We also don't need to support Node.js 23 and 25 (both EOL). We can support 26 (current, soon LTS) though:

Suggested change
"node": ">=22"
"node": "^22.14.0 || ^24 || >=26"

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was under the impression we wouldn't want to support 26 until it is LTS.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a reason to not support it? It's the current version. AFAIK we supported 24 before it was LTS too in some other repositories too.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to use 26 for build and lint then?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, might as well.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Comment on lines 172 to +197
@@ -182,8 +182,8 @@ jobs:
exit 1
fi

test-22:
name: Test (22.x)
test-26:
name: Test (26.x)
runs-on: ubuntu-latest
needs: prepare
strategy:
@@ -194,7 +194,7 @@ jobs:
uses: MetaMask/action-checkout-and-setup@v2
with:
is-high-risk-environment: false
node-version: 22.x
node-version: 26.x
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.

3 participants