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: Rename ControllerMessenger to Messenger #5050

Merged
merged 2 commits into from
Dec 13, 2024

Conversation

Gudahtt
Copy link
Member

@Gudahtt Gudahtt commented Dec 10, 2024

Explanation

Rename the ControllerMessenger to Messenger so that it is clear it can be used for more than just controllers.

This was decided by this ADR: https://github.com/MetaMask/decisions/blob/main/decisions/core/0001-messaging-non-controllers.md

Previous names have been preserved as aliases to avoid making this a breaking change.

References

Relates to #4538

Changelog

See diff

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've highlighted breaking changes using the "BREAKING" category above as appropriate
  • I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes

@Gudahtt Gudahtt force-pushed the rename-controller-messenger branch 7 times, most recently from f7e4e7c to d2c1c84 Compare December 10, 2024 01:49
@Gudahtt Gudahtt marked this pull request as ready for review December 10, 2024 21:55
@Gudahtt Gudahtt requested a review from a team as a code owner December 10, 2024 21:55
@Gudahtt
Copy link
Member Author

Gudahtt commented Dec 10, 2024

@metamaskbot publish-previews

@Gudahtt
Copy link
Member Author

Gudahtt commented Dec 10, 2024

I'd like to test this in the clients before merging even though it's not breaking, as we've seen type incompatibilities before from private property renaming.

Copy link
Contributor

Preview builds have been published. See these instructions for more information about preview builds.

Expand for full list of packages and versions.
{
  "@metamask-previews/accounts-controller": "20.0.1-preview-1d772cc",
  "@metamask-previews/address-book-controller": "6.0.2-preview-1d772cc",
  "@metamask-previews/announcement-controller": "7.0.2-preview-1d772cc",
  "@metamask-previews/approval-controller": "7.1.1-preview-1d772cc",
  "@metamask-previews/assets-controllers": "45.1.1-preview-1d772cc",
  "@metamask-previews/base-controller": "7.0.2-preview-1d772cc",
  "@metamask-previews/build-utils": "3.0.2-preview-1d772cc",
  "@metamask-previews/chain-controller": "0.2.1-preview-1d772cc",
  "@metamask-previews/composable-controller": "10.0.0-preview-1d772cc",
  "@metamask-previews/controller-utils": "11.4.4-preview-1d772cc",
  "@metamask-previews/ens-controller": "15.0.1-preview-1d772cc",
  "@metamask-previews/eth-json-rpc-provider": "4.1.6-preview-1d772cc",
  "@metamask-previews/gas-fee-controller": "22.0.2-preview-1d772cc",
  "@metamask-previews/json-rpc-engine": "10.0.1-preview-1d772cc",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.5-preview-1d772cc",
  "@metamask-previews/keyring-controller": "19.0.1-preview-1d772cc",
  "@metamask-previews/logging-controller": "6.0.3-preview-1d772cc",
  "@metamask-previews/message-manager": "11.0.3-preview-1d772cc",
  "@metamask-previews/multichain": "1.1.2-preview-1d772cc",
  "@metamask-previews/name-controller": "8.0.2-preview-1d772cc",
  "@metamask-previews/network-controller": "22.1.1-preview-1d772cc",
  "@metamask-previews/notification-services-controller": "0.15.0-preview-1d772cc",
  "@metamask-previews/permission-controller": "11.0.4-preview-1d772cc",
  "@metamask-previews/permission-log-controller": "3.0.2-preview-1d772cc",
  "@metamask-previews/phishing-controller": "12.3.1-preview-1d772cc",
  "@metamask-previews/polling-controller": "12.0.2-preview-1d772cc",
  "@metamask-previews/preferences-controller": "15.0.1-preview-1d772cc",
  "@metamask-previews/profile-sync-controller": "3.0.0-preview-1d772cc",
  "@metamask-previews/queued-request-controller": "8.0.2-preview-1d772cc",
  "@metamask-previews/rate-limit-controller": "6.0.2-preview-1d772cc",
  "@metamask-previews/remote-feature-flag-controller": "1.1.0-preview-1d772cc",
  "@metamask-previews/selected-network-controller": "20.0.2-preview-1d772cc",
  "@metamask-previews/signature-controller": "23.1.0-preview-1d772cc",
  "@metamask-previews/transaction-controller": "42.0.0-preview-1d772cc",
  "@metamask-previews/user-operation-controller": "21.0.0-preview-1d772cc"
}

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!

Rename the `ControllerMessenger` to `Messenger` so that it is clear it
can be used for more than just controllers.

This was decided by this ADR: https://github.com/MetaMask/decisions/blob/main/decisions/core/0001-messaging-non-controllers.md

Previous names have been preserved as aliases to avoid making this a breaking
change.

Relates to #4538
@Gudahtt Gudahtt force-pushed the rename-controller-messenger branch from 1d772cc to 9c00587 Compare December 13, 2024 21:27
@Gudahtt Gudahtt merged commit e73bc47 into main Dec 13, 2024
120 of 121 checks passed
@Gudahtt Gudahtt deleted the rename-controller-messenger branch December 13, 2024 22:01
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