Skip to content
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

chore: Recategorize controllers as peer dependencies #472

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Nov 26, 2024

The @metamask/network-controller and @metamask/transaction-controller dependencies have been moved from dependencies to peerDependencies (and devDependencies). This was done because we're not directly importing and using those controllers directly from imports, they're instead passed in as constructor parameters (indirectly), so it's critical that the versions we use here match the versions used on the client exactly.

The peer dependency requirements of those two packages have been silenced because they aren't actually instantiated here, just used for type purposes (so we don't need their peerDependencies present).

@Gudahtt

This comment was marked as resolved.

Base automatically changed from update-network-controller-v22 to main November 26, 2024 20:28
The `@metamask/network-controller` and
`@metamask/transaction-controller` dependencies have been moved from
`dependencies` to `peerDependencies` (and `devDependencies`). This was
done because we're not directly importing and using those controllers
directly from imports, they're instead passed in as constructor
parameters (indirectly), so it's critical that the versions we use here
match the versions used on the client exactly.

The peer dependency requirements of those two packages have been
silenced because they aren't actually instantiated here, just used for
type purposes (so we don't need their `peerDependencies` present).
@Gudahtt Gudahtt force-pushed the controllers-as-peer-dependencies branch from 1c3c7e1 to 3e64d70 Compare November 26, 2024 20:28
@Gudahtt Gudahtt marked this pull request as ready for review November 26, 2024 20:28
@Gudahtt Gudahtt requested a review from a team as a code owner November 26, 2024 20:28
Copy link
Contributor

@cryptodev-2s cryptodev-2s left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

"@metamask/network-controller": "^22.0.0",
"@metamask/transaction-controller": "^38.0.0"
},
"peerDependenciesMeta": {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah... good idea.

@Gudahtt Gudahtt merged commit 42e161c into main Nov 26, 2024
16 checks passed
@Gudahtt Gudahtt deleted the controllers-as-peer-dependencies branch November 26, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants