@netlify/build 29.36.3 → 29.36.5

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.
@@ -1,5 +1,5 @@
1
1
  import { handleBuildError } from '../error/handle.js';
2
- import { getMajorVersion } from '../utils/semver.js';
2
+ import { getMajorVersion, isPrerelease } from '../utils/semver.js';
3
3
  // Retrieve plugin's pinned major versions by fetching the latest `PluginRun`
4
4
  // Only applies to `netlify.toml`-only installed plugins.
5
5
  export const addPinnedVersions = async function ({ pluginsOptions, api, siteInfo: { id: siteId }, sendStatus }) {
@@ -52,8 +52,9 @@ export const pinPlugins = async function ({ pluginsOptions, failedPlugins, api,
52
52
  // - the plugin's version has not been pinned yet
53
53
  // - the plugin was installed in the UI
54
54
  // - both the build and the plugin succeeded
55
- const shouldPinVersion = function ({ pluginOptions: { packageName, pinnedVersion, loadedFrom, origin }, failedPlugins, }) {
56
- return (pinnedVersion === undefined &&
55
+ const shouldPinVersion = function ({ pluginOptions: { packageName, pinnedVersion, pluginPackageJson: { version }, loadedFrom, origin, }, failedPlugins, }) {
56
+ return (!isPrerelease(version) &&
57
+ pinnedVersion === undefined &&
57
58
  loadedFrom === 'auto_install' &&
58
59
  origin === 'ui' &&
59
60
  !failedPlugins.includes(packageName));
@@ -1,2 +1,3 @@
1
1
  export function isPreviousMajor(versionA: any, versionB: any): boolean;
2
2
  export function getMajorVersion(version: any): string | undefined;
3
+ export function isPrerelease(version: any): readonly (string | number)[] | null;
@@ -26,3 +26,6 @@ export const getMajorVersion = function (version) {
26
26
  const patchVersion = semver.patch(version);
27
27
  return `${majorVersion}.${minorVersion}.${patchVersion}`;
28
28
  };
29
+ export const isPrerelease = function (version) {
30
+ return semver.prerelease(version);
31
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netlify/build",
3
- "version": "29.36.3",
3
+ "version": "29.36.5",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -75,11 +75,10 @@
75
75
  "@netlify/framework-info": "^9.8.10",
76
76
  "@netlify/functions-utils": "^5.2.51",
77
77
  "@netlify/git-utils": "^5.1.1",
78
- "@netlify/opentelemetry-utils": "^1.0.2",
78
+ "@netlify/opentelemetry-utils": "^1.0.3",
79
79
  "@netlify/plugins-list": "^6.75.0",
80
80
  "@netlify/run-utils": "^5.1.1",
81
81
  "@netlify/zip-it-and-ship-it": "9.29.2",
82
- "@opentelemetry/api": "~1.7.0",
83
82
  "@sindresorhus/slugify": "^2.0.0",
84
83
  "ansi-escapes": "^6.0.0",
85
84
  "chalk": "^5.0.0",
@@ -128,6 +127,7 @@
128
127
  },
129
128
  "devDependencies": {
130
129
  "@netlify/nock-udp": "^3.1.2",
130
+ "@opentelemetry/api": "^1.7.0",
131
131
  "@opentelemetry/sdk-trace-base": "^1.18.1",
132
132
  "@types/node": "^14.18.53",
133
133
  "@vitest/coverage-c8": "^0.33.0",
@@ -153,7 +153,8 @@
153
153
  "yarn": "^1.22.4"
154
154
  },
155
155
  "peerDependencies": {
156
- "@netlify/opentelemetry-sdk-setup": "^1.0.4"
156
+ "@netlify/opentelemetry-sdk-setup": "^1.0.5",
157
+ "@opentelemetry/api": "^1.7.0"
157
158
  },
158
159
  "peerDependenciesMeta": {
159
160
  "@netlify/opentelemetry-sdk-setup": {
@@ -163,5 +164,5 @@
163
164
  "engines": {
164
165
  "node": "^14.16.0 || >=16.0.0"
165
166
  },
166
- "gitHead": "64df9d234945fecb4d2ca52eca6c4884f723f742"
167
+ "gitHead": "c9c2345b160b9a2dbc51dbcf46fe574a4cecbac9"
167
168
  }