mobx 6.8.0 → 6.9.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/dist/mobx.esm.js CHANGED
@@ -459,6 +459,9 @@ var Atom = /*#__PURE__*/function () {
459
459
  _proto.reportChanged = function reportChanged() {
460
460
  startBatch();
461
461
  propagateChanged(this);
462
+ // We could update state version only at the end of batch,
463
+ // but we would still have to switch some global flag here to signal a change.
464
+ globalState.stateVersion = globalState.stateVersion < Number.MAX_SAFE_INTEGER ? globalState.stateVersion + 1 : Number.MIN_SAFE_INTEGER;
462
465
  endBatch();
463
466
  };
464
467
  _proto.toString = function toString() {
@@ -1834,6 +1837,7 @@ var MobXGlobals = function MobXGlobals() {
1834
1837
  this.useProxies = true;
1835
1838
  this.verifyProxies = false;
1836
1839
  this.safeDescriptors = true;
1840
+ this.stateVersion = Number.MIN_SAFE_INTEGER;
1837
1841
  };
1838
1842
  var canMergeGlobalState = true;
1839
1843
  var isolateCalled = false;
@@ -3090,7 +3094,7 @@ function toJS(source, options) {
3090
3094
 
3091
3095
  function trace() {
3092
3096
  if (!(process.env.NODE_ENV !== "production")) {
3093
- die("trace() is not available in production builds");
3097
+ return;
3094
3098
  }
3095
3099
  var enterBreakPoint = false;
3096
3100
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {