feat: Make breaking changes to next base-controller metadata - #6593
Merged
Merged
Conversation
Make the planned breaking changes to controller metadata. This includes renaming `anonymous` to `includeInDebugSnapshot`, and it includes making the two new metadata properties required. Relates to #6443
Gudahtt
marked this pull request as ready for review
September 12, 2025 20:36
There was a problem hiding this comment.
Bug: Metadata Constraint Mismatch
The StatePropertyMetadataConstraint type is out of sync with StatePropertyMetadata. It still uses the anonymous property instead of includeInDebugSnapshot, and includeInStateLogs and usedInUi are optional instead of required. This breaks its intended supertype relationship, causing type incompatibility.
packages/base-controller/src/next/BaseController.ts#L109-L120
core/packages/base-controller/src/next/BaseController.ts
Lines 109 to 120 in 1474ccc
4 tasks done
Gudahtt
added a commit
that referenced
this pull request
Oct 24, 2025
## Explanation In the `next` export of `base-controller`, the type `StatePropertyMetadataConstraint` mistakenly referenced the old metadata property name `anonymous` rather than `includeInDebugSnapshot`. The type has been updated to use the correct name. ## References Fixes a mistake introduced in #6593 ## Checklist - [x] I've updated the test suite for new or updated code as appropriate - [x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate - [x] I've communicated my changes to consumers by [updating changelogs for packages I've changed](https://github.com/MetaMask/core/tree/main/docs/contributing.md#updating-changelogs), highlighting breaking changes as necessary - [x] I've prepared draft pull requests for clients and consumer packages to resolve any breaking changes <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Corrects `StatePropertyMetadataConstraint` in the experimental `next` export to use `includeInDebugSnapshot` instead of `anonymous`, and updates the changelog. > > - **Type fix (experimental `next`)** > - Update `StatePropertyMetadataConstraint` in `packages/base-controller/src/next/BaseController.ts` to use `includeInDebugSnapshot` (replacing `anonymous`). > - **Changelog** > - Add Unreleased entry documenting the fix in `packages/base-controller/CHANGELOG.md`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 31f5c11. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation
Make the planned breaking changes to controller metadata. This includes renaming
anonymoustoincludeInDebugSnapshot, and it includes making the two new metadata properties required.References
Relates to #6443
Checklist