@vercel/build-utils 6.8.3 → 7.1.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 +12 -0
- package/dist/index.js +5 -1
- package/dist/lambda.d.ts +3 -0
- package/dist/lambda.js +5 -1
- package/package.json +4 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# @vercel/build-utils
|
2
2
|
|
3
|
+
## 7.1.0
|
4
|
+
|
5
|
+
### Minor Changes
|
6
|
+
|
7
|
+
- Support serverless function architecture ([#10392](https://github.com/vercel/vercel/pull/10392))
|
8
|
+
|
9
|
+
## 7.0.0
|
10
|
+
|
11
|
+
### Major Changes
|
12
|
+
|
13
|
+
- BREAKING CHANGE: Drop Node.js 14, bump minimum to Node.js 16 ([#10369](https://github.com/vercel/vercel/pull/10369))
|
14
|
+
|
3
15
|
## 6.8.3
|
4
16
|
|
5
17
|
### Patch Changes
|
package/dist/index.js
CHANGED
@@ -29826,7 +29826,7 @@ const download_1 = __webpack_require__(3166);
|
|
29826
29826
|
const stream_to_buffer_1 = __importDefault(__webpack_require__(9688));
|
29827
29827
|
class Lambda {
|
29828
29828
|
constructor(opts) {
|
29829
|
-
const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, supportsResponseStreaming, experimentalResponseStreaming, operationType, framework, } = opts;
|
29829
|
+
const { handler, runtime, maxDuration, architecture, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, supportsResponseStreaming, experimentalResponseStreaming, operationType, framework, } = opts;
|
29830
29830
|
if ('files' in opts) {
|
29831
29831
|
(0, assert_1.default)(typeof opts.files === 'object', '"files" must be an object');
|
29832
29832
|
}
|
@@ -29836,6 +29836,9 @@ class Lambda {
|
|
29836
29836
|
(0, assert_1.default)(typeof handler === 'string', '"handler" is not a string');
|
29837
29837
|
(0, assert_1.default)(typeof runtime === 'string', '"runtime" is not a string');
|
29838
29838
|
(0, assert_1.default)(typeof environment === 'object', '"environment" is not an object');
|
29839
|
+
if (architecture !== undefined) {
|
29840
|
+
(0, assert_1.default)(architecture === 'x86_64' || architecture === 'arm64', '"architecture" must be either "x86_64" or "arm64"');
|
29841
|
+
}
|
29839
29842
|
if (memory !== undefined) {
|
29840
29843
|
(0, assert_1.default)(typeof memory === 'number', '"memory" is not a number');
|
29841
29844
|
}
|
@@ -29868,6 +29871,7 @@ class Lambda {
|
|
29868
29871
|
this.files = 'files' in opts ? opts.files : undefined;
|
29869
29872
|
this.handler = handler;
|
29870
29873
|
this.runtime = runtime;
|
29874
|
+
this.architecture = architecture;
|
29871
29875
|
this.memory = memory;
|
29872
29876
|
this.maxDuration = maxDuration;
|
29873
29877
|
this.environment = environment;
|
package/dist/lambda.d.ts
CHANGED
@@ -4,9 +4,11 @@ interface Environment {
|
|
4
4
|
[key: string]: string;
|
5
5
|
}
|
6
6
|
export type LambdaOptions = LambdaOptionsWithFiles | LambdaOptionsWithZipBuffer;
|
7
|
+
export type LambdaArchitecture = 'x86_64' | 'arm64';
|
7
8
|
export interface LambdaOptionsBase {
|
8
9
|
handler: string;
|
9
10
|
runtime: string;
|
11
|
+
architecture?: LambdaArchitecture;
|
10
12
|
memory?: number;
|
11
13
|
maxDuration?: number;
|
12
14
|
environment?: Environment;
|
@@ -49,6 +51,7 @@ export declare class Lambda {
|
|
49
51
|
files?: Files;
|
50
52
|
handler: string;
|
51
53
|
runtime: string;
|
54
|
+
architecture?: LambdaArchitecture;
|
52
55
|
memory?: number;
|
53
56
|
maxDuration?: number;
|
54
57
|
environment: Environment;
|
package/dist/lambda.js
CHANGED
@@ -13,7 +13,7 @@ const download_1 = require("./fs/download");
|
|
13
13
|
const stream_to_buffer_1 = __importDefault(require("./fs/stream-to-buffer"));
|
14
14
|
class Lambda {
|
15
15
|
constructor(opts) {
|
16
|
-
const { handler, runtime, maxDuration, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, supportsResponseStreaming, experimentalResponseStreaming, operationType, framework, } = opts;
|
16
|
+
const { handler, runtime, maxDuration, architecture, memory, environment = {}, allowQuery, regions, supportsMultiPayloads, supportsWrapper, supportsResponseStreaming, experimentalResponseStreaming, operationType, framework, } = opts;
|
17
17
|
if ('files' in opts) {
|
18
18
|
(0, assert_1.default)(typeof opts.files === 'object', '"files" must be an object');
|
19
19
|
}
|
@@ -23,6 +23,9 @@ class Lambda {
|
|
23
23
|
(0, assert_1.default)(typeof handler === 'string', '"handler" is not a string');
|
24
24
|
(0, assert_1.default)(typeof runtime === 'string', '"runtime" is not a string');
|
25
25
|
(0, assert_1.default)(typeof environment === 'object', '"environment" is not an object');
|
26
|
+
if (architecture !== undefined) {
|
27
|
+
(0, assert_1.default)(architecture === 'x86_64' || architecture === 'arm64', '"architecture" must be either "x86_64" or "arm64"');
|
28
|
+
}
|
26
29
|
if (memory !== undefined) {
|
27
30
|
(0, assert_1.default)(typeof memory === 'number', '"memory" is not a number');
|
28
31
|
}
|
@@ -55,6 +58,7 @@ class Lambda {
|
|
55
58
|
this.files = 'files' in opts ? opts.files : undefined;
|
56
59
|
this.handler = handler;
|
57
60
|
this.runtime = runtime;
|
61
|
+
this.architecture = architecture;
|
58
62
|
this.memory = memory;
|
59
63
|
this.maxDuration = maxDuration;
|
60
64
|
this.environment = environment;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vercel/build-utils",
|
3
|
-
"version": "
|
3
|
+
"version": "7.1.0",
|
4
4
|
"license": "Apache-2.0",
|
5
5
|
"main": "./dist/index.js",
|
6
6
|
"types": "./dist/index.d.js",
|
@@ -26,7 +26,7 @@
|
|
26
26
|
"@types/node-fetch": "^2.1.6",
|
27
27
|
"@types/semver": "6.0.0",
|
28
28
|
"@types/yazl": "2.4.2",
|
29
|
-
"@vercel/error-utils": "
|
29
|
+
"@vercel/error-utils": "2.0.1",
|
30
30
|
"@vercel/ncc": "0.24.0",
|
31
31
|
"aggregate-error": "3.0.1",
|
32
32
|
"async-retry": "1.2.3",
|
@@ -38,6 +38,7 @@
|
|
38
38
|
"glob": "8.0.3",
|
39
39
|
"ignore": "4.0.6",
|
40
40
|
"into-stream": "5.0.0",
|
41
|
+
"jest-junit": "16.0.0",
|
41
42
|
"js-yaml": "3.13.1",
|
42
43
|
"minimatch": "3.1.2",
|
43
44
|
"multistream": "2.1.1",
|
@@ -48,7 +49,7 @@
|
|
48
49
|
},
|
49
50
|
"scripts": {
|
50
51
|
"build": "node build",
|
51
|
-
"test": "jest --env node --verbose --runInBand --bail",
|
52
|
+
"test": "jest --reporters=default --reporters=jest-junit --env node --verbose --runInBand --bail",
|
52
53
|
"test-unit": "pnpm test test/unit.*test.*",
|
53
54
|
"test-e2e": "pnpm test test/integration.test.ts"
|
54
55
|
}
|