cozy-client 24.7.0 → 24.8.0

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
@@ -3,6 +3,17 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [24.8.0](https://github.com/cozy/cozy-client/compare/v24.7.0...v24.8.0) (2021-09-16)
7
+
8
+
9
+ ### Features
10
+
11
+ * Makes queryAll faster with many requests ([17a9e23](https://github.com/cozy/cozy-client/commit/17a9e2397f72f94daafd03b49f1cebae5bad0ec3))
12
+
13
+
14
+
15
+
16
+
6
17
  # [24.7.0](https://github.com/cozy/cozy-client/compare/v24.6.2...v24.7.0) (2021-09-14)
7
18
 
8
19
 
@@ -2386,7 +2386,7 @@ var CozyClient = /*#__PURE__*/function () {
2386
2386
  CozyClient.hooks = CozyClient.hooks || {};
2387
2387
  CozyClient.fetchPolicies = _policies.default; //COZY_CLIENT_VERSION_PACKAGE in replaced by babel. See babel config
2388
2388
 
2389
- CozyClient.version = "24.7.0";
2389
+ CozyClient.version = "24.8.0";
2390
2390
 
2391
2391
  _microee.default.mixin(CozyClient);
2392
2392
 
@@ -184,21 +184,7 @@ var extractAndMergeDocument = function extractAndMergeDocument(data, updatedStat
184
184
  }
185
185
 
186
186
  var sortedData = (0, _keyBy.default)(data, _helpers.properId);
187
- var mergedData = {};
188
-
189
- if (updatedStateWithIncluded && updatedStateWithIncluded[doctype]) {
190
- Object.values(updatedStateWithIncluded[doctype]).map(function (dataState) {
191
- if (!mergedData[doctype]) mergedData[doctype] = {};
192
- var id = (0, _helpers.properId)(dataState);
193
-
194
- if (sortedData[id]) {
195
- mergedData[doctype][id] = _objectSpread(_objectSpread(_objectSpread({}, dataState), sortedData[id]), mergedData[doctype][id]);
196
- } else {
197
- mergedData[doctype][id] = _objectSpread(_objectSpread({}, dataState), mergedData[doctype][id]);
198
- }
199
- });
200
- }
201
-
187
+ var mergedData = Object.assign({}, updatedStateWithIncluded);
202
188
  Object.values(sortedData).map(function (data) {
203
189
  if (!mergedData[doctype]) mergedData[doctype] = {};
204
190
  var id = (0, _helpers.properId)(data);
@@ -209,7 +195,7 @@ var extractAndMergeDocument = function extractAndMergeDocument(data, updatedStat
209
195
  mergedData[doctype][id] = data;
210
196
  }
211
197
  });
212
- return _objectSpread(_objectSpread({}, updatedStateWithIncluded), mergedData);
198
+ return mergedData;
213
199
  };
214
200
 
215
201
  exports.extractAndMergeDocument = extractAndMergeDocument;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cozy-client",
3
- "version": "24.7.0",
3
+ "version": "24.8.0",
4
4
  "license": "MIT",
5
5
  "main": "dist/index.node.js",
6
6
  "browser": "dist/index.js",
@@ -68,5 +68,5 @@
68
68
  "react-native-inappbrowser-reborn": "^3.5.1"
69
69
  },
70
70
  "sideEffects": false,
71
- "gitHead": "1b8d8596f1898be70b8b1107bd96b055545b73d8"
71
+ "gitHead": "eb10dd8e450275b8ad3d10ae33f35c1e57e76bc4"
72
72
  }