@netlify/build 27.15.8-rc → 27.16.2-pidgey
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@netlify/build",
|
|
3
|
-
"version": "27.
|
|
3
|
+
"version": "27.16.2-pidgey",
|
|
4
4
|
"description": "Netlify build module",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": "./src/core/main.js",
|
|
@@ -56,14 +56,14 @@
|
|
|
56
56
|
"license": "MIT",
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"@bugsnag/js": "^7.0.0",
|
|
59
|
-
"@netlify/edge-bundler": "^1.
|
|
59
|
+
"@netlify/edge-bundler": "^1.14.1",
|
|
60
60
|
"@netlify/cache-utils": "^4.0.0",
|
|
61
|
-
"@netlify/config": "^18.2.
|
|
62
|
-
"@netlify/functions-utils": "^4.2.
|
|
61
|
+
"@netlify/config": "^18.2.3",
|
|
62
|
+
"@netlify/functions-utils": "^4.2.5",
|
|
63
63
|
"@netlify/git-utils": "^4.0.0",
|
|
64
|
-
"@netlify/plugins-list": "^6.
|
|
64
|
+
"@netlify/plugins-list": "^6.41.0",
|
|
65
65
|
"@netlify/run-utils": "^4.0.0",
|
|
66
|
-
"@netlify/zip-it-and-ship-it": "^
|
|
66
|
+
"@netlify/zip-it-and-ship-it": "^6.0.0",
|
|
67
67
|
"@sindresorhus/slugify": "^2.0.0",
|
|
68
68
|
"@types/node": "^16.0.0",
|
|
69
69
|
"ajv": "^8.11.0",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import semver from 'semver'
|
|
2
2
|
|
|
3
|
+
import { isRuntime } from '../../utils/runtime.js'
|
|
3
4
|
import { isPreviousMajor } from '../../utils/semver.js'
|
|
4
5
|
import { getPluginOrigin } from '../description.js'
|
|
5
6
|
import { logArray, logSubHeader, logWarningArray, logWarningSubHeader } from '../logger.js'
|
|
@@ -36,11 +37,6 @@ const isNotCorePlugin = function ({ origin }) {
|
|
|
36
37
|
return origin !== 'core'
|
|
37
38
|
}
|
|
38
39
|
|
|
39
|
-
const isRuntime = function ({ packageName }) {
|
|
40
|
-
// Make this a bit more robust in the future
|
|
41
|
-
return ['@netlify/next-runtime', '@netlify/plugin-nextjs'].includes(packageName)
|
|
42
|
-
}
|
|
43
|
-
|
|
44
40
|
const getPluginDescription = function (
|
|
45
41
|
{
|
|
46
42
|
packageName,
|
|
@@ -1,8 +1,20 @@
|
|
|
1
|
+
import { isRuntime } from '../../utils/runtime.js'
|
|
1
2
|
import { log, logArray, logSubHeader } from '../logger.js'
|
|
2
3
|
|
|
3
4
|
export const logInstallMissingPlugins = function (logs, packages) {
|
|
4
|
-
|
|
5
|
-
|
|
5
|
+
const runtimes = packages.filter((pkg) => isRuntime(pkg))
|
|
6
|
+
const plugins = packages.filter((pkg) => !isRuntime(pkg))
|
|
7
|
+
|
|
8
|
+
if (plugins.length !== 0) {
|
|
9
|
+
logSubHeader(logs, 'Installing plugins')
|
|
10
|
+
logArray(logs, packages)
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
if (runtimes.length !== 0) {
|
|
14
|
+
const [nextRuntime] = runtimes
|
|
15
|
+
|
|
16
|
+
logSubHeader(logs, `Using Next.js Runtime - v${nextRuntime.pluginPackageJson.version}`)
|
|
17
|
+
}
|
|
6
18
|
}
|
|
7
19
|
|
|
8
20
|
export const logInstallLocalPluginsDeps = function (logs, localPluginsOptions) {
|
|
@@ -42,12 +42,11 @@ export const getExpectedVersion = async function ({ versions, nodeVersion, packa
|
|
|
42
42
|
// - Otherwise, use `latestVersion`
|
|
43
43
|
const getCompatibleEntry = async function ({ versions, nodeVersion, packageJson, buildDir, pinnedVersion }) {
|
|
44
44
|
if (pinnedVersion !== undefined) {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
versions.find(({ version }) => semver.satisfies(semver.coerce(version), pinnedVersion)) || {
|
|
48
|
-
version: pinnedVersion,
|
|
49
|
-
}
|
|
45
|
+
const matchingVersion = versions.find(({ version }) =>
|
|
46
|
+
semver.satisfies(version, pinnedVersion, { includePrerelease: true }),
|
|
50
47
|
)
|
|
48
|
+
|
|
49
|
+
return matchingVersion || { version: pinnedVersion }
|
|
51
50
|
}
|
|
52
51
|
|
|
53
52
|
const versionsWithConditions = versions.filter(hasConditions)
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { promises as fs } from 'fs'
|
|
2
|
+
import path, { resolve } from 'path'
|
|
3
|
+
import process from 'process'
|
|
2
4
|
|
|
3
5
|
import { zipFunctions } from '@netlify/zip-it-and-ship-it'
|
|
4
6
|
import { pathExists } from 'path-exists'
|
|
@@ -26,6 +28,7 @@ const zipFunctionsAndLogResults = async ({
|
|
|
26
28
|
isRunningLocally,
|
|
27
29
|
logs,
|
|
28
30
|
repositoryRoot,
|
|
31
|
+
publishDir,
|
|
29
32
|
}) => {
|
|
30
33
|
const zisiParameters = getZisiParameters({
|
|
31
34
|
buildDir,
|
|
@@ -44,6 +47,13 @@ const zipFunctionsAndLogResults = async ({
|
|
|
44
47
|
|
|
45
48
|
const sourceDirectories = [internalFunctionsSrc, functionsSrc].filter(Boolean)
|
|
46
49
|
const results = await zipItAndShipIt.zipFunctions(sourceDirectories, functionsDist, zisiParameters)
|
|
50
|
+
if (process.env.NF_BUNDLE_FOR_FLY === 'true') {
|
|
51
|
+
const destDir = path.join(publishDir, '.netlify/internal/fly-functions')
|
|
52
|
+
await fs.mkdir(destDir, { recursive: true })
|
|
53
|
+
await Promise.all(
|
|
54
|
+
results.map((result) => fs.copyFile(result.path, path.join(destDir, path.basename(result.path)))),
|
|
55
|
+
)
|
|
56
|
+
}
|
|
47
57
|
|
|
48
58
|
logBundleResults({ logs, results })
|
|
49
59
|
|
|
@@ -62,6 +72,7 @@ const coreStep = async function ({
|
|
|
62
72
|
IS_LOCAL: isRunningLocally,
|
|
63
73
|
FUNCTIONS_SRC: relativeFunctionsSrc,
|
|
64
74
|
FUNCTIONS_DIST: relativeFunctionsDist,
|
|
75
|
+
PUBLISH_DIR: publishDir,
|
|
65
76
|
},
|
|
66
77
|
buildDir,
|
|
67
78
|
logs,
|
|
@@ -114,6 +125,7 @@ const coreStep = async function ({
|
|
|
114
125
|
isRunningLocally,
|
|
115
126
|
logs,
|
|
116
127
|
repositoryRoot,
|
|
128
|
+
publishDir,
|
|
117
129
|
})
|
|
118
130
|
|
|
119
131
|
return {
|