@netlify/build 26.1.3 → 26.1.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "26.1.3",
3
+ "version": "26.1.7",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./src/core/main.js",
@@ -60,11 +60,12 @@
60
60
  "@netlify/config": "^17.0.0",
61
61
  "@netlify/functions-utils": "^4.0.0",
62
62
  "@netlify/git-utils": "^4.0.0",
63
- "@netlify/plugin-edge-handlers": "^3.0.3",
64
- "@netlify/plugins-list": "^6.2.1",
63
+ "@netlify/plugin-edge-handlers": "^3.0.4",
64
+ "@netlify/plugins-list": "^6.3.0",
65
65
  "@netlify/run-utils": "^4.0.0",
66
- "@netlify/zip-it-and-ship-it": "^5.4.0",
66
+ "@netlify/zip-it-and-ship-it": "^5.4.1",
67
67
  "@sindresorhus/slugify": "^1.1.0",
68
+ "@types/node": "^16.0.0",
68
69
  "ansi-escapes": "^4.3.2",
69
70
  "chalk": "^4.1.2",
70
71
  "clean-stack": "^3.0.1",
@@ -103,9 +104,10 @@
103
104
  "supports-color": "^8.0.0",
104
105
  "tmp-promise": "^3.0.2",
105
106
  "ts-node": "^10.4.0",
107
+ "typescript": "^4.5.4",
106
108
  "update-notifier": "^5.0.0",
107
109
  "uuid": "^8.0.0",
108
- "yargs": "^15.3.1"
110
+ "yargs": "^17.3.1"
109
111
  },
110
112
  "devDependencies": {
111
113
  "@netlify/nock-udp": "^1.0.0",
package/src/core/bin.js CHANGED
@@ -4,6 +4,7 @@ import process from 'process'
4
4
 
5
5
  import filterObj from 'filter-obj'
6
6
  import yargs from 'yargs'
7
+ import { hideBin } from 'yargs/helpers'
7
8
 
8
9
  import { normalizeCliFeatureFlags } from './feature_flags.js'
9
10
  import { FLAGS } from './flags.js'
@@ -30,7 +31,10 @@ const runCli = async function () {
30
31
  }
31
32
 
32
33
  const parseFlags = function () {
33
- const { featureFlags: cliFeatureFlags = '', ...flags } = yargs.options(FLAGS).usage(USAGE).parse()
34
+ const { featureFlags: cliFeatureFlags = '', ...flags } = yargs(hideBin(process.argv))
35
+ .options(FLAGS)
36
+ .usage(USAGE)
37
+ .parse()
34
38
  const featureFlags = normalizeCliFeatureFlags(cliFeatureFlags)
35
39
  return { ...flags, featureFlags }
36
40
  }
package/src/core/flags.js CHANGED
@@ -1,5 +1,9 @@
1
1
  /* eslint eslint-comments/no-use: off, max-lines: off */
2
2
 
3
+ const jsonParse = function (value) {
4
+ return value === undefined ? undefined : JSON.parse(value)
5
+ }
6
+
3
7
  // All CLI flags
4
8
  export const FLAGS = {
5
9
  config: {
@@ -12,7 +16,7 @@ Defaults to any netlify.toml in the git repository root directory or the base di
12
16
  describe: `JSON configuration object containing default values.
13
17
  Each configuration default value is used unless overriden through the main configuration file.
14
18
  Default: none.`,
15
- coerce: JSON.parse,
19
+ coerce: jsonParse,
16
20
  hidden: true,
17
21
  },
18
22
  cachedConfig: {
@@ -21,7 +25,7 @@ Default: none.`,
21
25
  or when using @netlify/config programmatically.
22
26
  This is done as a performance optimization to cache the configuration loading logic.
23
27
  Default: none.`,
24
- coerce: JSON.parse,
28
+ coerce: jsonParse,
25
29
  hidden: true,
26
30
  },
27
31
  cachedConfigPath: {