@vercel/build-utils 13.22.0 → 13.22.1

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,11 @@
1
1
  # @vercel/build-utils
2
2
 
3
+ ## 13.22.1
4
+
5
+ ### Patch Changes
6
+
7
+ - f0d7d32: Disable response streaming for lambdas with `awsLambdaHandler` set inside `getLambdaSupportsStreaming`. This closes a gap where non-Node builders (e.g. `@vercel/redwood`) constructed `NodejsLambda` with `awsLambdaHandler` but no explicit `supportsResponseStreaming`, causing `finalizeLambda` to silently flip streaming on for AWS custom handlers. With the gate now enforced centrally in `finalizeLambda`, the equivalent `@vercel/node` build-time check from #16266 is consolidated away — all builders go through the same gate.
8
+
3
9
  ## 13.22.0
4
10
 
5
11
  ### Minor Changes
package/dist/index.js CHANGED
@@ -32604,6 +32604,9 @@ function getLambdaEnvironment(lambda, buffer, options) {
32604
32604
 
32605
32605
  // src/process-serverless/get-lambda-supports-streaming.ts
32606
32606
  async function getLambdaSupportsStreaming(lambda, forceStreamingRuntime) {
32607
+ if (lambda.awsLambdaHandler) {
32608
+ return { supportsStreaming: false };
32609
+ }
32607
32610
  if (forceStreamingRuntime) {
32608
32611
  return { supportsStreaming: true };
32609
32612
  }
@@ -1,4 +1,5 @@
1
1
  interface LambdaLike {
2
+ awsLambdaHandler?: string;
2
3
  handler: string;
3
4
  launcherType?: string;
4
5
  runtime: string;
@@ -12,9 +13,17 @@ export interface SupportsStreamingResult {
12
13
  };
13
14
  }
14
15
  /**
15
- * Determines if a Lambda should have streaming enabled. If
16
- * `forceStreamingRuntime` is true, streaming is always enabled. If the
17
- * setting is defined it will be honored. Enabled by default for Node.js.
16
+ * Determines if a Lambda should have streaming enabled.
17
+ *
18
+ * AWS custom handlers cannot stream the handler contract returns a
19
+ * response object, not a stream — so they always resolve to `false`,
20
+ * even when `forceStreamingRuntime` is set. This mirrors
21
+ * `deserializeLambda`, which also refuses to force streaming on lambdas
22
+ * with an `awsLambdaHandler` set.
23
+ *
24
+ * Otherwise: if `forceStreamingRuntime` is true, streaming is always
25
+ * enabled. If the setting is defined it will be honored. Enabled by
26
+ * default for Node.js.
18
27
  */
19
28
  export declare function getLambdaSupportsStreaming(lambda: LambdaLike, forceStreamingRuntime: boolean): Promise<SupportsStreamingResult>;
20
29
  export {};
@@ -22,6 +22,9 @@ __export(get_lambda_supports_streaming_exports, {
22
22
  });
23
23
  module.exports = __toCommonJS(get_lambda_supports_streaming_exports);
24
24
  async function getLambdaSupportsStreaming(lambda, forceStreamingRuntime) {
25
+ if (lambda.awsLambdaHandler) {
26
+ return { supportsStreaming: false };
27
+ }
25
28
  if (forceStreamingRuntime) {
26
29
  return { supportsStreaming: true };
27
30
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vercel/build-utils",
3
- "version": "13.22.0",
3
+ "version": "13.22.1",
4
4
  "license": "Apache-2.0",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.js",
@@ -53,8 +53,8 @@
53
53
  "smol-toml": "1.5.2",
54
54
  "vitest": "2.0.1",
55
55
  "yazl": "2.5.1",
56
- "@vercel/routing-utils": "6.2.0",
57
- "@vercel/error-utils": "2.1.0"
56
+ "@vercel/error-utils": "2.1.0",
57
+ "@vercel/routing-utils": "6.2.0"
58
58
  },
59
59
  "scripts": {
60
60
  "build": "node build.mjs",