-
-
Notifications
You must be signed in to change notification settings - Fork 258
fix: Ensure peer dependencies reflect latest breaking changes #6652
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: Ensure peer dependencies reflect latest breaking changes #6652
Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
33665a7 to
f93b0b9
Compare
|
Rebased to resolve changelog conflicts in account-tree-controller |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
mcmire
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! This does seem better than the behavior that was in place before #6274 was merged.
cryptodev-2s
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
f93b0b9 to
8792126
Compare
8792126 to
8c52fbb
Compare
This comment was marked as outdated.
This comment was marked as outdated.
|
Rebased to resolve conflicts again |
8c52fbb to
a7d366c
Compare
|
@metamaskbot publish-preview |
cryptodev-2s
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
|
Preview builds have been published. See these instructions for more information about preview builds. Expand for full list of packages and versions. |
a7d366c to
b351b45
Compare
…-1.0 packages (#836) ## **Description** Fixes peer dependency constraints for pre-1.0 packages in the monorepo. The previous implementation only used major version ranges (`^0.0.0` for all pre-1.0 packages), which was too permissive and could allow incompatible older versions. This update ensures peer dependencies correctly reflect the most significant version digit for breaking changes, following semantic versioning best practices for pre-1.0 packages. [Same PR in core](https://github.com/MetaMask/core/pull/6652/files#diff-594447fef9feecf11f1839e337c464b7b857fdb73fde7e18940eaa9cdf5b819d) ## **Related issues** Fixes: <!-- Based on MetaMask/core#6652 pattern --> ## **Manual testing steps** 1. Run `yarn constraints` to verify no constraint violations 2. Check that the updated logic handles various version scenarios: - `0.4.1` → generates `^0.4.0` peer dependency range - `0.2.1` → generates `^0.2.0` peer dependency range - `8.1.1` → generates `^8.0.0` peer dependency range (unchanged) - `0.0.5` → generates `^0.0.5` peer dependency range 3. Verify existing peer dependencies in package.json files remain valid 4. Test that the constraint logic properly prevents version mismatches ## **Screenshots/Recordings** Not applicable - this is a build configuration improvement with no visual changes. ### **Before** Pre-1.0 packages generated overly permissive `^0.0.0` peer dependency ranges. ### **After** Pre-1.0 packages generate appropriate ranges: `^0.minor.0` for minor-based versions, `^0.0.patch` for patch-only versions. ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) - [x] I've completed the PR template to the best of my ability - [x] I've included tests if applicable - [x] I've documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I've applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
b351b45 to
ac3d7ea
Compare
ac3d7ea to
ce4adab
Compare
cryptodev-2s
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
Our constraints for `peerDependencies` previously only required the major version to match. However, this was problematic for pre-1.0 packages because it allowed for situations where we cannot update a package without introducing a peer dependency error, since pre-1.0 packages can have breaking changes in minor or patch releases. The constraint has been updated to require the most significant part of the version to be synchronized for peer dependencies, and all resulting constraint errors have been auto-fixed.
ce4adab to
1dbff7b
Compare
## Explanation This release includes a number of breaking changes and "stabilization" 1.0 releases, intended to resolve a variety of peer dependency warnings caused by misaligned dependencies on pre-1.0 packages. ## References See #6652 ## Checklist N/A
## **Description** Update a variety of packages that are part of the `core` monorepo which had peer dependency warnings. The only breaking changes here are the peer dependencies, which should now be aligned. Individual package changelogs: - `account-tree-controller`: [1.0.0](https://github.com/MetaMask/core/blob/main/packages/account-tree-controller/CHANGELOG.md#100) - `assets-controllers`: [76.0.0](https://github.com/MetaMask/core/blob/main/packages/assets-controllers/CHANGELOG.md#7600) - `bridge-controller`: [44.0.0](https://github.com/MetaMask/core/blob/main/packages/bridge-controller/CHANGELOG.md#4400) - `bridge-status-controller`: [44.0.0](https://github.com/MetaMask/core/blob/main/packages/bridge-status-controller/CHANGELOG.md#4400) - `multichain-account-service`: [1.0.0](https://github.com/MetaMask/core/blob/main/packages/multichain-account-service/CHANGELOG.md#100) - `multichain-network-controller`: [1.0.0](https://github.com/MetaMask/core/blob/main/packages/multichain-network-controller/CHANGELOG.md#100) [](https://codespaces.new/MetaMask/metamask-extension/pull/36093?quickstart=1) ## **Changelog** CHANGELOG entry: null ## **Related issues** Here is the corresponding core PR: MetaMask/core#6652 ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: MetaMask Bot <[email protected]>
## **Description** Update a variety of packages that are part of the `core` monorepo which had peer dependency warnings. The only breaking changes here are the peer dependencies, which should now be aligned. Individual package changelogs: - `account-tree-controller`: [1.0.0](https://github.com/MetaMask/core/blob/main/packages/account-tree-controller/CHANGELOG.md#100) - `assets-controllers`: [76.0.0](https://github.com/MetaMask/core/blob/main/packages/assets-controllers/CHANGELOG.md#7600) - `bridge-controller`: [44.0.0](https://github.com/MetaMask/core/blob/main/packages/bridge-controller/CHANGELOG.md#4400) - `bridge-status-controller`: [44.0.0](https://github.com/MetaMask/core/blob/main/packages/bridge-status-controller/CHANGELOG.md#4400) - `multichain-account-service`: [1.0.0](https://github.com/MetaMask/core/blob/main/packages/multichain-account-service/CHANGELOG.md#100) - `multichain-network-controller`: [1.0.0](https://github.com/MetaMask/core/blob/main/packages/multichain-network-controller/CHANGELOG.md#100) - [](https://codespaces.new/MetaMask/metamask-extension/pull/36093?quickstart=1) ## **Changelog** CHANGELOG entry: null ## **Related issues** Here is the corresponding core PR: MetaMask/core#6652 ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: MetaMask Bot <[email protected]>
## **Description** Update a variety of packages that are part of the `core` monorepo which had peer dependency warnings. The only breaking changes here are the peer dependencies, which should now be aligned. Individual package changelogs: - `account-tree-controller`: [1.0.0](https://github.com/MetaMask/core/blob/main/packages/account-tree-controller/CHANGELOG.md#100) - `assets-controllers`: [76.0.0](https://github.com/MetaMask/core/blob/main/packages/assets-controllers/CHANGELOG.md#7600) - `bridge-controller`: [44.0.0](https://github.com/MetaMask/core/blob/main/packages/bridge-controller/CHANGELOG.md#4400) - `bridge-status-controller`: [44.0.0](https://github.com/MetaMask/core/blob/main/packages/bridge-status-controller/CHANGELOG.md#4400) - `multichain-account-service`: [1.0.0](https://github.com/MetaMask/core/blob/main/packages/multichain-account-service/CHANGELOG.md#100) - `multichain-network-controller`: [1.0.0](https://github.com/MetaMask/core/blob/main/packages/multichain-network-controller/CHANGELOG.md#100) - [](https://codespaces.new/MetaMask/metamask-extension/pull/36093?quickstart=1) ## **Changelog** CHANGELOG entry: null ## **Related issues** Here is the corresponding core PR: MetaMask/core#6652 ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: MetaMask Bot <[email protected]>
…0044) ## **Description** Update a variety of packages that are part of the `core` monorepo which had peer dependency warnings. The only breaking changes here are the peer dependencies, which should now be aligned. Edit: Other packages were updated in separate PRs, this now only updates the EarnController. Package changelog: - `earn-controller`: [8.0.0](https://github.com/MetaMask/core/blob/main/packages/earn-controller/CHANGELOG.md#800) ## **Changelog** CHANGELOG entry: null ## **Related issues** Here is the corresponding core PR: MetaMask/core#6652 ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Update @metamask/earn-controller to ^8.0.0 and align related peer/transitive dependencies. > > - **Dependencies**: > - Upgrade `@metamask/earn-controller` to `^8.0.0` in `package.json`. > - Align linked deps/peers in `yarn.lock`: `@metamask/base-controller@^8.4.0`, `@metamask/controller-utils@^11.14.0`, `@metamask/keyring-api@^21.0.0`, peer `@metamask/account-tree-controller@^1.0.0`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a42066a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…0044) ## **Description** Update a variety of packages that are part of the `core` monorepo which had peer dependency warnings. The only breaking changes here are the peer dependencies, which should now be aligned. Edit: Other packages were updated in separate PRs, this now only updates the EarnController. Package changelog: - `earn-controller`: [8.0.0](https://github.com/MetaMask/core/blob/main/packages/earn-controller/CHANGELOG.md#800) ## **Changelog** CHANGELOG entry: null ## **Related issues** Here is the corresponding core PR: MetaMask/core#6652 ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Update @metamask/earn-controller to ^8.0.0 and align related peer/transitive dependencies. > > - **Dependencies**: > - Upgrade `@metamask/earn-controller` to `^8.0.0` in `package.json`. > - Align linked deps/peers in `yarn.lock`: `@metamask/base-controller@^8.4.0`, `@metamask/controller-utils@^11.14.0`, `@metamask/keyring-api@^21.0.0`, peer `@metamask/account-tree-controller@^1.0.0`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a42066a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
…0044) ## **Description** Update a variety of packages that are part of the `core` monorepo which had peer dependency warnings. The only breaking changes here are the peer dependencies, which should now be aligned. Edit: Other packages were updated in separate PRs, this now only updates the EarnController. Package changelog: - `earn-controller`: [8.0.0](https://github.com/MetaMask/core/blob/main/packages/earn-controller/CHANGELOG.md#800) ## **Changelog** CHANGELOG entry: null ## **Related issues** Here is the corresponding core PR: MetaMask/core#6652 ## **Manual testing steps** N/A ## **Screenshots/Recordings** N/A ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile Coding Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Update @metamask/earn-controller to ^8.0.0 and align related peer/transitive dependencies. > > - **Dependencies**: > - Upgrade `@metamask/earn-controller` to `^8.0.0` in `package.json`. > - Align linked deps/peers in `yarn.lock`: `@metamask/base-controller@^8.4.0`, `@metamask/controller-utils@^11.14.0`, `@metamask/keyring-api@^21.0.0`, peer `@metamask/account-tree-controller@^1.0.0`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit a42066a. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
Explanation
Our constraints for
peerDependenciespreviously only required the major version to match. However, this was problematic for pre-1.0 packages because it allowed for situations where we cannot update a package without introducing a peer dependency error, since pre-1.0 packages can have breaking changes in minor or patch releases.The constraint has been updated to require the most significant part of the version to be synchronized for peer dependencies, and all resulting constraint errors have been auto-fixed.
References
N/A
Checklist