Skip to content

fix(cloudflare): capture framework build output in the test runner - #1114

Open
sam-goodwin wants to merge 2 commits into
mainfrom
claude/nextjs-build-output-capture-8fb855
Open

fix(cloudflare): capture framework build output in the test runner#1114
sam-goodwin wants to merge 2 commits into
mainfrom
claude/nextjs-build-output-capture-8fb855

Conversation

@sam-goodwin

Copy link
Copy Markdown
Contributor

The test runner is supposed to capture all output, but framework builds were printing raw to the terminal during test runs. Two distinct escape paths, both fixed in cloudflare-tools#106 (this PR bumps the submodule + lockfile):

  • Next.js / OpenNext: the build runner child was spawned with fd-level stdout/stderr: "inherit" through Effect's ChildProcessSpawner, whose ESM-bound node:child_process.spawn bypasses every JS-level patch alchemy-test installs. The runner now pipes and forwards chunks through process.stdout.write / process.stderr.write, which the stray-output capture intercepts (and which still streams to the terminal in a plain deploy).
  • SvelteKit / Waku / Nuxt: rolldown-vite's native progress reporter (transforming..., ✓ N modules transformed.) writes to the fd from Rust — uninterceptable from JS. Their vite builds now default to logLevel: "warn", matching what Astro and Octane already did.

Verified against the live cloud: Nextjs.test.ts, Astro.test.ts + Vite.test.ts, and SvelteKit.test.ts + Waku.test.ts + Nuxt.test.ts all green with zero build output on the terminal; the OpenNext build now appears as [stray stdout] lines in the run log.

🤖 Generated with Claude Code

Bump cloudflare-tools to alchemy-run/cloudflare-tools#106: the OpenNext
build runner now pipes (not fd-inherits) its output so alchemy-test's
stray-output capture can divert it, and SvelteKit/Waku/Nuxt vite builds
default to logLevel "warn" so rolldown's native fd-writing progress
reporter stays out of the terminal.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@alchemy-version-bot

Copy link
Copy Markdown
Contributor

Install the packages built from this commit:

alchemy

bun add alchemy@https://pkg.ing/alchemy/7b4008f

@alchemy.run/better-auth

bun add @alchemy.run/better-auth@https://pkg.ing/@alchemy.run/better-auth/7b4008f

@alchemy.run/pr-package

bun add @alchemy.run/pr-package@https://pkg.ing/@alchemy.run/pr-package/7b4008f

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant