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 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 powered state management solution based on data trees with first-class support for TypeScript, snapshots, patches and much more</i>
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
- #### New! Y.js bindings for `mobx-keystone` are now available in the `mobx-keystone-yjs` package as well as a working example in the examples section of the online docs.
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 more or less modern JavaScript environment to work, namely one with support for:
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 other words, it should work on mostly anything except _it won't work in Internet Explorer_.
133
+ In practice, this covers current browsers and Node.js releases, but not Internet Explorer.
135
134
 
136
- If you are using TypeScript, then version >= 4.2.0 is recommended, though it _might_ work with older versions.
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
- > `yarn add mobx-keystone`
143
+ > `pnpm add mobx mobx-keystone`
143
144
 
144
- > `pnpm add mobx-keystone`
145
+ `mobx` is a peer dependency and must be installed alongside `mobx-keystone`.