Skip to content

Commit

Permalink
Recategorize controller dependencies as devDependencies if only impor…
Browse files Browse the repository at this point in the history
…ts are messaging system-related types (#3607)

## Explanation

- Controller dependencies that are used via the messaging system should
be listed under `peerDependencies` to ensure that we see warnings for
incompatible versions.
- A `peerDependencies` controller that is not invoked directly at
runtime shouldn't be included under `dependencies`. Any type imports
will still resolve because we can assume the controller package will be
installed.

## References

## Changelog

### `@metamask/accounts-controller`
### Fixed
- Add `@metamask/snaps-controllers` as a peer dependency in addition to
a dev dependency ([#3607](#3607))

### `@metamask/ens-controller`
### Fixed
- Recategorize `@metamask/network-controller` as a dev dependency and
peer dependency ([#3607](#3607))

### `@metamask/keyring-controller`
### Fixed
- Recategorize `@metamask/preferences-controller` as a dev dependency
and peer dependency
([#3607](#3607))

### `@metamask/permission-controller`
### Fixed
- Recategorize `@metamask/approval-controller` as a dev dependency and
peer dependency ([#3607](#3607))

### `@metamask/queued-request-controller`
### Fixed
- Recategorize `@metamask/approval-controller`,
`@metamask/network-controller`, `@metamask/selected-network-controller`
as dev dependencies
([#3607](#3607))

## 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
MajorLift authored Dec 22, 2023
1 parent 247890e commit ca4baa0
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 7 deletions.
2 changes: 2 additions & 0 deletions packages/accounts-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Add `@metamask/snaps-controllers` as a peer dependency in addition to a dev dependency ([#3607](https://github.com/MetaMask/core/pull/3607))

## [6.0.0]
### Changed
Expand Down
3 changes: 2 additions & 1 deletion packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@
"typescript": "~4.8.4"
},
"peerDependencies": {
"@metamask/keyring-controller": "^10.0.0"
"@metamask/keyring-controller": "^10.0.0",
"@metamask/snaps-controllers": "^3.2.0"
},
"engines": {
"node": ">=16.0.0"
Expand Down
2 changes: 2 additions & 0 deletions packages/ens-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Recategorize `@metamask/network-controller` as a dev dependency and peer dependency ([#3607](https://github.com/MetaMask/core/pull/3607))

## [7.0.0]
### Changed
Expand Down
2 changes: 1 addition & 1 deletion packages/ens-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
"@ethersproject/providers": "^5.7.0",
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^8.0.0",
"@metamask/network-controller": "^17.0.0",
"@metamask/utils": "^8.2.0",
"ethereum-ens-network-map": "^1.0.2",
"punycode": "^2.1.1"
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/network-controller": "^17.0.0",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
Expand Down
3 changes: 3 additions & 0 deletions packages/keyring-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- Bump `@metamask/eth-keyring-controller` to `^15.1.0` ([#3617](https://github.com/MetaMask/core/pull/3617))

### Fixed
- Recategorize `@metamask/preferences-controller` as a dev dependency and peer dependency ([#3607](https://github.com/MetaMask/core/pull/3607))

## [10.0.0]
### Changed
- **BREAKING:** Bump `@metamask/base-controller` to ^4.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
Expand Down
2 changes: 1 addition & 1 deletion packages/keyring-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
"@metamask/base-controller": "^4.0.0",
"@metamask/eth-keyring-controller": "^15.1.0",
"@metamask/message-manager": "^7.3.6",
"@metamask/preferences-controller": "^5.0.0",
"@metamask/utils": "^8.2.0",
"async-mutex": "^0.2.6",
"ethereumjs-util": "^7.0.10",
Expand All @@ -48,6 +47,7 @@
"@keystonehq/bc-ur-registry-eth": "^0.9.0",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/eth-sig-util": "^7.0.1",
"@metamask/preferences-controller": "^5.0.0",
"@metamask/scure-bip39": "^2.1.1",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
Expand Down
2 changes: 2 additions & 0 deletions packages/permission-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Fixed
- Recategorize `@metamask/approval-controller` as a dev dependency and peer dependency ([#3607](https://github.com/MetaMask/core/pull/3607))

## [6.0.0]
### Added
Expand Down
2 changes: 1 addition & 1 deletion packages/permission-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@metamask/approval-controller": "^5.1.0",
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^8.0.0",
"@metamask/json-rpc-engine": "^7.3.0",
Expand All @@ -43,6 +42,7 @@
"nanoid": "^3.1.31"
},
"devDependencies": {
"@metamask/approval-controller": "^5.1.0",
"@metamask/auto-changelog": "^3.4.4",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
Expand Down
3 changes: 3 additions & 0 deletions packages/queued-request-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- **BREAKING:** `QueuedRequestControllerMessenger` can no longer be defined with any allowed actions or events ([#1970](https://github.com/MetaMask/core/pull/1970)).
- Move `@metamask/approval-controller` from devDependency to dependency ([#1970](https://github.com/MetaMask/core/pull/1970)).

### Fixed
- Recategorize `@metamask/approval-controller`, `@metamask/network-controller`, `@metamask/selected-network-controller` as dev dependencies ([#3607](https://github.com/MetaMask/core/pull/3607))

## [0.2.0]
### Changed
- **BREAKING:** Bump `@metamask/base-controller` to ^4.0.0 ([#2063](https://github.com/MetaMask/core/pull/2063))
Expand Down
6 changes: 3 additions & 3 deletions packages/queued-request-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,18 +31,18 @@
"test:watch": "jest --watch"
},
"dependencies": {
"@metamask/approval-controller": "^5.1.0",
"@metamask/base-controller": "^4.0.0",
"@metamask/controller-utils": "^8.0.0",
"@metamask/json-rpc-engine": "^7.3.0",
"@metamask/network-controller": "^17.0.0",
"@metamask/rpc-errors": "^6.1.0",
"@metamask/selected-network-controller": "^5.0.0",
"@metamask/swappable-obj-proxy": "^2.1.0",
"@metamask/utils": "^8.2.0"
},
"devDependencies": {
"@metamask/approval-controller": "^5.1.0",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/network-controller": "^17.0.0",
"@metamask/selected-network-controller": "^5.0.0",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
"immer": "^9.0.6",
Expand Down
1 change: 1 addition & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1493,6 +1493,7 @@ __metadata:
uuid: ^8.3.2
peerDependencies:
"@metamask/keyring-controller": ^10.0.0
"@metamask/snaps-controllers": ^3.2.0
languageName: unknown
linkType: soft

Expand Down

0 comments on commit ca4baa0

Please sign in to comment.