Repository navigation
·
27 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
- Added
database.readReplicationto enable or disable D1 replicas. New databases default to replication off. - Added
setSession()andgetBookmark()fromvoid/db, plus bookmark support increateDb(), to preserve previously observed database state across requests. - Added large SQL file imports for
void db execute --remote --fileon direct Cloudflare D1 deployments. - Added
--yestovoid db executeto skip interactive confirmation. - Improved
void initwith a concise setup summary, installation progress, and clearer next steps. - Fixed authentication clients triggering dependency re-optimization and page reloads during development.
- Fixed generated authentication schemas and migrations dropping indexes declared by Better Auth plugins.
- Fixed cancellation of AI provider requests and response streams.
- Fixed local
void db executehiding rows returned byWITH,PRAGMA,EXPLAIN, andRETURNINGstatements. - Fixed remote SQL scripts incorrectly skipping confirmation, and D1 queries failing with Windows line endings.
- Improved sending-only Cloudflare email setup, preserving inbound mail routing and avoiding repeated onboarding prompts.
- Fixed intermittent platform upgrades and application deployments failing on stale Cloudflare verification reads.
- Improved dependency alignment to avoid duplicate Cloudflare tooling in fresh installs.
Thanks to @0froq, @iPLAYCAFE-dev, and @morinokami for their contributions!
D1 Sessions and Bookmarks
Enable replicas with database.readReplication: true. To carry database progress between requests, return a bookmark after your queries and send it with the next request:
// routes/users.ts
import { users } from '@schema';
import { defineHandler } from 'void';
import { db, getBookmark, setSession } from 'void/db';
export const GET = defineHandler(async (c) => {
const bookmark = c.req.header('X-DB-Bookmark');
setSession(bookmark ? { bookmark } : 'first-primary');
const result = await db.select().from(users);
c.header('Cache-Control', 'private, no-store');
return { users: result, bookmark: getBookmark() };
});Large SQL Imports
Import SQL files into a directly deployed Cloudflare D1 database. Files larger than 100 KB use D1’s import API, which temporarily pauses database queries while the import runs:
void db execute --remote --file ./data.sql --yesUpgrade Guide
Previously deployed D1 databases may already have replicas enabled. Unless your app intentionally uses replicas with consistency handling, set database.readReplication to false and run void deploy:
import { defineConfig } from 'void/config';
export default defineConfig({
database: { readReplication: false },
});