@apollo/client 3.12.0-rc.2 → 3.12.0-rc.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.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": patch
3
+ ---
4
+
5
+ Fix issue when using `Unmasked` with older versions of TypeScript when used with array fields.
@@ -0,0 +1,5 @@
1
+ ---
2
+ "@apollo/client": patch
3
+ ---
4
+
5
+ Add a helper that will skip the TS unmasking alorithm when no fragments are present on type level
@@ -6,6 +6,7 @@
6
6
  },
7
7
  "changesets": [
8
8
  "brown-readers-smash",
9
+ "clean-turkeys-kick",
9
10
  "cold-apes-bow",
10
11
  "early-bobcats-eat",
11
12
  "flat-beans-knock",
@@ -17,6 +18,7 @@
17
18
  "nasty-camels-pay",
18
19
  "nervous-owls-hear",
19
20
  "nice-countries-share",
21
+ "perfect-jobs-flow",
20
22
  "slimy-points-end",
21
23
  "small-bears-confess",
22
24
  "wicked-pans-appear"
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @apollo/client
2
2
 
3
+ ## 3.12.0-rc.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [#12150](https://github.com/apollographql/apollo-client/pull/12150) [`9ed1e1e`](https://github.com/apollographql/apollo-client/commit/9ed1e1ef02b28445614fed4f5c141a289ac32d66) Thanks [@jerelmiller](https://github.com/jerelmiller)! - Fix issue when using `Unmasked` with older versions of TypeScript when used with array fields.
8
+
9
+ - [#12152](https://github.com/apollographql/apollo-client/pull/12152) [`78137ec`](https://github.com/apollographql/apollo-client/commit/78137eccba90b80dd29bd8e1423b49ebe51ef8df) Thanks [@phryneas](https://github.com/phryneas)! - Add a helper that will skip the TS unmasking alorithm when no fragments are present on type level
10
+
3
11
  ## 3.12.0-rc.2
4
12
 
5
13
  ### Patch Changes
package/apollo-client.cjs CHANGED
@@ -31,7 +31,7 @@ function _interopNamespace(e) {
31
31
  var equal__default = /*#__PURE__*/_interopDefaultLegacy(equal);
32
32
  var React__namespace = /*#__PURE__*/_interopNamespace(React);
33
33
 
34
- var version = "3.12.0-rc.2";
34
+ var version = "3.12.0-rc.3";
35
35
 
36
36
  function maybe(thunk) {
37
37
  try {
@@ -2605,23 +2605,22 @@ function getMutableTarget(data, mutableTargets) {
2605
2605
  function maskSelectionSet(data, selectionSet, context, migration, path) {
2606
2606
  var _a;
2607
2607
  var knownChanged = context.knownChanged;
2608
+ var memo = getMutableTarget(data, context.mutableTargets);
2608
2609
  if (Array.isArray(data)) {
2609
- var target = getMutableTarget(data, context.mutableTargets);
2610
2610
  for (var _i = 0, _b = Array.from(data.entries()); _i < _b.length; _i++) {
2611
2611
  var _c = _b[_i], index = _c[0], item = _c[1];
2612
2612
  if (item === null) {
2613
- target[index] = null;
2613
+ memo[index] = null;
2614
2614
  continue;
2615
2615
  }
2616
2616
  var masked = maskSelectionSet(item, selectionSet, context, migration, globalThis.__DEV__ !== false ? "".concat(path || "", "[").concat(index, "]") : void 0);
2617
2617
  if (knownChanged.has(masked)) {
2618
- knownChanged.add(target);
2618
+ knownChanged.add(memo);
2619
2619
  }
2620
- target[index] = masked;
2620
+ memo[index] = masked;
2621
2621
  }
2622
- return knownChanged.has(target) ? target : data;
2622
+ return knownChanged.has(memo) ? memo : data;
2623
2623
  }
2624
- var memo = getMutableTarget(data, context.mutableTargets);
2625
2624
  for (var _d = 0, _e = selectionSet.selections; _d < _e.length; _d++) {
2626
2625
  var selection = _e[_d];
2627
2626
  var value = void 0;