relay-runtime 10.0.1 → 10.1.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.
Files changed (82) hide show
  1. package/handlers/RelayDefaultHandlerProvider.js.flow +6 -0
  2. package/handlers/connection/MutationHandlers.js.flow +152 -20
  3. package/index.js +1 -1
  4. package/index.js.flow +17 -1
  5. package/lib/handlers/RelayDefaultHandlerProvider.js +9 -0
  6. package/lib/handlers/connection/MutationHandlers.js +185 -21
  7. package/lib/index.js +7 -0
  8. package/lib/mutations/RelayDeclarativeMutationConfig.js +5 -7
  9. package/lib/mutations/commitMutation.js +1 -4
  10. package/lib/mutations/validateMutation.js +28 -12
  11. package/lib/network/RelayQueryResponseCache.js +3 -7
  12. package/lib/query/GraphQLTag.js +2 -1
  13. package/lib/query/fetchQuery.js +2 -3
  14. package/lib/query/fetchQueryInternal.js +2 -3
  15. package/lib/store/DataChecker.js +85 -10
  16. package/lib/store/RelayConcreteVariables.js +2 -6
  17. package/lib/store/RelayModernEnvironment.js +81 -72
  18. package/lib/store/RelayModernFragmentSpecResolver.js +14 -7
  19. package/lib/store/RelayModernOperationDescriptor.js +6 -5
  20. package/lib/store/RelayModernQueryExecutor.js +46 -33
  21. package/lib/store/RelayModernRecord.js +3 -7
  22. package/lib/store/RelayModernStore.js +39 -137
  23. package/lib/store/RelayOperationTracker.js +7 -9
  24. package/lib/store/RelayOptimisticRecordSource.js +2 -6
  25. package/lib/store/RelayPublishQueue.js +1 -1
  26. package/lib/store/RelayReader.js +196 -33
  27. package/lib/store/RelayRecordSourceMapImpl.js +3 -5
  28. package/lib/store/RelayReferenceMarker.js +87 -5
  29. package/lib/store/RelayResponseNormalizer.js +115 -19
  30. package/lib/store/RelayStoreReactFlightUtils.js +47 -0
  31. package/lib/store/RelayStoreSubscriptions.js +162 -0
  32. package/lib/store/RelayStoreSubscriptionsUsingMapByID.js +258 -0
  33. package/lib/store/StoreInspector.js +2 -6
  34. package/lib/store/createRelayContext.js +5 -0
  35. package/lib/store/defaultRequiredFieldLogger.js +18 -0
  36. package/lib/store/normalizeRelayPayload.js +2 -6
  37. package/lib/subscription/requestSubscription.js +2 -3
  38. package/lib/util/NormalizationNode.js +1 -5
  39. package/lib/util/RelayConcreteNode.js +2 -0
  40. package/lib/util/RelayFeatureFlags.js +7 -2
  41. package/lib/util/createPayloadFor3DField.js +2 -7
  42. package/lib/util/getFragmentIdentifier.js +12 -3
  43. package/lib/util/getOperation.js +33 -0
  44. package/lib/util/isEmptyObject.js +25 -0
  45. package/lib/util/recycleNodesInto.js +4 -1
  46. package/lib/util/reportMissingRequiredFields.js +48 -0
  47. package/mutations/commitMutation.js.flow +1 -2
  48. package/mutations/validateMutation.js.flow +34 -5
  49. package/network/RelayNetworkTypes.js.flow +22 -0
  50. package/package.json +2 -2
  51. package/query/GraphQLTag.js.flow +3 -1
  52. package/query/fetchQuery.js.flow +2 -2
  53. package/query/fetchQueryInternal.js.flow +0 -5
  54. package/relay-runtime.js +2 -2
  55. package/relay-runtime.min.js +2 -2
  56. package/store/DataChecker.js.flow +68 -2
  57. package/store/RelayModernEnvironment.js.flow +107 -87
  58. package/store/RelayModernFragmentSpecResolver.js.flow +13 -1
  59. package/store/RelayModernOperationDescriptor.js.flow +5 -1
  60. package/store/RelayModernQueryExecutor.js.flow +47 -23
  61. package/store/RelayModernStore.js.flow +33 -107
  62. package/store/RelayPublishQueue.js.flow +1 -1
  63. package/store/RelayReader.js.flow +180 -15
  64. package/store/RelayReferenceMarker.js.flow +72 -5
  65. package/store/RelayResponseNormalizer.js.flow +130 -19
  66. package/store/RelayStoreReactFlightUtils.js.flow +64 -0
  67. package/store/RelayStoreSubscriptions.js.flow +168 -0
  68. package/store/RelayStoreSubscriptionsUsingMapByID.js.flow +259 -0
  69. package/store/RelayStoreTypes.js.flow +130 -37
  70. package/store/createRelayContext.js.flow +3 -0
  71. package/store/defaultRequiredFieldLogger.js.flow +23 -0
  72. package/subscription/requestSubscription.js.flow +5 -2
  73. package/util/NormalizationNode.js.flow +17 -2
  74. package/util/ReaderNode.js.flow +20 -1
  75. package/util/RelayConcreteNode.js.flow +6 -0
  76. package/util/RelayFeatureFlags.js.flow +12 -1
  77. package/util/getFragmentIdentifier.js.flow +33 -9
  78. package/util/getOperation.js.flow +40 -0
  79. package/util/getRequestIdentifier.js.flow +1 -1
  80. package/util/isEmptyObject.js.flow +25 -0
  81. package/util/recycleNodesInto.js.flow +11 -0
  82. package/util/reportMissingRequiredFields.js.flow +51 -0
