mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #667] [MERGED] refactor: extract Pages page data and ISR runtime #755
Labels
No labels
enhancement
enhancement
good first issue
help wanted
nextjs-tracking
nextjs-tracking
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/vinext#755
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/cloudflare/vinext/pull/667
Author: @southpolesteve
Created: 3/23/2026
Status: ✅ Merged
Merged: 3/25/2026
Merged by: @southpolesteve
Base:
main← Head:codex/pages-page-data-runtime📝 Commits (1)
b8f4b0frefactor: extract Pages page data runtime📊 Changes
6 files changed (+885 additions, -451 deletions)
View changed files
📝
packages/vinext/src/entries/pages-server-entry.ts(+107 -216)➕
packages/vinext/src/server/pages-page-data.ts(+396 -0)📝
packages/vinext/src/server/pages-page-response.ts(+1 -1)📝
tests/__snapshots__/entry-templates.test.ts.snap(+104 -216)📝
tests/entry-templates.test.ts(+19 -18)➕
tests/pages-page-data.test.ts(+258 -0)📄 Description
Summary
getStaticPaths/getServerSideProps/getStaticProps+ ISR decision path into typed runtime code inpackages/vinext/src/server/pages-page-data.tspackages/vinext/src/entries/pages-server-entry.tsfocused on route-specific wiring while delegating page data/cache behavior to the helper layertests/pages-page-data.test.tsand update generator expectations/snapshots for the new delegation boundaryWhy
This keeps another large chunk of real request/cache behavior out of the generated Pages Router entry, following the same pattern we used for App Router and the earlier Pages response extraction. The goal is to make the code easier to typecheck, test, and safely modify.
Verification
vp check packages/vinext/src/server/pages-page-data.ts tests/pages-page-data.test.ts packages/vinext/src/entries/pages-server-entry.ts tests/entry-templates.test.ts packages/vinext/src/server/pages-page-response.tsvp test run tests/pages-page-data.test.ts tests/entry-templates.test.tsvp test run tests/pages-router.test.ts -t 'renders pages with getStaticPaths \+ getStaticProps|returns 404 for paths not in getStaticPaths when fallback is false|getServerSideProps calling res.end\(\) short-circuits the response|keeps ISR cache-fill rerenders isolated from the streamed render state|wraps stale regeneration in a fresh unified request context'vp run vinext#buildWritten by Codex.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.