mobx 6.0.3 → 6.0.4
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 +6 -0
- package/dist/mobx.cjs.development.js +11 -2
- package/dist/mobx.cjs.development.js.map +1 -1
- package/dist/mobx.cjs.production.min.js +1 -1
- package/dist/mobx.cjs.production.min.js.map +1 -1
- package/dist/mobx.esm.development.js +9 -2
- package/dist/mobx.esm.development.js.map +1 -1
- package/dist/mobx.esm.js +9 -2
- package/dist/mobx.esm.js.map +1 -1
- package/dist/mobx.esm.production.min.js +1 -1
- package/dist/mobx.esm.production.min.js.map +1 -1
- package/dist/mobx.umd.development.js +11 -2
- package/dist/mobx.umd.development.js.map +1 -1
- package/dist/mobx.umd.production.min.js +1 -1
- package/dist/mobx.umd.production.min.js.map +1 -1
- package/package.json +17 -15
- package/src/types/observableobject.ts +8 -3
- package/dist/index.js.flow +0 -591
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# mobx
|
|
2
2
|
|
|
3
|
+
## 6.0.4
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`79a09f49`](https://github.com/mobxjs/mobx/commit/79a09f49a9f2baddbab8d89e9a7ac07cffadf624) [#2615](https://github.com/mobxjs/mobx/pull/2615) Thanks [@urugator](https://github.com/urugator)! - Fix [#2614](https://github.com/mobxjs/mobx/issues/2614) - `makeObservable` does not respect `options.name`
|
|
8
|
+
|
|
3
9
|
## 6.0.3
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
3
5
|
var niceErrors = {
|
|
4
6
|
0: "Invalid value for configuration 'enforceActions', expected 'never', 'always' or 'observed'",
|
|
5
7
|
1: function _(prop) {
|
|
@@ -4680,8 +4682,15 @@ function asObservableObject(target, name, defaultEnhancer) {
|
|
|
4680
4682
|
|
|
4681
4683
|
if (hasProp(target, $mobx)) return target[$mobx];
|
|
4682
4684
|
if ( !Object.isExtensible(target)) die("Cannot make the designated object observable; it is not extensible");
|
|
4683
|
-
|
|
4684
|
-
if (!name)
|
|
4685
|
+
|
|
4686
|
+
if (!name) {
|
|
4687
|
+
if (isPlainObject(target)) {
|
|
4688
|
+
name = "ObservableObject@" + getNextId();
|
|
4689
|
+
} else {
|
|
4690
|
+
name = (target.constructor.name || "ObservableObject") + "@" + getNextId();
|
|
4691
|
+
}
|
|
4692
|
+
}
|
|
4693
|
+
|
|
4685
4694
|
var adm = new ObservableObjectAdministration(target, new Map(), stringifyKey(name), defaultEnhancer);
|
|
4686
4695
|
addHiddenProp(target, $mobx, adm);
|
|
4687
4696
|
return adm;
|