@netlify/config 17.0.11 → 17.0.12

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.
Files changed (2) hide show
  1. package/package.json +3 -3
  2. package/src/simplify.js +2 -10
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/config",
3
- "version": "17.0.11",
3
+ "version": "17.0.12",
4
4
  "description": "Netlify config module",
5
5
  "type": "module",
6
6
  "exports": "./src/main.js",
@@ -19,8 +19,8 @@
19
19
  "prepublishOnly": "cd ../../ && npm run prepublishOnly"
20
20
  },
21
21
  "keywords": [
22
- "nodejs",
23
22
  "javascript",
23
+ "nodejs",
24
24
  "windows",
25
25
  "macos",
26
26
  "linux",
@@ -66,7 +66,7 @@
66
66
  "map-obj": "^5.0.0",
67
67
  "netlify": "^11.0.0",
68
68
  "netlify-headers-parser": "^6.0.2",
69
- "netlify-redirect-parser": "^13.0.3",
69
+ "netlify-redirect-parser": "13.0.2",
70
70
  "omit.js": "^2.0.2",
71
71
  "p-locate": "^6.0.0",
72
72
  "path-exists": "^5.0.0",
package/src/simplify.js CHANGED
@@ -33,8 +33,8 @@ export const simplifyConfig = function ({
33
33
  ...removeEmptyObject(simplifyFunctions(functions), 'functions'),
34
34
  ...removeEmptyObject(buildA, 'build'),
35
35
  ...removeEmptyArray(plugins, 'plugins'),
36
- ...removeEmptyArray(truncateArray(headers), 'headers'),
37
- ...removeEmptyArray(simplifyRedirects(truncateArray(redirects)), 'redirects'),
36
+ ...removeEmptyArray(headers, 'headers'),
37
+ ...removeEmptyArray(simplifyRedirects(redirects), 'redirects'),
38
38
  ...removeEmptyObject(simplifyContexts(context), 'context'),
39
39
  })
40
40
  }
@@ -85,14 +85,6 @@ const removeDefaultValue = function (value, propName, defaultValue) {
85
85
  return value === defaultValue ? {} : { [propName]: value }
86
86
  }
87
87
 
88
- // `headers` and `redirects` can be very long, which can take several minutes
89
- // to print in the build logs. We truncate them before logging.
90
- const truncateArray = function (array) {
91
- return !Array.isArray(array) || array.length < MAX_ARRAY_LENGTH ? array : array.slice(0, MAX_ARRAY_LENGTH)
92
- }
93
-
94
- const MAX_ARRAY_LENGTH = 100
95
-
96
88
  export const removeEmptyObject = function (object, propName) {
97
89
  if (!isPlainObj(object)) {
98
90
  return {}