Skip to content

v1.11.0

Latest

Choose a tag to compare

@cpojer cpojer released this 19 Nov 01:37
· 27 commits to main since this release
Immutable release. Only release title and notes can be modified.
  • Added database.readReplication to enable or disable D1 replicas. New databases default to replication off.
  • Added setSession() and getBookmark() from void/db, plus bookmark support in createDb(), to preserve previously observed database state across requests.
  • Added large SQL file imports for void db execute --remote --file on direct Cloudflare D1 deployments.
  • Added --yes to void db execute to skip interactive confirmation.
  • Improved void init with 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 execute hiding rows returned by WITH, PRAGMA, EXPLAIN, and RETURNING statements.
  • 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() };
});

D1 replication and bookmarks

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 --yes

Database commands

Upgrade 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 },
});