-
Notifications
You must be signed in to change notification settings - Fork 5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: update node to v22.12 #28368
base: main
Are you sure you want to change the base?
build: update node to v22.12 #28368
Conversation
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
Builds ready [48d757f]
Page Load Metrics (1833 ± 77 ms)
Bundle size diffs
|
48d757f
to
b0dcd1e
Compare
Builds ready [b0dcd1e]
Page Load Metrics (1613 ± 38 ms)
Bundle size diffs
|
b0dcd1e
to
39cbf78
Compare
.circleci/config.yml
Outdated
@@ -3,13 +3,13 @@ version: 2.1 | |||
executors: | |||
node-browsers-small: | |||
docker: | |||
- image: cimg/node:20.17-browsers | |||
- image: cimg/node:current-browsers |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use current
. Tests must always be as deterministic as possible.
39cbf78
to
14d098e
Compare
Builds ready [14d098e]
Page Load Metrics (1940 ± 53 ms)
Bundle size diffs
|
Pull request was converted to draft
@davidmurdoch in |
It uses from the docs:
I benchmarked this on my local machine when I implemented it and it measurably was faster to use |
14d098e
to
5fb6104
Compare
Builds ready [5fb6104]
Page Load Metrics (1689 ± 76 ms)
Bundle size diffs
|
5fb6104
to
8d7e500
Compare
…t8Array`s before zipping (#29177) Use a copy of the Buffer via `Buffer.from(asset)`, as Zip will *consume* it, which breaks things if we are compiling for multiple browsers at once. `Buffer.from` uses the internal pool, so it's superior to `new Uint8Array` if we don't need to pass it off to a worker thread. Additionally, in Node.js 22+ a Buffer marked as "Untransferable" (like ours) can't be passed to a worker, which `AsyncZipDeflate` uses. See: 101arrowz/fflate#227 (comment) This can probably be simplified to `zipFile.push(Buffer.from(asset), true);` if the above issue is resolved. This fix should hopefully unblock #28368 <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29177?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. -->
Builds ready [8d7e500]
Page Load Metrics (1665 ± 71 ms)
Bundle size diffs
|
I think this PR should also update |
…t8Array`s before zipping (#29177) Use a copy of the Buffer via `Buffer.from(asset)`, as Zip will *consume* it, which breaks things if we are compiling for multiple browsers at once. `Buffer.from` uses the internal pool, so it's superior to `new Uint8Array` if we don't need to pass it off to a worker thread. Additionally, in Node.js 22+ a Buffer marked as "Untransferable" (like ours) can't be passed to a worker, which `AsyncZipDeflate` uses. See: 101arrowz/fflate#227 (comment) This can probably be simplified to `zipFile.push(Buffer.from(asset), true);` if the above issue is resolved. This fix should hopefully unblock #28368 <!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. ## **Description** <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/29177?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Go to this page... 2. 3. ## **Screenshots/Recordings** ### **Before** ### **After** ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. -->
8d7e500
to
613236d
Compare
New and removed dependencies detected. Learn more about Socket for GitHub ↗︎
🚮 Removed packages: npm/@tsconfig/[email protected] |
@davidmurdoch good call, done |
Builds ready [613236d]
Page Load Metrics (1607 ± 85 ms)
Bundle size diffs
|
Description
Node LTS just moved to 22, let's start using it.
Keeping this as-is in package.json for now:
"node": ">= 20",
Was previously blocked by 101arrowz/fflate#227
Just merged this and now it's unblocked #29177