@netlify/config 18.2.7-rc → 19.0.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/bin.js CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
 
3
3
  // This is a workaround for npm issue: https://github.com/npm/cli/issues/2632
4
- // eslint-disable-next-line import/no-unassigned-import
4
+
5
5
  import './lib/bin/main.js'
@@ -8,7 +8,6 @@ import { ERROR_CALL_TO_ACTION } from '../log/messages.js';
8
8
  // Requires knowing the `siteId` and having the access `token`.
9
9
  // Silently ignore API errors. For example the network connection might be down,
10
10
  // but local builds should still work regardless.
11
- // eslint-disable-next-line complexity
12
11
  export const getSiteInfo = async function ({ api, siteId, mode, testOpts: { env: testEnv = true } = {} }) {
13
12
  if (api === undefined || mode === 'buildbot' || !testEnv) {
14
13
  const siteInfo = siteId === undefined ? {} : { id: siteId };
package/lib/env/git.js CHANGED
@@ -17,5 +17,7 @@ const git = async function (args, cwd) {
17
17
  const { stdout } = await execa('git', args, { cwd });
18
18
  return stdout;
19
19
  }
20
- catch { }
20
+ catch {
21
+ // continue regardless error
22
+ }
21
23
  };
package/lib/main.js CHANGED
@@ -19,7 +19,6 @@ import { getConfigPath } from './path.js';
19
19
  import { getRedirectsPath, addRedirects } from './redirects.js';
20
20
  export { DEV_EVENTS, EVENTS } from './events.js';
21
21
  export { cleanupConfig } from './log/cleanup.js';
22
- // eslint-disable-next-line import/max-dependencies
23
22
  export { updateConfig, restoreConfig } from './mutations/update.js';
24
23
  // Load the configuration file.
25
24
  // Takes an optional configuration file path as input and return the resolved
@@ -85,7 +85,9 @@ const deleteNoError = async (path) => {
85
85
  try {
86
86
  await fs.unlink(path);
87
87
  }
88
- catch { }
88
+ catch {
89
+ // continue regardless error
90
+ }
89
91
  };
90
92
  const copyOrDelete = async function (src, dest) {
91
93
  if (await pathExists(src)) {
@@ -24,6 +24,8 @@ const getGitBranch = async function (repositoryRoot, gitRef) {
24
24
  const { stdout } = await execaCommand(`git rev-parse --abbrev-ref ${gitRef}`, { cwd: repositoryRoot });
25
25
  return stdout;
26
26
  }
27
- catch { }
27
+ catch {
28
+ // continue regardless error
29
+ }
28
30
  };
29
31
  const FALLBACK_BRANCH = 'master';
package/lib/utils/set.js CHANGED
@@ -16,7 +16,6 @@ export const setProp = function (parent, keys, value) {
16
16
  const setArrayProp = function (parent, [index, ...keys], value) {
17
17
  const arrayParent = Array.isArray(parent) ? parent : [];
18
18
  const missingItems = index - arrayParent.length + 1;
19
- // eslint-disable-next-line unicorn/no-new-array
20
19
  const normalizedParent = missingItems > 0 ? [...arrayParent, ...new Array(missingItems)] : arrayParent;
21
20
  const newValue = setProp(normalizedParent[index], keys, value);
22
21
  return [...normalizedParent.slice(0, index), newValue, ...normalizedParent.slice(index + 1)];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/config",
3
- "version": "18.2.7-rc",
3
+ "version": "19.0.0",
4
4
  "description": "Netlify config module",
5
5
  "type": "module",
6
6
  "exports": "./lib/main.js",
@@ -18,12 +18,10 @@
18
18
  "David Wells <hello@davidwells.io> (https://davidwells.io/)"
19
19
  ],
20
20
  "scripts": {
21
- "prepublishOnly": "cd ../../ && npm run prepublishOnly",
22
21
  "prebuild": "rm -rf lib",
23
22
  "build": "tsc",
24
23
  "test": "ava",
25
- "test:ci": "c8 -r lcovonly -r text -r json ava",
26
- "test:measure": "node tools/tests_duration.mjs"
24
+ "test:ci": "c8 -r lcovonly -r text -r json ava"
27
25
  },
28
26
  "keywords": [
29
27
  "javascript",
@@ -71,9 +69,9 @@
71
69
  "is-plain-obj": "^4.0.0",
72
70
  "js-yaml": "^4.0.0",
73
71
  "map-obj": "^5.0.0",
74
- "netlify": "^12.0.1",
75
- "netlify-headers-parser": "^6.0.2",
76
- "netlify-redirect-parser": "13.0.5",
72
+ "netlify": "^13.0.0",
73
+ "netlify-headers-parser": "^7.0.0",
74
+ "netlify-redirect-parser": "^14.0.0",
77
75
  "omit.js": "^2.0.2",
78
76
  "p-locate": "^6.0.0",
79
77
  "path-exists": "^5.0.0",
@@ -84,13 +82,17 @@
84
82
  "yargs": "^17.3.1"
85
83
  },
86
84
  "devDependencies": {
85
+ "@types/node": "^14.18.31",
87
86
  "ava": "^4.0.0",
87
+ "c8": "^7.12.0",
88
88
  "del": "^6.0.0",
89
89
  "has-ansi": "^5.0.0",
90
90
  "is-ci": "^3.0.0",
91
- "tmp-promise": "^3.0.2"
91
+ "tmp-promise": "^3.0.2",
92
+ "typescript": "^4.8.4"
92
93
  },
93
94
  "engines": {
94
- "node": "^12.20.0 || ^14.14.0 || >=16.0.0"
95
- }
95
+ "node": "^14.16.0 || >=16.0.0"
96
+ },
97
+ "gitHead": "c4502f1c112e7f33d5e6fa053bfbe7dabdfe0160"
96
98
  }