@tanstack/trailbase-db-collection#
0.1.88#
Patch Changes#
- Updated dependencies [
307fdf8]:- @tanstack/db@0.6.10
0.1.87#
Patch Changes#
0.1.86#
Patch Changes#
- Updated dependencies [
3827b62]:- @tanstack/db@0.6.8
0.1.85#
Patch Changes#
0.1.84#
Patch Changes#
- Updated dependencies [
4e9ab39]:- @tanstack/db@0.6.6
0.1.83#
Patch Changes#
0.1.82#
Patch Changes#
- Updated dependencies [
1e69dd6]:- @tanstack/db@0.6.4
0.1.81#
Patch Changes#
0.1.80#
Patch Changes#
0.1.79#
Patch Changes#
- Updated dependencies [
8b7fb1a]:- @tanstack/db@0.6.1
0.1.78#
Patch Changes#
Add TrailBase
syncModesupport and end-to-end coverage for eager and on-demand collection syncing. (#1098)Add a wider range of subset queries for TrailBase integration, including pagination, ordering, and basic
wheresupport. (#1101)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/store0.9.x API which returnsSubscriptionobjects instead of unsubscribe functions. (#1381)Update TrailBase's client to v0.10 and lock-down server version for e2e tests. (#1398)
Updated dependencies [
f60384b,b8abc02,09c7afc,bb09eb1,179d666,43ecbfa,055fd94,055fd94,055fd94,055fd94,85f5435,b65d8f7,e0df07e,9952921,d351c67]:- @tanstack/db@0.6.0
0.1.77#
Patch Changes#
- Updated dependencies [
c3e6a96]:- @tanstack/db@0.5.33
0.1.76#
Patch Changes#
0.1.75#
Patch Changes#
- Updated dependencies [
bf1d078]:- @tanstack/db@0.5.31
0.1.74#
Patch Changes#
- Updated dependencies [
e9d0fd8]:- @tanstack/db@0.5.30
0.1.73#
Patch Changes#
0.1.72#
Patch Changes#
- Updated dependencies [
46450e7]:- @tanstack/db@0.5.28
0.1.71#
Patch Changes#
Make type of collection utils more precise for localOnly, PowerSync, Trailbase, and Electric collections (#1236)
Updated dependencies [
802550f,dc41d7d,4ff3da5,2223cd6]:- @tanstack/db@0.5.27
0.1.70#
Patch Changes#
0.1.69#
Patch Changes#
0.1.68#
Patch Changes#
- Updated dependencies [
7099459]:- @tanstack/db@0.5.24
0.1.67#
Patch Changes#
- Updated dependencies [
05130f2]:- @tanstack/db@0.5.23
0.1.66#
Patch Changes#
- Updated dependencies [
f9b741e]:- @tanstack/db@0.5.22
0.1.65#
Patch Changes#
0.1.64#
Patch Changes#
- Updated dependencies []:
- @tanstack/db@0.5.20
0.1.63#
Patch Changes#
0.1.62#
Patch Changes#
- Updated dependencies [
c1247e8]:- @tanstack/db@0.5.18
0.1.61#
Patch Changes#
0.1.60#
Patch Changes#
- Updated dependencies [
41308b8]:- @tanstack/db@0.5.16
0.1.59#
Patch Changes#
- Updated dependencies [
32ec4d8]:- @tanstack/db@0.5.15
0.1.58#
Patch Changes#
- Updated dependencies [
26ed0aa]:- @tanstack/db@0.5.14
0.1.57#
Patch Changes#
0.1.56#
Patch Changes#
0.1.55#
Patch Changes#
0.1.54#
Patch Changes#
0.1.53#
Patch Changes#
- Updated dependencies [
5f474f1]:- @tanstack/db@0.5.9
0.1.52#
Patch Changes#
0.1.51#
Patch Changes#
- Updated dependencies [
295cb45]:- @tanstack/db@0.5.7
0.1.50#
Patch Changes#
- Updated dependencies [
c8a2c16]:- @tanstack/db@0.5.6
0.1.49#
Patch Changes#
- Updated dependencies [
077fc1a]:- @tanstack/db@0.5.5
0.1.48#
Patch Changes#
0.1.47#
Patch Changes#
0.1.46#
Patch Changes#
- Updated dependencies [
99a3716]:- @tanstack/db@0.5.2
0.1.45#
Patch Changes#
- Updated dependencies [
a83a818]:- @tanstack/db@0.5.1
0.1.44#
Patch Changes#
- Updated dependencies [
243a35a,f9d11fc,7aedf12,28f81b5,28f81b5,f6ac7ea,01093a7]:- @tanstack/db@0.5.0
0.1.43#
Patch Changes#
Trigger new release for trailbase-db-collection
Version 0.1.42 was already published to npm. This changeset bumps the version to 0.1.43 to allow for a new release.
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#
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#
Define BaseCollectionConfig interface and let all collections extend it. (#531)
Updated dependencies [
b03894d,3968087]:- @tanstack/db@0.2.5
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#
0.0.9#
Patch Changes#
- Updated dependencies [
6e8d7f6]:- @tanstack/db@0.0.33
0.0.8#
Patch Changes#
- Updated dependencies [
e04bd12]:- @tanstack/db@0.0.32
0.0.7#
Patch Changes#
- Updated dependencies [
3e9a36d]:- @tanstack/db@0.0.31
0.0.6#
Patch Changes#
- Updated dependencies [
6bdde55]:- @tanstack/db@0.0.30
0.0.5#
Patch Changes#
feat: Replace string-based errors with named error classes for better error handling (#297)
This comprehensive update replaces all string-based error throws throughout the TanStack DB codebase with named error classes, providing better type safety and developer experience.
New Features#
- Root
TanStackDBErrorclass - all errors inherit from a common base for unified error handling - Named error classes organized by package and functional area
- Type-safe error handling using
instanceofchecks instead of string matching - Package-specific error definitions - each adapter has its own error classes
- Better IDE support with autocomplete for error types
Package Structure#
Core Package (
@tanstack/db)#Contains generic errors used across the ecosystem:
- Collection configuration, state, and operation errors
- Transaction lifecycle and mutation errors
- Query building, compilation, and execution errors
- Storage and serialization errors
Adapter Packages#
Each adapter now exports its own specific error classes:
@tanstack/electric-db-collection: Electric-specific errors@tanstack/trailbase-db-collection: TrailBase-specific errors@tanstack/query-db-collection: Query collection specific errors
Breaking Changes#
- Error handling code using string matching will need to be updated to use
instanceofchecks - Some error messages may have slight formatting changes
- Adapter-specific errors now need to be imported from their respective packages
Migration Guide#
Core DB Errors#
Before:
try { collection.insert(data) } catch (error) { if (error.message.includes('already exists')) { // Handle duplicate key error } }After:
import { DuplicateKeyError } from '@tanstack/db' try { collection.insert(data) } catch (error) { if (error instanceof DuplicateKeyError) { // Type-safe error handling } }Adapter-Specific Errors#
Before:
// Electric collection errors were imported from @tanstack/db import { ElectricInsertHandlerMustReturnTxIdError } from '@tanstack/db'After:
// Now import from the specific adapter package import { ElectricInsertHandlerMustReturnTxIdError } from '@tanstack/electric-db-collection'Unified Error Handling#
New:
import { TanStackDBError } from '@tanstack/db' try { // Any TanStack DB operation } catch (error) { if (error instanceof TanStackDBError) { // Handle all TanStack DB errors uniformly console.log('TanStack DB error:', error.message) } }Benefits#
- Type Safety: All errors now have specific types that can be caught with
instanceof - Unified Error Handling: Root
TanStackDBErrorclass allows catching all library errors with a single check - Better Package Separation: Each adapter manages its own error types
- Developer Experience: Better IDE support with autocomplete for error types
- Maintainability: Error definitions are co-located with their usage
- Consistency: Uniform error handling patterns across the entire codebase
All error classes maintain the same error messages and behavior while providing better structure and package separation.
- Root
Updated dependencies [
ced0657,dcfef51,360b0df,608be0c,5260ee3]:- @tanstack/db@0.0.29
0.0.4#
Patch Changes#
0.0.3#
Patch Changes#
- Updated dependencies [
bec8620]:- @tanstack/db@0.0.27
0.0.2#
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