contentful-resolve-response 1.3.1 → 1.3.4

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/cjs/index.js CHANGED
@@ -86,6 +86,7 @@ var walkMutate = function walkMutate(input, predicate, mutator, removeUnresolved
86
86
 
87
87
  if (input && typeof input === 'object') {
88
88
  for (var key in input) {
89
+ // eslint-disable-next-line no-prototype-builtins
89
90
  if (input.hasOwnProperty(key)) {
90
91
  input[key] = walkMutate(input[key], predicate, mutator, removeUnresolved);
91
92
  }
@@ -124,7 +125,7 @@ var makeEntryObject = function makeEntryObject(item, itemEntryPoints) {
124
125
  * resolveResponse Function
125
126
  * Resolves contentful response to normalized form.
126
127
  * @param {Object} response Contentful response
127
- * @param {Object} options
128
+ * @param {{removeUnresolved: Boolean, itemEntryPoints: Array<String>}|{}} options
128
129
  * @param {Boolean} options.removeUnresolved - Remove unresolved links default:false
129
130
  * @param {Array<String>} options.itemEntryPoints - Resolve links only in those item properties
130
131
  * @return {Object}
package/dist/esm/index.js CHANGED
@@ -78,6 +78,7 @@ var walkMutate = function walkMutate(input, predicate, mutator, removeUnresolved
78
78
 
79
79
  if (input && (typeof input === 'undefined' ? 'undefined' : _typeof(input)) === 'object') {
80
80
  for (var key in input) {
81
+ // eslint-disable-next-line no-prototype-builtins
81
82
  if (input.hasOwnProperty(key)) {
82
83
  input[key] = walkMutate(input[key], predicate, mutator, removeUnresolved);
83
84
  }
@@ -116,7 +117,7 @@ var makeEntryObject = function makeEntryObject(item, itemEntryPoints) {
116
117
  * resolveResponse Function
117
118
  * Resolves contentful response to normalized form.
118
119
  * @param {Object} response Contentful response
119
- * @param {Object} options
120
+ * @param {{removeUnresolved: Boolean, itemEntryPoints: Array<String>}|{}} options
120
121
  * @param {Boolean} options.removeUnresolved - Remove unresolved links default:false
121
122
  * @param {Array<String>} options.itemEntryPoints - Resolve links only in those item properties
122
123
  * @return {Object}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contentful-resolve-response",
3
- "version": "1.3.1",
3
+ "version": "1.3.4",
4
4
  "description": "",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "module": "./dist/esm/index.js",
@@ -25,33 +25,33 @@
25
25
  "node": ">=4.7.2"
26
26
  },
27
27
  "dependencies": {
28
- "fast-copy": "^2.1.0"
28
+ "fast-copy": "^2.1.1"
29
29
  },
30
30
  "devDependencies": {
31
- "@commitlint/cli": "^9.0.1",
32
- "@commitlint/config-conventional": "^9.0.1",
33
- "@contentful/eslint-config-backend": "^7.0.0",
34
- "@semantic-release/changelog": "^5.0.1",
35
- "@semantic-release/git": "^9.0.0",
36
- "@timbeyer/commitlint-circle": "^3.0.0",
31
+ "@commitlint/cli": "^16.2.1",
32
+ "@commitlint/config-conventional": "^16.2.1",
33
+ "@contentful/eslint-config-backend": "^10.0.0",
34
+ "@semantic-release/changelog": "^6.0.1",
35
+ "@semantic-release/git": "^10.0.1",
36
+ "@timbeyer/commitlint-circle": "^4.1.1",
37
37
  "babel-cli": "^6.26.0",
38
38
  "babel-plugin-add-module-exports": "^1.0.2",
39
39
  "babel-preset-env": "^1.7.0",
40
40
  "babel-register": "^6.26.0",
41
- "chai": "^4.2.0",
41
+ "chai": "^4.3.6",
42
42
  "dirty-chai": "^2.0.1",
43
- "eslint": "^6.4.0",
44
- "eslint-config-prettier": "^6.11.0",
45
- "eslint-plugin-import": "^2.18.2",
46
- "eslint-plugin-mocha": "^6.1.1",
47
- "eslint-plugin-node": "^10.0.0",
48
- "eslint-plugin-prettier": "^3.1.4",
49
- "eslint-plugin-promise": "^4.2.1",
50
- "eslint-plugin-standard": "^4.0.1",
51
- "husky": "^3.0.5",
52
- "mocha": "^6.2.0",
53
- "prettier": "^2.0.5",
54
- "semantic-release": "^17.1.1"
43
+ "eslint": "^8.9.0",
44
+ "eslint-config-prettier": "^8.4.0",
45
+ "eslint-plugin-import": "^2.25.4",
46
+ "eslint-plugin-mocha": "^10.0.3",
47
+ "eslint-plugin-node": "^11.1.0",
48
+ "eslint-plugin-prettier": "^4.0.0",
49
+ "eslint-plugin-promise": "^6.0.0",
50
+ "eslint-plugin-standard": "^5.0.0",
51
+ "husky": "^7.0.4",
52
+ "mocha": "^9.2.1",
53
+ "prettier": "^2.5.1",
54
+ "semantic-release": "^19.0.2"
55
55
  },
56
56
  "files": [
57
57
  "dist"
package/CHANGELOG.md DELETED
@@ -1,105 +0,0 @@
1
- ## [1.3.1](https://github.com/contentful/contentful-resolve-response/compare/v1.3.0...v1.3.1) (2022-02-24)
2
-
3
- # [1.3.0](https://github.com/contentful/contentful-resolve-response/compare/v1.2.2...v1.3.0) (2020-11-25)
4
-
5
-
6
- ### Features
7
-
8
- * remove lodash and replace cloneDeep with fast-copy ([b6bffed](https://github.com/contentful/contentful-resolve-response/commit/b6bffed343eebf4913d397a4e157787028929692))
9
-
10
- ## [1.2.2](https://github.com/contentful/contentful-resolve-response/compare/v1.2.1...v1.2.2) (2020-07-03)
11
-
12
-
13
- ### Bug Fixes
14
-
15
- * bump to 1.2.2 for semantic-release ([b835e90](https://github.com/contentful/contentful-resolve-response/commit/b835e90b9a800712f43576e141500508cefdfffd))
16
-
17
- ## [1.2.1](https://github.com/contentful/contentful-resolve-response/compare/v1.2.0...v1.2.1) (2020-07-03)
18
-
19
-
20
- ### Bug Fixes
21
-
22
- * bump to 1.2.1 for semantic-release ([0cf7de5](https://github.com/contentful/contentful-resolve-response/commit/0cf7de51032933f734dd72011f5b518f5583b6da))
23
-
24
- # [1.2.0](https://github.com/contentful/contentful-resolve-response/compare/v1.1.2...v1.2.0) (2020-07-03)
25
-
26
-
27
- ### Bug Fixes
28
-
29
- * **get-link:** better performance on large input ([9b1bab0](https://github.com/contentful/contentful-resolve-response/commit/9b1bab06b2ff8d5037e66d7bdd131a51e4d82062))
30
- * Update deps ([587f04c](https://github.com/contentful/contentful-resolve-response/commit/587f04ccd36d62d0241721ee7bbcd00c4f0cfcdc))
31
- * Update Nodejs version ([d4550e0](https://github.com/contentful/contentful-resolve-response/commit/d4550e0b2941a3080b06954ac0d7eb9da4f8a6cd))
32
- * **array-fields:** proper unresolved removal while iterating array ([#19](https://github.com/contentful/contentful-resolve-response/issues/19)) ([39bf40d](https://github.com/contentful/contentful-resolve-response/commit/39bf40d7e38f5e3a0bce96491448c333d128b850))
33
- * **compatibility:** indexOf instead of includes([#18](https://github.com/contentful/contentful-resolve-response/issues/18)) ([1c3b277](https://github.com/contentful/contentful-resolve-response/commit/1c3b277c2189b966841a86da276de018618aa1ce))
34
-
35
-
36
- ### Features
37
-
38
- * bump to 1.2.0 for semantic-release ([08a5c8a](https://github.com/contentful/contentful-resolve-response/commit/08a5c8aca742e545a65f27ca32b14d17b618a76b))
39
-
40
- ## [1.1.3](https://github.com/contentful/contentful-resolve-response/compare/v1.1.2...v1.1.3) (2020-07-03)
41
-
42
-
43
- ### Bug Fixes
44
-
45
- * **get-link:** better performance on large input ([9b1bab0](https://github.com/contentful/contentful-resolve-response/commit/9b1bab06b2ff8d5037e66d7bdd131a51e4d82062))
46
- * Update deps ([587f04c](https://github.com/contentful/contentful-resolve-response/commit/587f04ccd36d62d0241721ee7bbcd00c4f0cfcdc))
47
- * Update Nodejs version ([d4550e0](https://github.com/contentful/contentful-resolve-response/commit/d4550e0b2941a3080b06954ac0d7eb9da4f8a6cd))
48
- * **array-fields:** proper unresolved removal while iterating array ([#19](https://github.com/contentful/contentful-resolve-response/issues/19)) ([39bf40d](https://github.com/contentful/contentful-resolve-response/commit/39bf40d7e38f5e3a0bce96491448c333d128b850))
49
- * **compatibility:** indexOf instead of includes([#18](https://github.com/contentful/contentful-resolve-response/issues/18)) ([1c3b277](https://github.com/contentful/contentful-resolve-response/commit/1c3b277c2189b966841a86da276de018618aa1ce))
50
-
51
- ## [1.1.3](https://github.com/contentful/contentful-resolve-response/compare/v1.1.2...v1.1.3) (2020-07-03)
52
-
53
-
54
- ### Bug Fixes
55
-
56
- * Update deps ([587f04c](https://github.com/contentful/contentful-resolve-response/commit/587f04ccd36d62d0241721ee7bbcd00c4f0cfcdc))
57
- * Update Nodejs version ([d4550e0](https://github.com/contentful/contentful-resolve-response/commit/d4550e0b2941a3080b06954ac0d7eb9da4f8a6cd))
58
- * **array-fields:** proper unresolved removal while iterating array ([#19](https://github.com/contentful/contentful-resolve-response/issues/19)) ([39bf40d](https://github.com/contentful/contentful-resolve-response/commit/39bf40d7e38f5e3a0bce96491448c333d128b850))
59
- * **compatibility:** indexOf instead of includes([#18](https://github.com/contentful/contentful-resolve-response/issues/18)) ([1c3b277](https://github.com/contentful/contentful-resolve-response/commit/1c3b277c2189b966841a86da276de018618aa1ce))
60
-
61
- # Change Log
62
- All notable changes to this project will be documented in this file.
63
-
64
- ## v1.1.4 - 2018-02-21
65
-
66
- ### Bug Fixes
67
-
68
- * **array-fields:** proper unresolved removal while iterating array ([#19](https://github.com/contentful/contentful-resolve-response/pull/19)) ([39bf40d7](https://github.com/contentful/contentful-resolve-response/commit/39bf40d7e38f5e3a0bce96491448c333d128b850))
69
-
70
- ## v1.1.3 - 2018-02-12
71
-
72
- ### Bug Fixes
73
-
74
- * **compatibility:** indexOf instead of includes([#18](https://github.com/contentful/contentful-resolve-response/pull/18)) ([1c3b277c](https://github.com/contentful/contentful-resolve-response/commit/1c3b277c2189b966841a86da276de018618aa1ce))
75
-
76
- ## v1.1.2
77
-
78
- ### Build System / Dependencies
79
-
80
- * **esm:** provide esm version for bundlers ([#16](https://github.com/contentful/contentful-resolve-response/pull/16)) ([a40cabb7](https://github.com/contentful/contentful-resolve-response/commit/a40cabb73e099347cd7a77679ba4060f20d07b65))
81
-
82
- ### Documentation Changes
83
-
84
- * **package.json:** fix urls ([70f61377](https://github.com/contentful/contentful-resolve-response/commit/70f6137787345cdb5913dd198b597e446ab16390))
85
- * **README:** add npm version badge ([724b5ef6](https://github.com/contentful/contentful-resolve-response/commit/724b5ef684fa12d3a539e23ad089da3b3a047199))
86
-
87
- ## v1.1.1
88
-
89
- ### Bug Fixes
90
-
91
- * **removeUnresolved:** remove instead of set to undefined ([#15](https://github.com/contentful/contentful-resolve-response/pull/15)) ([a58906b1](https://github.com/contentful/contentful-resolve-response/commit/a58906b1df9218cfebf9974e6969d07d87a9dc05))
92
-
93
- ## v1.1.0 - 2018-01-17
94
- ### Added
95
- - _[options]_ allow explicit item entry points
96
-
97
- ### Changed
98
- - _[pkg]_ manually set version field to 1.0.1
99
- - _[githooks]_ lint every commit, test every push (#13)
100
- - _[gitignore]_ ignore coverage and other irrelevant files
101
- - _[coverage]_ add code coverage reports
102
- - _[unit]_ circular references in multi value fields (#11)
103
-
104
- ### Fixed
105
- - _[lodash]_ require explicit to allow tree shaking (#10)