Pass through prerender classification metadata to prerender-config.json#78
Closed
agadzik wants to merge 1 commit into
Closed
Pass through prerender classification metadata to prerender-config.json#78agadzik wants to merge 1 commit into
agadzik wants to merge 1 commit into
Conversation
Forward hasPostponed, hasFallback, htmlSize, and isDynamicRoute from AdapterOutput['PRERENDER'] (added in vercel/next.js#95534) so deployment summaries can classify PPR and Cache Components routes, matching the @vercel/next builder. The values are tri-state, so they are written raw: false/0 are preserved and only undefined keys are dropped. Adds the repo's first vitest setup with a pass-through test, wired into the Lint workflow. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
🦋 Changeset detectedLatest commit: e86b9d3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
@agadzik is attempting to deploy a commit to the vtest314-next-adapter-e2e-tests Team on Vercel. A member of the Team first needs to authorize it. |
This was referenced Jul 7, 2026
Author
|
Superseded by #80 (same commit, branch renamed to gadzik/add-ppr-metadata-prerender). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Forwards four per-route classification fields from
AdapterOutput['PRERENDER']into the Build Output APIprerender-config.json:hasPostponed— whether the build-time PPR prerender postponedhasFallback— whether a dynamic route template has a static fallback shellhtmlSize— byte size of the prerendered HTML shell (0= fully postponed empty shell)isDynamicRoute— dynamic route template vs. concrete prerendered pathWhy
Vercel's deployment summary classifies PPR and Cache Components routes from these signals. The legacy
@vercel/nextbuilder emits them (vercel/vercel#16554, vercel/vercel#16584); this adapter did not, so newer Next versions regressed the summary.How
Pure pass-through — all four values are computed in Next core by vercel/next.js#95534 and written raw: they are tri-state, so
false/0must be preserved and onlyundefinedkeys dropped byJSON.stringify. Deliberately not using the|| undefinedidiom used elsewhere in this file, which would collapsefalsetoundefined.Since no published
nextcanary includes vercel/next.js#95534 yet, the fields are typed via a localPrerenderClassificationFieldstype intersected at the read site. Remove it once thenextdevDependency is bumped past that PR's merge. Until then (and on older Next versions at runtime) the fields simply readundefinedand are omitted — this PR is safe to merge independently.Tests
Adds the repo's first vitest setup (
vitest run, wired into the Lint workflow) with a pass-through test forhandlePrerenderOutputs: assertshasFallback: falseandhtmlSize: 0survive un-mangled, and that absent fields produce no keys.Rollout
A release of this package does nothing in production until
@vercel/nextbumps its pinned version and re-bundles. After merge, cut a new beta from the version-packages PR so that follow-up can pin it.Known fast-follow (separate PR, different mechanism):
.vc-config.jsonreportsoperationType: PAGEwhere the legacy builder emitsISR(e.g.pages/index.jswithgetStaticProps+revalidate), which corrupts the same deployment-summary classification these fields feed.🤖 Generated with Claude Code