Skip to content

Commit 0bf29e4

Browse files
authored
fix: Fix mistake in StatePropertyMetadataConstraint type (#6942)
## 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 -->
1 parent e4f2a09 commit 0bf29e4

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

packages/base-controller/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Fixed
11+
12+
- In experimental `next` export, fix the `StatePropertyMetadataConstraint` type ([#6942](https://github.com/MetaMask/core/pull/6942))
13+
- It incorrectly used the old metadata property `anonymous` instead of `includeInDebugSnapshot`
14+
1015
## [8.4.2]
1116

1217
### Fixed

packages/base-controller/src/next/BaseController.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export type StateDeriverConstraint = (value: never) => Json;
112112
* This type can be assigned to any `StatePropertyMetadata` type.
113113
*/
114114
export type StatePropertyMetadataConstraint = {
115-
anonymous: boolean | StateDeriverConstraint;
115+
includeInDebugSnapshot: boolean | StateDeriverConstraint;
116116
includeInStateLogs?: boolean | StateDeriverConstraint;
117117
persist: boolean | StateDeriverConstraint;
118118
usedInUi?: boolean;

0 commit comments

Comments
 (0)