@vercel/build-utils 13.2.8 → 13.2.10
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 +12 -0
- package/dist/fs/run-user-scripts.d.ts +1 -1
- package/dist/fs/run-user-scripts.js +3 -3
- package/dist/index.d.ts +2 -2
- package/dist/index.js +7 -4
- package/dist/lambda.d.ts +1 -1
- package/dist/lambda.js +4 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 13.2.10
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add 'go' as a valid runtimeLanguage option for Lambda functions ([#14624](https://github.com/vercel/vercel/pull/14624))
|
|
8
|
+
|
|
9
|
+
## 13.2.9
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- replace getRuntimeNodeVersion with getNodeVersion ([#14622](https://github.com/vercel/vercel/pull/14622))
|
|
14
|
+
|
|
3
15
|
## 13.2.8
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -90,7 +90,7 @@ export declare function runShellScript(fsPath: string, args?: string[], spawnOpt
|
|
|
90
90
|
* Use getEnvForPackageManager() instead when within a builder.
|
|
91
91
|
*/
|
|
92
92
|
export declare function getSpawnOptions(meta: Meta, nodeVersion: NodeVersion): SpawnOptions;
|
|
93
|
-
export declare function
|
|
93
|
+
export declare function getNodeVersion(destPath: string, fallbackVersion?: string | undefined, config?: Config, meta?: Meta, availableVersions?: number[]): Promise<NodeVersion | BunVersion>;
|
|
94
94
|
export declare function scanParentDirs(destPath: string, readPackageJson?: boolean, base?: string): Promise<ScanParentDirsResult>;
|
|
95
95
|
export declare function turboVersionSpecifierSupportsCorepack(turboVersionSpecifier: string): boolean;
|
|
96
96
|
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,
|
|
37
38
|
getPathForPackageManager: () => getPathForPackageManager,
|
|
38
39
|
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 getNodeVersion(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,
|
|
1095
1096
|
getPathForPackageManager,
|
|
1096
1097
|
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, getNodeVersion, 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, getNodeVersion, 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,6 +23750,7 @@ __export(src_exports, {
|
|
|
23750
23750
|
getLatestNodeVersion: () => getLatestNodeVersion,
|
|
23751
23751
|
getNodeBinPath: () => getNodeBinPath,
|
|
23752
23752
|
getNodeBinPaths: () => getNodeBinPaths,
|
|
23753
|
+
getNodeVersion: () => getNodeVersion,
|
|
23753
23754
|
getOsRelease: () => getOsRelease,
|
|
23754
23755
|
getPackageJson: () => getPackageJson,
|
|
23755
23756
|
getPathForPackageManager: () => getPathForPackageManager,
|
|
@@ -23757,7 +23758,6 @@ __export(src_exports, {
|
|
|
23757
23758
|
getPrefixedEnvVars: () => getPrefixedEnvVars,
|
|
23758
23759
|
getPrettyError: () => getPrettyError,
|
|
23759
23760
|
getProvidedRuntime: () => getProvidedRuntime,
|
|
23760
|
-
getRuntimeNodeVersion: () => getRuntimeNodeVersion,
|
|
23761
23761
|
getScriptName: () => getScriptName,
|
|
23762
23762
|
getSpawnOptions: () => getSpawnOptions,
|
|
23763
23763
|
getSupportedBunVersion: () => getSupportedBunVersion,
|
|
@@ -24336,7 +24336,10 @@ var Lambda = class {
|
|
|
24336
24336
|
);
|
|
24337
24337
|
}
|
|
24338
24338
|
if (runtimeLanguage !== void 0) {
|
|
24339
|
-
(0, import_assert4.default)(
|
|
24339
|
+
(0, import_assert4.default)(
|
|
24340
|
+
runtimeLanguage === "rust" || runtimeLanguage === "go",
|
|
24341
|
+
'"runtimeLanguage" is invalid. Valid options: "rust", "go"'
|
|
24342
|
+
);
|
|
24340
24343
|
}
|
|
24341
24344
|
if ("experimentalAllowBundling" in opts && opts.experimentalAllowBundling !== void 0) {
|
|
24342
24345
|
(0, import_assert4.default)(
|
|
@@ -25239,7 +25242,7 @@ function getSpawnOptions(meta, nodeVersion) {
|
|
|
25239
25242
|
}
|
|
25240
25243
|
return opts;
|
|
25241
25244
|
}
|
|
25242
|
-
async function
|
|
25245
|
+
async function getNodeVersion(destPath, fallbackVersion = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION, config = {}, meta = {}, availableVersions = getAvailableNodeVersions()) {
|
|
25243
25246
|
if (config.bunVersion) {
|
|
25244
25247
|
return getSupportedBunVersion(config.bunVersion);
|
|
25245
25248
|
}
|
|
@@ -26843,6 +26846,7 @@ async function isPythonEntrypoint(file) {
|
|
|
26843
26846
|
getLatestNodeVersion,
|
|
26844
26847
|
getNodeBinPath,
|
|
26845
26848
|
getNodeBinPaths,
|
|
26849
|
+
getNodeVersion,
|
|
26846
26850
|
getOsRelease,
|
|
26847
26851
|
getPackageJson,
|
|
26848
26852
|
getPathForPackageManager,
|
|
@@ -26850,7 +26854,6 @@ async function isPythonEntrypoint(file) {
|
|
|
26850
26854
|
getPrefixedEnvVars,
|
|
26851
26855
|
getPrettyError,
|
|
26852
26856
|
getProvidedRuntime,
|
|
26853
|
-
getRuntimeNodeVersion,
|
|
26854
26857
|
getScriptName,
|
|
26855
26858
|
getSpawnOptions,
|
|
26856
26859
|
getSupportedBunVersion,
|
package/dist/lambda.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import type { Config, Env, Files, FunctionFramework, TriggerEvent } from './types';
|
|
3
3
|
export type { TriggerEvent };
|
|
4
4
|
export type LambdaOptions = LambdaOptionsWithFiles | LambdaOptionsWithZipBuffer;
|
|
5
|
-
export type LambdaExecutableRuntimeLanguages = 'rust';
|
|
5
|
+
export type LambdaExecutableRuntimeLanguages = 'rust' | 'go';
|
|
6
6
|
export type LambdaArchitecture = 'x86_64' | 'arm64';
|
|
7
7
|
export interface LambdaOptionsBase {
|
|
8
8
|
handler: string;
|
package/dist/lambda.js
CHANGED
|
@@ -93,7 +93,10 @@ class Lambda {
|
|
|
93
93
|
);
|
|
94
94
|
}
|
|
95
95
|
if (runtimeLanguage !== void 0) {
|
|
96
|
-
(0, import_assert.default)(
|
|
96
|
+
(0, import_assert.default)(
|
|
97
|
+
runtimeLanguage === "rust" || runtimeLanguage === "go",
|
|
98
|
+
'"runtimeLanguage" is invalid. Valid options: "rust", "go"'
|
|
99
|
+
);
|
|
97
100
|
}
|
|
98
101
|
if ("experimentalAllowBundling" in opts && opts.experimentalAllowBundling !== void 0) {
|
|
99
102
|
(0, import_assert.default)(
|