contentful-resolve-response 1.2.2 → 1.3.2
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 +11 -0
- package/dist/cjs/index.js +3 -3
- package/dist/esm/index.js +2 -2
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,14 @@
|
|
|
1
|
+
## [1.3.2](https://github.com/contentful/contentful-resolve-response/compare/v1.3.1...v1.3.2) (2022-02-24)
|
|
2
|
+
|
|
3
|
+
## [1.3.1](https://github.com/contentful/contentful-resolve-response/compare/v1.3.0...v1.3.1) (2022-02-24)
|
|
4
|
+
|
|
5
|
+
# [1.3.0](https://github.com/contentful/contentful-resolve-response/compare/v1.2.2...v1.3.0) (2020-11-25)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
* remove lodash and replace cloneDeep with fast-copy ([b6bffed](https://github.com/contentful/contentful-resolve-response/commit/b6bffed343eebf4913d397a4e157787028929692))
|
|
11
|
+
|
|
1
12
|
## [1.2.2](https://github.com/contentful/contentful-resolve-response/compare/v1.2.1...v1.2.2) (2020-07-03)
|
|
2
13
|
|
|
3
14
|
|
package/dist/cjs/index.js
CHANGED
|
@@ -4,9 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _fastCopy = require('fast-copy');
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _fastCopy2 = _interopRequireDefault(_fastCopy);
|
|
10
10
|
|
|
11
11
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
12
|
|
|
@@ -134,7 +134,7 @@ var resolveResponse = function resolveResponse(response, options) {
|
|
|
134
134
|
if (!response.items) {
|
|
135
135
|
return [];
|
|
136
136
|
}
|
|
137
|
-
var responseClone = (0,
|
|
137
|
+
var responseClone = (0, _fastCopy2.default)(response);
|
|
138
138
|
var allIncludes = Object.keys(responseClone.includes || {}).reduce(function (all, type) {
|
|
139
139
|
return [].concat(_toConsumableArray(all), _toConsumableArray(response.includes[type]));
|
|
140
140
|
}, []);
|
package/dist/esm/index.js
CHANGED
|
@@ -2,7 +2,7 @@ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol
|
|
|
2
2
|
|
|
3
3
|
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } }
|
|
4
4
|
|
|
5
|
-
import
|
|
5
|
+
import copy from 'fast-copy';
|
|
6
6
|
|
|
7
7
|
var UNRESOLVED_LINK = {}; // unique object to avoid polyfill bloat using Symbol()
|
|
8
8
|
|
|
@@ -126,7 +126,7 @@ var resolveResponse = function resolveResponse(response, options) {
|
|
|
126
126
|
if (!response.items) {
|
|
127
127
|
return [];
|
|
128
128
|
}
|
|
129
|
-
var responseClone =
|
|
129
|
+
var responseClone = copy(response);
|
|
130
130
|
var allIncludes = Object.keys(responseClone.includes || {}).reduce(function (all, type) {
|
|
131
131
|
return [].concat(_toConsumableArray(all), _toConsumableArray(response.includes[type]));
|
|
132
132
|
}, []);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "contentful-resolve-response",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"module": "./dist/esm/index.js",
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"node": ">=4.7.2"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"
|
|
28
|
+
"fast-copy": "^2.1.0"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@commitlint/cli": "^9.0.1",
|