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

CHANGELOG.md

988 lines50.9 KB

@tanstack/react-db

0.3.12

Patch Changes

0.3.11

Patch Changes

  • Retire adapter-created live-query collections after their final subscriber leaves. Treat an undefined gcTime as omitted, preserve explicit values and caller-supplied collections, and retain Solid projections while their Suspense boundary is pending. (#2172)

  • Updated dependencies [468db85, 3c481f6, a09ba67, 92b11b0, fcd539a, 2c83fdc]:

    • @tanstack/db@0.15.1

0.3.10

Patch Changes

0.3.9

Patch Changes

0.3.8

Patch Changes

0.3.7

Patch Changes

  • Updated dependencies [487c5a6]:
    • @tanstack/db@0.12.3

0.3.6

Patch Changes

0.3.5

Patch Changes

0.3.4

Patch Changes

0.3.3

Patch Changes

  • Updated dependencies [06cab6f]:
    • @tanstack/db@0.11.3

0.3.2

Patch Changes

  • Mount and update many small filtered live queries at Redux-level cost. A live query that reads one eager source Collection, filters it by at least one eq(field, literal), and has no clause besides where and an orderBy on its own fields is served from an equality partition shared by every query on those fields, in React, Vue, Solid, Svelte, and Angular. Its other where conditions on the row, such as not, gt, or like, are evaluated per query over its group. This applies to a query function, a query builder, and a { query } config that sets no other option besides queryKey or gcTime. Queries with a DbClient (React, Svelte) or React Suspense keep a live-query Collection. Each query reads its group of rows instead of compiling a live query and subscribing to the source. With 240 such queries in React, mounting takes about 2.3 ms instead of 8.2 ms, and is the same with or without an index. (#1987)

    Results are unchanged: the same rows in the same order with the same values and status, including a terminal error when the source is cleaned up. Two things can differ. Rows are the source Collection's row objects rather than copies. The returned collection is built only when your code reads it, so its automatic id may differ, and tools that list live Collections do not see a pooled query until then.

  • Updated dependencies [dac687d, dac687d, dac687d, dac687d, 7595a2d, dac687d, dac687d, 8be6705]:

    • @tanstack/db@0.11.2

0.3.1

Patch Changes

0.3.0

Minor Changes

  • Add opt-in network-first initial rendering for eagerly persisted SQLite Collections. initialRender: { strategy: 'network-first', networkTimeoutMs } lets React and Solid Suspense render restored rows after the configured deadline (three seconds by default) or a network failure while sync continues. Live-query observers and the Angular, React, Solid, Svelte, and Vue integrations expose persistedStatus, isPersistedReady, and persistedError separately from Collection readiness. (#1955)

Patch Changes

0.2.46

Patch Changes

0.2.45

Patch Changes

  • Updated dependencies [3c4c35d]:
    • @tanstack/db@0.9.2

0.2.44

Patch Changes

0.2.43

Patch Changes

  • Updated dependencies [cfb01ce]:
    • @tanstack/db@0.9.0

0.2.42

Patch Changes

  • Updated dependencies [bbc9edf]:
    • @tanstack/db@0.8.7

0.2.41

Patch Changes

  • Updated dependencies [ae2fe74]:
    • @tanstack/db@0.8.6

0.2.40

Patch Changes

0.2.39

Patch Changes

0.2.38

Patch Changes

0.2.37

Patch Changes

  • Updated dependencies [c521b5d]:
    • @tanstack/db@0.8.2

0.2.36

Patch Changes

0.2.35

Patch Changes

  • Updated dependencies [4b9e8cd]:
    • @tanstack/db@0.8.0

0.2.34

Patch Changes

  • Update agent skills to match current APIs and behavior. (#1696)

  • Updated dependencies [5f63996]:

    • @tanstack/db@0.7.2

0.2.33

Patch Changes

  • Updated dependencies [424382b]:
    • @tanstack/db@0.7.1

0.2.32

Patch Changes

  • Add an internal shared live-query observer and migrate all five framework adapters to it (#1642)

    Introduces createLiveQueryObserver in @tanstack/db: given a resolved live-query collection (or null for a disabled query) it owns the subscription lifecycle every adapter used to re-implement β€” change and status subscriptions, a snapshot with stable identity per state revision for wholesale consumers, and delivery of the raw ChangeMessage[] for granular consumers. React, Vue, Svelte, Solid, and Angular's live-query hooks now materialize from the observer instead of their own hand-rolled subscription/status/snapshot machinery, keeping each adapter's native reactivity and each adapter's data-loading policy (wholesale adapters subscribe without initial state; granular adapters seed from it).

    The observer is an internal, unstable contract for TanStack DB's official adapters β€” it is exported so the adapter packages can consume it, but it is not a public extension point yet and its API may change in any release.

    The migration also fixes several live-query lifecycle defects: status-only transitions (error, cleaned-up) now reach mounted consumers; snapshot identity is stable across unsubscribe/resubscribe and stays fresh while detached; dispatch is FIFO and non-reentrant with subscriptions identified by record rather than callback; disposing during the synchronous initial replay no longer leaks the collection subscription; subscribing after dispose throws instead of registering a dead listener; Solid guards its async resource continuations against superseded collections; and constructing an observer no longer activates sync. Observers activate on their first committed subscription unless an adapter has already started a pre-created collection supplied directly or returned from a callback.

  • Updated dependencies [ad88d07, 7e7abda, dc53f0e]:

    • @tanstack/db@0.7.0

0.2.31

Patch Changes

  • Updated dependencies [8ee783d]:
    • @tanstack/db@0.6.17

0.2.30

Patch Changes

0.2.29

Patch Changes

  • Extract shared live-query adapter helpers into @tanstack/db (#1641)

    Adds isCollection, isSingleResultCollection, and getLiveQueryStatusFlags to @tanstack/db and migrates all five framework adapters to use them. isCollection replaces the per-adapter duck-typing and Solid's instanceof CollectionImpl with one structural, multi-realm-safe guard (the instanceof form gave false negatives across dual-package boundaries). No behavior change; internal deduplication only.

  • Updated dependencies [eabcea7, 6d4c096]:

    • @tanstack/db@0.6.15

0.2.28

Patch Changes

  • Updated dependencies [397e12a]:
    • @tanstack/db@0.6.14

0.2.27

Patch Changes

0.2.26

Patch Changes

  • Updated dependencies [2b27dd1]:
    • @tanstack/db@0.6.12

0.2.25

Patch Changes

0.2.24

Patch Changes

  • Updated dependencies [307fdf8]:
    • @tanstack/db@0.6.10

0.2.23

Patch Changes

0.2.22

Patch Changes

  • Updated dependencies [3827b62]:
    • @tanstack/db@0.6.8

0.2.21

Patch Changes

0.2.20

Patch Changes

  • Updated dependencies [4e9ab39]:
    • @tanstack/db@0.6.6

0.2.19

Patch Changes

0.2.18

Patch Changes

  • Add includes (hierarchical data) documentation to all framework SKILL.md files and fix inaccurate toArray scalar select constraint in db-core/live-queries skill. (#1361)

  • Updated dependencies [1e69dd6]:

    • @tanstack/db@0.6.4

0.2.17

Patch Changes

0.2.16

Patch Changes

0.2.15

Patch Changes

  • Update all SKILL.md files to v0.6.0 with new documentation for persistence, virtual properties, queryOnce, createEffect, includes, indexing, and sync metadata. Add tanstack-intent keyword to all packages with skills. (#1421)

  • Updated dependencies [8b7fb1a]:

    • @tanstack/db@0.6.1

0.2.14

Patch Changes

  • fix(solid-db): support findOne in useLiveQuery (#1403)

    useLiveQuery with .findOne() returned an array instead of a single object. Updated type overloads to use InferResultType<TContext> so findOne queries return T | undefined, and added a runtime singleResult check to return the first element instead of the full array.

    Fixes #1399

  • Update dependencies across workspace to resolve version mismatches: @electric-sql/client ^1.5.13, @tanstack/store ^0.9.2, pg ^8.20.0. Adapt subscription cleanup to @tanstack/store 0.9.x API which returns Subscription objects instead of unsubscribe functions. (#1381)

  • Updated dependencies [f60384b, b8abc02, 09c7afc, bb09eb1, 179d666, 43ecbfa, 055fd94, 055fd94, 055fd94, 055fd94, 85f5435, b65d8f7, e0df07e, 9952921, d351c67]:

    • @tanstack/db@0.6.0

0.2.13

Patch Changes

  • Updated dependencies [c3e6a96]:
    • @tanstack/db@0.5.33

0.2.12

Patch Changes

0.2.11

Patch Changes

  • Add Intent agent skills (SKILL.md files) to guide AI coding agents. Include skills for core DB concepts, all 5 framework bindings, meta-framework integration, and offline transactions. Also add export * from '@tanstack/db' to angular-db for consistency with other framework packages. (#1330)

  • Updated dependencies [bf1d078]:

    • @tanstack/db@0.5.31

0.2.10

Patch Changes

  • Updated dependencies [e9d0fd8]:
    • @tanstack/db@0.5.30

0.2.9

Patch Changes

0.2.8

Patch Changes

  • Updated dependencies [46450e7]:
    • @tanstack/db@0.5.28

0.2.7

Patch Changes

0.2.6

Patch Changes

0.2.5

Patch Changes

0.2.4

Patch Changes

  • Updated dependencies [7099459]:
    • @tanstack/db@0.5.24

0.2.3

Patch Changes

  • Updated dependencies [05130f2]:
    • @tanstack/db@0.5.23

0.2.2

Patch Changes

  • Updated dependencies [f9b741e]:
    • @tanstack/db@0.5.22

0.2.1

Patch Changes

0.2.0

Minor Changes

  • Update solid-db to enable suspense support. (#826) You can now run do

    // Use Suspense boundaries
    const todosQuery = useLiveQuery((q) => q.from({ todos: todoCollection }))
    
    return (
      <>
        {/* Status and other getters don't trigger Suspense */}
        <div>Status {todosQuery.status}</div>
        <div>Loading {todosQuery.isLoading ? 'yes' : 'no'}</div>
    
        <Suspense fallback={<div>Loading...</div>}>
          <For each={todosQuery()}>
            {(todo) => <li key={todo.id}>{todo.text}</li>}
          </For>
        </Suspense>
      </>
    )

    All values returned from useLiveQuery are now getters, so no longer need to be called as functions. This is a breaking change. This is to match how createResource works, and everything still stays reactive.

    const todos = useLiveQuery(() => existingCollection)
    
    const handleToggle = (id) => {
      // Can now access collection directly
      todos.collection.update(id, (draft) => {
        draft.completed = !draft.completed
      })
    }
    
    return (
      <>
        {/* Status and other getters don't trigger Suspense */}
        <div>Status {todos.status}</div>
        <div>Loading {todos.isLoading ? 'yes' : 'no'}</div>
        <div>Ready {todos.isReady ? 'yes' : 'no'}</div>
        <div>Idle {todos.isIdle ? 'yes' : 'no'}</div>
        <div>Error {todos.isError ? 'yes' : 'no'}</div>
      </>
    )

Patch Changes

  • Updated dependencies []:
    • @tanstack/db@0.5.20

0.1.62

Patch Changes

0.1.61

Patch Changes

  • Updated dependencies [c1247e8]:
    • @tanstack/db@0.5.18

0.1.60

Patch Changes

0.1.59

Patch Changes

  • Updated dependencies [41308b8]:
    • @tanstack/db@0.5.16

0.1.58

Patch Changes

  • Updated dependencies [32ec4d8]:
    • @tanstack/db@0.5.15

0.1.57

Patch Changes

  • Updated dependencies [26ed0aa]:
    • @tanstack/db@0.5.14

0.1.56

Patch Changes

0.1.55

Patch Changes

0.1.54

Patch Changes

  • Fixed isReady to return true for disabled queries in useLiveQuery/injectLiveQuery across all framework packages. When a query function returns null or undefined (disabling the query), there's no async operation to wait for, so the hook should be considered "ready" immediately. (#886)

    Additionally, all frameworks now have proper TypeScript overloads that explicitly support returning undefined | null from query functions, making the disabled query pattern type-safe.

    This fixes the common pattern where users conditionally enable queries and don't want to show loading states when the query is disabled.

  • Updated dependencies [c4b9399, a1a484e]:

    • @tanstack/db@0.5.11

0.1.53

Patch Changes

0.1.52

Patch Changes

  • Updated dependencies [5f474f1]:
    • @tanstack/db@0.5.9

0.1.51

Patch Changes

0.1.50

Patch Changes

  • Updated dependencies [295cb45]:
    • @tanstack/db@0.5.7

0.1.49

Patch Changes

  • Updated dependencies [c8a2c16]:
    • @tanstack/db@0.5.6

0.1.48

Patch Changes

  • Updated dependencies [077fc1a]:
    • @tanstack/db@0.5.5

0.1.47

Patch Changes

0.1.46

Patch Changes

0.1.45

Patch Changes

  • Updated dependencies [99a3716]:
    • @tanstack/db@0.5.2

0.1.44

Patch Changes

  • Updated dependencies [a83a818]:
    • @tanstack/db@0.5.1

0.1.43

Patch Changes

0.1.42

Patch Changes

0.1.41

Patch Changes

  • Updated dependencies [75470a8]:
    • @tanstack/db@0.4.19

0.1.40

Patch Changes

0.1.39

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

0.1.38

Patch Changes

0.1.37

Patch Changes

  • Updated dependencies [6738247]:
    • @tanstack/db@0.4.15

0.1.36

Patch Changes

  • Updated dependencies [970616b]:
    • @tanstack/db@0.4.14

0.1.35

Patch Changes

  • Updated dependencies [3c9526c]:
    • @tanstack/db@0.4.13

0.1.34

Patch Changes

0.1.33

Patch Changes

  • Updated dependencies [5566b26]:
    • @tanstack/db@0.4.11

0.1.32

Patch Changes

0.1.31

Patch Changes

0.1.30

Patch Changes

0.1.29

Patch Changes

  • Updated dependencies [6692aad]:
    • @tanstack/db@0.4.7

0.1.28

Patch Changes

0.1.27

Patch Changes

  • Updated dependencies [7556fb6]:
    • @tanstack/db@0.4.5

0.1.26

Patch Changes

0.1.25

Patch Changes

  • Updated dependencies [32f2212]:
    • @tanstack/db@0.4.3

0.1.24

Patch Changes

0.1.23

Patch Changes

  • Updated dependencies [8cd0876]:
    • @tanstack/db@0.4.1

0.1.22

Patch Changes

  • Let collection.subscribeChanges return a subscription object. Move all data loading code related to optimizations into that subscription object. (#564)

  • Updated dependencies [2f87216, ac6250a, 2f87216]:

    • @tanstack/db@0.4.0

0.1.21

Patch Changes

  • Updated dependencies [cacfca2]:
    • @tanstack/db@0.3.2

0.1.20

Patch Changes

  • Updated dependencies [5f51f35]:
    • @tanstack/db@0.3.1

0.1.19

Patch Changes

0.1.18

Patch Changes

0.1.17

Patch Changes

0.1.16

Patch Changes

  • Updated dependencies [b162556]:
    • @tanstack/db@0.2.3

0.1.15

Patch Changes

  • Updated dependencies [33515c6]:
    • @tanstack/db@0.2.2

0.1.14

Patch Changes

  • Updated dependencies [620ebea]:
    • @tanstack/db@0.2.1

0.1.13

Patch Changes

0.1.12

Patch Changes

  • Updated dependencies [cc4c34a]:
    • @tanstack/db@0.1.12

0.1.11

Patch Changes

  • Updated dependencies [b869f68]:
    • @tanstack/db@0.1.11

0.1.10

Patch Changes

0.1.9

Patch Changes

  • Updated dependencies [d64b4a8]:
    • @tanstack/db@0.1.9

0.1.8

Patch Changes

0.1.7

Patch Changes

0.1.6

Patch Changes

  • Updated dependencies [ad33e9e]:
    • @tanstack/db@0.1.6

0.1.5

Patch Changes

  • Updated dependencies [9a5a20c]:
    • @tanstack/db@0.1.5

0.1.4

Patch Changes

0.1.3

Patch Changes

  • Updated dependencies [0cb7699]:
    • @tanstack/db@0.1.3

0.1.2

Patch Changes

0.1.1

Patch Changes

0.1.0

Minor Changes

  • 0.1 release - first beta πŸŽ‰ (#332)

Patch Changes

  • We have moved development of the differential dataflow implementation from @electric-sql/d2mini to a new @tanstack/db-ivm package inside the tanstack db monorepo to make development simpler. (#330)

  • Updated dependencies [7d2f4be, f0eda36]:

    • @tanstack/db@0.1.0

0.0.29

Patch Changes

  • Updated dependencies [6e8d7f6]:
    • @tanstack/db@0.0.33

0.0.28

Patch Changes

  • Add initial version of solid-db integration TanStack DB with SolidJS (#92)

0.0.27

  • Add support for solid-js