@vercel/build-utils 13.32.1 → 13.32.2
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 +6 -0
- package/dist/index.js +5 -1
- package/dist/lambda.d.ts +1 -1
- package/dist/lambda.js +5 -1
- package/dist/types.d.ts +2 -0
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @vercel/build-utils
|
|
2
2
|
|
|
3
|
+
## 13.32.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 6b49a17: Apply per-service `functions` config when building experimental V2 services. Previously, function configuration declared under `services.<name>.functions` in `vercel.json` (`experimentalTriggers`, `maxDuration`, `memory`, `architecture`, `regions`, `functionFailoverRegions`, `supportsCancellation`) was dropped at build time — only the top-level `functions` map was honored. The build now feeds each service's `functions` to its lambdas for both single-lambda builders (`@vercel/node`, etc., via `writeBuildResultV3`) and framework builders that read `config.functions` (e.g. `@vercel/next`, via the builder config). Derived `queue/v2beta` consumer groups are now scoped by the owning service name so two services that declare the same function path + topic no longer collide.
|
|
8
|
+
|
|
3
9
|
## 13.32.1
|
|
4
10
|
|
|
5
11
|
### Patch Changes
|
package/dist/index.js
CHANGED
|
@@ -35511,14 +35511,18 @@ async function getLambdaOptionsFromFunction({
|
|
|
35511
35511
|
config
|
|
35512
35512
|
}) {
|
|
35513
35513
|
if (config?.functions) {
|
|
35514
|
+
const serviceName = typeof config.serviceName === "string" && config.serviceName !== "" ? config.serviceName : void 0;
|
|
35514
35515
|
for (const [pattern, fn] of Object.entries(config.functions)) {
|
|
35515
35516
|
if (sourceFile === pattern || (0, import_minimatch.default)(sourceFile, pattern)) {
|
|
35517
|
+
const consumer = sanitizeConsumerName(
|
|
35518
|
+
serviceName ? `${serviceName}~${pattern}` : pattern
|
|
35519
|
+
);
|
|
35516
35520
|
const experimentalTriggers = fn.experimentalTriggers?.map(
|
|
35517
35521
|
(trigger) => {
|
|
35518
35522
|
if (trigger.type === "queue/v2beta") {
|
|
35519
35523
|
return {
|
|
35520
35524
|
...trigger,
|
|
35521
|
-
consumer
|
|
35525
|
+
consumer
|
|
35522
35526
|
};
|
|
35523
35527
|
}
|
|
35524
35528
|
return trigger;
|
package/dist/lambda.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export interface LambdaOptionsWithZipBuffer extends LambdaOptionsBase {
|
|
|
81
81
|
}
|
|
82
82
|
interface GetLambdaOptionsFromFunctionOptions {
|
|
83
83
|
sourceFile: string;
|
|
84
|
-
config?: Pick<Config, 'functions'>;
|
|
84
|
+
config?: Pick<Config, 'functions' | 'serviceName'>;
|
|
85
85
|
}
|
|
86
86
|
export declare class Lambda {
|
|
87
87
|
type: 'Lambda';
|
package/dist/lambda.js
CHANGED
|
@@ -349,14 +349,18 @@ async function getLambdaOptionsFromFunction({
|
|
|
349
349
|
config
|
|
350
350
|
}) {
|
|
351
351
|
if (config?.functions) {
|
|
352
|
+
const serviceName = typeof config.serviceName === "string" && config.serviceName !== "" ? config.serviceName : void 0;
|
|
352
353
|
for (const [pattern, fn] of Object.entries(config.functions)) {
|
|
353
354
|
if (sourceFile === pattern || (0, import_minimatch.default)(sourceFile, pattern)) {
|
|
355
|
+
const consumer = sanitizeConsumerName(
|
|
356
|
+
serviceName ? `${serviceName}~${pattern}` : pattern
|
|
357
|
+
);
|
|
354
358
|
const experimentalTriggers = fn.experimentalTriggers?.map(
|
|
355
359
|
(trigger) => {
|
|
356
360
|
if (trigger.type === "queue/v2beta") {
|
|
357
361
|
return {
|
|
358
362
|
...trigger,
|
|
359
|
-
consumer
|
|
363
|
+
consumer
|
|
360
364
|
};
|
|
361
365
|
}
|
|
362
366
|
return trigger;
|
package/dist/types.d.ts
CHANGED
|
@@ -44,6 +44,8 @@ export interface Config {
|
|
|
44
44
|
framework?: string | null;
|
|
45
45
|
nodeVersion?: string;
|
|
46
46
|
middleware?: boolean;
|
|
47
|
+
/** Owning service name; scopes per-function config such as the v2beta consumer. */
|
|
48
|
+
serviceName?: string;
|
|
47
49
|
[key: string]: unknown;
|
|
48
50
|
}
|
|
49
51
|
export type { HasField };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vercel/build-utils",
|
|
3
|
-
"version": "13.32.
|
|
3
|
+
"version": "13.32.2",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.js",
|
|
@@ -55,8 +55,8 @@
|
|
|
55
55
|
"vitest": "2.0.1",
|
|
56
56
|
"typescript": "4.9.5",
|
|
57
57
|
"yazl": "2.5.1",
|
|
58
|
-
"@vercel/
|
|
59
|
-
"@vercel/
|
|
58
|
+
"@vercel/error-utils": "2.2.0",
|
|
59
|
+
"@vercel/routing-utils": "6.4.0"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"build": "node build.mjs",
|