From 9f366881d69866a635c7b9978901c26b7ce3f92b Mon Sep 17 00:00:00 2001 From: Elliot Winkler Date: Thu, 16 Jan 2025 12:22:47 -0700 Subject: [PATCH 1/3] Use dev Node to check for unsupported Node builtins in tests (#5158) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The `n/no-unsupported-features/es-builtins`, `n/no-unsupported-features/es-syntax`, and `n/no-unsupported-features/node-builtins` ESLint rules ensure that production code is not using features of JavaScript that are unsupported by the expected version of Node. It does this by keeping track of which versions various features will become generally available and failing if the version of Node it sees does not match. By default, this rule uses `engines.node` to know which is the "expected version of Node". While that is fine for production code, we use a later version of Node — which is set to the current LTS version — for tests, and therefore we may be allowed to use features that were once experimental in previous versions. To fix this, this commit overrides the three `n/no-unsupported-features/*` rules to use the current LTS of Node for tests. --- eslint-warning-thresholds.json | 2 +- eslint.config.mjs | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/eslint-warning-thresholds.json b/eslint-warning-thresholds.json index 92cc78a3f7..5f8ce43766 100644 --- a/eslint-warning-thresholds.json +++ b/eslint-warning-thresholds.json @@ -16,7 +16,7 @@ "jsdoc/check-tag-names": 375, "jsdoc/require-returns": 22, "jsdoc/tag-lines": 328, - "n/no-unsupported-features/node-builtins": 18, + "n/no-unsupported-features/node-builtins": 4, "n/prefer-global/text-encoder": 4, "n/prefer-global/text-decoder": 4, "prettier/prettier": 115, diff --git a/eslint.config.mjs b/eslint.config.mjs index 2ed8169174..a82bd5c29d 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -3,6 +3,8 @@ import jest from '@metamask/eslint-config-jest'; import nodejs from '@metamask/eslint-config-nodejs'; import typescript from '@metamask/eslint-config-typescript'; +const NODE_LTS_VERSION = 22; + const config = createConfig([ ...base, { @@ -83,6 +85,11 @@ const config = createConfig([ 'jest/prefer-lowercase-title': 'warn', 'jest/prefer-strict-equal': 'warn', }, + settings: { + node: { + version: `^${NODE_LTS_VERSION}`, + }, + }, }, { // These files are test helpers, not tests. We still use the Jest ESLint From 0ff4a839b5498a507f03b3ffaaeacdc56527b6e1 Mon Sep 17 00:00:00 2001 From: Charly Chevalier Date: Thu, 16 Jan 2025 23:44:01 +0100 Subject: [PATCH 2/3] chore(accounts-controller): bump eth-snap-keyring to 8.1.0 (#5167) ## Explanation Bumping accounts-related dependencies. ## References N/A ## Changelog ### `@metamask/accounts-controller` - **CHANGED**: Bump `@metamask/eth-snap-keyring` from `^8.0.0` to `^8.1.0` ## 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 highlighted breaking changes using the "BREAKING" category above as appropriate - [ ] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes --- packages/accounts-controller/package.json | 2 +- yarn.lock | 25 ++++++++++++----------- 2 files changed, 14 insertions(+), 13 deletions(-) diff --git a/packages/accounts-controller/package.json b/packages/accounts-controller/package.json index dcc430634e..eb6d49cf8a 100644 --- a/packages/accounts-controller/package.json +++ b/packages/accounts-controller/package.json @@ -49,7 +49,7 @@ "dependencies": { "@ethereumjs/util": "^8.1.0", "@metamask/base-controller": "^7.1.1", - "@metamask/eth-snap-keyring": "^8.0.0", + "@metamask/eth-snap-keyring": "^8.1.0", "@metamask/keyring-api": "^13.0.0", "@metamask/keyring-internal-api": "^2.0.0", "@metamask/snaps-sdk": "^6.7.0", diff --git a/yarn.lock b/yarn.lock index f88317fe24..228d246861 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2262,7 +2262,7 @@ __metadata: "@ethereumjs/util": "npm:^8.1.0" "@metamask/auto-changelog": "npm:^3.4.4" "@metamask/base-controller": "npm:^7.1.1" - "@metamask/eth-snap-keyring": "npm:^8.0.0" + "@metamask/eth-snap-keyring": "npm:^8.1.0" "@metamask/keyring-api": "npm:^13.0.0" "@metamask/keyring-controller": "npm:^19.0.3" "@metamask/keyring-internal-api": "npm:^2.0.0" @@ -2878,16 +2878,16 @@ __metadata: languageName: node linkType: hard -"@metamask/eth-snap-keyring@npm:^8.0.0": - version: 8.0.0 - resolution: "@metamask/eth-snap-keyring@npm:8.0.0" +"@metamask/eth-snap-keyring@npm:^8.1.0": + version: 8.1.0 + resolution: "@metamask/eth-snap-keyring@npm:8.1.0" dependencies: "@ethereumjs/tx": "npm:^4.2.0" "@metamask/eth-sig-util": "npm:^8.1.2" "@metamask/keyring-api": "npm:^13.0.0" "@metamask/keyring-internal-api": "npm:^2.0.0" "@metamask/keyring-internal-snap-client": "npm:^2.0.0" - "@metamask/keyring-utils": "npm:^1.0.0" + "@metamask/keyring-utils": "npm:^1.1.0" "@metamask/snaps-controllers": "npm:^9.10.0" "@metamask/snaps-sdk": "npm:^6.7.0" "@metamask/snaps-utils": "npm:^8.3.0" @@ -2899,7 +2899,7 @@ __metadata: peerDependencies: "@metamask/keyring-api": ^13.0.0 "@metamask/providers": ^18.3.1 - checksum: 10/51bc9f703109acd662aac36986568cb25995307a2607f4634067cdd2353afda2eb620438993452f1376f6c7323660556df6c3e02c0c0b9e3dbe2d11d56d2a93f + checksum: 10/4b758f14540cf8ea892a80d8cf70234305e7f6978ab46dc58b727d6c6944d11dee22841fc17b22a7620662a5051ec189675f2dd06638733b9b1c3e8436c8b623 languageName: node linkType: hard @@ -3251,13 +3251,14 @@ __metadata: languageName: node linkType: hard -"@metamask/keyring-utils@npm:^1.0.0": - version: 1.0.0 - resolution: "@metamask/keyring-utils@npm:1.0.0" +"@metamask/keyring-utils@npm:^1.0.0, @metamask/keyring-utils@npm:^1.1.0": + version: 1.1.0 + resolution: "@metamask/keyring-utils@npm:1.1.0" dependencies: "@metamask/superstruct": "npm:^3.1.0" - "@metamask/utils": "npm:^9.3.0" - checksum: 10/f74f7343a7154b029e0fa4c25735c589eba4dc25a9e323d43b7c733ce5dbb23ce603a4f02aac455163993649ceeaf714b8b843985ba7a9cb00b926b3b8dc6b51 + "@metamask/utils": "npm:^11.0.1" + bitcoin-address-validation: "npm:^2.2.3" + checksum: 10/327eb37dcee41f47df212a9790672deec15c11692e370c15bb5687a2c90078b4d14dc61a9d7ce317e4bda03f18284731229feee19c1adae35bc859313da37ba5 languageName: node linkType: hard @@ -4092,7 +4093,7 @@ __metadata: languageName: node linkType: hard -"@metamask/utils@npm:^9.0.0, @metamask/utils@npm:^9.1.0, @metamask/utils@npm:^9.2.1, @metamask/utils@npm:^9.3.0": +"@metamask/utils@npm:^9.0.0, @metamask/utils@npm:^9.1.0, @metamask/utils@npm:^9.2.1": version: 9.3.0 resolution: "@metamask/utils@npm:9.3.0" dependencies: From 52d1c1688d2f82be9bceb64823722b596f147458 Mon Sep 17 00:00:00 2001 From: OGPoyraz Date: Fri, 17 Jan 2025 11:03:07 +0100 Subject: [PATCH 3/3] Release `284.0.0` (#5169) ## Explanation New RC for the `284.0.0` ## References ## Changelog ### `@metamask/message-manager@12.0.0` #### Changed - **BREAKING:** Base class of `DecryptMessageManager` and `EncryptionPublicKeyManager`(`AbstractMessageManager`) now expects new options to initialise ([#5103](https://github.com/MetaMask/core/pull/5103)) - Bump `@metamask/base-controller` from `^7.0.0` to `^7.1.0` ([#5079](https://github.com/MetaMask/core/pull/5079)) #### Removed - **BREAKING:** Removed internal event emitter (`hub` property) from `AbstractMessageManager` ([#5103](https://github.com/MetaMask/core/pull/5103)) - **BREAKING:** `unapprovedMessage` and `updateBadge` removed from internal events. These events are now emitted from messaging system ([#5103](https://github.com/MetaMask/core/pull/5103)) - Controllers should now listen to `DerivedManagerName:X` event instead of using internal event emitter. ### `@metamask/accounts-controller@21.0.1` #### Changed - Bump `@metamask/eth-snap-keyring` from `^8.0.0` to `^8.1.0` ([#5167](https://github.com/MetaMask/core/pull/5167)) ## 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 highlighted breaking changes using the "BREAKING" category above as appropriate - [ ] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes --------- Co-authored-by: Charly Chevalier --- package.json | 2 +- packages/accounts-controller/CHANGELOG.md | 9 ++++++++- packages/accounts-controller/package.json | 2 +- packages/assets-controllers/package.json | 2 +- packages/keyring-controller/package.json | 2 +- packages/message-manager/CHANGELOG.md | 5 ++++- packages/message-manager/package.json | 2 +- packages/profile-sync-controller/package.json | 2 +- packages/transaction-controller/package.json | 2 +- yarn.lock | 12 ++++++------ 10 files changed, 25 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 67464d8c8b..61ef6f9d5b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/core-monorepo", - "version": "283.0.0", + "version": "284.0.0", "private": true, "description": "Monorepo for packages shared between MetaMask clients", "repository": { diff --git a/packages/accounts-controller/CHANGELOG.md b/packages/accounts-controller/CHANGELOG.md index a6c0fd8aaf..d02cef8353 100644 --- a/packages/accounts-controller/CHANGELOG.md +++ b/packages/accounts-controller/CHANGELOG.md @@ -7,6 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [21.0.1] + +### Changed + +- Bump `@metamask/eth-snap-keyring` from `^8.0.0` to `^8.1.0` ([#5167](https://github.com/MetaMask/core/pull/5167)) + ## [21.0.0] ### Changed @@ -388,7 +394,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Initial release ([#1637](https://github.com/MetaMask/core/pull/1637)) -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@21.0.0...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@21.0.1...HEAD +[21.0.1]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@21.0.0...@metamask/accounts-controller@21.0.1 [21.0.0]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@20.0.2...@metamask/accounts-controller@21.0.0 [20.0.2]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@20.0.1...@metamask/accounts-controller@20.0.2 [20.0.1]: https://github.com/MetaMask/core/compare/@metamask/accounts-controller@20.0.0...@metamask/accounts-controller@20.0.1 diff --git a/packages/accounts-controller/package.json b/packages/accounts-controller/package.json index eb6d49cf8a..7d02f7b89f 100644 --- a/packages/accounts-controller/package.json +++ b/packages/accounts-controller/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/accounts-controller", - "version": "21.0.0", + "version": "21.0.1", "description": "Manages internal accounts", "keywords": [ "MetaMask", diff --git a/packages/assets-controllers/package.json b/packages/assets-controllers/package.json index d2daa3b1ca..4c4c8d5cd7 100644 --- a/packages/assets-controllers/package.json +++ b/packages/assets-controllers/package.json @@ -77,7 +77,7 @@ }, "devDependencies": { "@babel/runtime": "^7.23.9", - "@metamask/accounts-controller": "^21.0.0", + "@metamask/accounts-controller": "^21.0.1", "@metamask/approval-controller": "^7.1.2", "@metamask/auto-changelog": "^3.4.4", "@metamask/ethjs-provider-http": "^0.3.0", diff --git a/packages/keyring-controller/package.json b/packages/keyring-controller/package.json index d0f98e5f1c..a3cb4972ce 100644 --- a/packages/keyring-controller/package.json +++ b/packages/keyring-controller/package.json @@ -56,7 +56,7 @@ "@metamask/eth-simple-keyring": "^6.0.5", "@metamask/keyring-api": "^13.0.0", "@metamask/keyring-internal-api": "^2.0.0", - "@metamask/message-manager": "^11.0.3", + "@metamask/message-manager": "^12.0.0", "@metamask/utils": "^11.0.1", "async-mutex": "^0.5.0", "ethereumjs-wallet": "^1.0.1", diff --git a/packages/message-manager/CHANGELOG.md b/packages/message-manager/CHANGELOG.md index f9ca2a8819..0395cc7f3e 100644 --- a/packages/message-manager/CHANGELOG.md +++ b/packages/message-manager/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +## [12.0.0] + ### Changed - **BREAKING:** Base class of `DecryptMessageManager` and `EncryptionPublicKeyManager`(`AbstractMessageManager`) now expects new options to initialise ([#5103](https://github.com/MetaMask/core/pull/5103)) @@ -357,7 +359,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 All changes listed after this point were applied to this package following the monorepo conversion. -[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/message-manager@11.0.3...HEAD +[Unreleased]: https://github.com/MetaMask/core/compare/@metamask/message-manager@12.0.0...HEAD +[12.0.0]: https://github.com/MetaMask/core/compare/@metamask/message-manager@11.0.3...@metamask/message-manager@12.0.0 [11.0.3]: https://github.com/MetaMask/core/compare/@metamask/message-manager@11.0.2...@metamask/message-manager@11.0.3 [11.0.2]: https://github.com/MetaMask/core/compare/@metamask/message-manager@11.0.1...@metamask/message-manager@11.0.2 [11.0.1]: https://github.com/MetaMask/core/compare/@metamask/message-manager@11.0.0...@metamask/message-manager@11.0.1 diff --git a/packages/message-manager/package.json b/packages/message-manager/package.json index 37cd315da2..ee76d4fdd2 100644 --- a/packages/message-manager/package.json +++ b/packages/message-manager/package.json @@ -1,6 +1,6 @@ { "name": "@metamask/message-manager", - "version": "11.0.3", + "version": "12.0.0", "description": "Stores and manages interactions with signing requests", "keywords": [ "MetaMask", diff --git a/packages/profile-sync-controller/package.json b/packages/profile-sync-controller/package.json index 232671b4cd..fe1a9dda54 100644 --- a/packages/profile-sync-controller/package.json +++ b/packages/profile-sync-controller/package.json @@ -115,7 +115,7 @@ "devDependencies": { "@lavamoat/allow-scripts": "^3.0.4", "@lavamoat/preinstall-always-fail": "^2.1.0", - "@metamask/accounts-controller": "^21.0.0", + "@metamask/accounts-controller": "^21.0.1", "@metamask/auto-changelog": "^3.4.4", "@metamask/keyring-internal-api": "^2.0.0", "@metamask/providers": "^18.1.1", diff --git a/packages/transaction-controller/package.json b/packages/transaction-controller/package.json index 7efdd227f6..7e4aa89ee8 100644 --- a/packages/transaction-controller/package.json +++ b/packages/transaction-controller/package.json @@ -69,7 +69,7 @@ }, "devDependencies": { "@babel/runtime": "^7.23.9", - "@metamask/accounts-controller": "^21.0.0", + "@metamask/accounts-controller": "^21.0.1", "@metamask/approval-controller": "^7.1.2", "@metamask/auto-changelog": "^3.4.4", "@metamask/eth-block-tracker": "^11.0.3", diff --git a/yarn.lock b/yarn.lock index 228d246861..84e5e62473 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2255,7 +2255,7 @@ __metadata: languageName: node linkType: hard -"@metamask/accounts-controller@npm:^21.0.0, @metamask/accounts-controller@workspace:packages/accounts-controller": +"@metamask/accounts-controller@npm:^21.0.1, @metamask/accounts-controller@workspace:packages/accounts-controller": version: 0.0.0-use.local resolution: "@metamask/accounts-controller@workspace:packages/accounts-controller" dependencies: @@ -2375,7 +2375,7 @@ __metadata: "@ethersproject/contracts": "npm:^5.7.0" "@ethersproject/providers": "npm:^5.7.0" "@metamask/abi-utils": "npm:^2.0.3" - "@metamask/accounts-controller": "npm:^21.0.0" + "@metamask/accounts-controller": "npm:^21.0.1" "@metamask/approval-controller": "npm:^7.1.2" "@metamask/auto-changelog": "npm:^3.4.4" "@metamask/base-controller": "npm:^7.1.1" @@ -3187,7 +3187,7 @@ __metadata: "@metamask/eth-simple-keyring": "npm:^6.0.5" "@metamask/keyring-api": "npm:^13.0.0" "@metamask/keyring-internal-api": "npm:^2.0.0" - "@metamask/message-manager": "npm:^11.0.3" + "@metamask/message-manager": "npm:^12.0.0" "@metamask/scure-bip39": "npm:^2.1.1" "@metamask/utils": "npm:^11.0.1" "@types/jest": "npm:^27.4.1" @@ -3280,7 +3280,7 @@ __metadata: languageName: unknown linkType: soft -"@metamask/message-manager@npm:^11.0.3, @metamask/message-manager@workspace:packages/message-manager": +"@metamask/message-manager@npm:^12.0.0, @metamask/message-manager@workspace:packages/message-manager": version: 0.0.0-use.local resolution: "@metamask/message-manager@workspace:packages/message-manager" dependencies: @@ -3604,7 +3604,7 @@ __metadata: dependencies: "@lavamoat/allow-scripts": "npm:^3.0.4" "@lavamoat/preinstall-always-fail": "npm:^2.1.0" - "@metamask/accounts-controller": "npm:^21.0.0" + "@metamask/accounts-controller": "npm:^21.0.1" "@metamask/auto-changelog": "npm:^3.4.4" "@metamask/base-controller": "npm:^7.1.1" "@metamask/keyring-api": "npm:^13.0.0" @@ -3960,7 +3960,7 @@ __metadata: "@ethersproject/abi": "npm:^5.7.0" "@ethersproject/contracts": "npm:^5.7.0" "@ethersproject/providers": "npm:^5.7.0" - "@metamask/accounts-controller": "npm:^21.0.0" + "@metamask/accounts-controller": "npm:^21.0.1" "@metamask/approval-controller": "npm:^7.1.2" "@metamask/auto-changelog": "npm:^3.4.4" "@metamask/base-controller": "npm:^7.1.1"