@@ -12,16 +12,14 @@
12
12
 
13
13
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
14
14
 
15
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
-
17
- function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
15
+ var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
18
16
 
19
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
20
-
21
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
17
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
22
18
 
23
19
  var DataChecker = require('./DataChecker');
24
20
 
21
+ var RelayFeatureFlags = require('../util/RelayFeatureFlags');
22
+
25
23
  var RelayModernRecord = require('./RelayModernRecord');
26
24
 
27
25
  var RelayOptimisticRecordSource = require('./RelayOptimisticRecordSource');
@@ -32,18 +30,20 @@ var RelayReader = require('./RelayReader');
32
30
 
33
31
  var RelayReferenceMarker = require('./RelayReferenceMarker');
34
32
 
33
+ var RelayStoreReactFlightUtils = require('./RelayStoreReactFlightUtils');
34
+
35
+ var RelayStoreSubscriptions = require('./RelayStoreSubscriptions');
36
+
37
+ var RelayStoreSubscriptionsUsingMapByID = require('./RelayStoreSubscriptionsUsingMapByID');
38
+
35
39
  var RelayStoreUtils = require('./RelayStoreUtils');
36
40
 
37
41
  var deepFreeze = require('../util/deepFreeze');
38
42
 
39
43
  var defaultGetDataID = require('./defaultGetDataID');
40
44
 
41
- var hasOverlappingIDs = require('./hasOverlappingIDs');
42
-
43
45
  var invariant = require("fbjs/lib/invariant");
44
46
 
45
- var recycleNodesInto = require('../util/recycleNodesInto');
46
-
47
47
  var resolveImmediate = require('../util/resolveImmediate');
48
48
 
49
49
  var _require = require('./RelayStoreUtils'),
@@ -110,7 +110,7 @@ var RelayModernStore = /*#__PURE__*/function () {
110
110
  this._releaseBuffer = [];
111
111
  this._roots = new Map();
112
112
  this._shouldScheduleGC = false;
113
- this._subscriptions = new Set();
113
+ this._storeSubscriptions = RelayFeatureFlags.ENABLE_STORE_SUBSCRIPTIONS_REFACTOR === true ? new RelayStoreSubscriptionsUsingMapByID() : new RelayStoreSubscriptions();
114
114
  this._updatedRecordIDs = {};
115
115
  initializeRecordSource(this._recordSource);
116
116
  }
@@ -186,7 +186,7 @@ var RelayModernStore = /*#__PURE__*/function () {
186
186
  if (rootEntryIsStale) {
187
187
  _this2._roots["delete"](id);
188
188
 
189
- _this2._scheduleGC();
189
+ _this2.scheduleGC();
190
190
  } else {
191
191
  _this2._releaseBuffer.push(id); // If the release buffer is now over-full, remove the least-recently
192
192
  // added entry and schedule a GC. Note that all items in the release
@@ -198,7 +198,7 @@ var RelayModernStore = /*#__PURE__*/function () {
198
198
 
199
199
  _this2._roots["delete"](_id);
200
200
 
201
- _this2._scheduleGC();
201
+ _this2.scheduleGC();
202
202
  }
203
203
  }
204
204
  }
