Skip to content

Commit

Permalink
Fix peer dependency warnings (#4974)
Browse files Browse the repository at this point in the history
When running `yarn install`, several packages generate peer dependency
warnings.

- `@lavamoat/preinstall-always-fail` is now a peer dependency of
`@lavamoat/allow-scripts`, so we need to add it as a new dev dependency.
- For the other packages — `@babel/runtime`, `@metamask/providers`,
`webextension-polyfill` — we really expect the _client_ to have these
dependencies, so we also add them as dev and peer dependencies instead
of dependencies. We have to do this because they will not get forwarded
along.
  • Loading branch information
mcmire authored Nov 26, 2024
1 parent d1a5dd7 commit 54bc0f4
Show file tree
Hide file tree
Showing 22 changed files with 172 additions and 10 deletions.
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
"@babel/plugin-transform-modules-commonjs": "^7.23.3",
"@babel/preset-typescript": "^7.23.3",
"@lavamoat/allow-scripts": "^3.0.4",
"@lavamoat/preinstall-always-fail": "^2.1.0",
"@metamask/create-release-branch": "^3.1.0",
"@metamask/eslint-config": "^12.2.0",
"@metamask/eslint-config-jest": "^12.1.0",
Expand Down
9 changes: 9 additions & 0 deletions packages/accounts-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- `@metamask/providers` `^18.1.0` (required by `@metamask/keyring-api`)
- `webextension-polyfill` `^0.10.0 || ^0.11.0 || ^0.12.0` (required by `@metamask/providers`)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.

## [20.0.0]

### Changed
Expand Down
8 changes: 6 additions & 2 deletions packages/accounts-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,22 @@
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/keyring-controller": "^19.0.0",
"@metamask/providers": "^18.1.1",
"@metamask/snaps-controllers": "^9.10.0",
"@types/jest": "^27.4.1",
"@types/readable-stream": "^2.3.0",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.2.2"
"typescript": "~5.2.2",
"webextension-polyfill": "^0.12.0"
},
"peerDependencies": {
"@metamask/keyring-controller": "^19.0.0",
"@metamask/snaps-controllers": "^9.7.0"
"@metamask/providers": "^18.1.0",
"@metamask/snaps-controllers": "^9.7.0",
"webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
9 changes: 9 additions & 0 deletions packages/assets-controllers/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- `@metamask/providers` `^18.1.0` (required by `@metamask/keyring-api`)
- `webextension-polyfill` `^0.10.0 || ^0.11.0 || ^0.12.0` (required by `@metamask/providers`)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.

## [45.1.0]

### Added
Expand Down
9 changes: 7 additions & 2 deletions packages/assets-controllers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"@babel/runtime": "^7.23.9",
"@metamask/accounts-controller": "^20.0.0",
"@metamask/approval-controller": "^7.1.1",
"@metamask/auto-changelog": "^3.4.4",
Expand All @@ -82,6 +83,7 @@
"@metamask/keyring-controller": "^19.0.0",
"@metamask/network-controller": "^22.0.2",
"@metamask/preferences-controller": "^15.0.0",
"@metamask/providers": "^18.1.1",
"@types/jest": "^27.4.1",
"@types/lodash": "^4.14.191",
"@types/node": "^16.18.54",
Expand All @@ -93,14 +95,17 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.2.2"
"typescript": "~5.2.2",
"webextension-polyfill": "^0.12.0"
},
"peerDependencies": {
"@metamask/accounts-controller": "^20.0.0",
"@metamask/approval-controller": "^7.0.0",
"@metamask/keyring-controller": "^19.0.0",
"@metamask/network-controller": "^22.0.0",
"@metamask/preferences-controller": "^15.0.0"
"@metamask/preferences-controller": "^15.0.0",
"@metamask/providers": "^18.1.0",
"webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
9 changes: 9 additions & 0 deletions packages/chain-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- `@metamask/providers` `^18.1.0` (required by `@metamask/keyring-api`)
- `webextension-polyfill` `^0.10.0 || ^0.11.0 || ^0.12.0` (required by `@metamask/providers`)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.

## [0.2.0]

### Changed
Expand Down
8 changes: 7 additions & 1 deletion packages/chain-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,20 @@
},
"devDependencies": {
"@metamask/auto-changelog": "^3.4.4",
"@metamask/providers": "^18.1.1",
"@types/jest": "^27.4.1",
"@types/readable-stream": "^2.3.0",
"deepmerge": "^4.2.2",
"jest": "^27.5.1",
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.2.2"
"typescript": "~5.2.2",
"webextension-polyfill": "^0.12.0"
},
"peerDependencies": {
"@metamask/providers": "^18.1.0",
"webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
8 changes: 8 additions & 0 deletions packages/controller-utils/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- `@babel/runtime@^7.0.0` (required by `@metamask/ethjs-unit`)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.

## [11.4.3]

### Changed
Expand Down
4 changes: 4 additions & 0 deletions packages/controller-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"fast-deep-equal": "^3.1.3"
},
"devDependencies": {
"@babel/runtime": "^7.23.9",
"@metamask/auto-changelog": "^3.4.4",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
Expand All @@ -69,6 +70,9 @@
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.2.2"
},
"peerDependencies": {
"@babel/runtime": "^7.0.0"
},
"engines": {
"node": "^18.18 || >=20"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/gas-fee-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- `@babel/runtime@^7.0.0` (required by `@metamask/ethjs-unit`)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.

## [22.0.1]

### Changed
Expand Down
2 changes: 2 additions & 0 deletions packages/gas-fee-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"uuid": "^8.3.2"
},
"devDependencies": {
"@babel/runtime": "^7.23.9",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/network-controller": "^22.0.2",
"@types/jest": "^27.4.1",
Expand All @@ -74,6 +75,7 @@
"typescript": "~5.2.2"
},
"peerDependencies": {
"@babel/runtime": "^7.0.0",
"@metamask/network-controller": "^22.0.0"
},
"engines": {
Expand Down
1 change: 1 addition & 0 deletions packages/json-rpc-engine/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@
},
"devDependencies": {
"@lavamoat/allow-scripts": "^3.0.4",
"@lavamoat/preinstall-always-fail": "^2.1.0",
"@metamask/auto-changelog": "^3.4.4",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
Expand Down
9 changes: 9 additions & 0 deletions packages/keyring-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- `@metamask/providers` `^18.1.0` (required by `@metamask/keyring-api`)
- `webextension-polyfill` `^0.10.0 || ^0.11.0 || ^0.12.0` (required by `@metamask/providers`)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.

## [19.0.0]

### Changed
Expand Down
9 changes: 8 additions & 1 deletion packages/keyring-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@
"@ethereumjs/tx": "^4.2.0",
"@keystonehq/bc-ur-registry-eth": "^0.19.0",
"@lavamoat/allow-scripts": "^3.0.4",
"@lavamoat/preinstall-always-fail": "^2.1.0",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/providers": "^18.1.1",
"@metamask/scure-bip39": "^2.1.1",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
Expand All @@ -77,7 +79,12 @@
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.2.2",
"uuid": "^8.3.2"
"uuid": "^8.3.2",
"webextension-polyfill": "^0.12.0"
},
"peerDependencies": {
"@metamask/providers": "^18.1.0",
"webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
1 change: 1 addition & 0 deletions packages/notification-services-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@
},
"devDependencies": {
"@lavamoat/allow-scripts": "^3.0.4",
"@lavamoat/preinstall-always-fail": "^2.1.0",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/keyring-controller": "^19.0.0",
"@metamask/profile-sync-controller": "^2.0.0",
Expand Down
9 changes: 9 additions & 0 deletions packages/profile-sync-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- `@metamask/providers` `^18.1.0` (required by `@metamask/keyring-api`)
- `webextension-polyfill` `^0.10.0 || ^0.11.0 || ^0.12.0` (required by `@metamask/providers`)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.

## [2.0.0]

### Changed
Expand Down
9 changes: 7 additions & 2 deletions packages/profile-sync-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,10 @@
},
"devDependencies": {
"@lavamoat/allow-scripts": "^3.0.4",
"@lavamoat/preinstall-always-fail": "^2.1.0",
"@metamask/accounts-controller": "^20.0.0",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/providers": "^18.1.1",
"@metamask/snaps-controllers": "^9.10.0",
"@types/jest": "^27.4.1",
"deepmerge": "^4.2.2",
Expand All @@ -126,13 +128,16 @@
"ts-jest": "^27.1.4",
"typedoc": "^0.24.8",
"typedoc-plugin-missing-exports": "^2.0.0",
"typescript": "~5.2.2"
"typescript": "~5.2.2",
"webextension-polyfill": "^0.12.0"
},
"peerDependencies": {
"@metamask/accounts-controller": "^20.0.0",
"@metamask/keyring-controller": "^19.0.0",
"@metamask/network-controller": "^22.0.0",
"@metamask/snaps-controllers": "^9.10.0"
"@metamask/providers": "^18.1.0",
"@metamask/snaps-controllers": "^9.10.0",
"webextension-polyfill": "^0.10.0 || ^0.11.0 || ^0.12.0"
},
"engines": {
"node": "^18.18 || >=20"
Expand Down
9 changes: 9 additions & 0 deletions packages/transaction-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- `@babel/runtime` `^7.0.0` (required by `@metamask/ethjs-provider-http`)
- `@metamask/eth-block-tracker` `>=9` (required by `@metamask/nonce-tracker`)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.

## [41.0.0]

### Added
Expand Down
4 changes: 3 additions & 1 deletion packages/transaction-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
"@metamask/accounts-controller": "^20.0.0",
"@metamask/approval-controller": "^7.1.1",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/eth-block-tracker": "^11.0.2",
"@metamask/eth-json-rpc-provider": "^4.1.6",
"@metamask/ethjs-provider-http": "^0.3.0",
"@metamask/gas-fee-controller": "^22.0.1",
Expand All @@ -90,9 +91,10 @@
"typescript": "~5.2.2"
},
"peerDependencies": {
"@babel/runtime": "^7.23.9",
"@babel/runtime": "^7.0.0",
"@metamask/accounts-controller": "^20.0.0",
"@metamask/approval-controller": "^7.0.0",
"@metamask/eth-block-tracker": ">=9",
"@metamask/gas-fee-controller": "^22.0.0",
"@metamask/network-controller": "^22.0.0"
},
Expand Down
8 changes: 8 additions & 0 deletions packages/user-operation-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- Make implicit peer dependencies explicit ([#4974](https://github.com/MetaMask/core/pull/4974))
- Add the following packages as peer dependencies of this package to satisfy peer dependency requirements from other dependencies:
- `@metamask/eth-block-tracker` `>=9` (required by `@metamask/transaction-controller`)
- These dependencies really should be present in projects that consume this package (e.g. MetaMask clients), and this change ensures that they now are.
- Furthermore, we are assuming that clients already use these dependencies, since otherwise it would be impossible to consume this package in its entirety or even create a working build. Hence, the addition of these peer dependencies is really a formality and should not be breaking.

## [20.0.0]

### Changed
Expand Down
2 changes: 2 additions & 0 deletions packages/user-operation-controller/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
"devDependencies": {
"@metamask/approval-controller": "^7.1.1",
"@metamask/auto-changelog": "^3.4.4",
"@metamask/eth-block-tracker": "^11.0.2",
"@metamask/gas-fee-controller": "^22.0.1",
"@metamask/keyring-controller": "^19.0.0",
"@metamask/network-controller": "^22.0.2",
Expand All @@ -77,6 +78,7 @@
},
"peerDependencies": {
"@metamask/approval-controller": "^7.0.0",
"@metamask/eth-block-tracker": ">=9",
"@metamask/gas-fee-controller": "^22.0.0",
"@metamask/keyring-controller": "^19.0.0",
"@metamask/network-controller": "^22.0.0",
Expand Down
Loading

0 comments on commit 54bc0f4

Please sign in to comment.