@netlify/build 29.12.0 → 29.12.2

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/lib/core/bin.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  import process from 'process';
3
- import filterObj from 'filter-obj';
3
+ import { includeKeys } from 'filter-obj';
4
4
  import yargs from 'yargs';
5
5
  import { hideBin } from 'yargs/helpers';
6
6
  import { normalizeCliFeatureFlags } from './feature_flags.js';
@@ -14,7 +14,7 @@ import { FALLBACK_SEVERITY_ENTRY } from './severity.js';
14
14
  // sense only in CLI, such as CLI flags parsing and exit code.
15
15
  const runCli = async function () {
16
16
  const flags = parseFlags();
17
- const flagsA = filterObj(flags, isUserFlag);
17
+ const flagsA = includeKeys(flags, isUserFlag);
18
18
  const state = { done: false };
19
19
  process.on('exit', onExit.bind(undefined, state));
20
20
  const { severityCode, logs } = await build(flagsA);
@@ -1,5 +1,5 @@
1
1
  import { env } from 'process';
2
- import filterObj from 'filter-obj';
2
+ import { includeKeys } from 'filter-obj';
3
3
  import mapObj from 'map-obj';
4
4
  // If plugins modify `process.env`, this is propagated in other plugins and in
5
5
  // `build.command`. Since those are different processes, we figure out when they
@@ -10,8 +10,8 @@ export const getNewEnvChanges = function (envBefore, netlifyConfig, netlifyConfi
10
10
  return { ...processEnvChanges, ...netlifyConfigEnvChanges };
11
11
  };
12
12
  const diffEnv = function (envBefore, envAfter) {
13
- const envChanges = filterObj(envAfter, (name, value) => value !== envBefore[name]);
14
- const deletedEnv = filterObj(envBefore, (name) => envAfter[name] === undefined);
13
+ const envChanges = includeKeys(envAfter, (name, value) => value !== envBefore[name]);
14
+ const deletedEnv = includeKeys(envBefore, (name) => envAfter[name] === undefined);
15
15
  const deletedEnvA = mapObj(deletedEnv, setToNull);
16
16
  return { ...envChanges, ...deletedEnvA };
17
17
  };
package/lib/env/main.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { env } from 'process';
2
- import filterObj from 'filter-obj';
2
+ import { includeKeys } from 'filter-obj';
3
3
  import { getParentColorEnv } from '../log/colors.js';
4
4
  // Retrieve the environment variables passed to plugins and `build.command`
5
5
  // When run locally, this tries to emulate the production environment.
6
6
  export const getChildEnv = function ({ envOpt, env: allConfigEnv }) {
7
7
  const parentColorEnv = getParentColorEnv();
8
8
  const parentEnv = { ...env, ...allConfigEnv, ...envOpt, ...parentColorEnv };
9
- return filterObj(parentEnv, shouldKeepEnv);
9
+ return includeKeys(parentEnv, shouldKeepEnv);
10
10
  };
11
11
  const shouldKeepEnv = function (key) {
12
12
  return !REMOVED_PARENT_ENV.has(key.toLowerCase());
@@ -1,8 +1,8 @@
1
1
  import { env } from 'process';
2
- import filterObj from 'filter-obj';
2
+ import { includeKeys } from 'filter-obj';
3
3
  // Retrieve environment variables used in error monitoring
4
4
  export const getEnvMetadata = function (childEnv = env) {
5
- return filterObj(childEnv, isEnvMetadata);
5
+ return includeKeys(childEnv, isEnvMetadata);
6
6
  };
7
7
  const isEnvMetadata = function (name) {
8
8
  return ENVIRONMENT_VARIABLES.has(name);
@@ -1,4 +1,4 @@
1
- import filterObj from 'filter-obj';
1
+ import { includeKeys } from 'filter-obj';
2
2
  import { getLogic } from './logic.js';
3
3
  import { registerTypeScript } from './typescript.js';
4
4
  import { validatePlugin } from './validate.js';
@@ -11,12 +11,12 @@ export const load = async function ({ pluginPath, inputs, packageJson, verbose }
11
11
  const tsNodeService = registerTypeScript(pluginPath);
12
12
  const logic = await getLogic({ pluginPath, inputs, tsNodeService });
13
13
  validatePlugin(logic);
14
- const methods = filterObj(logic, isEventHandler);
14
+ const methods = includeKeys(logic, isEventHandler);
15
15
  const events = Object.keys(methods);
16
16
  // Context passed to every event handler
17
17
  const context = { methods, inputs, packageJson, verbose };
18
18
  return { events, context };
19
19
  };
20
- const isEventHandler = function (event, value) {
20
+ const isEventHandler = function (_event, value) {
21
21
  return typeof value === 'function';
22
22
  };
package/lib/utils/omit.js CHANGED
@@ -1,3 +1,3 @@
1
- import filterObj from 'filter-obj';
1
+ import { excludeKeys } from 'filter-obj';
2
2
  // lodash.omit is 1400 lines of codes. filter-obj is much smaller and simpler.
3
- export const omit = (obj, keys) => filterObj(obj, (key) => !keys.includes(key));
3
+ export const omit = (obj, keys) => excludeKeys(obj, (key) => keys.includes(key));
@@ -1,8 +1,8 @@
1
- import filterObj from 'filter-obj';
1
+ import { includeKeys } from 'filter-obj';
2
2
  // Remove falsy values from object
3
3
  export const removeFalsy = function (obj) {
4
- return filterObj(obj, isDefined);
4
+ return includeKeys(obj, isDefined);
5
5
  };
6
- const isDefined = function (key, value) {
6
+ const isDefined = function (_key, value) {
7
7
  return value !== undefined && value !== '';
8
8
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.12.0",
3
+ "version": "29.12.2",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/core/main.js",
@@ -65,23 +65,23 @@
65
65
  "dependencies": {
66
66
  "@bugsnag/js": "^7.0.0",
67
67
  "@netlify/cache-utils": "^5.1.5",
68
- "@netlify/config": "^20.4.4",
69
- "@netlify/edge-bundler": "8.16.0",
70
- "@netlify/framework-info": "^9.8.8",
71
- "@netlify/functions-utils": "^5.2.9",
68
+ "@netlify/config": "^20.4.5",
69
+ "@netlify/edge-bundler": "8.16.2",
70
+ "@netlify/framework-info": "^9.8.10",
71
+ "@netlify/functions-utils": "^5.2.11",
72
72
  "@netlify/git-utils": "^5.1.1",
73
73
  "@netlify/plugins-list": "^6.68.0",
74
- "@netlify/run-utils": "^5.1.0",
75
- "@netlify/zip-it-and-ship-it": "9.7.0",
74
+ "@netlify/run-utils": "^5.1.1",
75
+ "@netlify/zip-it-and-ship-it": "9.8.1",
76
76
  "@sindresorhus/slugify": "^2.0.0",
77
77
  "ansi-escapes": "^6.0.0",
78
78
  "chalk": "^5.0.0",
79
79
  "clean-stack": "^4.0.0",
80
80
  "execa": "^6.0.0",
81
- "figures": "^4.0.0",
82
- "filter-obj": "^3.0.0",
81
+ "figures": "^5.0.0",
82
+ "filter-obj": "^5.0.0",
83
83
  "got": "^12.0.0",
84
- "hot-shots": "9.3.0",
84
+ "hot-shots": "10.0.0",
85
85
  "indent-string": "^5.0.0",
86
86
  "is-plain-obj": "^4.0.0",
87
87
  "js-yaml": "^4.0.0",
@@ -98,7 +98,7 @@
98
98
  "p-reduce": "^3.0.0",
99
99
  "path-exists": "^5.0.0",
100
100
  "path-type": "^5.0.0",
101
- "pkg-dir": "^6.0.0",
101
+ "pkg-dir": "^7.0.0",
102
102
  "pretty-ms": "^8.0.0",
103
103
  "ps-list": "^8.0.0",
104
104
  "read-pkg-up": "^9.0.0",
@@ -106,7 +106,7 @@
106
106
  "resolve": "^2.0.0-next.1",
107
107
  "rfdc": "^1.3.0",
108
108
  "safe-json-stringify": "^1.2.0",
109
- "semver": "^7.0.0",
109
+ "semver": "^7.3.8",
110
110
  "string-width": "^5.0.0",
111
111
  "strip-ansi": "^7.0.0",
112
112
  "supports-color": "^9.0.0",
@@ -146,5 +146,5 @@
146
146
  "module": "commonjs"
147
147
  }
148
148
  },
149
- "gitHead": "6bae6a398a0b4899859734425a98ca8a6ce54654"
149
+ "gitHead": "271879f20816c0963b4cf5a53a711f8cf48d68ff"
150
150
  }