mirror of
https://github.com/cloudflare/vinext.git
synced 2026-05-09 08:25:34 +02:00
[PR #975] [MERGED] fix: add SWR non-blocking guard tests for route handler ISR #995
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#995
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/975
Author: @Divkix
Created: 4/30/2026
Status: ✅ Merged
Merged: 4/30/2026
Merged by: @james-elicx
Base:
main← Head:fix/959-route-handler-swr-block📝 Commits (2)
4393da6fix: add SWR non-blocking guard tests for route handler ISR (#959)309688adocs: clarify porting attribution in SWR ISR tests📊 Changes
2 files changed (+71 additions, -1 deletions)
View changed files
📝
tests/app-router.test.ts(+51 -1)➕
tests/fixtures/app-basic/app/api/slow-isr/route.ts(+20 -0)📄 Description
Fixes #959
Summary
pendingWaitUntil/pipe-readableblocking pattern from the Next.js fix (vercel/next.js#93189)ctx.waitUntil()for all background cache writes and regenerations — no equivalent of the Next.jspendingWaitUntil/pipe-readableblocking existstest/e2e/app-dir/use-cache-swr/use-cache-swr.test.tsTest plan
it("route handler ISR: STALE serves stale data and triggers background regen")— addedstaleDuration < 500msassertionit("route handler ISR: STALE completes quickly without blocking on background regen")— new test with slow handler fixture, verifies cold request ≥ 700ms, stale response < 500ms, background regen completes successfully🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.