Repository navigation
v0.3.0
Added
- Typed mutations (ADR-0010).
SyncRegistrytakes a third generic — a collection-row manifest — so handlers are fully typed without casts:new SyncRegistry<TUser, Env, { messages: Message }>()typespk(must be a column) and each handler'sop.colsper op (insert→Message,update→Partial<Message>,delete→none). Purely type-level; the untyped two-generic form still works (op.colsfalls back tounknown). - Changelog time-based retention (ADR-0009). A new
changelogRetentionMsknob (default 2 days) prunes_sync_changesrows older than the window, so the log is bounded by age, not just key-cardinality. A client reconnecting from beyond the surviving floor now receives areset+ full snapshot instead of an incremental delta. SetchangelogRetentionMs: nullto disable retention (compaction-only, the prior behavior).
Changed
- Renamed
Registry→SyncRegistry. Breaking, no compat shim. The old name was too generic and clashy; the public surface is uniformlySync*(SyncDurableObject,runSyncedWrite,registerSync). Update your import andnew SyncRegistry(...). registerSyncnow reconciles CDC triggers to the registry instead of only adding them: triggers for a collection you've removed from the registry are dropped on the nextregisterSync, so an orphaned table stops firing capture triggers into_sync_changes. Trigger reap only — existing change rows are left untouched. (ADR-0008)
Full changelog: https://github.com/grrowl/tanstack-do-db-collection/blob/main/CHANGELOG.md