Skip to content

v0.5.1

Choose a tag to compare

@grrowl grrowl released this 02 Jul 15:41
· 66 commits to main since this release

Patch release: reject tables with no usable internal rowid at registerSync (ADR-0015), and align SyncMixin's WebSocket handler types with their implementation.

Fixed

  • registerSync now rejects tables with no usable internal rowid (ADR-0015). The cold-snapshot/fetch reader defaults to ORDER BY rowid when the client sends no orderBy. A WITHOUT ROWID table has no rowid, so that read threw no such column: rowid and hung the subscriber; a table with a declared rowid column shadows the internal one, so the read would silently sort by that arbitrary column. assertSyncCompatible now rejects both loudly at registerSync, alongside the existing INTEGER PRIMARY KEY guard. Ordinary rowid tables (the documented id TEXT PRIMARY KEY pattern) are unaffected.
  • SyncMixin's declared webSocketClose/webSocketError now match their implementation. Both were typed as returning Promise<void> while the mixin's overrides return void synchronously (there is nothing to await — both just drop bookkeeping for the closed socket). Retyped to void | Promise<void>, mirroring @cloudflare/workers-types's own DurableObject interface. webSocketMessage is genuinely async and is unaffected. Cosmetic: no runtime behavior changed, only the emitted .d.ts.

Full Changelog: v0.5.0...v0.5.1