@netlify/build 32.2.0 → 33.0.1

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.
@@ -15,11 +15,9 @@ export type PluginsOptions = {
15
15
  * usually the system's Node.js version.
16
16
  * If the user Node version does not satisfy our supported engine range use our own system Node version
17
17
  */
18
- export declare const addPluginsNodeVersion: ({ featureFlags, pluginsOptions, nodePath, userNodeVersion, logs, systemLog, }: {
19
- featureFlags: any;
18
+ export declare const addPluginsNodeVersion: ({ pluginsOptions, nodePath, userNodeVersion, logs }: {
20
19
  pluginsOptions: any;
21
20
  nodePath: any;
22
21
  userNodeVersion: any;
23
22
  logs: any;
24
- systemLog: any;
25
23
  }) => Promise<any[]>;
@@ -1,15 +1,12 @@
1
- import { dirname } from 'path';
2
1
  import { execPath, version as currentVersion } from 'process';
3
2
  import semver from 'semver';
4
3
  import link from 'terminal-link';
5
4
  import { logWarning, logWarningSubHeader } from '../log/logger.js';
6
- import { getPackageJson } from '../utils/package.js';
7
5
  /**
8
6
  * This node version is minimum required to run the plugins code.
9
7
  * If the users preferred Node.js version is below that we have to fall back to the system node version
10
8
  */
11
- const MINIMUM_REQUIRED_NODE_VERSION = '^14.14.0 || >=16.0.0';
12
- const UPCOMING_MINIMUM_REQUIRED_NODE_VERSION = '>=18.14.0';
9
+ const MINIMUM_REQUIRED_NODE_VERSION = '>=18.14.0';
13
10
  /**
14
11
  * Local plugins and `package.json`-installed plugins use user's preferred Node.js version if higher than our minimum
15
12
  * supported version. Else default to the system Node version.
@@ -17,19 +14,17 @@ const UPCOMING_MINIMUM_REQUIRED_NODE_VERSION = '>=18.14.0';
17
14
  * usually the system's Node.js version.
18
15
  * If the user Node version does not satisfy our supported engine range use our own system Node version
19
16
  */
20
- export const addPluginsNodeVersion = function ({ featureFlags, pluginsOptions, nodePath, userNodeVersion, logs, systemLog, }) {
17
+ export const addPluginsNodeVersion = function ({ pluginsOptions, nodePath, userNodeVersion, logs }) {
21
18
  const currentNodeVersion = semver.clean(currentVersion);
22
19
  return Promise.all(pluginsOptions.map((pluginOptions) => addPluginNodeVersion({
23
- featureFlags,
24
20
  pluginOptions,
25
21
  currentNodeVersion,
26
22
  userNodeVersion,
27
23
  nodePath,
28
24
  logs,
29
- systemLog,
30
25
  })));
31
26
  };
32
- const addPluginNodeVersion = async function ({ featureFlags, pluginOptions, pluginOptions: { loadedFrom, packageName, pluginPath }, currentNodeVersion, userNodeVersion, nodePath, logs, systemLog, }) {
27
+ const addPluginNodeVersion = async function ({ pluginOptions, pluginOptions: { loadedFrom, packageName }, currentNodeVersion, userNodeVersion, nodePath, logs, }) {
33
28
  const systemNode = { ...pluginOptions, nodePath: execPath, nodeVersion: currentNodeVersion };
34
29
  const userNode = { ...pluginOptions, nodePath, nodeVersion: userNodeVersion };
35
30
  const isLocalPlugin = loadedFrom === 'local' || loadedFrom === 'package.json';
@@ -37,33 +32,12 @@ const addPluginNodeVersion = async function ({ featureFlags, pluginOptions, plug
37
32
  if (isUIOrAutoInstalledPlugin) {
38
33
  return systemNode;
39
34
  }
40
- if (featureFlags.build_warn_upcoming_system_version_change &&
41
- !semver.satisfies(userNodeVersion, UPCOMING_MINIMUM_REQUIRED_NODE_VERSION)) {
42
- if (pluginPath) {
43
- const pluginDir = dirname(pluginPath);
44
- const { packageJson: pluginPackageJson } = await getPackageJson(pluginDir);
45
- // Ensure Node.js version is compatible with plugin's `engines.node`
46
- const pluginNodeVersionRange = pluginPackageJson?.engines?.node;
47
- if (!pluginNodeVersionRange) {
48
- systemLog(`plugin "${packageName}" does not specify node support range`);
49
- }
50
- else if (semver.satisfies('22.0.0', pluginNodeVersionRange)) {
51
- systemLog(`plugin "${packageName}" node support range includes v22`);
52
- }
53
- else {
54
- systemLog(`plugin "${packageName}" node support range does NOT include v22`);
55
- }
56
- }
57
- else {
58
- systemLog(`plugin "${packageName}" pluginPath not available`);
59
- }
60
- }
61
35
  if (semver.satisfies(userNodeVersion, MINIMUM_REQUIRED_NODE_VERSION)) {
62
36
  return userNode;
63
37
  }
64
38
  logWarningSubHeader(logs, `Warning: ${packageName} will be executed with Node.js version ${currentNodeVersion}`);
65
39
  logWarning(logs, ` The plugin cannot be executed with your defined Node.js version ${userNodeVersion}
66
40
 
67
- Read more about our minimum required version in our ${link('forums announcement', 'https://answers.netlify.com/t/build-plugins-dropping-support-for-node-js-12/79421')}`);
41
+ Read more about our minimum required version in our ${link('forums announcement', 'https://answers.netlify.com/t/build-plugins-end-of-support-for-node-js-14-node-js-16/136405')}`);
68
42
  return systemNode;
69
43
  };
@@ -15,12 +15,10 @@ export const resolvePluginsPath = async function ({ pluginsOptions, siteInfo, bu
15
15
  const autoPluginsDir = getAutoPluginsDir(buildDir, packagePath);
16
16
  const pluginsOptionsA = await Promise.all(pluginsOptions.map((pluginOptions) => resolvePluginPath({ pluginOptions, buildDir, packagePath, autoPluginsDir })));
17
17
  const pluginsOptionsB = await addPluginsNodeVersion({
18
- featureFlags,
19
18
  pluginsOptions: pluginsOptionsA,
20
19
  nodePath,
21
20
  userNodeVersion,
22
21
  logs,
23
- systemLog,
24
22
  });
25
23
  const pluginsOptionsC = await addPinnedVersions({ pluginsOptions: pluginsOptionsB, api, siteInfo, sendStatus });
26
24
  const pluginsOptionsD = await addExpectedVersions({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "32.2.0",
3
+ "version": "33.0.1",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -68,16 +68,16 @@
68
68
  "dependencies": {
69
69
  "@bugsnag/js": "^7.0.0",
70
70
  "@netlify/blobs": "^8.2.0",
71
- "@netlify/cache-utils": "^5.2.0",
72
- "@netlify/config": "^22.2.0",
73
- "@netlify/edge-bundler": "13.0.3",
74
- "@netlify/framework-info": "^9.9.3",
75
- "@netlify/functions-utils": "^5.3.18",
76
- "@netlify/git-utils": "^5.2.0",
77
- "@netlify/opentelemetry-utils": "^1.3.1",
71
+ "@netlify/cache-utils": "^6.0.0",
72
+ "@netlify/config": "^23.0.1",
73
+ "@netlify/edge-bundler": "14.0.1",
74
+ "@netlify/framework-info": "^10.0.0",
75
+ "@netlify/functions-utils": "^6.0.1",
76
+ "@netlify/git-utils": "^6.0.0",
77
+ "@netlify/opentelemetry-utils": "^2.0.0",
78
78
  "@netlify/plugins-list": "^6.80.0",
79
- "@netlify/run-utils": "^5.2.0",
80
- "@netlify/zip-it-and-ship-it": "10.1.1",
79
+ "@netlify/run-utils": "^6.0.0",
80
+ "@netlify/zip-it-and-ship-it": "11.0.1",
81
81
  "@sindresorhus/slugify": "^2.0.0",
82
82
  "ansi-escapes": "^6.0.0",
83
83
  "chalk": "^5.0.0",
@@ -122,33 +122,33 @@
122
122
  "terminal-link": "^3.0.0",
123
123
  "ts-node": "^10.9.1",
124
124
  "typescript": "^5.0.0",
125
- "uuid": "^9.0.0",
125
+ "uuid": "^11.0.0",
126
126
  "yargs": "^17.6.0"
127
127
  },
128
128
  "devDependencies": {
129
- "@netlify/nock-udp": "^4.0.0",
129
+ "@netlify/nock-udp": "^5.0.0",
130
130
  "@opentelemetry/api": "~1.8.0",
131
131
  "@opentelemetry/sdk-trace-base": "~1.24.0",
132
132
  "@types/node": "^14.18.53",
133
133
  "atob": "^2.1.2",
134
134
  "ava": "^4.0.0",
135
- "c8": "^7.12.0",
135
+ "c8": "^10.0.0",
136
136
  "copyfiles": "^2.4.1",
137
137
  "cpy": "^9.0.0",
138
138
  "get-node": "^12.0.0",
139
139
  "get-port": "^6.0.0",
140
- "has-ansi": "^5.0.0",
140
+ "has-ansi": "^6.0.0",
141
141
  "moize": "^6.0.0",
142
142
  "npm-run-all2": "^5.0.0",
143
143
  "process-exists": "^5.0.0",
144
- "sinon": "^13.0.0",
144
+ "sinon": "^20.0.0",
145
145
  "tmp-promise": "^3.0.2",
146
146
  "tsd": "^0.32.0",
147
147
  "vitest": "^0.34.0",
148
148
  "yarn": "^1.22.22"
149
149
  },
150
150
  "peerDependencies": {
151
- "@netlify/opentelemetry-sdk-setup": "^1.1.0",
151
+ "@netlify/opentelemetry-sdk-setup": "^2.0.0",
152
152
  "@opentelemetry/api": "~1.8.0"
153
153
  },
154
154
  "peerDependenciesMeta": {
@@ -157,7 +157,7 @@
157
157
  }
158
158
  },
159
159
  "engines": {
160
- "node": "^14.16.0 || >=16.0.0"
160
+ "node": ">=18.14.0"
161
161
  },
162
- "gitHead": "fa49ed28e63e0cb14e1fdd8e9f0a812999c3314e"
162
+ "gitHead": "c05f2007b0fd64e9abebc79df473087b1d9e348f"
163
163
  }