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

[composable-controller] perf: Optimize expensive reduce operations, fix metadata instantiation #4968

Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
2a4a115
perf: Convert reduce operations to re-use output object instead of cr…
MajorLift Nov 25, 2024
2612d4a
fix: incorrect logic for assigning fall-back metadata properties for …
MajorLift Nov 25, 2024
87fc3f6
fix: type issue with assigning property to generic type
MajorLift Nov 25, 2024
2a18840
feat: **BREAKING:** Re-define `controllers` constructor option from a…
MajorLift Nov 25, 2024
7b0be9f
fix: Check that input is V1/V2 controller when instantiating Composab…
MajorLift Nov 25, 2024
871486a
test: Update tests
MajorLift Nov 25, 2024
c103016
Update changelogs
MajorLift Nov 25, 2024
c570e26
Update comments
MajorLift Nov 25, 2024
901e8b4
perf: Replace` Object.assign` with property assignments
MajorLift Nov 25, 2024
55af3a6
Assign metadata to each child controller instead of to individual nes…
MajorLift Nov 25, 2024
c533f7c
Remove non-controller properties from state, metadata fields
MajorLift Nov 25, 2024
c1a4670
test: fix missing `stateChange` events in test composable-controller …
MajorLift Nov 25, 2024
5b94171
Update jsdoc comments
MajorLift Nov 25, 2024
571a483
Fix undefined property deletion behavior
MajorLift Nov 25, 2024
77fb0e8
Apply `eslint-disable` to entire test file to allow PascalCase contro…
MajorLift Nov 25, 2024
a7e7296
Fix types
MajorLift Nov 26, 2024
b23ef8e
Update changelog
MajorLift Nov 26, 2024
c420da0
Wrap delete operations for non-controllers in try-catch block
MajorLift Dec 3, 2024
518eaa7
Add tests for `stateChange` events that are not defined or omitted fr…
MajorLift Dec 3, 2024
244f6c8
Update packages/composable-controller/CHANGELOG.md
MajorLift Dec 3, 2024
0b52f5f
Add links to changelog entries
MajorLift Dec 3, 2024
61c9697
Add comments explaining reduce implementation and type assertions
MajorLift Dec 3, 2024
74e45f4
Rename `QuxController` to `ControllerWithoutStateChangeEvent`
MajorLift Dec 3, 2024
db8147a
Rename `ChildControllers` type parameter to `ChildControllersMap`
MajorLift Dec 3, 2024
4583266
Merge branch 'main' into jongsun/perf/composable-controller/241124-re…
MajorLift Dec 4, 2024
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
10 changes: 10 additions & 0 deletions packages/composable-controller/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

- **BREAKING:** `ComposableController` constructor option `controllers` and generic type argument `ChildControllers` are re-defined from an array of controller instances to an object that maps controller names to controller instances.
- **BREAKING:** `ComposableController` class field objects `state` and `metadata` exclude child controllers that do not extend from `BaseController` or `BaseControllerV1`. Any non-controller entries that are passed into the constructor will be removed automatically.

### Fixed

- **BREAKING:** `ComposableController` class field object `metadata` now assigns the `StateMetadataProperty`-type object `{ persist: true, anonymous: true }` to each child controller name.
- Previously, V2 child controllers were erroneously assigned their own metadata object. This issue was introduced in `@metamask/[email protected]`.

## [9.0.1]

### Fixed
Expand Down
Loading
Loading