mobx-keystone 1.24.0 → 1.24.1
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 +4 -0
- package/LICENSE +21 -21
- package/README.md +11 -10
- package/dist/mobx-keystone.esm.js +76 -84
- package/dist/mobx-keystone.esm.mjs +76 -84
- package/dist/mobx-keystone.umd.js +76 -84
- package/dist/types/modelShared/BaseModelShared.d.ts +7 -1
- package/dist/types/modelShared/prop.d.ts +5 -0
- package/dist/types/types/TypeChecker.d.ts +79 -0
- package/dist/types/types/schemas.d.ts +15 -0
- package/package.json +7 -6
- package/src/modelShared/BaseModelShared.ts +1 -1
- package/src/modelShared/prop.ts +1 -1
- package/src/types/TypeChecker.ts +6 -6
- package/src/types/schemas.ts +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 1.24.1
|
|
4
|
+
|
|
5
|
+
- Fixed a serious type-safety regression in the declarations published with versions 1.20.0 through 1.24.0, where `types.object(...)` data, snapshot, and stored-data types could collapse to `{ [x: string]: any }`. This allowed incorrect property values, unknown properties, and arbitrary property access to pass TypeScript checks. The missing declaration dependencies are now retained, restoring the exact object shape and optional-property inference, and package builds now fully type-check every generated declaration to prevent this from recurring.
|
|
6
|
+
|
|
3
7
|
## 1.24.0
|
|
4
8
|
|
|
5
9
|
- Added MobX 7 compatibility with standard-decorator coverage across TypeScript, Babel, and SWC.
|
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2019 Javier González Garcés
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Javier González Garcés
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<h1 align="center">mobx-keystone</h1>
|
|
4
4
|
</p>
|
|
5
5
|
<p align="center">
|
|
6
|
-
<i>A MobX
|
|
6
|
+
<i>A MobX-powered state management solution based on data trees, with first-class support for TypeScript, snapshots, patches, and much more</i>
|
|
7
7
|
</p>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
@@ -32,9 +32,7 @@
|
|
|
32
32
|
>
|
|
33
33
|
> ## [mobx-keystone.js.org](https://mobx-keystone.js.org)
|
|
34
34
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
#### New! Loro CRDT bindings for `mobx-keystone` are now available in the `mobx-keystone-loro` package with native move operation support for arrays, as well as a working example in the examples section of the online docs.
|
|
35
|
+
Collaborative editing is available through the [`mobx-keystone-yjs`](https://mobx-keystone.js.org/integrations/yjs-binding) and [`mobx-keystone-loro`](https://mobx-keystone.js.org/integrations/loro-binding) CRDT bindings, with complete examples in the online docs.
|
|
38
36
|
|
|
39
37
|
## Introduction
|
|
40
38
|
|
|
@@ -46,6 +44,7 @@ You can think of it as a TypeScript-first model layer on top of MobX that scales
|
|
|
46
44
|
### Quick links
|
|
47
45
|
|
|
48
46
|
- [Installation](https://mobx-keystone.js.org/installation)
|
|
47
|
+
- [Getting Started](https://mobx-keystone.js.org/getting-started)
|
|
49
48
|
- [Class Models](https://mobx-keystone.js.org/class-models)
|
|
50
49
|
- [Todo List Example](https://mobx-keystone.js.org/examples/todo-list)
|
|
51
50
|
- [MST Migration Guide](https://mobx-keystone.js.org/mst-migration-guide)
|
|
@@ -124,21 +123,23 @@ Model instances are created from props, protect their own updates, and reconcile
|
|
|
124
123
|
|
|
125
124
|
## Requirements
|
|
126
125
|
|
|
127
|
-
This library requires a
|
|
126
|
+
This library requires a modern JavaScript environment with support for:
|
|
128
127
|
|
|
129
128
|
- MobX 7, 6, 5 (or 4 with its gotchas)
|
|
130
129
|
- Proxies
|
|
131
130
|
- Symbols
|
|
132
131
|
- WeakMap/WeakSet
|
|
133
132
|
|
|
134
|
-
In
|
|
133
|
+
In practice, this covers current browsers and Node.js releases, but not Internet Explorer.
|
|
135
134
|
|
|
136
|
-
|
|
135
|
+
TypeScript 5.0 or newer is recommended so you can use standard decorators. Legacy decorators remain supported by `mobx-keystone`; see the [installation guide](https://mobx-keystone.js.org/installation) for the required compiler configuration and the MobX 7 compatibility note.
|
|
137
136
|
|
|
138
137
|
## Installation
|
|
139
138
|
|
|
140
|
-
> `npm install mobx-keystone`
|
|
139
|
+
> `npm install mobx mobx-keystone`
|
|
140
|
+
|
|
141
|
+
> `yarn add mobx mobx-keystone`
|
|
141
142
|
|
|
142
|
-
> `
|
|
143
|
+
> `pnpm add mobx mobx-keystone`
|
|
143
144
|
|
|
144
|
-
|
|
145
|
+
`mobx` is a peer dependency and must be installed alongside `mobx-keystone`.
|