@netlify/build 29.59.1 → 30.0.0

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.
@@ -13,10 +13,10 @@ export function getUtils({ event, constants: { FUNCTIONS_SRC, INTERNAL_FUNCTIONS
13
13
  cancelBuild: any;
14
14
  };
15
15
  cache: {
16
- save: (paths: any, optsA: any) => any;
17
- restore: (paths: any, optsA: any) => any;
18
- remove: (paths: any, optsA: any) => any;
19
- has: (paths: any, optsA: any) => any;
16
+ save: (paths: any, optsA: any) => Promise<any>;
17
+ restore: (paths: any, optsA: any) => Promise<any>;
18
+ remove: (paths: any, optsA: any) => Promise<any>;
19
+ has: (paths: any, optsA: any) => Promise<any>;
20
20
  list: (optsA: any) => Promise<string[]>;
21
21
  getCacheDir: (optsA: any) => string;
22
22
  };
@@ -13,7 +13,7 @@ const AUTO_PLUGINS_DIR = '.netlify/plugins/';
13
13
  // - automatically installed by us, to `.netlify/plugins/`
14
14
  export const resolvePluginsPath = async function ({ pluginsOptions, siteInfo, buildDir, packagePath, nodePath, packageJson, userNodeVersion, mode, api, logs, debug, sendStatus, testOpts, featureFlags, integrations, context, systemLog, pluginsEnv, }) {
15
15
  const autoPluginsDir = getAutoPluginsDir(buildDir, packagePath);
16
- const pluginsOptionsA = await Promise.all(pluginsOptions.map((pluginOptions) => resolvePluginPath({ pluginOptions, buildDir, autoPluginsDir })));
16
+ const pluginsOptionsA = await Promise.all(pluginsOptions.map((pluginOptions) => resolvePluginPath({ pluginOptions, buildDir, packagePath, autoPluginsDir })));
17
17
  const pluginsOptionsB = await addPluginsNodeVersion({
18
18
  featureFlags,
19
19
  pluginsOptions: pluginsOptionsA,
@@ -65,20 +65,21 @@ export const resolvePluginsPath = async function ({ pluginsOptions, siteInfo, bu
65
65
  const getAutoPluginsDir = function (buildDir, packagePath) {
66
66
  return join(buildDir, packagePath || '', AUTO_PLUGINS_DIR);
67
67
  };
68
- const resolvePluginPath = async function ({ pluginOptions, pluginOptions: { packageName, loadedFrom }, buildDir, autoPluginsDir, }) {
68
+ const resolvePluginPath = async function ({ pluginOptions, pluginOptions: { packageName, loadedFrom }, buildDir, packagePath, autoPluginsDir, }) {
69
69
  // Core plugins
70
70
  if (loadedFrom !== undefined) {
71
71
  return pluginOptions;
72
72
  }
73
- const localPackageName = normalizeLocalPackageName(packageName);
74
73
  // Local plugins
74
+ const localPackageName = normalizeLocalPackageName(packageName);
75
75
  if (localPackageName.startsWith('.')) {
76
76
  const { path: localPath, error } = await tryResolvePath(localPackageName, buildDir);
77
77
  validateLocalPluginPath(error, localPackageName);
78
78
  return { ...pluginOptions, pluginPath: localPath, loadedFrom: 'local' };
79
79
  }
80
80
  // Plugin added to `package.json`
81
- const { path: manualPath } = await tryResolvePath(packageName, buildDir);
81
+ const packageDir = join(buildDir, packagePath || '');
82
+ const { path: manualPath } = await tryResolvePath(packageName, packageDir);
82
83
  if (manualPath !== undefined) {
83
84
  return { ...pluginOptions, pluginPath: manualPath, loadedFrom: 'package.json' };
84
85
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.59.1",
3
+ "version": "30.0.0",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -69,15 +69,15 @@
69
69
  "@bugsnag/js": "^7.0.0",
70
70
  "@netlify/blobs": "^7.4.0",
71
71
  "@netlify/cache-utils": "^5.2.0",
72
- "@netlify/config": "^20.22.0",
72
+ "@netlify/config": "^21.0.0",
73
73
  "@netlify/edge-bundler": "12.3.2",
74
74
  "@netlify/framework-info": "^9.9.1",
75
- "@netlify/functions-utils": "^5.3.7",
75
+ "@netlify/functions-utils": "^5.3.9",
76
76
  "@netlify/git-utils": "^5.2.0",
77
77
  "@netlify/opentelemetry-utils": "^1.3.0",
78
78
  "@netlify/plugins-list": "^6.80.0",
79
79
  "@netlify/run-utils": "^5.2.0",
80
- "@netlify/zip-it-and-ship-it": "9.43.0",
80
+ "@netlify/zip-it-and-ship-it": "10.0.0",
81
81
  "@sindresorhus/slugify": "^2.0.0",
82
82
  "ansi-escapes": "^6.0.0",
83
83
  "chalk": "^5.0.0",
@@ -112,7 +112,7 @@
112
112
  "ps-list": "^8.0.0",
113
113
  "read-package-up": "^11.0.0",
114
114
  "readdirp": "^3.4.0",
115
- "resolve": "^2.0.0-next.1",
115
+ "resolve": "^2.0.0-next.5",
116
116
  "rfdc": "^1.3.0",
117
117
  "safe-json-stringify": "^1.2.0",
118
118
  "semver": "^7.3.8",
@@ -126,7 +126,7 @@
126
126
  "yargs": "^17.6.0"
127
127
  },
128
128
  "devDependencies": {
129
- "@netlify/nock-udp": "^3.2.0",
129
+ "@netlify/nock-udp": "^4.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",
@@ -164,5 +164,5 @@
164
164
  "engines": {
165
165
  "node": "^14.16.0 || >=16.0.0"
166
166
  },
167
- "gitHead": "5ef5481867986c27c75fc39a12a82c7be40f5938"
167
+ "gitHead": "65206cf82369d2e0412c707c763590690cc1819a"
168
168
  }