Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

@vercel/build-utils

Package Overview
Dependencies
Maintainers
4
Versions
442
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/build-utils - npm Package Compare versions

Comparing version
13.27.2
to
13.28.0
+10
-0
CHANGELOG.md
# @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 @@

+9
-1

@@ -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