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

Move composable-controller utility types to base-controller #4581

Merged

Conversation

MajorLift
Copy link
Contributor

@MajorLift MajorLift commented Aug 1, 2024

Explanation

This commit moves BaseController-related types and functions in @metamask/composable-controller to @metamask/base-controller.

Because applying these changes requires a concurrent major update of @metamask/base-controller, this commit will be excluded from @metamask/composable-controller@8.0.0 (#4467), so that complications can be avoided while applying 8.0.0 to mobile.

References

Changelog

@metamask/base-controller (minor)

Added

  • Migrate from @metamask/composable-controller@8.0.0 into @metamask/base-controller: types LegacyControllerStateConstraint, RestrictedControllerMessengerConstraint and type guard functions isBaseController, isBaseControllerV1 (#4581)
  • Add and export types ControllerInstance, BaseControllerInstance, StateDeriverConstraint, StateMetadataConstraint, StatePropertyMetadataConstraint, BaseControllerV1Instance, ConfigConstraintV1, StateConstraintV1 (#4581)

@metamask/composable-controller (major)

Removed

  • BREAKING: Remove exports for types LegacyControllerStateConstraint, RestrictedControllerMessengerConstraint, and type guard functions isBaseController, isBaseControllerV1 (#4467)
    • These have been migrated to @metamask/base-controller@6.2.0.

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

@MajorLift MajorLift requested a review from a team August 1, 2024 19:33
@MajorLift MajorLift self-assigned this Aug 1, 2024
@MajorLift MajorLift marked this pull request as ready for review August 1, 2024 19:55
@MajorLift MajorLift requested a review from a team as a code owner August 1, 2024 19:55
@MajorLift MajorLift changed the base branch from 240620-fix-ComposableController-validator-types to main August 1, 2024 20:08
@MajorLift MajorLift marked this pull request as draft August 1, 2024 20:08
@MajorLift MajorLift changed the base branch from main to 240620-fix-ComposableController-validator-types August 1, 2024 20:29
@MajorLift MajorLift marked this pull request as ready for review August 1, 2024 20:31
Base automatically changed from 240620-fix-ComposableController-validator-types to main August 20, 2024 17:04
@MajorLift
Copy link
Contributor Author

@metamaskbot publish-preview

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": "18.0.0-preview-b5937ee4",
  "@metamask-previews/address-book-controller": "5.0.0-preview-b5937ee4",
  "@metamask-previews/announcement-controller": "7.0.0-preview-b5937ee4",
  "@metamask-previews/approval-controller": "7.0.2-preview-b5937ee4",
  "@metamask-previews/assets-controllers": "37.0.0-preview-b5937ee4",
  "@metamask-previews/base-controller": "6.0.2-preview-b5937ee4",
  "@metamask-previews/build-utils": "3.0.0-preview-b5937ee4",
  "@metamask-previews/chain-controller": "0.1.1-preview-b5937ee4",
  "@metamask-previews/composable-controller": "7.0.0-preview-b5937ee4",
  "@metamask-previews/controller-utils": "11.0.2-preview-b5937ee4",
  "@metamask-previews/ens-controller": "13.0.1-preview-b5937ee4",
  "@metamask-previews/eth-json-rpc-provider": "4.1.3-preview-b5937ee4",
  "@metamask-previews/gas-fee-controller": "19.0.1-preview-b5937ee4",
  "@metamask-previews/json-rpc-engine": "9.0.2-preview-b5937ee4",
  "@metamask-previews/json-rpc-middleware-stream": "8.0.2-preview-b5937ee4",
  "@metamask-previews/keyring-controller": "17.1.2-preview-b5937ee4",
  "@metamask-previews/logging-controller": "5.0.0-preview-b5937ee4",
  "@metamask-previews/message-manager": "10.0.2-preview-b5937ee4",
  "@metamask-previews/name-controller": "8.0.0-preview-b5937ee4",
  "@metamask-previews/network-controller": "20.2.0-preview-b5937ee4",
  "@metamask-previews/notification-controller": "6.0.0-preview-b5937ee4",
  "@metamask-previews/notification-services-controller": "0.2.1-preview-b5937ee4",
  "@metamask-previews/permission-controller": "11.0.0-preview-b5937ee4",
  "@metamask-previews/permission-log-controller": "3.0.0-preview-b5937ee4",
  "@metamask-previews/phishing-controller": "11.0.0-preview-b5937ee4",
  "@metamask-previews/polling-controller": "9.0.1-preview-b5937ee4",
  "@metamask-previews/preferences-controller": "13.0.1-preview-b5937ee4",
  "@metamask-previews/profile-sync-controller": "0.2.1-preview-b5937ee4",
  "@metamask-previews/queued-request-controller": "4.0.0-preview-b5937ee4",
  "@metamask-previews/rate-limit-controller": "6.0.0-preview-b5937ee4",
  "@metamask-previews/selected-network-controller": "17.0.0-preview-b5937ee4",
  "@metamask-previews/signature-controller": "18.1.0-preview-b5937ee4",
  "@metamask-previews/transaction-controller": "35.1.1-preview-b5937ee4",
  "@metamask-previews/user-operation-controller": "14.0.1-preview-b5937ee4"
}

@MajorLift MajorLift force-pushed the move-ComposableController-utility-types-to-BaseController branch from b5937ee to 7a3baa8 Compare August 20, 2024 18:54
Copy link
Member

@mikesposito mikesposito left a comment

Choose a reason for hiding this comment

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

LGTM!

@MajorLift MajorLift merged commit c6f7e02 into main Aug 21, 2024
116 checks passed
@MajorLift MajorLift deleted the move-ComposableController-utility-types-to-BaseController branch August 21, 2024 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants