-
-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
…2078) ## Motivation The controller-messenger pattern implemented by `BaseControllerV2` is intended to be used by all of our controllers. Currently, the default `BaseController` name points to the older base controller implementation, which needs to be deprecated and only used for temporary backwards compatibility while all controllers are brought up-to-date. ## Explanation In this commit, we export `BaseControllerV2` as the default `BaseController`, and add a `@deprecated` tsdoc tag to the old `BaseController` class as well as export it under the new name `BaseControllerV1` to discourage future usage. This aligns with the `PollingController` naming scheme, where the up-to-date version is the default, and outdated mixins are named with qualifiers (`PollingControllerOnly`, `PollingControllerV1`). ## Impact Existing controller classes in core that extend from the old base controller are not affected — they now simply extend from `BaseControllerV1` instead of `BaseController`. External packages will need to update any instances of `extends BaseController` to `extends BaseControllerV1` and `extends BaseControllerV2` to `extends BaseController`, along with accompanying changes to import statements. --------- Co-authored-by: Elliot Winkler <[email protected]>
- Loading branch information
Showing
32 changed files
with
87 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
...ase-controller/src/BaseController.test.ts → ...e-controller/src/BaseControllerV1.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,17 @@ | ||
export type { BaseConfig, BaseState, Listener } from './BaseController'; | ||
export { BaseController } from './BaseController'; | ||
export type { BaseConfig, BaseState, Listener } from './BaseControllerV1'; | ||
export { BaseControllerV1 } from './BaseControllerV1'; | ||
export type { | ||
Listener as ListenerV2, | ||
StateDeriver, | ||
StateMetadata, | ||
StatePropertyMetadata, | ||
ControllerGetStateAction, | ||
ControllerStateChangeEvent, | ||
} from './BaseControllerV2'; | ||
export { | ||
BaseController as BaseControllerV2, | ||
BaseController, | ||
getAnonymizedState, | ||
getPersistentState, | ||
type ControllerGetStateAction, | ||
type ControllerStateChangeEvent, | ||
} from './BaseControllerV2'; | ||
export * from './ControllerMessenger'; | ||
export * from './RestrictedControllerMessenger'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.