Skip to content

Commit 8c31fbc

Browse files
authored
bump @opennextjs/aws to 4.1.1 (#1361)
1 parent 56dfacc commit 8c31fbc

4 files changed

Lines changed: 32 additions & 9 deletions

File tree

.changeset/chatty-bars-bathe.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@opennextjs/cloudflare": patch
3+
---
4+
5+
chore: bump `@opennextjs/aws` to 4.1.1
6+
7+
See details at <https://github.com/opennextjs/opennextjs-aws/releases/tag/v4.1.1>

examples/e2e/experimental/e2e/ppr.test.ts

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,30 @@ test.describe("PPR", () => {
1111
await expect(el).toBeVisible();
1212
});
1313

14-
test("PPR rsc prefetch request should be cached", async ({ request }) => {
14+
// Next.js 16.2 dropped `<page>.prefetch.rsc` in favor of per segment prefetches, so the
15+
// build only emits a `<page>.rsc` for fully static routes. A postponed PPR route has no
16+
// RSC payload to serve for a whole page prefetch and Next.js answers 404 so that the
17+
// client falls back to a full navigation - the adapter matches that behavior.
18+
test("PPR rsc prefetch request should not be served as a whole page", async ({ request }) => {
1519
const resp = await request.get("/ppr", {
1620
headers: { rsc: "1", "next-router-prefetch": "1" },
1721
});
18-
expect(resp.status()).toEqual(200);
22+
expect(resp.status()).toEqual(404);
1923
const headers = resp.headers();
2024
expect(headers["x-nextjs-postponed"]).toEqual("1");
2125
expect(headers["x-nextjs-cache"]).toEqual("HIT");
26+
});
27+
28+
test("PPR rsc segment prefetch request should be cached", async ({ request }) => {
29+
const resp = await request.get("/ppr", {
30+
headers: { rsc: "1", "next-router-prefetch": "1", "next-router-segment-prefetch": "/_tree" },
31+
});
32+
expect(resp.status()).toEqual(200);
33+
const headers = resp.headers();
34+
// "2" identifies a segment prefetch response.
35+
expect(headers["x-nextjs-postponed"]).toEqual("2");
36+
expect(headers["x-nextjs-prerender"]).toEqual("1");
37+
expect(headers["x-nextjs-cache"]).toEqual("HIT");
2238
expect(headers["cache-control"]).toEqual("s-maxage=31536000");
2339
});
2440
});

packages/cloudflare/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"dependencies": {
5555
"@ast-grep/napi": "^0.40.5",
5656
"@dotenvx/dotenvx": "catalog:",
57-
"@opennextjs/aws": "4.1.0",
57+
"@opennextjs/aws": "4.1.1",
5858
"ci-info": "^4.2.0",
5959
"cloudflare": "^4.4.1",
6060
"comment-json": "^4.5.1",

pnpm-lock.yaml

Lines changed: 6 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)