@@ -267,13 +267,7 @@ var RelayModernStore = /*#__PURE__*/function () {
267
267
  var source = this.getSource();
268
268
  var updatedOwners = [];
269
269
 
270
- this._subscriptions.forEach(function (subscription) {
271
- var owner = _this3._updateSubscription(source, subscription);
272
-
273
- if (owner != null) {
274
- updatedOwners.push(owner);
275
- }
276
- });
270
+ this._storeSubscriptions.updateSubscriptions(source, this._updatedRecordIDs, updatedOwners);
277
271
 
278
272
  this._invalidationSubscriptions.forEach(function (subscription) {
279
273
  _this3._updateInvalidationSubscription(subscription, invalidateStore === true);
@@ -348,28 +342,11 @@ var RelayModernStore = /*#__PURE__*/function () {
348
342
  };
349
343
 
350
344
  _proto.subscribe = function subscribe(snapshot, callback) {
351
- var _this4 = this;
352
-
353
- var subscription = {
354
- backup: null,
355
- callback: callback,
356
- snapshot: snapshot,
357
- stale: false
358
- };
359
-
360
- var dispose = function dispose() {
361
- _this4._subscriptions["delete"](subscription);
362
- };
363
-
364
- this._subscriptions.add(subscription);
365
-
366
- return {
367
- dispose: dispose
368
- };
345
+ return this._storeSubscriptions.subscribe(snapshot, callback);
369
346
  };
370
347
 
371
348
  _proto.holdGC = function holdGC() {
372
- var _this5 = this;
349
+ var _this4 = this;
373
350
 
374
351
  if (this._gcRun) {
375
352
  this._gcRun = null;
@@ -379,13 +356,13 @@ var RelayModernStore = /*#__PURE__*/function () {
379
356
  this._gcHoldCounter++;
380
357
 
381
358
  var dispose = function dispose() {
382
- if (_this5._gcHoldCounter > 0) {
383
- _this5._gcHoldCounter--;
359
+ if (_this4._gcHoldCounter > 0) {
360
+ _this4._gcHoldCounter--;
384
361
 
385
- if (_this5._gcHoldCounter === 0 && _this5._shouldScheduleGC) {
386
- _this5._scheduleGC();
362
+ if (_this4._gcHoldCounter === 0 && _this4._shouldScheduleGC) {
363
+ _this4.scheduleGC();
387
364
 
388
- _this5._shouldScheduleGC = false;
365
+ _this4._shouldScheduleGC = false;
389
366
  }
390
367
  }
391
368
  };
@@ -402,51 +379,16 @@ var RelayModernStore = /*#__PURE__*/function () {
402
379
 
403
380
  _proto.__getUpdatedRecordIDs = function __getUpdatedRecordIDs() {
404
381
  return this._updatedRecordIDs;
405
- } // Returns the owner (RequestDescriptor) if the subscription was affected by the
406
- // latest update, or null if it was not affected.
407
- ;
408
-
409
- _proto._updateSubscription = function _updateSubscription(source, subscription) {
410
- var backup = subscription.backup,
411
- callback = subscription.callback,
412
- snapshot = subscription.snapshot,
413
- stale = subscription.stale;
414
- var hasOverlappingUpdates = hasOverlappingIDs(snapshot.seenRecords, this._updatedRecordIDs);
415
-
416
- if (!stale && !hasOverlappingUpdates) {
417
- return;
418
- }
419
-
420
- var nextSnapshot = hasOverlappingUpdates || !backup ? RelayReader.read(source, snapshot.selector) : backup;
421
- var nextData = recycleNodesInto(snapshot.data, nextSnapshot.data);
422
- nextSnapshot = {
423
- data: nextData,
424
- isMissingData: nextSnapshot.isMissingData,
425
- seenRecords: nextSnapshot.seenRecords,
426
- selector: nextSnapshot.selector
427
- };
428
-
429
- if (process.env.NODE_ENV !== "production") {
430
- deepFreeze(nextSnapshot);
431
- }
432
-
433
- subscription.snapshot = nextSnapshot;
434
- subscription.stale = false;
435
-
436
- if (nextSnapshot.data !== snapshot.data) {
437
- callback(nextSnapshot);
438
- return snapshot.selector.owner;
439
- }
440
382
  };
441
383
 
442
384
  _proto.lookupInvalidationState = function lookupInvalidationState(dataIDs) {
443
- var _this6 = this;
385
+ var _this5 = this;
444
386
 
445
387
  var invalidations = new Map();
446
388
  dataIDs.forEach(function (dataID) {
447
389
  var _RelayModernRecord$ge;
448
390
 
449
- var record = _this6.getSource().get(dataID);
391
+ var record = _this5.getSource().get(dataID);
450
392
 
451
393
  invalidations.set(dataID, (_RelayModernRecord$ge = RelayModernRecord.getInvalidationEpoch(record)) !== null && _RelayModernRecord$ge !== void 0 ? _RelayModernRecord$ge : null);
452
394
  });
@@ -467,7 +409,7 @@ var RelayModernStore = /*#__PURE__*/function () {
467
409
  } // Check if the invalidation state for any of the ids has changed.
468
410
 
469
411
 
470
- var _iterator = _createForOfIteratorHelper(prevInvalidationState.dataIDs),
412
+ var _iterator = (0, _createForOfIteratorHelper2["default"])(prevInvalidationState.dataIDs),
471
413
  _step;
472
414
 
473
415
  try {
@@ -488,7 +430,7 @@ var RelayModernStore = /*#__PURE__*/function () {
488
430
  };
489
431
 
490
432
  _proto.subscribeToInvalidationState = function subscribeToInvalidationState(invalidationState, callback) {
491
- var _this7 = this;
433
+ var _this6 = this;
492
434
 
493
435
  var subscription = {
494
436
  callback: callback,
@@ -496,7 +438,7 @@ var RelayModernStore = /*#__PURE__*/function () {
496
438
  };
497
439
 
498
440
  var dispose = function dispose() {
499
- _this7._invalidationSubscriptions["delete"](subscription);
441
+ _this6._invalidationSubscriptions["delete"](subscription);
500
442
  };
501
443
 
502
444
  this._invalidationSubscriptions.add(subscription);
@@ -507,13 +449,13 @@ var RelayModernStore = /*#__PURE__*/function () {
507
449
  };
508
450
 
509
451
  _proto._updateInvalidationSubscription = function _updateInvalidationSubscription(subscription, invalidatedStore) {
510
- var _this8 = this;
452
+ var _this7 = this;
511
453
 
512
454
  var callback = subscription.callback,
513
455
  invalidationState = subscription.invalidationState;
514
456
  var dataIDs = invalidationState.dataIDs;
515
457
  var isSubscribedToInvalidatedIDs = invalidatedStore || dataIDs.some(function (dataID) {
516
- return _this8._invalidatedRecordIDs.has(dataID);
458
+ return _this7._invalidatedRecordIDs.has(dataID);
517
459
  });
518
460
 
519
461
  if (!isSubscribedToInvalidatedIDs) {
@@ -524,8 +466,6 @@ var RelayModernStore = /*#__PURE__*/function () {
524
466
  };
525
467
 
526
468
  _proto.snapshot = function snapshot() {
527
- var _this9 = this;
528
-
529
469
  !(this._optimisticSource == null) ? process.env.NODE_ENV !== "production" ? invariant(false, 'RelayModernStore: Unexpected call to snapshot() while a previous ' + 'snapshot exists.') : invariant(false) : void 0;
530
470
  var log = this.__log;
531
471
 
@@ -535,31 +475,7 @@ var RelayModernStore = /*#__PURE__*/function () {
535
475
  });
536
476
  }
537
477
 
538
- this._subscriptions.forEach(function (subscription) {
539
- // Backup occurs after writing a new "final" payload(s) and before (re)applying
540
- // optimistic changes. Each subscription's `snapshot` represents what was *last
541
- // published to the subscriber*, which notably may include previous optimistic
542
- // updates. Therefore a subscription can be in any of the following states:
543
- // - stale=true: This subscription was restored to a different value than
544
- // `snapshot`. That means this subscription has changes relative to its base,
545
- // but its base has changed (we just applied a final payload): recompute
546
- // a backup so that we can later restore to the state the subscription
547
- // should be in.
548
- // - stale=false: This subscription was restored to the same value than
549
- // `snapshot`. That means this subscription does *not* have changes relative
550
- // to its base, so the current `snapshot` is valid to use as a backup.
551
- if (!subscription.stale) {
552
- subscription.backup = subscription.snapshot;
553
- return;
554
- }
555
-
556
- var snapshot = subscription.snapshot;
557
- var backup = RelayReader.read(_this9.getSource(), snapshot.selector);
558
- var nextData = recycleNodesInto(snapshot.data, backup.data);
559
- backup.data = nextData; // backup owns the snapshot and can safely mutate
560
-
561
- subscription.backup = backup;
562
- });
478
+ this._storeSubscriptions.snapshotSubscriptions(this.getSource());
563
479
 
564
480
  if (this._gcRun) {
565
481
  this._gcRun = null;
@@ -582,31 +498,13 @@ var RelayModernStore = /*#__PURE__*/function () {
582
498
  this._optimisticSource = null;
583
499
 
584
500
  if (this._shouldScheduleGC) {
585
- this._scheduleGC();
501
+ this.scheduleGC();
586
502
  }
587
503
 
588
- this._subscriptions.forEach(function (subscription) {
589
- var backup = subscription.backup;
590
- subscription.backup = null;
591
-
592
- if (backup) {
593
- if (backup.data !== subscription.snapshot.data) {
594
- subscription.stale = true;
595
- }
596
-
597
- subscription.snapshot = {
598
- data: subscription.snapshot.data,
599
- isMissingData: backup.isMissingData,
600
- seenRecords: backup.seenRecords,
601
- selector: backup.selector
602
- };
603
- } else {
604
- subscription.stale = true;
605
- }
606
- });
504
+ this._storeSubscriptions.restoreSubscriptions();
607
505
  };
608
506
 
609
- _proto._scheduleGC = function _scheduleGC() {
507
+ _proto.scheduleGC = function scheduleGC() {
610
508
  if (this._gcHoldCounter > 0) {
611
509
  this._shouldScheduleGC = true;
612
510
  return;
@@ -642,7 +540,7 @@ var RelayModernStore = /*#__PURE__*/function () {
642
540
  var startEpoch = this._currentWriteEpoch;
643
541
  var references = new Set(); // Mark all records that are traversable from a root
644
542
 
645
- var _iterator2 = _createForOfIteratorHelper(this._roots.values()),
543
+ var _iterator2 = (0, _createForOfIteratorHelper2["default"])(this._roots.values()),
646
544
  _step2;
647
545
 
648
546
  try {
@@ -705,7 +603,7 @@ function initializeRecordSource(target) {
705
603
  /**
706
604
  * Updates the target with information from source, also updating a mapping of
707
605
  * which records in the target were changed as a result.
708
- * Additionally, will marc records as invalidated at the current write epoch
606
+ * Additionally, will mark records as invalidated at the current write epoch
709
607
  * given the set of record ids marked as stale in this update.
710
608
  */
711
609
 
@@ -767,7 +665,11 @@ function updateTargetFromSource(target, source, currentWriteEpoch, idsMarkedForI
767
665
  }
768
666
 
769
667
  if (sourceRecord && targetRecord) {
770
- var nextRecord = RelayModernRecord.update(targetRecord, sourceRecord);
668
+ // ReactFlightClientResponses are lazy and only materialize when readRoot
669
+ // is called when we read the field, so if the record is a Flight field
670
+ // we always use the new record's data regardless of whether
671
+ // it actually changed. Let React take care of reconciliation instead.
672
+ var nextRecord = RelayModernRecord.getType(targetRecord) === RelayStoreReactFlightUtils.REACT_FLIGHT_TYPE_NAME ? sourceRecord : RelayModernRecord.update(targetRecord, sourceRecord);
771
673
 
772
674
  if (nextRecord !== targetRecord) {
773
675
  // Prevent mutation of a record from outside the store.
@@ -10,11 +10,9 @@
10
10
  // flowlint ambiguous-object-type:error
11
11
  'use strict';
12
12
 
13
- function _createForOfIteratorHelper(o) { if (typeof Symbol === "undefined" || o[Symbol.iterator] == null) { if (Array.isArray(o) || (o = _unsupportedIterableToArray(o))) { var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var it, normalCompletion = true, didErr = false, err; return { s: function s() { it = o[Symbol.iterator](); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
13
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
14
14
 
15
- function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(n); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
16
-
17
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
15
+ var _createForOfIteratorHelper2 = _interopRequireDefault(require("@babel/runtime/helpers/createForOfIteratorHelper"));
18
16
 
19
17
  var invariant = require("fbjs/lib/invariant");
20
18
 
@@ -39,7 +37,7 @@ var RelayOperationTracker = /*#__PURE__*/function () {
39
37
 
40
38
  var newlyAffectedOwners = new Set();
41
39
 
42
- var _iterator = _createForOfIteratorHelper(affectedOwners),
40
+ var _iterator = (0, _createForOfIteratorHelper2["default"])(affectedOwners),
43
41
  _step;
44
42
 
45
43
  try {
@@ -78,7 +76,7 @@ var RelayOperationTracker = /*#__PURE__*/function () {
78
76
 
79
77
  var ownersAffectedByOperation = this._pendingOperationsToOwners.get(pendingOperation) || new Set();
80
78
 
81
- var _iterator2 = _createForOfIteratorHelper(newlyAffectedOwners),
79
+ var _iterator2 = (0, _createForOfIteratorHelper2["default"])(newlyAffectedOwners),
82
80
  _step2;
83
81
 
84
82
  try {
@@ -116,7 +114,7 @@ var RelayOperationTracker = /*#__PURE__*/function () {
116
114
 
117
115
  var updatedOwners = new Set();
118
116
 
119
- var _iterator3 = _createForOfIteratorHelper(affectedOwners),
117
+ var _iterator3 = (0, _createForOfIteratorHelper2["default"])(affectedOwners),
120
118
  _step3;
121
119
 
122
120
  try {
@@ -144,7 +142,7 @@ var RelayOperationTracker = /*#__PURE__*/function () {
144
142
  _iterator3.f();
145
143
  }
146
144
 
147
- var _iterator4 = _createForOfIteratorHelper(completedOwners),
145
+ var _iterator4 = (0, _createForOfIteratorHelper2["default"])(completedOwners),
148
146
  _step4;
149
147
 
150
148
  try {
@@ -163,7 +161,7 @@ var RelayOperationTracker = /*#__PURE__*/function () {
163
161
  _iterator4.f();
164
162
  }
165
163
 
166
- var _iterator5 = _createForOfIteratorHelper(updatedOwners),
164
+ var _iterator5 = (0, _createForOfIteratorHelper2["default"])(updatedOwners),
167
165
  _step5;
168
166
 
169
167
  try {
@@ -12,11 +12,7 @@
12
12
 
13
13
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
14
14
 
15
- var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
16
-
17
- function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
18
-
19
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
15
+ var _objectSpread2 = _interopRequireDefault(require("@babel/runtime/helpers/objectSpread2"));
20
16
 
21
17
  var RelayRecordSource = require('./RelayRecordSource');
22
18
 
@@ -102,7 +98,7 @@ var RelayOptimisticRecordSource = /*#__PURE__*/function () {
102
98
  _proto.toJSON = function toJSON() {
103
99
  var _this = this;
104
100
 
105
- var merged = _objectSpread({}, this._base.toJSON());
101
+ var merged = (0, _objectSpread2["default"])({}, this._base.toJSON());
106
102
 
107
103
  this._sink.getRecordIDs().forEach(function (dataID) {
108
104
  var record = _this.get(dataID);
@@ -146,7 +146,7 @@ var RelayPublishQueue = /*#__PURE__*/function () {
146
146
 
147
147
  _proto.run = function run(sourceOperation) {
148
148
  if (process.env.NODE_ENV !== "production") {
149
- process.env.NODE_ENV !== "production" ? warning(this._isRunning !== true, 'A store update was detected within another store update. Please ' + 'make sure new store updates arent being executed within an ' + 'updater function for a different update.') : void 0;
149
+ process.env.NODE_ENV !== "production" ? warning(this._isRunning !== true, 'A store update was detected within another store update. Please ' + "make sure new store updates aren't being executed within an " + 'updater function for a different update.') : void 0;
150
150
  this._isRunning = true;
151
151
  }
152
152