From 6c8da846423136fc393fbb2d39ed38c927e2b0ee Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa <4232207+hi-ogawa@users.noreply.github.com> Date: Mon, 5 Oct 2026 16:55:13 +0900 Subject: [PATCH 1/3] test(rsc): run cloudflare e2e on a copy of starter-extra The cloudflare dev tests edited `examples/starter-extra` in place for HMR, while other specs copy that directory as their inline fixture base. A copy taken on the other worker during an edit could build with the edited source. Run the cloudflare tests on an inline fixture instead. Co-Authored-By: Claude Opus 5.5 --- packages/plugin-rsc/e2e/cloudflare.test.ts | 14 +++++++++++--- packages/plugin-rsc/examples/e2e/package.json | 4 +++- pnpm-lock.yaml | 6 ++++++ 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/packages/plugin-rsc/e2e/cloudflare.test.ts b/packages/plugin-rsc/e2e/cloudflare.test.ts index 724d80770..d2d5f18a8 100644 --- a/packages/plugin-rsc/e2e/cloudflare.test.ts +++ b/packages/plugin-rsc/e2e/cloudflare.test.ts @@ -1,10 +1,18 @@ import { test } from '@playwright/test' -import { useFixture } from './fixture' +import { setupInlineFixture, useFixture } from './fixture' import { defineStarterTest } from './starter' +// Run on a copy so the HMR tests never edit `examples/starter-extra`, +// which other specs copy as their inline fixture base. +const root = 'examples/e2e/temp/cloudflare' + +test.beforeAll(async () => { + await setupInlineFixture({ src: 'examples/starter-extra', dest: root }) +}) + test.describe('dev-cloudflare', () => { const f = useFixture({ - root: 'examples/starter-extra', + root, mode: 'dev', command: 'pnpm cf:dev', }) @@ -13,7 +21,7 @@ test.describe('dev-cloudflare', () => { test.describe('build-cloudflare', () => { const f = useFixture({ - root: 'examples/starter-extra', + root, mode: 'build', buildCommand: 'pnpm cf:build', command: 'pnpm cf:preview', diff --git a/packages/plugin-rsc/examples/e2e/package.json b/packages/plugin-rsc/examples/e2e/package.json index 733431b2c..a1a9cf40a 100644 --- a/packages/plugin-rsc/examples/e2e/package.json +++ b/packages/plugin-rsc/examples/e2e/package.json @@ -3,12 +3,14 @@ "private": true, "type": "module", "devDependencies": { + "@cloudflare/vite-plugin": "^1.61.0", "@rolldown/plugin-babel": "^0.2.4", "@vitejs/plugin-react": "latest", "@vitejs/plugin-rsc": "latest", "babel-plugin-react-compiler": "^1.0.0", "connect": "^3.7.0", "rsc-html-stream": "^0.0.8", - "sirv": "^3.0.2" + "sirv": "^3.0.2", + "wrangler": "^4.142.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e76224c90..a161d22c2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -726,6 +726,9 @@ importers: packages/plugin-rsc/examples/e2e: devDependencies: + '@cloudflare/vite-plugin': + specifier: ^1.61.0 + version: 1.61.0(@types/node@24.19.0)(vite@8.3.1(@types/node@24.19.0)(esbuild@0.28.1)(jiti@2.7.0)(yaml@2.9.1))(wrangler@4.142.0(@types/node@24.19.0)) '@rolldown/plugin-babel': specifier: ^0.2.4 version: 0.2.4(@babel/core@8.0.6)(rolldown@1.2.9)(vite@8.3.1(@types/node@24.19.0)(esbuild@0.28.1)(jiti@2.7.0)(yaml@2.9.1)) @@ -747,6 +750,9 @@ importers: sirv: specifier: ^3.0.2 version: 3.0.2 + wrangler: + specifier: ^4.142.0 + version: 4.142.0(@types/node@24.19.0) packages/plugin-rsc/examples/no-ssr: dependencies: From b173f68d946f6e4013b26d901ecc3f7f36b74309 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa <4232207+hi-ogawa@users.noreply.github.com> Date: Mon, 5 Oct 2026 17:45:29 +0900 Subject: [PATCH 2/3] docs(rsc): base inline fixtures on starter-extra in CONTRIBUTING Co-Authored-By: Claude Opus 5.5 --- packages/plugin-rsc/CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/plugin-rsc/CONTRIBUTING.md b/packages/plugin-rsc/CONTRIBUTING.md index b16ab9d89..5effee821 100644 --- a/packages/plugin-rsc/CONTRIBUTING.md +++ b/packages/plugin-rsc/CONTRIBUTING.md @@ -32,7 +32,7 @@ Use `examples/basic`, which contains comprehensive test scenarios, when the case **Using `setupInlineFixture`** -Use `setupInlineFixture` with `examples/starter` for narrow configuration variants, invalid-input coverage, and cases where a standalone runnable example would add mostly boilerplate. Test projects are written under `examples/e2e/temp/`, with dependencies managed in `examples/e2e/package.json`. See `e2e/ssr-thenable.test.ts` for the pattern. +Use `setupInlineFixture` with `examples/starter-extra` for narrow configuration variants, invalid-input coverage, and cases where a standalone runnable example would add mostly boilerplate. Test projects are written under `examples/e2e/temp/`, with dependencies managed in `examples/e2e/package.json`. See `e2e/ssr-thenable.test.ts` for the pattern. ### Unit Tests From 54e7c8d1984f99f1defb524055ff7f17aae117e0 Mon Sep 17 00:00:00 2001 From: Hiroshi Ogawa <4232207+hi-ogawa@users.noreply.github.com> Date: Mon, 5 Oct 2026 17:53:16 +0900 Subject: [PATCH 3/3] chore(rsc): regenerate lockfile after merging main Match the Cloudflare plugin and wrangler versions in starter-extra. Co-Authored-By: Claude Opus 5.5 --- packages/plugin-rsc/examples/e2e/package.json | 4 ++-- pnpm-lock.yaml | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/plugin-rsc/examples/e2e/package.json b/packages/plugin-rsc/examples/e2e/package.json index a1a9cf40a..9bd59da85 100644 --- a/packages/plugin-rsc/examples/e2e/package.json +++ b/packages/plugin-rsc/examples/e2e/package.json @@ -3,7 +3,7 @@ "private": true, "type": "module", "devDependencies": { - "@cloudflare/vite-plugin": "^1.61.0", + "@cloudflare/vite-plugin": "^1.62.5", "@rolldown/plugin-babel": "^0.2.4", "@vitejs/plugin-react": "latest", "@vitejs/plugin-rsc": "latest", @@ -11,6 +11,6 @@ "connect": "^3.7.0", "rsc-html-stream": "^0.0.8", "sirv": "^3.0.2", - "wrangler": "^4.142.0" + "wrangler": "^4.147.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9f0adb285..1fc013942 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -727,8 +727,8 @@ importers: packages/plugin-rsc/examples/e2e: devDependencies: '@cloudflare/vite-plugin': - specifier: ^1.61.0 - version: 1.61.0(@types/node@24.19.0)(vite@8.3.1(@types/node@24.19.0)(esbuild@0.28.1)(jiti@2.7.0)(yaml@2.9.1))(wrangler@4.142.0(@types/node@24.19.0)) + specifier: ^1.62.5 + version: 1.62.5(@types/node@24.19.1)(vite@8.3.2(@types/node@24.19.1)(esbuild@0.28.1)(jiti@2.7.0)(yaml@2.9.1))(wrangler@4.147.0(@types/node@24.19.1)) '@rolldown/plugin-babel': specifier: ^0.2.4 version: 0.2.4(@babel/core@8.0.6)(rolldown@1.2.12)(vite@8.3.2(@types/node@24.19.1)(esbuild@0.28.1)(jiti@2.7.0)(yaml@2.9.1)) @@ -751,8 +751,8 @@ importers: specifier: ^3.0.2 version: 3.0.2 wrangler: - specifier: ^4.142.0 - version: 4.142.0(@types/node@24.19.0) + specifier: ^4.147.0 + version: 4.147.0(@types/node@24.19.1) packages/plugin-rsc/examples/no-ssr: dependencies: