Skip to content

Commit

Permalink
chore: Remove redundant dependencies (#4556)
Browse files Browse the repository at this point in the history
## Explanation

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.

## References

None

## Changelog

Changelogs updated in diff

## Checklist

- [x] I've updated the test suite for new or updated code as appropriate
- [x] I've updated documentation (JSDoc, Markdown, etc.) for new or
updated code as appropriate
- [x] I've highlighted breaking changes using the "BREAKING" category
above as appropriate
  • Loading branch information
Gudahtt authored and AugmentedMode committed Jul 30, 2024
1 parent 1a9d68f commit 41ff05b
Show file tree
Hide file tree
Showing 20 changed files with 75 additions and 25 deletions.
5 changes: 5 additions & 0 deletions packages/accounts-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions packages/assets-controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions packages/assets-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions packages/gas-fee-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/gas-fee-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions packages/notification-services-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/notification-services-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions packages/polling-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/polling-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
"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",
"uuid": "^8.3.2"
},
"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",
Expand Down
5 changes: 5 additions & 0 deletions packages/profile-sync-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion packages/profile-sync-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions packages/selected-network-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions packages/selected-network-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions packages/signature-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions packages/signature-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions packages/transaction-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions packages/transaction-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions packages/user-operation-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions packages/user-operation-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,25 @@
"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",
"lodash": "^4.17.21",
"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",
Expand Down

0 comments on commit 41ff05b

Please sign in to comment.