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
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/base-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]

### Changed

- Rename `ControllerMessenger` to `Messenger` ([#5050](https://github.com/MetaMask/core/pull/5050))
- `ControllerMessenger` has been renamed to `Messenger`
- `RestrictedControllerMessengerConstraint` has been renamed to `RestrictedMessengerConstraint`
- `RestrictedControllerMessenger` has been renamed to `RestrictedMessenger`
- The `RestrictedMessenger` constructor parameter `controllerMessenger` has been renamed to `messenger`, though the old name is still accepted
- The old names remain exported as deprecated aliases of the new names, so this is not a breaking change.

## [7.0.2]

### Changed
Expand Down
2 changes: 1 addition & 1 deletion packages/base-controller/src/BaseControllerV1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import {
countControllerStateMetadata,
getCountMessenger,
} from './BaseControllerV2.test';
import { ControllerMessenger } from './ControllerMessenger';
import { ControllerMessenger } from './Messenger';

const STATE = { name: 'foo' };
const CONFIG = { disabled: true };
Expand Down
4 changes: 2 additions & 2 deletions packages/base-controller/src/BaseControllerV2.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import {
getPersistentState,
isBaseController,
} from './BaseControllerV2';
import { ControllerMessenger } from './ControllerMessenger';
import type { RestrictedControllerMessenger } from './RestrictedControllerMessenger';
import { ControllerMessenger } from './Messenger';
import type { RestrictedControllerMessenger } from './RestrictedMessenger';

export const countControllerName = 'CountController';

Expand Down
4 changes: 2 additions & 2 deletions packages/base-controller/src/BaseControllerV2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import type {
BaseControllerV1Instance,
StateConstraint as StateConstraintV1,
} from './BaseControllerV1';
import type { ActionConstraint, EventConstraint } from './ControllerMessenger';
import type { ActionConstraint, EventConstraint } from './Messenger';
import type {
RestrictedControllerMessenger,
RestrictedControllerMessengerConstraint,
} from './RestrictedControllerMessenger';
} from './RestrictedMessenger';

enablePatches();

Expand Down
Loading
Loading