Skip to content

Conversation

@mcmire
Copy link
Contributor

@mcmire mcmire commented Dec 3, 2024

Some controller dependencies of this package have peer dependencies, but those additional dependencies are not present in this package's manifest, and as a result peer dependency warnings are being generated at install time:

warning " > @metamask/accounts-controller@18.2.3" has unmet peer dependency "@metamask/snaps-controllers@^9.7.0".
warning "@metamask/accounts-controller > @metamask/keyring-api@8.1.3" has unmet peer dependency "@metamask/providers@^17.2.0".
warning "@metamask/accounts-controller > @metamask/snaps-sdk > @metamask/providers@18.1.1" has unmet peer dependency "webextension-polyfill@^0.10.0 || ^0.11.0 || ^0.12.0".
warning "@metamask/accounts-controller > @metamask/snaps-sdk > @metamask/providers > extension-port-stream@4.2.0" has unmet peer dependency "webextension-polyfill@^0.10.0 || ^0.11.0 || ^0.12.0".
warning " > @metamask/eslint-config-typescript@12.1.0" has incorrect peer dependency "typescript@~4.8.4 || ~5.0 || ~5.1".
warning " > @metamask/transaction-controller@37.3.0" has incorrect peer dependency "@metamask/gas-fee-controller@^20.0.0".
warning "@metamask/transaction-controller > @metamask/nonce-tracker@6.0.0" has unmet peer dependency "@metamask/eth-block-tracker@>=9".

While adding the required dependencies directly to the dependencies section would make the warnings disappear, it would be more useful for the clients to have them. This commit denotes this need by adding them to peerDependencies instead.

After making these changes, there are only a couple peer dependency warnings left:

warning " > @lavamoat/allow-scripts@3.2.0" has unmet peer dependency "@lavamoat/preinstall-always-fail@*".
warning " > @metamask/eslint-config-typescript@12.1.0" has incorrect peer dependency "typescript@~4.8.4 || ~5.0 || ~5.1".
warning " > @metamask/transaction-controller@37.3.0" has incorrect peer dependency "@metamask/gas-fee-controller@^20.0.0".

The remaining peer dependency warnings will be addressed in future commits.

@mcmire mcmire requested review from a team December 3, 2024 20:01
@mcmire mcmire self-assigned this Dec 3, 2024
@socket-security
Copy link

socket-security bot commented Dec 3, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/webextension-polyfill@0.12.0 None 0 205 kB addons-robot

🚮 Removed packages: npm/@metamask/json-rpc-engine@10.0.0, npm/@metamask/rpc-errors@7.0.0, npm/escalade@3.1.2

View full report↗︎

@socket-security
Copy link

socket-security bot commented Dec 3, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@mcmire
Copy link
Contributor Author

mcmire commented Dec 3, 2024

@SocketSecurity ignore npm/@metamask/snaps-utils@8.6.0

This is OK. This is our package.

@mcmire mcmire force-pushed the forward-peer-dependencies branch from 5469cf8 to ca14288 Compare December 3, 2024 20:51
Some controller dependencies of this package have peer dependencies, but
those additional dependencies are not present in this package's
manifest, and as a result peer dependency warnings are being generated
at install time:

```
warning " > @metamask/accounts-controller@18.2.3" has unmet peer dependency "@metamask/snaps-controllers@^9.7.0".
warning "@metamask/accounts-controller > @metamask/keyring-api@8.1.3" has unmet peer dependency "@metamask/providers@^17.2.0".
warning "@metamask/accounts-controller > @metamask/snaps-sdk > @metamask/providers@18.1.1" has unmet peer dependency "webextension-polyfill@^0.10.0 || ^0.11.0 || ^0.12.0".
warning "@metamask/accounts-controller > @metamask/snaps-sdk > @metamask/providers > extension-port-stream@4.2.0" has unmet peer dependency "webextension-polyfill@^0.10.0 || ^0.11.0 || ^0.12.0".
warning " > @metamask/eslint-config-typescript@12.1.0" has incorrect peer dependency "typescript@~4.8.4 || ~5.0 || ~5.1".
warning " > @metamask/transaction-controller@37.3.0" has incorrect peer dependency "@metamask/gas-fee-controller@^20.0.0".
warning "@metamask/transaction-controller > @metamask/nonce-tracker@6.0.0" has unmet peer dependency "@metamask/eth-block-tracker@>=9".
```

While adding the required dependencies directly to the `dependencies`
section would make the warnings disappear, it would be more useful for
the clients to have them. This commit denotes this need by adding them
to `peerDependencies` instead.

After making these changes, there are only a couple peer dependency
warnings left:

```
warning " > @lavamoat/allow-scripts@3.2.0" has unmet peer dependency "@lavamoat/preinstall-always-fail@*".
warning " > @metamask/eslint-config-typescript@12.1.0" has incorrect peer dependency "typescript@~4.8.4 || ~5.0 || ~5.1".
warning " > @metamask/transaction-controller@37.3.0" has incorrect peer dependency "@metamask/gas-fee-controller@^20.0.0".
```

The remaining peer dependency warnings will be addressed in future
commits.
@mcmire mcmire force-pushed the forward-peer-dependencies branch from ca14288 to 6147221 Compare December 3, 2024 20:57
@mcmire mcmire marked this pull request as draft December 3, 2024 23:19
@mcmire
Copy link
Contributor Author

mcmire commented Dec 3, 2024

Partially superceded by #360.

@mcmire
Copy link
Contributor Author

mcmire commented Dec 5, 2024

Now obsolete.

@mcmire mcmire closed this Dec 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants