@netlify/build 29.4.1 → 29.4.3-rc

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
@@ -3,10 +3,10 @@ import process from 'process';
3
3
  import filterObj from 'filter-obj';
4
4
  import yargs from 'yargs';
5
5
  import { hideBin } from 'yargs/helpers';
6
- import { normalizeCliFeatureFlags } from './feature_flags.js';
7
- import { FLAGS } from './flags.js';
8
- import build from './main.js';
9
- import { FALLBACK_SEVERITY_ENTRY } from './severity.js';
6
+ import { normalizeCliFeatureFlags } from '../../lib/core/feature_flags.js';
7
+ import { FLAGS } from '../../lib/core/flags.js';
8
+ import build from '../../lib/core/main.js';
9
+ import { FALLBACK_SEVERITY_ENTRY } from '../../lib/core/severity.js';
10
10
  // CLI entry point.
11
11
  // Before adding logic to this file, please consider adding it to the main
12
12
  // programmatic command instead, so that the new logic is available when run
package/lib/core/build.js CHANGED
@@ -30,7 +30,7 @@ export const startBuild = function (flags) {
30
30
  const errorMonitor = startErrorMonitor({ flags: flagsA, logs, bugsnagKey });
31
31
  return { ...flagsA, errorMonitor, logs, timers };
32
32
  };
33
- const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cachedConfigPath, outputConfigPath, cwd, repositoryRoot, apiHost, token, siteId, context, branch, baseRelDir, env: envOpt, debug, systemLogFile, verbose, nodePath, functionsDistDir, edgeFunctionsDistDir, cacheDir, dry, mode, offline, deployId, buildId, testOpts, errorMonitor, errorParams, logs, timers, buildbotServerSocket, sendStatus, saveConfig, featureFlags, timeline, devCommand, quiet, }) {
33
+ const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cachedConfigPath, outputConfigPath, cwd, repositoryRoot, apiHost, token, siteId, context, branch, baseRelDir, env: envOpt, debug, systemLogFile, verbose, nodePath, functionsDistDir, edgeFunctionsDistDir, cacheDir, dry, mode, offline, deployId, buildId, testOpts, errorMonitor, errorParams, logs, timers, buildbotServerSocket, sendStatus, saveConfig, featureFlags, timeline, devCommand, quiet, framework, }) {
34
34
  const configOpts = getConfigOpts({
35
35
  config,
36
36
  defaultConfig,
@@ -61,6 +61,14 @@ const tExecBuild = async function ({ config, defaultConfig, cachedConfig, cached
61
61
  timers,
62
62
  quiet,
63
63
  });
64
+ if (framework) {
65
+ const runtime = supportedRuntimes[framework];
66
+ const skip = childEnv[runtime.skipFlag];
67
+ const installedPlugins = netlifyConfig.plugins.map((plugin) => plugin.package);
68
+ if (runtime !== undefined && skip !== 'true' && installedPlugins.contains(runtime.package)) {
69
+ netlifyConfig.plugins.push({ package: runtime.package });
70
+ }
71
+ }
64
72
  const constants = await getConstants({
65
73
  configPath,
66
74
  buildDir,
@@ -366,3 +374,7 @@ const runBuild = async function ({ childProcesses, pluginsOptions, netlifyConfig
366
374
  });
367
375
  return { stepsCount, netlifyConfig: netlifyConfigA, statuses, failedPlugins, timers: timersB, configMutations };
368
376
  };
377
+ const supportedRuntimes = {
378
+ next: { package: '@netlify/plugin-nextjs', skipFlag: 'NETLIFY_NEXT_PLUGIN_SKIP' },
379
+ gatsby: { package: '@netlify/plugin-gatsby', skipFlag: 'NETLIFY_GATSBY_PLUGIN_SKIP' },
380
+ };
package/lib/core/main.js CHANGED
@@ -31,6 +31,7 @@ export default async function buildSite(flags = {}) {
31
31
  debug,
32
32
  testOpts,
33
33
  errorParams,
34
+ framework,
34
35
  });
35
36
  await handleBuildSuccess({
36
37
  framework,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.4.1",
3
+ "version": "29.4.3-rc",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/core/main.js",
@@ -69,7 +69,7 @@
69
69
  "@netlify/edge-bundler": "8.0.0",
70
70
  "@netlify/functions-utils": "^5.1.1",
71
71
  "@netlify/git-utils": "^5.1.0",
72
- "@netlify/plugins-list": "^6.61.0",
72
+ "@netlify/plugins-list": "^6.59.0",
73
73
  "@netlify/run-utils": "^5.1.0",
74
74
  "@netlify/zip-it-and-ship-it": "^8.2.0",
75
75
  "@sindresorhus/slugify": "^2.0.0",
@@ -148,6 +148,5 @@
148
148
  "compilerOptions": {
149
149
  "module": "commonjs"
150
150
  }
151
- },
152
- "gitHead": "4bd8537773af176971af17d2c871b0f3fd8d74fd"
151
+ }
153
152
  }