@vercel/build-utils 13.2.6 → 13.2.7
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 13.2.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Replace getNodeVersion with getRuntimeNodeVersion ([#14600](https://github.com/vercel/vercel/pull/14600))
|
|
8
|
+
|
|
9
|
+
- Add zero-config support for Koa.js ([#14567](https://github.com/vercel/vercel/pull/14567))
|
|
10
|
+
|
|
3
11
|
## 13.2.6
|
|
4
12
|
|
|
5
13
|
### Patch Changes
|
|
@@ -2,8 +2,8 @@ import { Builder } from '.';
|
|
|
2
2
|
/**
|
|
3
3
|
* List of backend frameworks supported by the experimental backends feature
|
|
4
4
|
*/
|
|
5
|
-
export declare const BACKEND_FRAMEWORKS: readonly ["express", "hono", "h3", "nestjs", "fastify", "elysia"];
|
|
6
|
-
export declare const BACKEND_BUILDERS: readonly ["@vercel/express", "@vercel/hono", "@vercel/h3", "@vercel/nestjs", "@vercel/fastify", "@vercel/elysia"];
|
|
5
|
+
export declare const BACKEND_FRAMEWORKS: readonly ["express", "hono", "h3", "koa", "nestjs", "fastify", "elysia"];
|
|
6
|
+
export declare const BACKEND_BUILDERS: readonly ["@vercel/express", "@vercel/hono", "@vercel/h3", "@vercel/koa", "@vercel/nestjs", "@vercel/fastify", "@vercel/elysia"];
|
|
7
7
|
export type BackendFramework = (typeof BACKEND_FRAMEWORKS)[number];
|
|
8
8
|
/**
|
|
9
9
|
* Checks if the given framework is a backend framework
|
|
@@ -31,6 +31,7 @@ const BACKEND_FRAMEWORKS = [
|
|
|
31
31
|
"express",
|
|
32
32
|
"hono",
|
|
33
33
|
"h3",
|
|
34
|
+
"koa",
|
|
34
35
|
"nestjs",
|
|
35
36
|
"fastify",
|
|
36
37
|
"elysia"
|
|
@@ -39,6 +40,7 @@ const BACKEND_BUILDERS = [
|
|
|
39
40
|
"@vercel/express",
|
|
40
41
|
"@vercel/hono",
|
|
41
42
|
"@vercel/h3",
|
|
43
|
+
"@vercel/koa",
|
|
42
44
|
"@vercel/nestjs",
|
|
43
45
|
"@vercel/fastify",
|
|
44
46
|
"@vercel/elysia"
|
|
@@ -85,7 +85,7 @@ export declare function getNodeBinPath({ cwd, }: {
|
|
|
85
85
|
export declare function getNodeBinPaths({ start, base, }: TraverseUpDirectoriesProps): string[];
|
|
86
86
|
export declare function runShellScript(fsPath: string, args?: string[], spawnOpts?: SpawnOptions): Promise<boolean>;
|
|
87
87
|
export declare function getSpawnOptions(meta: Meta, nodeVersion: NodeVersion): SpawnOptions;
|
|
88
|
-
export declare function
|
|
88
|
+
export declare function getRuntimeNodeVersion(destPath: string, fallbackVersion?: string | undefined, config?: Config, meta?: Meta, availableVersions?: number[]): Promise<NodeVersion | BunVersion>;
|
|
89
89
|
export declare function scanParentDirs(destPath: string, readPackageJson?: boolean, base?: string): Promise<ScanParentDirsResult>;
|
|
90
90
|
export declare function turboVersionSpecifierSupportsCorepack(turboVersionSpecifier: string): boolean;
|
|
91
91
|
export declare function usingCorepack(env: {
|
|
@@ -34,9 +34,9 @@ __export(run_user_scripts_exports, {
|
|
|
34
34
|
getEnvForPackageManager: () => getEnvForPackageManager,
|
|
35
35
|
getNodeBinPath: () => getNodeBinPath,
|
|
36
36
|
getNodeBinPaths: () => getNodeBinPaths,
|
|
37
|
-
getNodeVersion: () => getNodeVersion,
|
|
38
37
|
getPathForPackageManager: () => getPathForPackageManager,
|
|
39
38
|
getPathOverrideForPackageManager: () => getPathOverrideForPackageManager,
|
|
39
|
+
getRuntimeNodeVersion: () => getRuntimeNodeVersion,
|
|
40
40
|
getScriptName: () => getScriptName,
|
|
41
41
|
getSpawnOptions: () => getSpawnOptions,
|
|
42
42
|
installDependencies: () => installDependencies,
|
|
@@ -203,7 +203,7 @@ function getSpawnOptions(meta, nodeVersion) {
|
|
|
203
203
|
}
|
|
204
204
|
return opts;
|
|
205
205
|
}
|
|
206
|
-
async function
|
|
206
|
+
async function getRuntimeNodeVersion(destPath, fallbackVersion = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION, config = {}, meta = {}, availableVersions = (0, import_node_version.getAvailableNodeVersions)()) {
|
|
207
207
|
if (config.bunVersion) {
|
|
208
208
|
return (0, import_node_version.getSupportedBunVersion)(config.bunVersion);
|
|
209
209
|
}
|
|
@@ -1092,9 +1092,9 @@ const installDependencies = (0, import_util.deprecate)(
|
|
|
1092
1092
|
getEnvForPackageManager,
|
|
1093
1093
|
getNodeBinPath,
|
|
1094
1094
|
getNodeBinPaths,
|
|
1095
|
-
getNodeVersion,
|
|
1096
1095
|
getPathForPackageManager,
|
|
1097
1096
|
getPathOverrideForPackageManager,
|
|
1097
|
+
getRuntimeNodeVersion,
|
|
1098
1098
|
getScriptName,
|
|
1099
1099
|
getSpawnOptions,
|
|
1100
1100
|
installDependencies,
|
package/dist/index.d.ts
CHANGED
|
@@ -8,7 +8,7 @@ import download, { downloadFile, DownloadedFiles, isSymbolicLink, isDirectory }
|
|
|
8
8
|
import getWriteableDirectory from './fs/get-writable-directory';
|
|
9
9
|
import glob, { GlobOptions } from './fs/glob';
|
|
10
10
|
import rename from './fs/rename';
|
|
11
|
-
import { spawnAsync, execCommand, spawnCommand, walkParentDirs, getScriptName, installDependencies, runPackageJsonScript, runNpmInstall, runBundleInstall, runPipInstall, runShellScript, runCustomInstallCommand, resetCustomInstallCommandSet, getEnvForPackageManager,
|
|
11
|
+
import { spawnAsync, execCommand, spawnCommand, walkParentDirs, getScriptName, installDependencies, runPackageJsonScript, runNpmInstall, runBundleInstall, runPipInstall, runShellScript, runCustomInstallCommand, resetCustomInstallCommandSet, getEnvForPackageManager, getRuntimeNodeVersion, getPathForPackageManager, detectPackageManager, getSpawnOptions, getNodeBinPath, getNodeBinPaths, scanParentDirs, traverseUpDirectories } from './fs/run-user-scripts';
|
|
12
12
|
import { getLatestNodeVersion, getDiscontinuedNodeVersions, getSupportedNodeVersion, isBunVersion, getSupportedBunVersion } from './fs/node-version';
|
|
13
13
|
import streamToBuffer, { streamToBufferChunks } from './fs/stream-to-buffer';
|
|
14
14
|
import debug from './debug';
|
|
@@ -18,7 +18,7 @@ import { getPrefixedEnvVars } from './get-prefixed-env-vars';
|
|
|
18
18
|
import { cloneEnv } from './clone-env';
|
|
19
19
|
import { hardLinkDir } from './hard-link-dir';
|
|
20
20
|
import { validateNpmrc } from './validate-npmrc';
|
|
21
|
-
export { FileBlob, FileFsRef, FileRef, Lambda, NodejsLambda, createLambda, Prerender, download, downloadFile, DownloadedFiles, getWriteableDirectory, glob, GlobOptions, rename, spawnAsync, getScriptName, installDependencies, runPackageJsonScript, execCommand, spawnCommand, walkParentDirs, getNodeBinPath, getNodeBinPaths, getSupportedNodeVersion, isBunVersion, getSupportedBunVersion, detectPackageManager, runNpmInstall, runBundleInstall, runPipInstall, runShellScript, runCustomInstallCommand, resetCustomInstallCommandSet, getEnvForPackageManager,
|
|
21
|
+
export { FileBlob, FileFsRef, FileRef, Lambda, NodejsLambda, createLambda, Prerender, download, downloadFile, DownloadedFiles, getWriteableDirectory, glob, GlobOptions, rename, spawnAsync, getScriptName, installDependencies, runPackageJsonScript, execCommand, spawnCommand, walkParentDirs, getNodeBinPath, getNodeBinPaths, getSupportedNodeVersion, isBunVersion, getSupportedBunVersion, detectPackageManager, runNpmInstall, runBundleInstall, runPipInstall, runShellScript, runCustomInstallCommand, resetCustomInstallCommandSet, getEnvForPackageManager, getRuntimeNodeVersion, getPathForPackageManager, getLatestNodeVersion, getDiscontinuedNodeVersions, getSpawnOptions, getPlatformEnv, getPrefixedEnvVars, streamToBuffer, streamToBufferChunks, debug, isSymbolicLink, isDirectory, getLambdaOptionsFromFunction, scanParentDirs, getIgnoreFilter, cloneEnv, hardLinkDir, traverseUpDirectories, validateNpmrc, };
|
|
22
22
|
export { EdgeFunction } from './edge-function';
|
|
23
23
|
export { readConfigFile, getPackageJson } from './fs/read-config-file';
|
|
24
24
|
export { normalizePath } from './fs/normalize-path';
|
package/dist/index.js
CHANGED
|
@@ -23750,7 +23750,6 @@ __export(src_exports, {
|
|
|
23750
23750
|
getLatestNodeVersion: () => getLatestNodeVersion,
|
|
23751
23751
|
getNodeBinPath: () => getNodeBinPath,
|
|
23752
23752
|
getNodeBinPaths: () => getNodeBinPaths,
|
|
23753
|
-
getNodeVersion: () => getNodeVersion,
|
|
23754
23753
|
getOsRelease: () => getOsRelease,
|
|
23755
23754
|
getPackageJson: () => getPackageJson,
|
|
23756
23755
|
getPathForPackageManager: () => getPathForPackageManager,
|
|
@@ -23758,6 +23757,7 @@ __export(src_exports, {
|
|
|
23758
23757
|
getPrefixedEnvVars: () => getPrefixedEnvVars,
|
|
23759
23758
|
getPrettyError: () => getPrettyError,
|
|
23760
23759
|
getProvidedRuntime: () => getProvidedRuntime,
|
|
23760
|
+
getRuntimeNodeVersion: () => getRuntimeNodeVersion,
|
|
23761
23761
|
getScriptName: () => getScriptName,
|
|
23762
23762
|
getSpawnOptions: () => getSpawnOptions,
|
|
23763
23763
|
getSupportedBunVersion: () => getSupportedBunVersion,
|
|
@@ -25239,7 +25239,7 @@ function getSpawnOptions(meta, nodeVersion) {
|
|
|
25239
25239
|
}
|
|
25240
25240
|
return opts;
|
|
25241
25241
|
}
|
|
25242
|
-
async function
|
|
25242
|
+
async function getRuntimeNodeVersion(destPath, fallbackVersion = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION, config = {}, meta = {}, availableVersions = getAvailableNodeVersions()) {
|
|
25243
25243
|
if (config.bunVersion) {
|
|
25244
25244
|
return getSupportedBunVersion(config.bunVersion);
|
|
25245
25245
|
}
|
|
@@ -26724,6 +26724,7 @@ var BACKEND_FRAMEWORKS = [
|
|
|
26724
26724
|
"express",
|
|
26725
26725
|
"hono",
|
|
26726
26726
|
"h3",
|
|
26727
|
+
"koa",
|
|
26727
26728
|
"nestjs",
|
|
26728
26729
|
"fastify",
|
|
26729
26730
|
"elysia"
|
|
@@ -26732,6 +26733,7 @@ var BACKEND_BUILDERS = [
|
|
|
26732
26733
|
"@vercel/express",
|
|
26733
26734
|
"@vercel/hono",
|
|
26734
26735
|
"@vercel/h3",
|
|
26736
|
+
"@vercel/koa",
|
|
26735
26737
|
"@vercel/nestjs",
|
|
26736
26738
|
"@vercel/fastify",
|
|
26737
26739
|
"@vercel/elysia"
|
|
@@ -26841,7 +26843,6 @@ async function isPythonEntrypoint(file) {
|
|
|
26841
26843
|
getLatestNodeVersion,
|
|
26842
26844
|
getNodeBinPath,
|
|
26843
26845
|
getNodeBinPaths,
|
|
26844
|
-
getNodeVersion,
|
|
26845
26846
|
getOsRelease,
|
|
26846
26847
|
getPackageJson,
|
|
26847
26848
|
getPathForPackageManager,
|
|
@@ -26849,6 +26850,7 @@ async function isPythonEntrypoint(file) {
|
|
|
26849
26850
|
getPrefixedEnvVars,
|
|
26850
26851
|
getPrettyError,
|
|
26851
26852
|
getProvidedRuntime,
|
|
26853
|
+
getRuntimeNodeVersion,
|
|
26852
26854
|
getScriptName,
|
|
26853
26855
|
getSpawnOptions,
|
|
26854
26856
|
getSupportedBunVersion,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/build-utils",
|
|
3
|
-
"version": "13.2.
|
|
3
|
+
"version": "13.2.7",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.js",
|
|
@@ -47,8 +47,8 @@
|
|
|
47
47
|
"yazl": "2.5.1",
|
|
48
48
|
"vitest": "2.0.1",
|
|
49
49
|
"json5": "2.2.3",
|
|
50
|
-
"@vercel/
|
|
51
|
-
"@vercel/
|
|
50
|
+
"@vercel/routing-utils": "5.3.2",
|
|
51
|
+
"@vercel/error-utils": "2.0.3"
|
|
52
52
|
},
|
|
53
53
|
"scripts": {
|
|
54
54
|
"build": "node build.mjs",
|