mobx-keystone 2.4.1 → 2.4.3

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,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 2.4.3
4
+
5
+ - Fixed `ExtendedModel` throwing "Cannot assign to read only property 'Symbol(Symbol.metadata)'" when the base class uses standard decorators and decorator metadata is supported (natively or through a polyfill such as core-js) (#598). In non-strict builds such as the UMD one it didn't throw, but the subclass didn't get the base class's `Symbol.metadata`.
6
+
7
+ ## 2.4.2
8
+
9
+ - Fixed `ObjectMap` treating properties inherited from `Object.prototype` as entries: `has("toString")` returned `true`, `get("toString")` the inherited function (`get("__proto__")` returned `Object.prototype`), `delete` returned `true` without removing anything, and `getOrInsert` / `getOrInsertComputed` returned the inherited value without inserting. They now behave like a `Map`: a key is only an entry once it is set, keys such as `toString`, `constructor` or `__proto__` can be stored as entries, and reactions reading `has(key)` / `get(key)` re-run when such an entry is added or removed. Other map wrappers (`asMap`, `types.mapFromObject`, `objectToMapTransform`) already behaved this way. MobX 4 still cannot store entries named like inherited properties, since its `set` fails for them.
10
+
3
11
  ## 2.4.1
4
12
 
5
13
  - `Serializer.decodeCall` and `Serializer.decodeValue` take a `{ generateNewIds }` option (`DecodeOptions`) that gives new model ids to the models decoded from snapshots, nested ones included, e.g. for a server that accepts snapshots from clients, where duplicate ids would break `applyPatches` and `applySnapshot` on replicas. References are unaffected and ids are still kept by default. Value serializers see it as `DecodeContext.generateNewIds`.