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

CHANGELOG.md

582 lines22.1 KB

1# @tanstack/react-db
2​
3## 0.1.23
4​
5### Patch Changes
6​
7- Updated dependencies [[`8cd0876`](https://github.com/TanStack/db/commit/8cd0876b50bc7c1a614365318d5e74c2f32a0f80)]:
8 - @tanstack/db@0.4.1
9​
10## 0.1.22
11​
12### Patch Changes
13​
14- Let collection.subscribeChanges return a subscription object. Move all data loading code related to optimizations into that subscription object. ([#564](https://github.com/TanStack/db/pull/564))
15​
16- Updated dependencies [[`2f87216`](https://github.com/TanStack/db/commit/2f8721630e06331ca8bb2f962fbb283341103a58), [`ac6250a`](https://github.com/TanStack/db/commit/ac6250a879e95718e8d911732c10fb3388569f0f), [`2f87216`](https://github.com/TanStack/db/commit/2f8721630e06331ca8bb2f962fbb283341103a58)]:
17 - @tanstack/db@0.4.0
18​
19## 0.1.21
20​
21### Patch Changes
22​
23- Expand `useLiveQuery` callback to support conditional queries and additional return types, enabling the ability to temporarily disable the query. ([#535](https://github.com/TanStack/db/pull/535))
24​
25 **New Features:**
26 - Callback can now return `undefined` or `null` to temporarily disable the query
27 - Callback can return a pre-created `Collection` instance to use it directly
28 - Callback can return a `LiveQueryCollectionConfig` object for advanced configuration
29 - When disabled (returning `undefined`/`null`), the hook returns a specific idle state
30​
31 **Usage Examples:**
32​
33 ```ts
34 // Conditional queries - disable when not ready
35 const enabled = useState(false)
36 const { data, state, isIdle } = useLiveQuery((q) => {
37 if (!enabled) return undefined // Disables the query
38 return q.from({ users }).where(...)
39 }, [enabled])
40​
41 /**
42 * When disabled, returns:
43 * {
44 * state: undefined,
45 * data: undefined,
46 * isIdle: true,
47 * ...
48 * }
49 */
50​
51 // Return pre-created Collection
52 const { data } = useLiveQuery((q) => {
53 if (usePrebuilt) return myCollection // Use existing collection
54 return q.from({ items }).select(...)
55 }, [usePrebuilt])
56​
57 // Return LiveQueryCollectionConfig
58 const { data } = useLiveQuery((q) => {
59 return {
60 query: q.from({ items }).select(...),
61 id: `my-collection`,
62 }
63 })
64 ```
65​
66- Updated dependencies [[`cacfca2`](https://github.com/TanStack/db/commit/cacfca2d1b430c34a05202128fd3affa4bff54d6)]:
67 - @tanstack/db@0.3.2
68​
69## 0.1.20
70​
71### Patch Changes
72​
73- Updated dependencies [[`5f51f35`](https://github.com/TanStack/db/commit/5f51f35d2c9543766a00cc5eea1374c62798b34e)]:
74 - @tanstack/db@0.3.1
75​
76## 0.1.19
77​
78### Patch Changes
79​
80- Updated dependencies [[`c557a14`](https://github.com/TanStack/db/commit/c557a1488650ea9081b671a4ac278d55c59ac9cc), [`b5c87f7`](https://github.com/TanStack/db/commit/b5c87f71dbb534e4f1c660cf010e2cb6c0446ec5)]:
81 - @tanstack/db@0.3.0
82​
83## 0.1.18
84​
85### Patch Changes
86​
87- Updated dependencies [[`b03894d`](https://github.com/TanStack/db/commit/b03894db05e063629a3660e03b31a80a48558dd5), [`3968087`](https://github.com/TanStack/db/commit/39680877fdc1993733933d2def13217bd18fa254)]:
88 - @tanstack/db@0.2.5
89​
90## 0.1.17
91​
92### Patch Changes
93​
94- Updated dependencies [[`92febbf`](https://github.com/TanStack/db/commit/92febbf1feaa1d46f8cc4d7a4ea0d44cd5f85256), [`b487430`](https://github.com/TanStack/db/commit/b4874308813f95232f3361de539cec104ed55170)]:
95 - @tanstack/db@0.2.4
96​
97## 0.1.16
98​
99### Patch Changes
100​
101- Updated dependencies [[`b162556`](https://github.com/TanStack/db/commit/b1625565df44b0824501297f7ef14ae1cd450b49)]:
102 - @tanstack/db@0.2.3
103​
104## 0.1.15
105​
106### Patch Changes
107​
108- Updated dependencies [[`33515c6`](https://github.com/TanStack/db/commit/33515c69befc557add2cf828354ee378100f3977)]:
109 - @tanstack/db@0.2.2
110​
111## 0.1.14
112​
113### Patch Changes
114​
115- Updated dependencies [[`620ebea`](https://github.com/TanStack/db/commit/620ebea96eb3fbeec66701b949de9920c4084c17)]:
116 - @tanstack/db@0.2.1
117​
118## 0.1.13
119​
120### Patch Changes
121​
122- Updated dependencies [[`08303e6`](https://github.com/TanStack/db/commit/08303e645974db97e10b2aca0031abcbce027dd6), [`bafeaa1`](https://github.com/TanStack/db/commit/bafeaa1e9f161ac2200ce86537e442b2aa8e2a5b), [`1814f8c`](https://github.com/TanStack/db/commit/1814f8cc3c0e831c82f8053b86fbbbd737e4f34b), [`31acdf2`](https://github.com/TanStack/db/commit/31acdf2a96411da327f93f0d30fa78d884422969), [`e41ed7e`](https://github.com/TanStack/db/commit/e41ed7e1ff1d94dd3ce0c48b6321f66b8ea044fd), [`51954d8`](https://github.com/TanStack/db/commit/51954d8c5d64291d136159bce293e0ad00a19f88)]:
123 - @tanstack/db@0.2.0
124​
125## 0.1.12
126​
127### Patch Changes
128​
129- Updated dependencies [[`cc4c34a`](https://github.com/TanStack/db/commit/cc4c34a6b40c81c83aa10c8d00dfc0a3d33c56db)]:
130 - @tanstack/db@0.1.12
131​
132## 0.1.11
133​
134### Patch Changes
135​
136- Fixed a bug where a race condition could cause initial results not to be rendered when using `useLiveQuery`. ([#485](https://github.com/TanStack/db/pull/485))
137​
138- Updated dependencies [[`b869f68`](https://github.com/TanStack/db/commit/b869f68f0109b3126509f202a38855cee38b4276)]:
139 - @tanstack/db@0.1.11
140​
141## 0.1.10
142​
143### Patch Changes
144​
145- Updated dependencies [[`eb8fd18`](https://github.com/TanStack/db/commit/eb8fd18c50ee03b72cb06e4d7ef25f214367950b), [`e59a355`](https://github.com/TanStack/db/commit/e59a3551e75bac9dd166e14c911d9491e3a67b9a), [`074aab0`](https://github.com/TanStack/db/commit/074aab0477a7c55e9e0f19a705b96ed2619e2afb), [`d469c39`](https://github.com/TanStack/db/commit/d469c39a7bdc034fa4fbc533010573b3515f239f)]:
146 - @tanstack/db@0.1.10
147​
148## 0.1.9
149​
150### Patch Changes
151​
152- Updated dependencies [[`d64b4a8`](https://github.com/TanStack/db/commit/d64b4a8b692a213c7ad58faaf66f5f5fd50bef66)]:
153 - @tanstack/db@0.1.9
154​
155## 0.1.8
156​
157### Patch Changes
158​
159- Updated dependencies [[`1c5e206`](https://github.com/TanStack/db/commit/1c5e206d00d0a99f8419f0d00429b5a3c6cdc76e), [`4d20004`](https://github.com/TanStack/db/commit/4d2000488b9b5abf85c05801633297528af0eff6), [`968602e`](https://github.com/TanStack/db/commit/968602e4ffc597eaa559219daf22d6ef6321162a)]:
160 - @tanstack/db@0.1.8
161​
162## 0.1.7
163​
164### Patch Changes
165​
166- Updated dependencies [[`48d0889`](https://github.com/TanStack/db/commit/48d088996a3f18df026aa7d2d1e7f27d1151345b), [`aecbcc3`](https://github.com/TanStack/db/commit/aecbcc32012561f1645df0bdf89a6c259058d888), [`a937f4c`](https://github.com/TanStack/db/commit/a937f4c7a5f4fc20c255e86692c5e2e80d5ebbec), [`3d60fad`](https://github.com/TanStack/db/commit/3d60fadbb9e8a1b62a9bcde947e282d653a2a270), [`79c95a3`](https://github.com/TanStack/db/commit/79c95a36f60087ffc3f9a02b76975c8bdf40acc7)]:
167 - @tanstack/db@0.1.7
168​
169## 0.1.6
170​
171### Patch Changes
172​
173- Updated dependencies [[`ad33e9e`](https://github.com/TanStack/db/commit/ad33e9e535ca6197c2e00e2dbb59bf8e8f9bb51e)]:
174 - @tanstack/db@0.1.6
175​
176## 0.1.5
177​
178### Patch Changes
179​
180- ensure that useLiveQuery returns a stable ref when there are no changes ([#388](https://github.com/TanStack/db/pull/388))
181​
182- Updated dependencies [[`9a5a20c`](https://github.com/TanStack/db/commit/9a5a20c21fbf8286ab90e1db6d6f3315f8344a4e)]:
183 - @tanstack/db@0.1.5
184​
185## 0.1.4
186​
187### Patch Changes
188​
189- Ensure that the ready status is correctly returned from a live query ([#390](https://github.com/TanStack/db/pull/390))
190​
191- Updated dependencies [[`c90b4d8`](https://github.com/TanStack/db/commit/c90b4d85822f94f7fe72286d5c7ee07b087d0e20), [`6c1c19c`](https://github.com/TanStack/db/commit/6c1c19cedbc1d9d98396948e8e43fa0515bb8919), [`69a6d2d`](https://github.com/TanStack/db/commit/69a6d2d94c7a5510568c8b652356c62bd2b3cc76), [`6250a92`](https://github.com/TanStack/db/commit/6250a92c8045ef2fd69c107a94e05179471681d7), [`68538b4`](https://github.com/TanStack/db/commit/68538b4c446abeb992e24964f811c8900749f141)]:
192 - @tanstack/db@0.1.4
193​
194## 0.1.3
195​
196### Patch Changes
197​
198- Updated dependencies [[`0cb7699`](https://github.com/TanStack/db/commit/0cb76999e5d6df5916694a5afeb31b928eab68e4)]:
199 - @tanstack/db@0.1.3
200​
201## 0.1.2
202​
203### Patch Changes
204​
205- Updated dependencies [[`bb5d50e`](https://github.com/TanStack/db/commit/bb5d50e255d9114ef32b8f52eef6b15399255327), [`97b595e`](https://github.com/TanStack/db/commit/97b595e9617b1abb05c14489e3d608b314da08e8)]:
206 - @tanstack/db@0.1.2
207​
208## 0.1.1
209​
210### Patch Changes
211​
212- Updated dependencies [[`bc2f204`](https://github.com/TanStack/db/commit/bc2f204b8cb8a4870ade00757d10f846524e2090), [`bda3f24`](https://github.com/TanStack/db/commit/bda3f24cc41504f60be0c5e071698b7735f75e28)]:
213 - @tanstack/db@0.1.1
214​
215## 0.1.0
216​
217### Minor Changes
218​
219- 0.1 release - first beta 🎉 ([#332](https://github.com/TanStack/db/pull/332))
220​
221### Patch Changes
222​
223- 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](https://github.com/TanStack/db/pull/330))
224​
225- Updated dependencies [[`7d2f4be`](https://github.com/TanStack/db/commit/7d2f4be95c43aad29fb61e80e5a04c58c859322b), [`f0eda36`](https://github.com/TanStack/db/commit/f0eda36cb36350399bc8835686a6c4b6ad297e45)]:
226 - @tanstack/db@0.1.0
227​
228## 0.0.33
229​
230### Patch Changes
231​
232- Updated dependencies [[`6e8d7f6`](https://github.com/TanStack/db/commit/6e8d7f660050118e050d575913733e469e3daa8c)]:
233 - @tanstack/db@0.0.33
234​
235## 0.0.32
236​
237### Patch Changes
238​
239- Updated dependencies [[`e04bd12`](https://github.com/TanStack/db/commit/e04bd1252f612d4638104368d17cb644cc85295b)]:
240 - @tanstack/db@0.0.32
241​
242## 0.0.31
243​
244### Patch Changes
245​
246- Updated dependencies [[`3e9a36d`](https://github.com/TanStack/db/commit/3e9a36d2600c4f700ca7bc4f720c189a5a29387a)]:
247 - @tanstack/db@0.0.31
248​
249## 0.0.30
250​
251### Patch Changes
252​
253- Updated dependencies [[`6bdde55`](https://github.com/TanStack/db/commit/6bdde554f36f54c0c4f4dacb74bef5da45811855)]:
254 - @tanstack/db@0.0.30
255​
256## 0.0.29
257​
258### Patch Changes
259​
260- Updated dependencies [[`ced0657`](https://github.com/TanStack/db/commit/ced0657e72646e35343dfea8389d96e213710cdf), [`dcfef51`](https://github.com/TanStack/db/commit/dcfef51d4d94c756bf77e40e7015e47b7982c09a), [`360b0df`](https://github.com/TanStack/db/commit/360b0dfa411ba9f8a93f6b737aa1df8fb37dd036), [`608be0c`](https://github.com/TanStack/db/commit/608be0c14dc5ae9577deebf436557a1eace46733), [`5260ee3`](https://github.com/TanStack/db/commit/5260ee3098d12eccc58a5cf903ea479908681402)]:
261 - @tanstack/db@0.0.29
262​
263## 0.0.28
264​
265### Patch Changes
266​
267- Updated dependencies [[`bb85522`](https://github.com/TanStack/db/commit/bb8552210a97dd05d3ca6fdd080a3fd25c1023a6), [`e9e8e5e`](https://github.com/TanStack/db/commit/e9e8e5e20c23fb7f98865d6b8aab05ad5322e5f7)]:
268 - @tanstack/db@0.0.28
269​
270## 0.0.27
271​
272### Patch Changes
273​
274- Updated dependencies [[`bec8620`](https://github.com/TanStack/db/commit/bec862004deef5fdd560f70107ebd59f7c27656e)]:
275 - @tanstack/db@0.0.27
276​
277## 0.0.26
278​
279### Patch Changes
280​
281- 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](https://github.com/TanStack/db/pull/228))
282​
283- Updated dependencies [[`09c6995`](https://github.com/TanStack/db/commit/09c6995ea9c8e6979d077ca63cbdd6215054ae78)]:
284 - @tanstack/db@0.0.26
285​
286## 0.0.25
287​
288### Patch Changes
289​
290- Updated dependencies [[`1758eda`](https://github.com/TanStack/db/commit/1758edab9608383d9d1470156021ee632f043e51), [`20f810e`](https://github.com/TanStack/db/commit/20f810e13a7d802bf56da6f0df89b34312ebb2fd)]:
291 - @tanstack/db@0.0.25
292​
293## 0.0.24
294​
295### Patch Changes
296​
297- Updated dependencies [[`11215d9`](https://github.com/TanStack/db/commit/11215d9544d02e9dc6258c661ba4b5e439e479ed), [`fe42591`](https://github.com/TanStack/db/commit/fe42591bd7ea9955d67ecec4471b44cb7808e74b), [`665efe6`](https://github.com/TanStack/db/commit/665efe660c1aed68139326a2a33904968622a882)]:
298 - @tanstack/db@0.0.24
299​
300## 0.0.23
301​
302### Patch Changes
303​
304- Updated dependencies [[`056609e`](https://github.com/TanStack/db/commit/056609ed2926e12df5ee08be5fad0a6333e787f3)]:
305 - @tanstack/db@0.0.23
306​
307## 0.0.22
308​
309### Patch Changes
310​
311- Updated dependencies [[`aeee9a1`](https://github.com/TanStack/db/commit/aeee9a13411527bd0ebfc0a0c06989bdb904b650)]:
312 - @tanstack/db@0.0.22
313​
314## 0.0.21
315​
316### Patch Changes
317​
318- Updated dependencies [[`8e23322`](https://github.com/TanStack/db/commit/8e233229b25eabed07cdaf12948ba913786bf4f9)]:
319 - @tanstack/db@0.0.21
320​
321## 0.0.20
322​
323### Patch Changes
324​
325- Updated dependencies [[`f13c11e`](https://github.com/TanStack/db/commit/f13c11ed0ab27cd88b03d789b0cd953e86bd1333)]:
326 - @tanstack/db@0.0.20
327​
328## 0.0.19
329​
330### Patch Changes
331​
332- Updated dependencies [[`9f0b0c2`](https://github.com/TanStack/db/commit/9f0b0c28ede99273eb5914be28aff55b91c50778)]:
333 - @tanstack/db@0.0.19
334​
335## 0.0.18
336​
337### Patch Changes
338​
339- Improve jsdocs ([#243](https://github.com/TanStack/db/pull/243))
340​
341- Updated dependencies [[`266bd29`](https://github.com/TanStack/db/commit/266bd29514c6c0fa9e903986ca11c5e22f4d2361)]:
342 - @tanstack/db@0.0.18
343​
344## 0.0.17
345​
346### Patch Changes
347​
348- Updated dependencies [[`7e63d76`](https://github.com/TanStack/db/commit/7e63d7671f9df9f9fc81240c3818789d4ed0d464)]:
349 - @tanstack/db@0.0.17
350​
351## 0.0.16
352​
353### Patch Changes
354​
355- add support for composable queries ([#232](https://github.com/TanStack/db/pull/232))
356​
357- Updated dependencies [[`e478d53`](https://github.com/TanStack/db/commit/e478d5353cc8fc64e3a29dda1f86fba863cf6ce8)]:
358 - @tanstack/db@0.0.16
359​
360## 0.0.15
361​
362### Patch Changes
363​
364- Updated dependencies [[`f5cf44b`](https://github.com/TanStack/db/commit/f5cf44b1b181afef89a80cf7b8678337a3d4a065), [`f5cf44b`](https://github.com/TanStack/db/commit/f5cf44b1b181afef89a80cf7b8678337a3d4a065)]:
365 - @tanstack/db@0.0.15
366​
367## 0.0.14
368​
369### Patch Changes
370​
371- Updated dependencies [[`74c140d`](https://github.com/TanStack/db/commit/74c140d8744f1f7bd3f9cb940c75719574afc78f)]:
372 - @tanstack/db@0.0.14
373​
374## 0.0.13
375​
376### Patch Changes
377​
378- feat: implement Collection Lifecycle Management ([#198](https://github.com/TanStack/db/pull/198))
379​
380 Adds automatic lifecycle management for collections to optimize resource usage.
381​
382 **New Features:**
383 - Added `startSync` option (defaults to `false`, set to `true` to start syncing immediately)
384 - Automatic garbage collection after `gcTime` (default 5 minutes) of inactivity
385 - Collection status tracking: "idle" | "loading" | "ready" | "error" | "cleaned-up"
386 - Manual `preload()` and `cleanup()` methods for lifecycle control
387​
388 **Usage:**
389​
390 ```typescript
391 const collection = createCollection({
392 startSync: false, // Enable lazy loading
393 gcTime: 300000, // Cleanup timeout (default: 5 minutes)
394 })
395​
396 console.log(collection.status) // Current state
397 await collection.preload() // Ensure ready
398 await collection.cleanup() // Manual cleanup
399 ```
400​
401- Add createOptimisticAction helper that replaces useOptimisticMutation ([#210](https://github.com/TanStack/db/pull/210))
402​
403 An example of converting a `useOptimisticMutation` hook to `createOptimisticAction`. Now all optimistic & server mutation logic are consolidated.
404​
405 ```diff
406 -import { useOptimisticMutation } from '@tanstack/react-db'
407 +import { createOptimisticAction } from '@tanstack/react-db'
408 +
409 +// Create the `addTodo` action, passing in your `mutationFn` and `onMutate`.
410 +const addTodo = createOptimisticAction<string>({
411 + onMutate: (text) => {
412 + // Instantly applies the local optimistic state.
413 + todoCollection.insert({
414 + id: uuid(),
415 + text,
416 + completed: false
417 + })
418 + },
419 + mutationFn: async (text) => {
420 + // Persist the todo to your backend
421 + const response = await fetch('/api/todos', {
422 + method: 'POST',
423 + body: JSON.stringify({ text, completed: false }),
424 + })
425 + return response.json()
426 + }
427 +})
428​
429 const Todo = () => {
430 - // Create the `addTodo` mutator, passing in your `mutationFn`.
431 - const addTodo = useOptimisticMutation({ mutationFn })
432 -
433 const handleClick = () => {
434 - // Triggers the mutationFn
435 - addTodo.mutate(() =>
436 - // Instantly applies the local optimistic state.
437 - todoCollection.insert({
438 - id: uuid(),
439 - text: '🔥 Make app faster',
440 - completed: false
441 - })
442 - )
443 + // Triggers the onMutate and then the mutationFn
444 + addTodo('🔥 Make app faster')
445 }
446​
447 return <Button onClick={ handleClick } />
448 }
449 ```
450​
451- Updated dependencies [[`945868e`](https://github.com/TanStack/db/commit/945868e95944543ccf5d778409548679a952e249), [`0f8a008`](https://github.com/TanStack/db/commit/0f8a008be8b368f231c8518ad1adfcac08132da2), [`57b5f5d`](https://github.com/TanStack/db/commit/57b5f5de6297326a57ef205a400428af0697b48b)]:
452 - @tanstack/db@0.0.13
453​
454## 0.0.12
455​
456### Patch Changes
457​
458- Updated dependencies [[`f6abe9b`](https://github.com/TanStack/db/commit/f6abe9b94b890487fe960bd72a89e4a75de89d46)]:
459 - @tanstack/db@0.0.12
460​
461## 0.0.11
462​
463### Patch Changes
464​
465- Export `ElectricCollectionUtils` & allow passing generic to `createTransaction` ([#179](https://github.com/TanStack/db/pull/179))
466​
467- Updated dependencies [[`66ed58b`](https://github.com/TanStack/db/commit/66ed58b66553683ff0a5241de8cde83954d18847), [`c5489ff`](https://github.com/TanStack/db/commit/c5489ff276db07a0a4b65876790ccd7f11a6f99d)]:
468 - @tanstack/db@0.0.11
469​
470## 0.0.10
471​
472### Patch Changes
473​
474- Updated dependencies [[`38d4505`](https://github.com/TanStack/db/commit/38d45051b065b619b95849f78422e9ace8750361)]:
475 - @tanstack/db@0.0.10
476​
477## 0.0.9
478​
479### Patch Changes
480​
481- Updated dependencies [[`2ae0b09`](https://github.com/TanStack/db/commit/2ae0b09cc52152b0044818b538e11e8ca10d0f80)]:
482 - @tanstack/db@0.0.9
483​
484## 0.0.8
485​
486### Patch Changes
487​
488- A large refactor of the core `Collection` with: ([#155](https://github.com/TanStack/db/pull/155))
489 - a change to not use Store internally and emit fine grade changes with `subscribeChanges` and `subscribeKeyChanges` methods.
490 - changes to the `Collection` api to be more `Map` like for reads, with `get`, `has`, `size`, `entries`, `keys`, and `values`.
491 - renames `config.getId` to `config.getKey` for consistency with the `Map` like api.
492​
493- Updated dependencies [[`5c538cf`](https://github.com/TanStack/db/commit/5c538cf03573512a8d1bbde96962a9f7ca014708), [`9553366`](https://github.com/TanStack/db/commit/955336604a286d7992f9506cb1c76ecf150d0432), [`b4602a0`](https://github.com/TanStack/db/commit/b4602a071cb6866bb1338e30d5802220b0d1fc49), [`02adc81`](https://github.com/TanStack/db/commit/02adc813177cbb44ab6245cc9821142e9cf97876), [`06d8ecc`](https://github.com/TanStack/db/commit/06d8eccc5aaabc194c31ea89c9b4191e2aa68180), [`c50cd51`](https://github.com/TanStack/db/commit/c50cd51ac8030b391cd9d84e8cd8b8fb57cb8ca5)]:
494 - @tanstack/db@0.0.8
495​
496## 0.0.7
497​
498### Patch Changes
499​
500- Expose utilities on collection instances ([#161](https://github.com/TanStack/db/pull/161))
501​
502 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.
503 - Refactored `createCollection` in packages/db/src/collection.ts to accept options with utilities directly
504 - Added `utils` property to CollectionImpl
505 - Added TypeScript types for utility functions and utility records
506 - Changed Collection from a class to a type, updating all usages to use createCollection() instead
507 - Updated Electric/Query implementations
508 - Utilities are now ergonomically accessible under `.utils`
509 - Full TypeScript typing is preserved for both collection data and utilities
510 - API is clean and straightforward - users can call `createCollection(optionsCreator(config))` directly
511 - Zero-boilerplate TypeScript pattern that infers utility types automatically
512​
513- Updated dependencies [[`8b43ad3`](https://github.com/TanStack/db/commit/8b43ad305b277560aed660c31cf1409d22ed1e47)]:
514 - @tanstack/db@0.0.7
515​
516## 0.0.6
517​
518### Patch Changes
519​
520- Updated dependencies [[`856be72`](https://github.com/TanStack/db/commit/856be725a6299374a3a97c88b50bd5d7bb94b783), [`0455e27`](https://github.com/TanStack/db/commit/0455e27f50d69b1e1887b841dc2f262f4de4c55d), [`80fdac7`](https://github.com/TanStack/db/commit/80fdac76389ea741f5743bc788df375f63fb767b)]:
521 - @tanstack/db@0.0.6
522​
523## 0.0.5
524​
525### Patch Changes
526​
527- Collections must have a getId function & use an id for update/delete operators ([#134](https://github.com/TanStack/db/pull/134))
528​
529- the `keyBy` query operator has been removed, keying withing the query pipeline is now automatic ([#144](https://github.com/TanStack/db/pull/144))
530​
531- Updated dependencies [[`1fbb844`](https://github.com/TanStack/db/commit/1fbb8447d8425d37cb9ab4f078ffab999b28b06c), [`338efc2`](https://github.com/TanStack/db/commit/338efc229c3794da5ac373b8b26143e379433407), [`ee5d026`](https://github.com/TanStack/db/commit/ee5d026715962dd0232fcaca513a8fac9189dce2), [`e7b036c`](https://github.com/TanStack/db/commit/e7b036ce6ebd17c94cc944d6d96ca2c645921c3e), [`e4feb0c`](https://github.com/TanStack/db/commit/e4feb0c214835675b47f0aa18a72d004a423df03)]:
532 - @tanstack/db@0.0.5
533​
534## 0.0.4
535​
536### Patch Changes
537​
538- Updated dependencies [[`8ce449e`](https://github.com/TanStack/db/commit/8ce449ed6d070e9e591d1b74b0db5fed7a3fc92f)]:
539 - @tanstack/db@0.0.4
540​
541## 0.0.3
542​
543### Patch Changes
544​
545- Updated dependencies [[`b29420b`](https://github.com/TanStack/db/commit/b29420bcdae30dfeffeef63a8753b83306a54e5a)]:
546 - @tanstack/db@0.0.3
547​
548## 0.0.2
549​
550### Patch Changes
551​
552- Fixed an issue with injecting the optimistic state removal into the reactive live query. ([#78](https://github.com/TanStack/db/pull/78))
553​
554- Updated dependencies [[`4c82edb`](https://github.com/TanStack/db/commit/4c82edb9547f26c9de44f5bf43d4385c38920672)]:
555 - @tanstack/db@0.0.2
556​
557## 0.0.3
558​
559### Patch Changes
560​
561- Make transactions first class & move ownership of mutationFn from collections to transactions ([#53](https://github.com/TanStack/db/pull/53))
562​
563- Updated dependencies [[`b42479c`](https://github.com/TanStack/db/commit/b42479cf95f9a820b36e01684b13a9179973f3d8)]:
564 - @tanstack/db@0.0.3
565​
566## 0.0.2
567​
568### Patch Changes
569​
570- make mutationFn optional for read-only collections ([#12](https://github.com/TanStack/db/pull/12))
571​
572- Updated dependencies [[`9bb6e89`](https://github.com/TanStack/db/commit/9bb6e8909cebdcd7c03091bfc12dd37f5ab2e1ea), [`8eb7e9b`](https://github.com/TanStack/db/commit/8eb7e9b1d1f569c5c064e0f440257589486b73cf)]:
573 - @tanstack/db@0.0.2
574​
575## 0.0.1
576​
577### Patch Changes
578​
579- feat: Initial release ([#2](https://github.com/TanStack/db/pull/2))
580​
581- Updated dependencies [[`2d2dd77`](https://github.com/TanStack/db/commit/2d2dd7743f715ffefaeee8e8d11173b751c7043b)]:
582 - @tanstack/db@0.0.1