Skip to content

Latest commit

 

History

History
856 lines (512 loc) · 32.6 KB

File metadata and controls

856 lines (512 loc) · 32.6 KB

@tanstack/vue-db

0.0.106

Patch Changes

0.0.105

Patch Changes

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

0.0.104

Patch Changes

0.0.103

Patch Changes

0.0.102

Patch Changes

0.0.101

Patch Changes

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

0.0.100

Patch Changes

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

0.0.99

Patch Changes

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

0.0.98

Patch Changes

0.0.97

Patch Changes

  • Fix type of findOne queries in Vue such that they type to a singular result instead of an array of results. (#1134)

0.0.96

Patch Changes

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

0.0.95

Patch Changes

0.0.94

Patch Changes

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

0.0.93

Patch Changes

0.0.92

Patch Changes

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

0.0.91

Patch Changes

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

0.0.90

Patch Changes

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

0.0.89

Patch Changes

0.0.88

Patch Changes

0.0.87

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.0.86

Patch Changes

0.0.85

Patch Changes

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

0.0.84

Patch Changes

0.0.83

Patch Changes

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

0.0.82

Patch Changes

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

0.0.81

Patch Changes

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

0.0.80

Patch Changes

0.0.79

Patch Changes

0.0.78

Patch Changes

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

0.0.77

Patch Changes

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

0.0.76

Patch Changes

0.0.75

Patch Changes

0.0.74

Patch Changes

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

0.0.73

Patch Changes

0.0.72

Patch Changes

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

0.0.71

Patch Changes

0.0.70

Patch Changes

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

0.0.69

Patch Changes

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

0.0.68

Patch Changes

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

0.0.67

Patch Changes

0.0.66

Patch Changes

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

0.0.65

Patch Changes

0.0.64

Patch Changes

0.0.63

Patch Changes

0.0.62

Patch Changes

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

0.0.61

Patch Changes

0.0.60

Patch Changes

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

0.0.59

Patch Changes

0.0.58

Patch Changes

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

0.0.57

Patch Changes

0.0.56

Patch Changes

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

0.0.55

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.0.54

Patch Changes

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

0.0.53

Patch Changes

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

0.0.52

Patch Changes

0.0.51

Patch Changes

0.0.50

Patch Changes

0.0.49

Patch Changes

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

0.0.48

Patch Changes

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

0.0.47

Patch Changes

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

0.0.46

Patch Changes

0.0.45

Patch Changes

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

0.0.44

Patch Changes

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

0.0.43

Patch Changes

0.0.42

Patch Changes

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

0.0.41

Patch Changes

0.0.40

Patch Changes

0.0.39

Patch Changes

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

0.0.38

Patch Changes

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

0.0.37

Patch Changes

0.0.36

Patch Changes

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

0.0.35

Patch Changes

0.0.34

Patch Changes

0.0.33

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.32

Patch Changes

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

0.0.31

Patch Changes

  • Updated dependencies [e04bd12]:
    • @tanstack/db@0.0.32

0.0.30

Patch Changes

  • Updated dependencies [3e9a36d]:
    • @tanstack/db@0.0.31

0.0.29

Patch Changes

  • Updated dependencies [6bdde55]:
    • @tanstack/db@0.0.30

0.0.28

Patch Changes

0.0.27

Patch Changes

0.0.26

Patch Changes

  • Updated dependencies [bec8620]:
    • @tanstack/db@0.0.27

0.0.25

Patch Changes

  • Add initial release of TrailBase collection for TanStack DB. TrailBase is a blazingly fast, open-source alternative to Firebase built on Rust, SQLite, and V8. It provides type-safe REST and realtime APIs with sub-millisecond latencies, integrated authentication, and flexible access control - all in a single executable. This collection type enables seamless integration with TrailBase backends for high-performance real-time applications. (#228)

  • Updated dependencies [09c6995]:

    • @tanstack/db@0.0.26

0.0.24

Patch Changes

0.0.23

Patch Changes

0.0.22

Patch Changes

  • Updated dependencies [056609e]:
    • @tanstack/db@0.0.23

0.0.21

Patch Changes

  • Updated dependencies [aeee9a1]:
    • @tanstack/db@0.0.22

0.0.20

Patch Changes

  • Updated dependencies [8e23322]:
    • @tanstack/db@0.0.21

0.0.19

Patch Changes

  • Updated dependencies [f13c11e]:
    • @tanstack/db@0.0.20

0.0.18

Patch Changes

  • Updated dependencies [9f0b0c2]:
    • @tanstack/db@0.0.19

0.0.17

Patch Changes

  • Improve jsdocs (#243)

  • Updated dependencies [266bd29]:

    • @tanstack/db@0.0.18

0.0.16

Patch Changes

  • Updated dependencies [7e63d76]:
    • @tanstack/db@0.0.17

0.0.15

Patch Changes

  • add support for composable queries (#232)

  • Updated dependencies [e478d53]:

    • @tanstack/db@0.0.16

0.0.14

Patch Changes

0.0.13

Patch Changes

  • Updated dependencies [74c140d]:
    • @tanstack/db@0.0.14

0.0.12

Patch Changes

  • feat: implement Collection Lifecycle Management (#198)

    Adds automatic lifecycle management for collections to optimize resource usage.

    New Features:

    • Added startSync option (defaults to false, set to true to start syncing immediately)
    • Automatic garbage collection after gcTime (default 5 minutes) of inactivity
    • Collection status tracking: "idle" | "loading" | "ready" | "error" | "cleaned-up"
    • Manual preload() and cleanup() methods for lifecycle control

    Usage:

    const collection = createCollection({
      startSync: false, // Enable lazy loading
      gcTime: 300000, // Cleanup timeout (default: 5 minutes)
    })
    
    console.log(collection.status) // Current state
    await collection.preload() // Ensure ready
    await collection.cleanup() // Manual cleanup
  • Add createOptimisticAction helper that replaces useOptimisticMutation (#210)

    An example of converting a useOptimisticMutation hook to createOptimisticAction. Now all optimistic & server mutation logic are consolidated.

    -import { useOptimisticMutation } from '@tanstack/react-db'
    +import { createOptimisticAction } from '@tanstack/react-db'
    +
    +// Create the `addTodo` action, passing in your `mutationFn` and `onMutate`.
    +const addTodo = createOptimisticAction<string>({
    +  onMutate: (text) => {
    +    // Instantly applies the local optimistic state.
    +    todoCollection.insert({
    +      id: uuid(),
    +      text,
    +      completed: false
    +    })
    +  },
    +  mutationFn: async (text) => {
    +    // Persist the todo to your backend
    +    const response = await fetch('/api/todos', {
    +      method: 'POST',
    +      body: JSON.stringify({ text, completed: false }),
    +    })
    +    return response.json()
    +  }
    +})
    
     const Todo = () => {
    -  // Create the `addTodo` mutator, passing in your `mutationFn`.
    -  const addTodo = useOptimisticMutation({ mutationFn })
    -
       const handleClick = () => {
    -    // Triggers the mutationFn
    -    addTodo.mutate(() =>
    -      // Instantly applies the local optimistic state.
    -      todoCollection.insert({
    -        id: uuid(),
    -        text: '🔥 Make app faster',
    -        completed: false
    -      })
    -    )
    +    // Triggers the onMutate and then the mutationFn
    +    addTodo('🔥 Make app faster')
       }
    
       return <Button onClick={ handleClick } />
     }
  • Updated dependencies [945868e, 0f8a008, 57b5f5d]:

    • @tanstack/db@0.0.13

0.0.11

Patch Changes

  • Updated dependencies [f6abe9b]:
    • @tanstack/db@0.0.12

0.0.10

Patch Changes

  • Export ElectricCollectionUtils & allow passing generic to createTransaction (#179)

  • Updated dependencies [66ed58b, c5489ff]:

    • @tanstack/db@0.0.11

0.0.9

Patch Changes

  • Updated dependencies [38d4505]:
    • @tanstack/db@0.0.10

0.0.8

Patch Changes

  • Updated dependencies [2ae0b09]:
    • @tanstack/db@0.0.9

0.0.7

Patch Changes

  • A large refactor of the core Collection with: (#155)

    • a change to not use Store internally and emit fine grade changes with subscribeChanges and subscribeKeyChanges methods.
    • changes to the Collection api to be more Map like for reads, with get, has, size, entries, keys, and values.
    • renames config.getId to config.getKey for consistency with the Map like api.
  • Updated dependencies [5c538cf, 9553366, b4602a0, 02adc81, 06d8ecc, c50cd51]:

    • @tanstack/db@0.0.8

0.0.6

Patch Changes

  • Expose utilities on collection instances (#161)

    Implemented a utility exposure pattern for TanStack DB collections that allows utility functions to be passed as part of collection options and exposes them under a .utils namespace, with full TypeScript typing.

    • Refactored createCollection in packages/db/src/collection.ts to accept options with utilities directly
    • Added utils property to CollectionImpl
    • Added TypeScript types for utility functions and utility records
    • Changed Collection from a class to a type, updating all usages to use createCollection() instead
    • Updated Electric/Query implementations
    • Utilities are now ergonomically accessible under .utils
    • Full TypeScript typing is preserved for both collection data and utilities
    • API is clean and straightforward - users can call createCollection(optionsCreator(config)) directly
    • Zero-boilerplate TypeScript pattern that infers utility types automatically
  • Updated dependencies [8b43ad3]:

    • @tanstack/db@0.0.7

0.0.5

Patch Changes

0.0.4

Patch Changes

  • Collections must have a getId function & use an id for update/delete operators (#134)

  • the keyBy query operator has been removed, keying withing the query pipeline is now automatic (#144)

  • Updated dependencies [1fbb844, 338efc2, ee5d026, e7b036c, e4feb0c]:

    • @tanstack/db@0.0.5

0.0.3

Patch Changes

  • Updated dependencies [8ce449e]:
    • @tanstack/db@0.0.4

0.0.2

Patch Changes

  • Updated dependencies [b29420b]:
    • @tanstack/db@0.0.3

0.0.1

Patch Changes

  • Add Vue support (#83)