@netlify/build 29.36.4 → 29.36.6

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.4",
3
+ "version": "29.36.6",
4
4
  "description": "Netlify build module",
5
5
  "type": "module",
6
6
  "exports": "./lib/index.js",
@@ -72,7 +72,7 @@
72
72
  "@netlify/cache-utils": "^5.1.5",
73
73
  "@netlify/config": "^20.12.1",
74
74
  "@netlify/edge-bundler": "11.3.0",
75
- "@netlify/framework-info": "^9.8.10",
75
+ "@netlify/framework-info": "^9.8.11",
76
76
  "@netlify/functions-utils": "^5.2.51",
77
77
  "@netlify/git-utils": "^5.1.1",
78
78
  "@netlify/opentelemetry-utils": "^1.0.3",
@@ -164,5 +164,5 @@
164
164
  "engines": {
165
165
  "node": "^14.16.0 || >=16.0.0"
166
166
  },
167
- "gitHead": "d90cda652f5fbee7c3388abf9a8a0841ea4902bf"
167
+ "gitHead": "1cee56d47237e07daa078e8149c411aa346bc8e1"
168
168
  }