mobx-keystone 1.16.0 → 1.17.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 +8 -4
- package/dist/mobx-keystone.esm.js +401 -885
- package/dist/mobx-keystone.esm.mjs +401 -885
- package/dist/mobx-keystone.umd.js +406 -890
- package/dist/types/types/TypeChecker.d.ts +0 -4
- package/dist/types/types/arrayBased/typesArray.d.ts +0 -1
- package/dist/types/types/arrayBased/typesTuple.d.ts +0 -1
- package/dist/types/types/createPerEntryCachedCheck.d.ts +1 -0
- package/dist/types/types/objectBased/typesArraySet.d.ts +0 -1
- package/dist/types/types/objectBased/typesDataModelData.d.ts +1 -5
- package/dist/types/types/objectBased/typesModel.d.ts +0 -4
- package/dist/types/types/objectBased/typesObject.d.ts +0 -4
- package/dist/types/types/objectBased/typesObjectMap.d.ts +0 -1
- package/dist/types/types/objectBased/typesRecord.d.ts +0 -1
- package/dist/types/types/utility/typesOr.d.ts +0 -1
- package/dist/types/types/utility/typesRefinement.d.ts +0 -1
- package/dist/types/types/utility/typesTag.d.ts +0 -1
- package/package.json +1 -1
- package/src/dataModel/BaseDataModel.ts +14 -9
- package/src/dataModel/newDataModel.ts +11 -12
- package/src/model/BaseModel.ts +270 -270
- package/src/model/newModel.ts +301 -301
- package/src/tweaker/tweakArray.ts +2 -1
- package/src/tweaker/typeChecking.ts +64 -205
- package/src/types/TypeChecker.ts +6 -187
- package/src/types/arrayBased/typesArray.ts +21 -67
- package/src/types/arrayBased/typesTuple.ts +21 -74
- package/src/types/createPerEntryCachedCheck.ts +160 -0
- package/src/types/objectBased/typesArraySet.ts +2 -7
- package/src/types/objectBased/typesDataModelData.ts +6 -33
- package/src/types/objectBased/typesModel.ts +2 -34
- package/src/types/objectBased/typesObject.ts +42 -142
- package/src/types/objectBased/typesObjectMap.ts +2 -7
- package/src/types/objectBased/typesRecord.ts +26 -64
- package/src/types/objectBased/typesRef.ts +3 -8
- package/src/types/primitiveBased/typesPrimitive.ts +1 -5
- package/src/types/typeCheck.ts +2 -33
- package/src/types/utility/typesOr.ts +5 -18
- package/src/types/utility/typesRefinement.ts +2 -7
- package/src/types/utility/typesTag.ts +2 -13
- package/src/types/utility/typesUnchecked.ts +0 -1
- package/dist/types/types/typeCheckScope.d.ts +0 -18
- package/src/types/typeCheckScope.ts +0 -109
package/CHANGELOG.md
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
## 1.
|
|
3
|
+
## 1.17.0
|
|
4
4
|
|
|
5
|
-
-
|
|
6
|
-
- 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.
|
|
5
|
+
- 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.
|
|
7
6
|
|
|
8
|
-
## 1.
|
|
7
|
+
## 1.16.0
|
|
8
|
+
|
|
9
|
+
- 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
|
+
- 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.
|
|
11
|
+
|
|
12
|
+
## 1.15.0
|
|
9
13
|
|
|
10
14
|
- Added `registerModels(...)` to explicitly keep model/data-model class references at runtime (useful in snapshot-heavy apps where imports may be elided).
|
|
11
15
|
- Improved unknown model registry errors to include actionable guidance (`registerModels`, side-effect/runtime imports, and typed/runtime model references).
|