Repository navigation
fix(deploy): read the framework Worker config as JSONC - #498
Conversation
After `void domain add`, the root Wrangler config keeps Void's published-traffic comment, also when restored from void.lock.json. prepareCfFrameworkBuildOutput read it with JSON.parse, so the next `void deploy` of a framework app stopped at "Preparing deployment...". Read it with readGeneratedWranglerConfigFile, as the other readers of this file already do. Fixes #484 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-cf-build-output-jsonc-void-cloud.voidzero-docs.workers.dev (commit 56fec8a)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
|
Codex Review: Didn't find any major issues. Keep them coming! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Fixes #484
Problem
It affects framework apps whose Worker output is deployed directly (Astro, SvelteKit, Nuxt, Analog).
Fix
prepareCfFrameworkBuildOutputnow reads the config withreadGeneratedWranglerConfigFile. Other code that reads this file already uses that helper. It accepts comments, a BOM and trailing commas, and still rejects bad input.The issue also names two other
JSON.parsereads incf-build-output.ts. I left them as they are on purpose, because Void always writes those files as plain JSON:prepareCfStaticBuildOutput.void/deploy/cloudflare/wrangler-static.jsonJSON.stringify(deploy-cloudflare-static.ts)prepareCfBuildOutputwrangler.json@cloudflare/vite-pluginor a scratch dir, bothJSON.stringifyTests
packages/void/test/unit/cf-build-output.test.ts:writeCloudflareFrameworkDeployConfig, follow the deploy pointer, then prepare the build output.On
main, both tests fail with the error from the issue. Checks run:🤖 Generated with Claude Code