@netlify/build 29.1.2 → 29.1.3

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,7 +15,4 @@ export const DEFAULT_FEATURE_FLAGS = {
15
15
  buildbot_zisi_esbuild_parser: false,
16
16
  edge_functions_cache_cli: false,
17
17
  edge_functions_system_logger: false,
18
- // TODO: remove this flag once rolled out to everyone
19
- // FF link: https://app.launchdarkly.com/default/production/features/plugins_break_builds_with_unsupported_plugin_versions/targeting
20
- plugins_break_builds_with_unsupported_plugin_versions: false,
21
18
  };
package/lib/log/header.js CHANGED
@@ -8,7 +8,6 @@ export const getHeader = function (message) {
8
8
  const line = '─'.repeat(headerWidth + PADDING_WIDTH * 2);
9
9
  const paddingLeft = ' '.repeat(PADDING_WIDTH);
10
10
  const paddingRight = ' '.repeat(PADDING_WIDTH + headerWidth - messageWidth);
11
- return `${line}
12
- ${paddingLeft}${message}${paddingRight}
11
+ return `${paddingLeft}${message}${paddingRight}
13
12
  ${line}`;
14
13
  };
@@ -1,5 +1,4 @@
1
1
  import semver from 'semver';
2
- import { addErrorInfo } from '../../error/info.js';
3
2
  import { isRuntime } from '../../utils/runtime.js';
4
3
  import { isPreviousMajor } from '../../utils/semver.js';
5
4
  import { getPluginOrigin } from '../description.js';
@@ -57,15 +56,11 @@ const getVersionField = function ([versionFieldName, version]) {
57
56
  };
58
57
  // Print a warning message when old versions plugins are used.
59
58
  // This can only happen when they are installed to `package.json`.
60
- // Also throws an error if the Next runtime is >= 4.0.0 || < 4.26.0
61
- export const logOutdatedPlugins = function (logs, pluginsOptions, featureFlags) {
59
+ export const logOutdatedPlugins = function (logs, pluginsOptions) {
62
60
  const outdatedPlugins = pluginsOptions.filter(hasOutdatedVersion).map(getOutdatedPlugin);
63
61
  if (outdatedPlugins.length === 0) {
64
62
  return;
65
63
  }
66
- // TODO: remove feature flag once fully rolled out
67
- if (featureFlags.plugins_break_builds_with_unsupported_plugin_versions)
68
- throwIfUnsupportedPluginVersion(pluginsOptions.filter(hasOutdatedVersion));
69
64
  logWarningSubHeader(logs, 'Outdated plugins');
70
65
  logWarningArray(logs, outdatedPlugins);
71
66
  };
@@ -104,27 +99,6 @@ export const logIncompatiblePlugins = function (logs, pluginsOptions) {
104
99
  logWarningSubHeader(logs, 'Incompatible plugins');
105
100
  logWarningArray(logs, incompatiblePlugins);
106
101
  };
107
- // Throws an error if the Next runtime is >= 4.0.0 || < 4.26.0, otherwise returns.
108
- const throwIfUnsupportedPluginVersion = function (outdatedPlugins) {
109
- let packageName;
110
- let version;
111
- let latestVersion;
112
- const nextOutdatedV4Plugin = outdatedPlugins.find((plugin) => {
113
- packageName = plugin.pluginPackageJson.name;
114
- version = plugin.pluginPackageJson.version;
115
- latestVersion = plugin.latestVersion;
116
- // https://github.com/npm/node-semver#hyphen-ranges-xyz---abc
117
- // semver hyphen range is inclusive 4.0.0 - 4.25.0 is same as >= 4.0.0 || < 4.26.0;
118
- return (packageName === '@netlify/plugin-nextjs' &&
119
- semver.satisfies(version, '4.0.0 - 4.25.0', { includePrerelease: true }));
120
- });
121
- if (!nextOutdatedV4Plugin) {
122
- return;
123
- }
124
- const error = new Error(`This site cannot be built because it is using an outdated version of the Next.js Runtime: ${packageName}@${version}. Versions greater than 4.26.0 are recommended. To upgrade this plugin, please update its version in "package.json" to the latest version: ${latestVersion}. If you cannot use a more recent version, please contact support at https://www.netlify.com/support for guidance.`);
125
- addErrorInfo(error, { type: 'pluginUnsupportedVersion' });
126
- throw error;
127
- };
128
102
  const hasIncompatibleVersion = function ({ pluginPackageJson: { version }, compatibleVersion, compatWarning }) {
129
103
  return (compatWarning !== '' &&
130
104
  version !== undefined &&
@@ -15,7 +15,7 @@ const CHILD_MAIN_FILE = fileURLToPath(new URL('child/main.js', import.meta.url))
15
15
  const tStartPlugins = async function ({ pluginsOptions, buildDir, childEnv, logs, debug, featureFlags }) {
16
16
  logRuntime(logs, pluginsOptions);
17
17
  logLoadingPlugins(logs, pluginsOptions, debug);
18
- logOutdatedPlugins(logs, pluginsOptions, featureFlags);
18
+ logOutdatedPlugins(logs, pluginsOptions);
19
19
  logIncompatiblePlugins(logs, pluginsOptions);
20
20
  const childProcesses = await Promise.all(pluginsOptions.map(({ pluginDir, nodePath }) => startPlugin({ pluginDir, nodePath, buildDir, childEnv, featureFlags })));
21
21
  return { childProcesses };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.1.2",
3
+ "version": "29.1.3",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/core/main.js",
@@ -149,5 +149,5 @@
149
149
  "module": "commonjs"
150
150
  }
151
151
  },
152
- "gitHead": "a0acebbc30ce28e173ee9ee4edab4983d4172bc8"
152
+ "gitHead": "39ab35d11dad58433eba712c9ceb912d556ccb0b"
153
153
  }