mobx-keystone 1.17.0 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +11 -5
- package/dist/mobx-keystone.esm.js +48 -2
- package/dist/mobx-keystone.esm.mjs +48 -2
- package/dist/mobx-keystone.umd.js +48 -2
- package/dist/types/model/index.d.ts +2 -1
- package/dist/types/model/mixins.d.ts +164 -0
- package/package.json +1 -1
- package/src/model/index.ts +6 -5
- package/src/model/mixins.ts +288 -0
- package/src/modelShared/sharedInternalModel.ts +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,16 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
4
|
-
|
|
5
|
-
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
## 1.18.0
|
|
4
|
+
|
|
5
|
+
- Added `defineModelMixin` and `composeMixins` helpers for type-safe class-model mixin composition without per-factory cast boilerplate.
|
|
6
|
+
- Fix: preserve intermediate model props when composing extended/decorated model classes in inheritance chains (for example chained mixins), so runtime-composed classes keep all props from previous composition steps.
|
|
7
|
+
- Fix: `composeMixins` now keeps mixin-added model prop typing markers for non-function fields, so `ModelData<>` and `ModelCreationData<>` reflect mixed-in props.
|
|
8
|
+
|
|
9
|
+
## 1.17.0
|
|
10
|
+
|
|
11
|
+
- Performance: model auto type-checking is now faster for updates in large or deeply nested models. Type checks now re-run only for changed properties while unchanged branches reuse cached results, reducing repeated validation work during frequent updates. This is an internal optimization and does not change the public API.
|
|
12
|
+
|
|
13
|
+
## 1.16.0
|
|
8
14
|
|
|
9
15
|
- Fixed a long-standing bug: model auto type-checking now enforces ancestor property refinements (for example refinements on `a.b`) when mutating nested child model data (for example `a.b.x`), while still avoiding unnecessary ancestor checks when no refinement is present on the path.
|
|
10
16
|
- Performance: reduced runtime type-check overhead by caching object prop checker resolution, avoiding success-path child path allocations in object/array/tuple/record checks, and narrowing `types.or` branch checks by base type.
|