@netlify/build 29.40.0 → 29.41.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.
package/lib/core/build.js CHANGED
@@ -1,4 +1,5 @@
1
1
  import { supportedRuntimes } from '@netlify/framework-info';
2
+ import { addAttributesToActiveSpan } from '@netlify/opentelemetry-utils';
2
3
  import { getErrorInfo } from '../error/info.js';
3
4
  import { startErrorMonitor } from '../error/monitor/start.js';
4
5
  import { getBufferLogs, getSystemLogger } from '../log/logger.js';
@@ -276,6 +277,15 @@ const initAndRunBuild = async function ({ pluginsOptions, netlifyConfig, configO
276
277
  context,
277
278
  systemLog,
278
279
  });
280
+ if (pluginsOptionsA?.length) {
281
+ const buildPlugins = {};
282
+ for (const plugin of pluginsOptionsA) {
283
+ if (plugin?.pluginPackageJson?.name) {
284
+ buildPlugins[`build.plugins['${plugin.pluginPackageJson.name}']`] = plugin?.pluginPackageJson?.version ?? 'N/A';
285
+ }
286
+ }
287
+ addAttributesToActiveSpan(buildPlugins);
288
+ }
279
289
  errorParams.pluginsOptions = pluginsOptionsA;
280
290
  const { childProcesses, timers: timersB } = await startPlugins({
281
291
  pluginsOptions: pluginsOptionsA,
@@ -1,7 +1,8 @@
1
1
  import { rm, stat } from 'node:fs/promises';
2
- import { resolve } from 'node:path';
2
+ import { join, resolve } from 'node:path';
3
3
  import { listFrameworks } from '@netlify/framework-info';
4
4
  import { log } from '../../log/logger.js';
5
+ import { DEPLOY_CONFIG_BLOBS_PATH, LEGACY_BLOBS_PATH } from '../../utils/blobs.js';
5
6
  const dirExists = async (path) => {
6
7
  try {
7
8
  await stat(path);
@@ -11,15 +12,21 @@ const dirExists = async (path) => {
11
12
  return false;
12
13
  }
13
14
  };
14
- const getDirtyDirs = async function ({ buildDir, constants: { INTERNAL_EDGE_FUNCTIONS_SRC, INTERNAL_FUNCTIONS_SRC }, }) {
15
- const dirs = [];
15
+ const getDirtyDirs = async function ({ buildDir, constants: { INTERNAL_EDGE_FUNCTIONS_SRC, INTERNAL_FUNCTIONS_SRC }, packagePath, }) {
16
+ const directories = [];
16
17
  if (INTERNAL_FUNCTIONS_SRC && (await dirExists(resolve(buildDir, INTERNAL_FUNCTIONS_SRC)))) {
17
- dirs.push(INTERNAL_FUNCTIONS_SRC);
18
+ directories.push(INTERNAL_FUNCTIONS_SRC);
18
19
  }
19
20
  if (INTERNAL_EDGE_FUNCTIONS_SRC && (await dirExists(resolve(buildDir, INTERNAL_EDGE_FUNCTIONS_SRC)))) {
20
- dirs.push(INTERNAL_EDGE_FUNCTIONS_SRC);
21
+ directories.push(INTERNAL_EDGE_FUNCTIONS_SRC);
21
22
  }
22
- return dirs;
23
+ if (await dirExists(resolve(buildDir, packagePath || '', LEGACY_BLOBS_PATH))) {
24
+ directories.push(join(packagePath || '', LEGACY_BLOBS_PATH));
25
+ }
26
+ if (await dirExists(resolve(buildDir, packagePath || '', DEPLOY_CONFIG_BLOBS_PATH))) {
27
+ directories.push(join(packagePath || '', DEPLOY_CONFIG_BLOBS_PATH));
28
+ }
29
+ return directories;
23
30
  };
24
31
  const coreStep = async (input) => {
25
32
  const dirs = await getDirtyDirs(input);
@@ -1,4 +1,6 @@
1
1
  /// <reference types="node" resolution-mode="require"/>
2
+ export declare const LEGACY_BLOBS_PATH = ".netlify/blobs/deploy";
3
+ export declare const DEPLOY_CONFIG_BLOBS_PATH = ".netlify/deploy/v1/blobs/deploy";
2
4
  /** Retrieve the absolute path of the deploy scoped internal blob directories */
3
5
  export declare const getBlobsDirs: (buildDir: string, packagePath?: string) => string[];
4
6
  /**
@@ -1,8 +1,8 @@
1
1
  import { readFile } from 'node:fs/promises';
2
2
  import path from 'node:path';
3
3
  import { fdir } from 'fdir';
4
- const LEGACY_BLOBS_PATH = '.netlify/blobs/deploy';
5
- const DEPLOY_CONFIG_BLOBS_PATH = '.netlify/deploy/v1/blobs/deploy';
4
+ export const LEGACY_BLOBS_PATH = '.netlify/blobs/deploy';
5
+ export const DEPLOY_CONFIG_BLOBS_PATH = '.netlify/deploy/v1/blobs/deploy';
6
6
  /** Retrieve the absolute path of the deploy scoped internal blob directories */
7
7
  export const getBlobsDirs = (buildDir, packagePath) => [
8
8
  path.resolve(buildDir, packagePath || '', DEPLOY_CONFIG_BLOBS_PATH),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.40.0",
3
+ "version": "29.41.1",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -70,15 +70,15 @@
70
70
  "@bugsnag/js": "^7.0.0",
71
71
  "@netlify/blobs": "^7.3.0",
72
72
  "@netlify/cache-utils": "^5.1.5",
73
- "@netlify/config": "^20.12.1",
74
- "@netlify/edge-bundler": "11.4.0",
73
+ "@netlify/config": "^20.12.3",
74
+ "@netlify/edge-bundler": "12.0.0",
75
75
  "@netlify/framework-info": "^9.8.11",
76
76
  "@netlify/functions-utils": "^5.2.54",
77
77
  "@netlify/git-utils": "^5.1.1",
78
- "@netlify/opentelemetry-utils": "^1.1.0",
78
+ "@netlify/opentelemetry-utils": "^1.2.0",
79
79
  "@netlify/plugins-list": "^6.77.0",
80
80
  "@netlify/run-utils": "^5.1.1",
81
- "@netlify/zip-it-and-ship-it": "9.31.3",
81
+ "@netlify/zip-it-and-ship-it": "9.32.1",
82
82
  "@sindresorhus/slugify": "^2.0.0",
83
83
  "ansi-escapes": "^6.0.0",
84
84
  "chalk": "^5.0.0",
@@ -165,5 +165,5 @@
165
165
  "engines": {
166
166
  "node": "^14.16.0 || >=16.0.0"
167
167
  },
168
- "gitHead": "f4914c535e667addf543117d17d9b1c78b162081"
168
+ "gitHead": "58fa495beea44671013bd5586c08dabc6d17bc20"
169
169
  }