@vercel/build-utils 13.1.1 → 13.2.0

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,17 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 13.2.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Remove env var check for node24 ([#14355](https://github.com/vercel/vercel/pull/14355))
8
+
9
+ ## 13.1.2
10
+
11
+ ### Patch Changes
12
+
13
+ - Support `runtimeLanguage` in build-utils ([#14344](https://github.com/vercel/vercel/pull/14344))
14
+
3
15
  ## 13.1.1
4
16
 
5
17
  ### Patch Changes
@@ -45,6 +45,11 @@ var import_types = require("../types");
45
45
  var import_errors = require("../errors");
46
46
  var import_debug = __toESM(require("../debug"));
47
47
  const NODE_VERSIONS = [
48
+ new import_types.NodeVersion({
49
+ major: 24,
50
+ range: "24.x",
51
+ runtime: "nodejs24.x"
52
+ }),
48
53
  new import_types.NodeVersion({
49
54
  major: 22,
50
55
  range: "22.x",
@@ -103,16 +108,6 @@ function getNodeVersionByMajor(major) {
103
108
  return getOptions().find((v) => v.major === major);
104
109
  }
105
110
  function getOptions() {
106
- if (process.env.VERCEL_ALLOW_NODEJS_24 === "1") {
107
- return [
108
- new import_types.NodeVersion({
109
- major: 24,
110
- range: "24.x",
111
- runtime: "nodejs24.x"
112
- }),
113
- ...NODE_VERSIONS
114
- ];
115
- }
116
111
  return NODE_VERSIONS;
117
112
  }
118
113
  function isNodeVersionAvailable(version) {
package/dist/index.js CHANGED
@@ -22401,6 +22401,7 @@ var Lambda = class {
22401
22401
  const {
22402
22402
  handler,
22403
22403
  runtime,
22404
+ runtimeLanguage,
22404
22405
  maxDuration,
22405
22406
  architecture,
22406
22407
  memory,
@@ -22431,6 +22432,9 @@ var Lambda = class {
22431
22432
  '"architecture" must be either "x86_64" or "arm64"'
22432
22433
  );
22433
22434
  }
22435
+ if (runtimeLanguage !== void 0) {
22436
+ (0, import_assert4.default)(runtimeLanguage === "rust", '"runtimeLanguage" must be "rust"');
22437
+ }
22434
22438
  if ("experimentalAllowBundling" in opts && opts.experimentalAllowBundling !== void 0) {
22435
22439
  (0, import_assert4.default)(
22436
22440
  typeof opts.experimentalAllowBundling === "boolean",
@@ -22554,6 +22558,7 @@ var Lambda = class {
22554
22558
  this.files = "files" in opts ? opts.files : void 0;
22555
22559
  this.handler = handler;
22556
22560
  this.runtime = runtime;
22561
+ this.runtimeLanguage = runtimeLanguage;
22557
22562
  this.architecture = getDefaultLambdaArchitecture(architecture);
22558
22563
  this.memory = memory;
22559
22564
  this.maxDuration = maxDuration;
@@ -22962,6 +22967,11 @@ var BunVersion = class extends Version {
22962
22967
 
22963
22968
  // src/fs/node-version.ts
22964
22969
  var NODE_VERSIONS = [
22970
+ new NodeVersion({
22971
+ major: 24,
22972
+ range: "24.x",
22973
+ runtime: "nodejs24.x"
22974
+ }),
22965
22975
  new NodeVersion({
22966
22976
  major: 22,
22967
22977
  range: "22.x",
@@ -23017,16 +23027,6 @@ var BUN_VERSIONS = [
23017
23027
  })
23018
23028
  ];
23019
23029
  function getOptions() {
23020
- if (process.env.VERCEL_ALLOW_NODEJS_24 === "1") {
23021
- return [
23022
- new NodeVersion({
23023
- major: 24,
23024
- range: "24.x",
23025
- runtime: "nodejs24.x"
23026
- }),
23027
- ...NODE_VERSIONS
23028
- ];
23029
- }
23030
23030
  return NODE_VERSIONS;
23031
23031
  }
23032
23032
  function isNodeVersionAvailable(version) {
package/dist/lambda.d.ts CHANGED
@@ -2,10 +2,12 @@
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
6
  export type LambdaArchitecture = 'x86_64' | 'arm64';
6
7
  export interface LambdaOptionsBase {
7
8
  handler: string;
8
9
  runtime: string;
10
+ runtimeLanguage?: LambdaExecutableRuntimeLanguages;
9
11
  architecture?: LambdaArchitecture;
10
12
  memory?: number;
11
13
  maxDuration?: number;
@@ -70,6 +72,11 @@ export declare class Lambda {
70
72
  files?: Files;
71
73
  handler: string;
72
74
  runtime: string;
75
+ /**
76
+ * When using a generic runtime such as "executable" or "provided" (custom runtimes),
77
+ * this field can be used to specify the language the executable was compiled with.
78
+ */
79
+ runtimeLanguage?: LambdaExecutableRuntimeLanguages;
73
80
  architecture: LambdaArchitecture;
74
81
  memory?: number;
75
82
  maxDuration?: number;
package/dist/lambda.js CHANGED
@@ -60,6 +60,7 @@ class Lambda {
60
60
  const {
61
61
  handler,
62
62
  runtime,
63
+ runtimeLanguage,
63
64
  maxDuration,
64
65
  architecture,
65
66
  memory,
@@ -90,6 +91,9 @@ class Lambda {
90
91
  '"architecture" must be either "x86_64" or "arm64"'
91
92
  );
92
93
  }
94
+ if (runtimeLanguage !== void 0) {
95
+ (0, import_assert.default)(runtimeLanguage === "rust", '"runtimeLanguage" must be "rust"');
96
+ }
93
97
  if ("experimentalAllowBundling" in opts && opts.experimentalAllowBundling !== void 0) {
94
98
  (0, import_assert.default)(
95
99
  typeof opts.experimentalAllowBundling === "boolean",
@@ -213,6 +217,7 @@ class Lambda {
213
217
  this.files = "files" in opts ? opts.files : void 0;
214
218
  this.handler = handler;
215
219
  this.runtime = runtime;
220
+ this.runtimeLanguage = runtimeLanguage;
216
221
  this.architecture = getDefaultLambdaArchitecture(architecture);
217
222
  this.memory = memory;
218
223
  this.maxDuration = maxDuration;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "13.1.1",
3
+ "version": "13.2.0",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",