From 250c01bf5fcf7230e65be6ec3de4eabe7e457089 Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Thu, 25 Jul 2024 13:06:07 -0230 Subject: [PATCH 1/2] chore: Remove redundant dependencies In various packages, we have a package listed as both a peer dependency and as a dependency. This was done by mistake, the dependency entries aren't actually used in practice, as we require the package to be installed as a "peer" package anyway. It's also incorrect to list other controllers as a dependency in this case because we don't know which version we need. In these cases we need it to match the version setup with the global messenger, which we don't know. --- packages/accounts-controller/package.json | 2 +- packages/assets-controllers/package.json | 10 +++++----- packages/gas-fee-controller/package.json | 2 +- packages/notification-services-controller/package.json | 4 ++-- packages/polling-controller/package.json | 2 +- packages/profile-sync-controller/package.json | 2 +- packages/selected-network-controller/package.json | 4 ++-- packages/signature-controller/package.json | 6 +++--- packages/transaction-controller/package.json | 8 ++++---- packages/user-operation-controller/package.json | 10 +++++----- 10 files changed, 25 insertions(+), 25 deletions(-) diff --git a/packages/accounts-controller/package.json b/packages/accounts-controller/package.json index 129e51bb1e..2baf73d2e0 100644 --- a/packages/accounts-controller/package.json +++ b/packages/accounts-controller/package.json @@ -45,7 +45,6 @@ "@metamask/base-controller": "^6.0.2", "@metamask/eth-snap-keyring": "^4.3.1", "@metamask/keyring-api": "^8.0.1", - "@metamask/keyring-controller": "^17.1.1", "@metamask/snaps-sdk": "^6.1.1", "@metamask/snaps-utils": "^7.8.1", "@metamask/utils": "^9.1.0", @@ -56,6 +55,7 @@ }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", + "@metamask/keyring-controller": "^17.1.1", "@metamask/snaps-controllers": "^9.3.1", "@types/jest": "^27.4.1", "@types/readable-stream": "^2.3.0", diff --git a/packages/assets-controllers/package.json b/packages/assets-controllers/package.json index c66a13c91b..39a5564833 100644 --- a/packages/assets-controllers/package.json +++ b/packages/assets-controllers/package.json @@ -47,17 +47,12 @@ "@ethersproject/contracts": "^5.7.0", "@ethersproject/providers": "^5.7.0", "@metamask/abi-utils": "^2.0.3", - "@metamask/accounts-controller": "^17.2.0", - "@metamask/approval-controller": "^7.0.2", "@metamask/base-controller": "^6.0.2", "@metamask/contract-metadata": "^2.4.0", "@metamask/controller-utils": "^11.0.2", "@metamask/eth-query": "^4.0.0", - "@metamask/keyring-controller": "^17.1.1", "@metamask/metamask-eth-abis": "^3.1.1", - "@metamask/network-controller": "^20.0.0", "@metamask/polling-controller": "^9.0.0", - "@metamask/preferences-controller": "^13.0.0", "@metamask/rpc-errors": "^6.3.1", "@metamask/utils": "^9.1.0", "@types/bn.js": "^5.1.5", @@ -72,9 +67,14 @@ "uuid": "^8.3.2" }, "devDependencies": { + "@metamask/accounts-controller": "^17.2.0", + "@metamask/approval-controller": "^7.0.2", "@metamask/auto-changelog": "^3.4.4", "@metamask/ethjs-provider-http": "^0.3.0", "@metamask/keyring-api": "^8.0.1", + "@metamask/keyring-controller": "^17.1.1", + "@metamask/network-controller": "^20.0.0", + "@metamask/preferences-controller": "^13.0.0", "@types/jest": "^27.4.1", "@types/lodash": "^4.14.191", "@types/node": "^16.18.54", diff --git a/packages/gas-fee-controller/package.json b/packages/gas-fee-controller/package.json index 5219394d09..6e099b101a 100644 --- a/packages/gas-fee-controller/package.json +++ b/packages/gas-fee-controller/package.json @@ -45,7 +45,6 @@ "@metamask/controller-utils": "^11.0.2", "@metamask/eth-query": "^4.0.0", "@metamask/ethjs-unit": "^0.3.0", - "@metamask/network-controller": "^20.0.0", "@metamask/polling-controller": "^9.0.0", "@metamask/utils": "^9.1.0", "@types/bn.js": "^5.1.5", @@ -55,6 +54,7 @@ }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", + "@metamask/network-controller": "^20.0.0", "@types/jest": "^27.4.1", "@types/jest-when": "^2.7.3", "deepmerge": "^4.2.2", diff --git a/packages/notification-services-controller/package.json b/packages/notification-services-controller/package.json index c9cfc8b1c4..3aa5145fdb 100644 --- a/packages/notification-services-controller/package.json +++ b/packages/notification-services-controller/package.json @@ -44,8 +44,6 @@ "@contentful/rich-text-html-renderer": "^16.5.2", "@metamask/base-controller": "^6.0.2", "@metamask/controller-utils": "^11.0.2", - "@metamask/keyring-controller": "^17.1.1", - "@metamask/profile-sync-controller": "^0.1.4", "bignumber.js": "^4.1.0", "contentful": "^10.3.6", "firebase": "^10.11.0", @@ -55,6 +53,8 @@ "devDependencies": { "@lavamoat/allow-scripts": "^3.0.4", "@metamask/auto-changelog": "^3.4.4", + "@metamask/keyring-controller": "^17.1.1", + "@metamask/profile-sync-controller": "^0.1.4", "@types/jest": "^27.4.1", "@types/readable-stream": "^2.3.0", "deepmerge": "^4.2.2", diff --git a/packages/polling-controller/package.json b/packages/polling-controller/package.json index 18fbd282a3..2e56620bde 100644 --- a/packages/polling-controller/package.json +++ b/packages/polling-controller/package.json @@ -43,7 +43,6 @@ "dependencies": { "@metamask/base-controller": "^6.0.2", "@metamask/controller-utils": "^11.0.2", - "@metamask/network-controller": "^20.0.0", "@metamask/utils": "^9.1.0", "@types/uuid": "^8.3.0", "fast-json-stable-stringify": "^2.1.0", @@ -51,6 +50,7 @@ }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", + "@metamask/network-controller": "^20.0.0", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "jest": "^27.5.1", diff --git a/packages/profile-sync-controller/package.json b/packages/profile-sync-controller/package.json index da5325982b..377b271ef2 100644 --- a/packages/profile-sync-controller/package.json +++ b/packages/profile-sync-controller/package.json @@ -42,7 +42,6 @@ }, "dependencies": { "@metamask/base-controller": "^6.0.2", - "@metamask/snaps-controllers": "^9.3.1", "@metamask/snaps-sdk": "^6.1.1", "@metamask/snaps-utils": "^7.8.1", "@noble/ciphers": "^0.5.2", @@ -54,6 +53,7 @@ "devDependencies": { "@lavamoat/allow-scripts": "^3.0.4", "@metamask/auto-changelog": "^3.4.4", + "@metamask/snaps-controllers": "^9.3.1", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "ethers": "^6.12.0", diff --git a/packages/selected-network-controller/package.json b/packages/selected-network-controller/package.json index 2789402569..a01ffeb366 100644 --- a/packages/selected-network-controller/package.json +++ b/packages/selected-network-controller/package.json @@ -43,13 +43,13 @@ "dependencies": { "@metamask/base-controller": "^6.0.2", "@metamask/json-rpc-engine": "^9.0.2", - "@metamask/network-controller": "^20.0.0", - "@metamask/permission-controller": "^11.0.0", "@metamask/swappable-obj-proxy": "^2.2.0", "@metamask/utils": "^9.1.0" }, "devDependencies": { "@metamask/auto-changelog": "^3.4.4", + "@metamask/network-controller": "^20.0.0", + "@metamask/permission-controller": "^11.0.0", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "immer": "^9.0.6", diff --git a/packages/signature-controller/package.json b/packages/signature-controller/package.json index 2a76384309..cbe32e0197 100644 --- a/packages/signature-controller/package.json +++ b/packages/signature-controller/package.json @@ -41,18 +41,18 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/approval-controller": "^7.0.2", "@metamask/base-controller": "^6.0.2", "@metamask/controller-utils": "^11.0.2", - "@metamask/keyring-controller": "^17.1.1", - "@metamask/logging-controller": "^5.0.0", "@metamask/message-manager": "^10.0.1", "@metamask/rpc-errors": "^6.3.1", "@metamask/utils": "^9.1.0", "lodash": "^4.17.21" }, "devDependencies": { + "@metamask/approval-controller": "^7.0.2", "@metamask/auto-changelog": "^3.4.4", + "@metamask/keyring-controller": "^17.1.1", + "@metamask/logging-controller": "^5.0.0", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "jest": "^27.5.1", diff --git a/packages/transaction-controller/package.json b/packages/transaction-controller/package.json index 68f43d1cd0..8c1f84a24e 100644 --- a/packages/transaction-controller/package.json +++ b/packages/transaction-controller/package.json @@ -47,14 +47,10 @@ "@ethersproject/abi": "^5.7.0", "@ethersproject/contracts": "^5.7.0", "@ethersproject/providers": "^5.7.0", - "@metamask/accounts-controller": "^17.2.0", - "@metamask/approval-controller": "^7.0.2", "@metamask/base-controller": "^6.0.2", "@metamask/controller-utils": "^11.0.2", "@metamask/eth-query": "^4.0.0", - "@metamask/gas-fee-controller": "^19.0.0", "@metamask/metamask-eth-abis": "^3.1.1", - "@metamask/network-controller": "^20.0.0", "@metamask/nonce-tracker": "^5.0.0", "@metamask/rpc-errors": "^6.3.1", "@metamask/utils": "^9.1.0", @@ -67,10 +63,14 @@ }, "devDependencies": { "@babel/runtime": "^7.23.9", + "@metamask/accounts-controller": "^17.2.0", + "@metamask/approval-controller": "^7.0.2", "@metamask/auto-changelog": "^3.4.4", "@metamask/eth-json-rpc-provider": "^4.1.1", "@metamask/ethjs-provider-http": "^0.3.0", + "@metamask/gas-fee-controller": "^19.0.0", "@metamask/keyring-api": "^8.0.1", + "@metamask/network-controller": "^20.0.0", "@types/bn.js": "^5.1.5", "@types/jest": "^27.4.1", "@types/node": "^16.18.54", diff --git a/packages/user-operation-controller/package.json b/packages/user-operation-controller/package.json index e4d3f6b104..721a5d9ee0 100644 --- a/packages/user-operation-controller/package.json +++ b/packages/user-operation-controller/package.json @@ -42,17 +42,12 @@ "test:watch": "NODE_OPTIONS=--experimental-vm-modules jest --watch" }, "dependencies": { - "@metamask/approval-controller": "^7.0.2", "@metamask/base-controller": "^6.0.2", "@metamask/controller-utils": "^11.0.2", "@metamask/eth-query": "^4.0.0", - "@metamask/gas-fee-controller": "^19.0.0", - "@metamask/keyring-controller": "^17.1.1", - "@metamask/network-controller": "^20.0.0", "@metamask/polling-controller": "^9.0.0", "@metamask/rpc-errors": "^6.3.1", "@metamask/superstruct": "^3.1.0", - "@metamask/transaction-controller": "^35.0.0", "@metamask/utils": "^9.1.0", "bn.js": "^5.2.1", "immer": "^9.0.6", @@ -60,7 +55,12 @@ "uuid": "^8.3.2" }, "devDependencies": { + "@metamask/approval-controller": "^7.0.2", "@metamask/auto-changelog": "^3.4.4", + "@metamask/gas-fee-controller": "^19.0.0", + "@metamask/keyring-controller": "^17.1.1", + "@metamask/network-controller": "^20.0.0", + "@metamask/transaction-controller": "^35.0.0", "@types/jest": "^27.4.1", "deepmerge": "^4.2.2", "jest": "^27.5.1", From a765ed0faeaedd7ec32b51d2625c9d33946ce04b Mon Sep 17 00:00:00 2001 From: Mark Stacey Date: Thu, 25 Jul 2024 13:19:32 -0230 Subject: [PATCH 2/2] Add changelog entries --- packages/accounts-controller/CHANGELOG.md | 5 +++++ packages/assets-controllers/CHANGELOG.md | 5 +++++ packages/gas-fee-controller/CHANGELOG.md | 5 +++++ packages/notification-services-controller/CHANGELOG.md | 5 +++++ packages/polling-controller/CHANGELOG.md | 5 +++++ packages/profile-sync-controller/CHANGELOG.md | 5 +++++ packages/selected-network-controller/CHANGELOG.md | 5 +++++ packages/signature-controller/CHANGELOG.md | 5 +++++ packages/transaction-controller/CHANGELOG.md | 5 +++++ packages/user-operation-controller/CHANGELOG.md | 5 +++++ 10 files changed, 50 insertions(+) diff --git a/packages/accounts-controller/CHANGELOG.md b/packages/accounts-controller/CHANGELOG.md index bb3606bd4b..7fceb6a636 100644 --- a/packages/accounts-controller/CHANGELOG.md +++ b/packages/accounts-controller/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Remove `@metamask/keyring-controller` dependency [#4556](https://github.com/MetaMask/core/pull/4556) + - This was listed under `peerDependencies` already, so it was redundant as a dependency. + ## [17.2.0] ### Added diff --git a/packages/assets-controllers/CHANGELOG.md b/packages/assets-controllers/CHANGELOG.md index dba8022844..ebfd294f7d 100644 --- a/packages/assets-controllers/CHANGELOG.md +++ b/packages/assets-controllers/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Remove `@metamask/accounts-controller`, `@metamask/approval-controller`, `@metamask/keyring-controller`, and `@metamask/preferences-controller` dependencies [#4556](https://github.com/MetaMask/core/pull/4556) + - These were listed under `peerDependencies` already, so they were redundant as dependencies. + ## [36.0.0] ### Added diff --git a/packages/gas-fee-controller/CHANGELOG.md b/packages/gas-fee-controller/CHANGELOG.md index a6f06ffd47..9cf3d7d02a 100644 --- a/packages/gas-fee-controller/CHANGELOG.md +++ b/packages/gas-fee-controller/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Remove `@metamask/network-controller` dependency [#4556](https://github.com/MetaMask/core/pull/4556) + - This was listed under `peerDependencies` already, so it was redundant as a dependency. + ## [19.0.0] ### Changed diff --git a/packages/notification-services-controller/CHANGELOG.md b/packages/notification-services-controller/CHANGELOG.md index 83070274d9..97a9779cbc 100644 --- a/packages/notification-services-controller/CHANGELOG.md +++ b/packages/notification-services-controller/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Remove `@metamask/keyring-controller` and `@metamask/profile-sync-controller` dependencies [#4556](https://github.com/MetaMask/core/pull/4556) + - These were listed under `peerDependencies` already, so they were redundant as dependencies. + ## [0.1.2] ### Added diff --git a/packages/polling-controller/CHANGELOG.md b/packages/polling-controller/CHANGELOG.md index b6fad02093..4d367a2754 100644 --- a/packages/polling-controller/CHANGELOG.md +++ b/packages/polling-controller/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Remove `@metamask/network-controller` dependency [#4556](https://github.com/MetaMask/core/pull/4556) + - This was listed under `peerDependencies` already, so it was redundant as a dependency. + ## [9.0.0] ### Changed diff --git a/packages/profile-sync-controller/CHANGELOG.md b/packages/profile-sync-controller/CHANGELOG.md index ab2ad99ed2..63518fea8e 100644 --- a/packages/profile-sync-controller/CHANGELOG.md +++ b/packages/profile-sync-controller/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Remove `@metamask/snaps-controllers` dependency [#4556](https://github.com/MetaMask/core/pull/4556) + - This was listed under `peerDependencies` already, so it was redundant as a dependency. + ## [0.1.4] ### Added diff --git a/packages/selected-network-controller/CHANGELOG.md b/packages/selected-network-controller/CHANGELOG.md index 7770ada000..f5f0ce60f5 100644 --- a/packages/selected-network-controller/CHANGELOG.md +++ b/packages/selected-network-controller/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Remove `@metamask/network-controller` and `@metamask/permission-controller` dependencies [#4556](https://github.com/MetaMask/core/pull/4556) + - These were listed under `peerDependencies` already, so they were redundant as dependencies. + ## [16.0.0] ### Changed diff --git a/packages/signature-controller/CHANGELOG.md b/packages/signature-controller/CHANGELOG.md index 10f37cd76f..005d1fa49f 100644 --- a/packages/signature-controller/CHANGELOG.md +++ b/packages/signature-controller/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Remove `@metamask/approval-controller`, `@metamask/keyring-controller`, and `@metamask/logging-controller` dependencies [#4556](https://github.com/MetaMask/core/pull/4556) + - These were listed under `peerDependencies` already, so they were redundant as dependencies. + ## [18.0.0] ### Changed diff --git a/packages/transaction-controller/CHANGELOG.md b/packages/transaction-controller/CHANGELOG.md index d39bf5e6f9..8078d97ec3 100644 --- a/packages/transaction-controller/CHANGELOG.md +++ b/packages/transaction-controller/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Remove `@metamask/accounts-controller`, `@metamask/approval-controller`, `@metamask/gas-fee-controller`, and `@metamask/network-controller` dependencies [#4556](https://github.com/MetaMask/core/pull/4556) + - These were listed under `peerDependencies` already, so they were redundant as dependencies. + ## [35.0.0] ### Changed diff --git a/packages/user-operation-controller/CHANGELOG.md b/packages/user-operation-controller/CHANGELOG.md index 257c0f7f6e..ab61a1337c 100644 --- a/packages/user-operation-controller/CHANGELOG.md +++ b/packages/user-operation-controller/CHANGELOG.md @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +### Changed + +- Remove `@metamask/approval-controller`, `@metamask/gas-fee-controller`, `@metamask/keyring-controller`, `@metamask/network-controller`, and `@metamask/transaction-controller` dependencies [#4556](https://github.com/MetaMask/core/pull/4556) + - These were listed under `peerDependencies` already, so they were redundant as dependencies. + ## [14.0.0] ### Changed