contentful-resolve-response 1.3.0 → 1.3.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.
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.0",
3
+ "version": "1.3.3",
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",
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
36
  "@timbeyer/commitlint-circle": "^3.0.0",
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",
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
51
  "husky": "^3.0.5",
52
52
  "mocha": "^6.2.0",
53
- "prettier": "^2.0.5",
54
- "semantic-release": "^17.1.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,103 +0,0 @@
1
- # [1.3.0](https://github.com/contentful/contentful-resolve-response/compare/v1.2.2...v1.3.0) (2020-11-25)
2
-
3
-
4
- ### Features
5
-
6
- * remove lodash and replace cloneDeep with fast-copy ([b6bffed](https://github.com/contentful/contentful-resolve-response/commit/b6bffed343eebf4913d397a4e157787028929692))
7
-
8
- ## [1.2.2](https://github.com/contentful/contentful-resolve-response/compare/v1.2.1...v1.2.2) (2020-07-03)
9
-
10
-
11
- ### Bug Fixes
12
-
13
- * bump to 1.2.2 for semantic-release ([b835e90](https://github.com/contentful/contentful-resolve-response/commit/b835e90b9a800712f43576e141500508cefdfffd))
14
-
15
- ## [1.2.1](https://github.com/contentful/contentful-resolve-response/compare/v1.2.0...v1.2.1) (2020-07-03)
16
-
17
-
18
- ### Bug Fixes
19
-
20
- * bump to 1.2.1 for semantic-release ([0cf7de5](https://github.com/contentful/contentful-resolve-response/commit/0cf7de51032933f734dd72011f5b518f5583b6da))
21
-
22
- # [1.2.0](https://github.com/contentful/contentful-resolve-response/compare/v1.1.2...v1.2.0) (2020-07-03)
23
-
24
-
25
- ### Bug Fixes
26
-
27
- * **get-link:** better performance on large input ([9b1bab0](https://github.com/contentful/contentful-resolve-response/commit/9b1bab06b2ff8d5037e66d7bdd131a51e4d82062))
28
- * Update deps ([587f04c](https://github.com/contentful/contentful-resolve-response/commit/587f04ccd36d62d0241721ee7bbcd00c4f0cfcdc))
29
- * Update Nodejs version ([d4550e0](https://github.com/contentful/contentful-resolve-response/commit/d4550e0b2941a3080b06954ac0d7eb9da4f8a6cd))
30
- * **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))
31
- * **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))
32
-
33
-
34
- ### Features
35
-
36
- * bump to 1.2.0 for semantic-release ([08a5c8a](https://github.com/contentful/contentful-resolve-response/commit/08a5c8aca742e545a65f27ca32b14d17b618a76b))
37
-
38
- ## [1.1.3](https://github.com/contentful/contentful-resolve-response/compare/v1.1.2...v1.1.3) (2020-07-03)
39
-
40
-
41
- ### Bug Fixes
42
-
43
- * **get-link:** better performance on large input ([9b1bab0](https://github.com/contentful/contentful-resolve-response/commit/9b1bab06b2ff8d5037e66d7bdd131a51e4d82062))
44
- * Update deps ([587f04c](https://github.com/contentful/contentful-resolve-response/commit/587f04ccd36d62d0241721ee7bbcd00c4f0cfcdc))
45
- * Update Nodejs version ([d4550e0](https://github.com/contentful/contentful-resolve-response/commit/d4550e0b2941a3080b06954ac0d7eb9da4f8a6cd))
46
- * **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))
47
- * **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))
48
-
49
- ## [1.1.3](https://github.com/contentful/contentful-resolve-response/compare/v1.1.2...v1.1.3) (2020-07-03)
50
-
51
-
52
- ### Bug Fixes
53
-
54
- * Update deps ([587f04c](https://github.com/contentful/contentful-resolve-response/commit/587f04ccd36d62d0241721ee7bbcd00c4f0cfcdc))
55
- * Update Nodejs version ([d4550e0](https://github.com/contentful/contentful-resolve-response/commit/d4550e0b2941a3080b06954ac0d7eb9da4f8a6cd))
56
- * **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))
57
- * **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))
58
-
59
- # Change Log
60
- All notable changes to this project will be documented in this file.
61
-
62
- ## v1.1.4 - 2018-02-21
63
-
64
- ### Bug Fixes
65
-
66
- * **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))
67
-
68
- ## v1.1.3 - 2018-02-12
69
-
70
- ### Bug Fixes
71
-
72
- * **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))
73
-
74
- ## v1.1.2
75
-
76
- ### Build System / Dependencies
77
-
78
- * **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))
79
-
80
- ### Documentation Changes
81
-
82
- * **package.json:** fix urls ([70f61377](https://github.com/contentful/contentful-resolve-response/commit/70f6137787345cdb5913dd198b597e446ab16390))
83
- * **README:** add npm version badge ([724b5ef6](https://github.com/contentful/contentful-resolve-response/commit/724b5ef684fa12d3a539e23ad089da3b3a047199))
84
-
85
- ## v1.1.1
86
-
87
- ### Bug Fixes
88
-
89
- * **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))
90
-
91
- ## v1.1.0 - 2018-01-17
92
- ### Added
93
- - _[options]_ allow explicit item entry points
94
-
95
- ### Changed
96
- - _[pkg]_ manually set version field to 1.0.1
97
- - _[githooks]_ lint every commit, test every push (#13)
98
- - _[gitignore]_ ignore coverage and other irrelevant files
99
- - _[coverage]_ add code coverage reports
100
- - _[unit]_ circular references in multi value fields (#11)
101
-
102
- ### Fixed
103
- - _[lodash]_ require explicit to allow tree shaking (#10)