@vercel/build-utils
Advanced tools
+10
-0
| # @vercel/build-utils | ||
| ## 13.28.0 | ||
| ### Minor Changes | ||
| - 4e849dd: Add a per-route `hasPostponed` signal to `Prerender`. | ||
| `@vercel/build-utils` exposes a new optional `hasPostponed?: boolean` field on `Prerender` / `PrerenderOptions`. It is a tri-state: `true` when the route's `.meta` postponed state is present (React suspended during the build-time prerender), `false` when the framework prerendered a Prerender route without postponing, and `undefined` when the framework did not provide the signal. | ||
| `@vercel/next` populates it for app-router PPR routes (computed from the route's postponed state) and leaves it `undefined` for pages-router and other non-app-router prerenders. This is an additive, finer-grained signal — it does not change the existing `chain` / `experimentalStreamingLambdaPath` behavior — so downstream consumers can distinguish a route that actually postponed from one that has PPR machinery but fully prerendered (e.g. under `cacheComponents: true`). | ||
| ## 13.27.2 | ||
@@ -4,0 +14,0 @@ |
@@ -21,2 +21,3 @@ import type { File, HasField, Chain } from './types'; | ||
| partialFallback?: boolean; | ||
| hasPostponed?: boolean; | ||
| } | ||
@@ -51,4 +52,11 @@ export declare class Prerender { | ||
| partialFallback?: boolean; | ||
| constructor({ expiration, staleExpiration, lambda, fallback, group, bypassToken, allowQuery, allowHeader, initialHeaders, initialStatus, passQuery, sourcePath, experimentalBypassFor, experimentalStreamingLambdaPath, chain, exposeErrBody, partialFallback, }: PrerenderOptions); | ||
| /** | ||
| * Set to `true` when the route's `.meta` postponed state is present (React | ||
| * suspended during build prerender). `false` when the framework prerendered | ||
| * a Prerender route without postponing. `undefined` when the framework did | ||
| * not provide the signal. | ||
| */ | ||
| hasPostponed?: boolean; | ||
| constructor({ expiration, staleExpiration, lambda, fallback, group, bypassToken, allowQuery, allowHeader, initialHeaders, initialStatus, passQuery, sourcePath, experimentalBypassFor, experimentalStreamingLambdaPath, chain, exposeErrBody, partialFallback, hasPostponed, }: PrerenderOptions); | ||
| } | ||
| export {}; |
@@ -42,3 +42,4 @@ "use strict"; | ||
| exposeErrBody, | ||
| partialFallback | ||
| partialFallback, | ||
| hasPostponed | ||
| }) { | ||
@@ -49,2 +50,8 @@ this.type = "Prerender"; | ||
| this.sourcePath = sourcePath; | ||
| if (hasPostponed !== void 0 && typeof hasPostponed !== "boolean") { | ||
| throw new Error( | ||
| "The `hasPostponed` argument for `Prerender` must be a boolean or undefined." | ||
| ); | ||
| } | ||
| this.hasPostponed = hasPostponed; | ||
| this.lambda = lambda; | ||
@@ -51,0 +58,0 @@ if (this.lambda) { |
+1
-1
| { | ||
| "name": "@vercel/build-utils", | ||
| "version": "13.27.2", | ||
| "version": "13.28.0", | ||
| "license": "Apache-2.0", | ||
@@ -5,0 +5,0 @@ "main": "./dist/index.js", |
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
2069837
0.09%52113
0.04%