Skip to content
Source
Sign inSign up
TanStack/db
Open History to see the last commit

CHANGELOG.md

404 lines16.1 KB

@tanstack/browser-db-sqlite-persistence

0.2.35

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.4.10

0.2.34

Patch Changes

  • Recover persisted on-demand Electric and Query collections after cache claim loss by rotating their SQLite cache and reloading active subsets. Fence retired provider work and expired claims, preserve warm runs on their claimed cache generation, and forward claim lifetime options through SQLite host factories. Require explicit eager or claim-bound managed targets for SQLite adapter data operations, and forward them through Electron IPC protocol v6. Bare collection IDs no longer work at this lower-level adapter boundary. (#2069)

  • Updated dependencies [cda9d6a, 6fa60aa, 5d2a4b0]:

    • @tanstack/db-sqlite-persistence-core@0.4.9

0.2.33

Patch Changes

  • Keep source-backed persisted Collections usable when a writer tab closes after a commit but before its reply. Certify the original transaction with the new writer and reload peers without duplicating unchanged row events. (#2088)

    Forward exact-ID reconciliation through the Electron persistence bridge and require matching protocol v4 peers.

  • Updated dependencies [8b0e1de]:

    • @tanstack/db-sqlite-persistence-core@0.4.8

0.2.32

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.4.7

0.2.31

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.4.6

0.2.30

Patch Changes

0.2.29

Patch Changes

0.2.28

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.4.3

0.2.27

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.4.2

0.2.26

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.4.1

0.2.25

Patch Changes

  • Updated dependencies [9c62ac3, c0d123b]:
    • @tanstack/db-sqlite-persistence-core@0.4.0

0.2.24

Patch Changes

  • Browser OPFS database opening previously waited without a deadline. It now rejects after 30 seconds by default and terminates the pending worker instead of acquiring the database later. Set timeoutMs: 0 to keep the previous unbounded wait, override the deadline with another value, or pass an AbortSignal to cancel a pending open. (#1936)

  • Require coordinators to route complete committed transactions through the per-collection persistence owner, with named fail-stop errors for indeterminate commits and durability failures. Add clone-safe remote-subset leases with exact release, recursive wire validation, and matching Browser and Electron coordination. (#1845)

  • Request an existing leader's route before the first coordinated write, without sending the mutation. Let leader election finish during scheduled hydration, and reject writes queued under a former leader before persistence. (#1899)

  • Schedule ordinary persisted source commits before acquiring the browser writer lock, so they cannot deadlock with another Collection's hydration on a shared SQLite database. Add a real two-tab OPFS and live Electric recovery test for distinct schema versions and a torn legacy resume baseline. (#1910)

  • Terminate OPFS workers on pagehide, including during initialization, and reject pending requests with AbortError. Include available VFS error details in SQLite open failures. Connections must be recreated when restoring a document from the back/forward cache. (#1844)

  • Schedule complete SQLite hydration units fairly without holding coordinator work inside the local hydration scope. Fence stale startup rows after a coordinator reset. Preserve per-Collection leader adapter routing, mutation results across transport retries, terminal coordinator disposal, real-adapter restart order, and promise-discovered shared scheduling. (#1868)

  • Preserve persisted resume integrity with atomic SQLite baseline evidence and stale-writer rejection, expose persistence sync metadata as one versioned capability, and refresh uncertified Electric baselines before publishing resumed data. (#1846)

    This changes the public persistence contracts: custom PersistenceAdapter implementations must now implement loadResumeSnapshot, and SyncMetadataApi.persistence is required with null explicitly representing no persistence. Custom sync wrappers that receive metadata must forward metadata.persistence unchanged so consumers receive either that sentinel or the complete versioned capability. A direct sync invocation may still omit the optional metadata object entirely, which consumers treat as no persistence. The Electron bridge now transports the atomic resume snapshot through IPC protocol v2; Electron main and renderer integrations must upgrade together because mixed v1/v2 peers fail closed. Node and React Native persistence instances that wrap one database handle now share transaction admission so concurrent collection startup cannot overlap transactions on that connection.

  • Updated dependencies [6e151b0, 5108acf, fef53f8, 4b9617c, f09868f, d3c38c8, 5218f0c, 98639f0, 2781581, 3d96614, f473a36, 510cb53]:

    • @tanstack/db-sqlite-persistence-core@0.3.0

0.2.23

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.23

0.2.22

Patch Changes

  • Updated dependencies [a378bd3, ad043b7]:
    • @tanstack/db-sqlite-persistence-core@0.2.22

0.2.21

Patch Changes

  • Updated dependencies [cfb01ce]:
    • @tanstack/db-sqlite-persistence-core@0.2.21

0.2.20

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.20

0.2.19

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.19

0.2.18

Patch Changes

  • Updated dependencies [8c5838d]:
    • @tanstack/db-sqlite-persistence-core@0.2.18

0.2.17

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.17

0.2.16

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.16

0.2.15

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.15

0.2.14

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.14

0.2.13

Patch Changes

  • Updated dependencies [4b9e8cd]:
    • @tanstack/db-sqlite-persistence-core@0.2.13

0.2.12

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.12

0.2.11

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.11

0.2.10

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.10

0.2.9

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.9

0.2.8

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.8

0.2.7

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.7

0.2.6

Patch Changes

  • Updated dependencies [f7da776]:
    • @tanstack/db-sqlite-persistence-core@0.2.6

0.2.5

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.5

0.2.4

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.4

0.2.3

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.3

0.2.2

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.2.2

0.2.1

Patch Changes

  • Use a safe randomUUID helper that falls back to crypto.getRandomValues when crypto.randomUUID is unavailable (non-secure browser contexts such as dev servers reached via a LAN IP over HTTP). Fixes #1541. (#1593)

  • Updated dependencies [00389a4]:

    • @tanstack/db-sqlite-persistence-core@0.2.1

0.2.0

Minor Changes

  • SQLite persistence wrappers now prune the applied_tx replay log by default so SQLite files no longer grow without bound. When prune options are omitted, wrappers that construct the shared SQLite core adapter apply appliedTxPruneMaxRows: 1_000 and appliedTxPruneMaxAgeSeconds: 86_400 (24h). Both remain overridable, and passing 0 disables that limit. The defaults are exported as DEFAULT_APPLIED_TX_PRUNE_MAX_ROWS and DEFAULT_APPLIED_TX_PRUNE_MAX_AGE_SECONDS from the shared SQLite core package and re-exported by wrapper packages. (#1572)

    The shared SQLite core adapter now treats applied_tx as a bounded replay cache during pullSince recovery. If a recovery request starts before the retained replay window, pullSince returns requiresFullReload: true instead of returning partial deltas.

Patch Changes

  • Updated dependencies [58edb26]:
    • @tanstack/db-sqlite-persistence-core@0.2.0

0.1.11

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.1.11

0.1.10

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.1.10

0.1.9

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.1.9

0.1.8

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.1.8

0.1.7

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.1.7

0.1.6

Patch Changes

  • Fix absolute worker path in bundled output by setting base: './' in vite config, so the OPFS worker URL resolves relative to the module via import.meta.url instead of being hardcoded to /assets/... (#1436)

  • Updated dependencies []:

    • @tanstack/db-sqlite-persistence-core@0.1.6

0.1.5

Patch Changes

  • Updated dependencies []:
    • @tanstack/db-sqlite-persistence-core@0.1.5

0.1.4

Patch Changes

  • Fix workspace: dependency links that were incorrectly published to npm (#1410)

  • Updated dependencies [b779b4e]:

    • @tanstack/db-sqlite-persistence-core@0.1.4

0.1.3

Patch Changes

  • Fix workspace: dependency links that were incorrectly published to npm (#1408)

  • Updated dependencies [287673d]:

    • @tanstack/db-sqlite-persistence-core@0.1.3

0.1.2

Patch Changes

  • Fix workspace: dependency links that were incorrectly published to npm (#1406)

  • Updated dependencies [99ad6b5]:

    • @tanstack/db-sqlite-persistence-core@0.1.2

0.1.1

Patch Changes

  • feat(persistence): add SQLite-based offline persistence for collections (#1358)

    Adds a new persistence layer that durably stores collection data in SQLite, enabling applications to survive page reloads and app restarts across browser, Node, mobile, desktop, and edge runtimes.

    Core persistence (@tanstack/db-sqlite-persistence-core)

    • New package providing the shared SQLite persistence runtime: hydration, streaming, transaction tracking, and applied-tx pruning
    • SQLite core adapter with full query compilation, index management, and schema migration support
    • Portable conformance test contracts for runtime-specific adapters

    Browser (@tanstack/browser-db-sqlite-persistence)

    • New package for browser persistence via wa-sqlite backed by OPFS
    • Single-tab persistence with OPFS-based SQLite storage
    • BrowserCollectionCoordinator for multi-tab leader-election and cross-tab sync

    Cloudflare Durable Objects (@tanstack/cloudflare-durable-objects-db-sqlite-persistence)

    • New package for SQLite persistence in Cloudflare Durable Objects runtimes

    Node (@tanstack/node-db-sqlite-persistence)

    • New package for Node persistence via SQLite

    Electron (@tanstack/electron-db-sqlite-persistence)

    • New package providing Electron main and renderer persistence bridge helpers

    Expo (@tanstack/expo-db-sqlite-persistence)

    • New package for Expo persistence via expo-sqlite

    React Native (@tanstack/react-native-db-sqlite-persistence)

    • New package for React Native persistence via op-sqlite
    • Adapter with transaction deadlock prevention and runtime parity coverage

    Capacitor (@tanstack/capacitor-db-sqlite-persistence)

    • New package for Capacitor persistence via @capacitor-community/sqlite

    Tauri (@tanstack/tauri-db-sqlite-persistence)

    • New package for Tauri persistence via @tauri-apps/plugin-sql
  • Updated dependencies [e0df07e, d351c67]:

    • @tanstack/db-sqlite-persistence-core@0.1.1