You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 813a714
Browse filesBrowse the repository at this point in the historyBrowse files
fix(config): pin the default compatibility date without creating void.json
When a project had no config file and no date, the first dev server,
build or deploy created a new void.json, a format the docs call legacy.
Adding void.config.ts later then failed with "Found both".
Now the date goes where the project already keeps its config:
- a new project gets a generated void.config.ts with only the date, as
`void init` writes it, and `.void-wrangler.jsonc` is added to
.gitignore;
- framework apps (Astro, SvelteKit, Nuxt, Analog) and projects with a
root wrangler.json(c) get it in the root Wrangler file their adapter
reads;
- a project with wrangler.toml keeps getting it in void.json, because
void.config.ts would hide the toml's bindings.
A date already in void.json is still read, so existing projects keep
their date. The .gitignore helper moves from `void migrate` to
cloudflare-config.ts so both paths share it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: docs/reference/config.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -297,7 +297,7 @@ Void-managed WebSocket route files (`*.ws.ts`) are Cloudflare-only because they
297
297
298
298
### `worker`
299
299
300
-
Curated Cloudflare Workers configuration. `void init` pins `compatibility_date` here. Binding arrays such as `d1_databases`, `kv_namespaces`, and `r2_buckets` go in [`cloudflare`](#cloudflare), where Void preserves custom settings and resolved IDs during deployment.
300
+
Curated Cloudflare Workers configuration. `void init` pins `compatibility_date` here. If a project has no config file and no date, the first dev server or build creates `void.config.ts` with only this date and adds `.void-wrangler.jsonc` to `.gitignore`. Astro, SvelteKit, Nuxt, and Analog apps get the date in a root `wrangler.jsonc` instead, which their adapter reads by default. A project with a `wrangler.toml` gets it in `void.json`. Binding arrays such as `d1_databases`, `kv_namespaces`, and `r2_buckets` go in [`cloudflare`](#cloudflare), where Void preserves custom settings and resolved IDs during deployment.
0 commit comments