@vercel/build-utils 15.4.2 → 15.5.0-snapshot-fdd4372a7e51

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,30 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 15.5.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 200bff2: Add support for `functions[glob].perimeter` in `vercel.json` and preserve it in function build output.
8
+
9
+ ```json
10
+ {
11
+ "functions": {
12
+ "api/private/*.js": {
13
+ "perimeter": "pmtr_0123456789abcdefghijklmnopqr"
14
+ }
15
+ }
16
+ }
17
+ ```
18
+
19
+ Functions without a perimeter keep their existing behavior.
20
+
21
+ Keep functions with different perimeters in separate CLI bundles, including when bundling is forced.
22
+
23
+ ### Patch Changes
24
+
25
+ - a35a659: A schedule whose `entrypoint` has no `run` must set `runtime`: `"python"` for a module path, such as `"jobs": { "root": "jobs", "entrypoint": "tasks", "runtime": "python" }`, or `"node"` for a `.js`, `.mjs`, `.ts`, `.mts` or `.cts` file, such as `"jobs": { "root": "jobs", "entrypoint": "cleanup.ts", "runtime": "node" }`. The build no longer guesses the runtime from the entrypoint. `runtime` is rejected with `run` or without `entrypoint`.
26
+ - 88289f2: Name schedule functions after their settings with `getScheduleFunction` from `@vercel/build-utils`, which other builders can share. Python schedule functions keep their names.
27
+
3
28
  ## 15.4.2
4
29
 
5
30
  ### Patch Changes
@@ -1,6 +1,6 @@
1
1
  import type { LambdaOptionsBase } from './lambda';
2
2
  import type { Env, Files } from './types';
3
- export interface ContainerImageConfig extends Pick<LambdaOptionsBase, 'handler' | 'architecture' | 'memory' | 'maxDuration' | 'affinity' | 'maxConcurrency' | 'environment' | 'regions' | 'functionFailoverRegions' | 'experimentalTriggers' | 'supportsCancellation'> {
3
+ export interface ContainerImageConfig extends Pick<LambdaOptionsBase, 'handler' | 'architecture' | 'memory' | 'maxDuration' | 'affinity' | 'maxConcurrency' | 'environment' | 'regions' | 'functionFailoverRegions' | 'experimentalTriggers' | 'supportsCancellation' | 'perimeter'> {
4
4
  /**
5
5
  * The OCI image reference, for example
6
6
  * `vcr.vercel.com/team/project/svc@sha256:...`.
@@ -26,6 +26,7 @@ export declare class ContainerImage implements ContainerImageConfig {
26
26
  functionFailoverRegions?: ContainerImageConfig['functionFailoverRegions'];
27
27
  experimentalTriggers?: ContainerImageConfig['experimentalTriggers'];
28
28
  supportsCancellation?: ContainerImageConfig['supportsCancellation'];
29
+ perimeter?: ContainerImageConfig['perimeter'];
29
30
  constructor(params: ContainerImageConfig & {
30
31
  files: Files;
31
32
  });
@@ -40,6 +40,7 @@ class ContainerImage {
40
40
  this.functionFailoverRegions = params.functionFailoverRegions;
41
41
  this.experimentalTriggers = params.experimentalTriggers;
42
42
  this.supportsCancellation = params.supportsCancellation;
43
+ this.perimeter = params.perimeter;
43
44
  }
44
45
  }
45
46
  // Annotate the CommonJS export names for ESM import in node:
@@ -37,5 +37,11 @@ export declare class EdgeFunction {
37
37
  regions?: string | string[];
38
38
  /** The framework */
39
39
  framework?: FunctionFramework;
40
+ /**
41
+ * ID of the perimeter (`pmtr_...`) configured for this function. Edge
42
+ * Functions cannot run inside a perimeter; the field is kept so the
43
+ * deployment can reject it instead of ignoring it.
44
+ */
45
+ perimeter?: string;
40
46
  constructor(params: Omit<EdgeFunction, 'type'>);
41
47
  }
@@ -32,6 +32,7 @@ class EdgeFunction {
32
32
  this.regions = params.regions;
33
33
  this.framework = params.framework;
34
34
  this.environment = params.environment;
35
+ this.perimeter = params.perimeter;
35
36
  }
36
37
  }
37
38
  // Annotate the CommonJS export names for ESM import in node: