Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions .changeset/fix-on-demand-ready-timing.md

This file was deleted.

4 changes: 2 additions & 2 deletions examples/angular/todos/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
"@angular/forms": "^20.3.15",
"@angular/platform-browser": "^19.2.17",
"@angular/router": "^20.3.15",
"@tanstack/angular-db": "^0.1.43",
"@tanstack/db": "^0.5.17",
"@tanstack/angular-db": "^0.1.44",
"@tanstack/db": "^0.5.18",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "^0.16.0"
Expand Down
6 changes: 3 additions & 3 deletions examples/react/offline-transactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
"start": "node .output/server/index.mjs"
},
"dependencies": {
"@tanstack/offline-transactions": "^1.0.7",
"@tanstack/query-db-collection": "^1.0.13",
"@tanstack/react-db": "^0.1.61",
"@tanstack/offline-transactions": "^1.0.8",
"@tanstack/query-db-collection": "^1.0.14",
"@tanstack/react-db": "^0.1.62",
"@tanstack/react-query": "^5.90.16",
"@tanstack/react-router": "^1.144.0",
"@tanstack/react-router-devtools": "^1.144.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/paced-mutations-demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"preview": "vite preview"
},
"dependencies": {
"@tanstack/db": "^0.5.17",
"@tanstack/react-db": "^0.1.61",
"@tanstack/db": "^0.5.18",
"@tanstack/react-db": "^0.1.62",
"mitt": "^3.0.1",
"react": "^19.2.3",
"react-dom": "^19.2.3"
Expand Down
4 changes: 2 additions & 2 deletions examples/react/projects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
"dependencies": {
"@tailwindcss/vite": "^4.1.18",
"@tanstack/query-core": "^5.90.16",
"@tanstack/query-db-collection": "^1.0.13",
"@tanstack/react-db": "^0.1.61",
"@tanstack/query-db-collection": "^1.0.14",
"@tanstack/react-db": "^0.1.62",
"@tanstack/react-router": "^1.144.0",
"@tanstack/react-router-devtools": "^1.144.0",
"@tanstack/react-router-with-query": "^1.130.17",
Expand Down
8 changes: 4 additions & 4 deletions examples/react/todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"private": true,
"version": "0.1.24",
"dependencies": {
"@tanstack/electric-db-collection": "^0.2.21",
"@tanstack/electric-db-collection": "^0.2.22",
"@tanstack/query-core": "^5.90.16",
"@tanstack/query-db-collection": "^1.0.13",
"@tanstack/react-db": "^0.1.61",
"@tanstack/query-db-collection": "^1.0.14",
"@tanstack/react-db": "^0.1.62",
"@tanstack/react-router": "^1.144.0",
"@tanstack/react-start": "^1.145.5",
"@tanstack/trailbase-db-collection": "^0.1.61",
"@tanstack/trailbase-db-collection": "^0.1.62",
"cors": "^2.8.5",
"drizzle-orm": "^0.45.1",
"drizzle-zod": "^0.8.3",
Expand Down
8 changes: 4 additions & 4 deletions examples/solid/todo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"private": true,
"version": "0.0.33",
"dependencies": {
"@tanstack/electric-db-collection": "^0.2.21",
"@tanstack/electric-db-collection": "^0.2.22",
"@tanstack/query-core": "^5.90.16",
"@tanstack/query-db-collection": "^1.0.13",
"@tanstack/solid-db": "^0.1.60",
"@tanstack/query-db-collection": "^1.0.14",
"@tanstack/solid-db": "^0.1.61",
"@tanstack/solid-router": "^1.144.0",
"@tanstack/solid-start": "^1.145.5",
"@tanstack/trailbase-db-collection": "^0.1.61",
"@tanstack/trailbase-db-collection": "^0.1.62",
"cors": "^2.8.5",
"drizzle-orm": "^0.45.1",
"drizzle-zod": "^0.8.3",
Expand Down
7 changes: 7 additions & 0 deletions packages/angular-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/angular-db

## 0.1.44

### Patch Changes

- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
- @tanstack/[email protected]

## 0.1.43

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/angular-db/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/angular-db",
"version": "0.1.43",
"version": "0.1.44",
"description": "Angular integration for @tanstack/db",
"author": "Ethan McDaniel",
"license": "MIT",
Expand Down
24 changes: 24 additions & 0 deletions packages/db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @tanstack/db

## 0.5.18

### Patch Changes

- fix(db): prevent live query from being marked ready before subset data is loaded ([#1081](https://github.com/TanStack/db/pull/1081))

In on-demand sync mode, the live query collection was being marked as `ready` before
the subset data finished loading. This caused `useLiveQuery` to return `isReady=true`
with empty data, and `useLiveSuspenseQuery` to release suspense prematurely.

The root cause was a race condition: the `status:change` listener in `CollectionSubscriber`
was registered _after_ the snapshot was triggered. If `loadSubset` resolved quickly
(or synchronously), the `loadingSubset` status transition would be missed entirely,
so `trackLoadPromise` was never called on the live query collection.

Changes:
1. **Core fix - `onStatusChange` option**: Added `onStatusChange` callback option to
`subscribeChanges()`. The listener is registered BEFORE any snapshot is requested,
guaranteeing no status transitions are missed. This replaces the error-prone pattern
of manually deferring snapshots and registering listeners in the correct order.
2. **Ready state gating**: `updateLiveQueryStatus()` now checks `isLoadingSubset` on the
live query collection before marking it ready, and listens for `loadingSubset:change`
to trigger the ready check when subset loading completes.

## 0.5.17

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/db/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/db",
"version": "0.5.17",
"version": "0.5.18",
"description": "A reactive client store for building super fast apps on sync",
"author": "Kyle Mathews",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/electric-db-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/electric-db-collection

## 0.2.22

### Patch Changes

- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
- @tanstack/[email protected]

## 0.2.21

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/electric-db-collection/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/electric-db-collection",
"version": "0.2.21",
"version": "0.2.22",
"description": "ElectricSQL collection for TanStack DB",
"author": "Kyle Mathews",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/offline-transactions/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/offline-transactions

## 1.0.8

### Patch Changes

- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
- @tanstack/[email protected]

## 1.0.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/offline-transactions/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/offline-transactions",
"version": "1.0.7",
"version": "1.0.8",
"description": "Offline-first transaction capabilities for TanStack DB",
"author": "TanStack",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/powersync-db-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/powersync-db-collection

## 0.1.22

### Patch Changes

- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
- @tanstack/[email protected]

## 0.1.21

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/powersync-db-collection/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/powersync-db-collection",
"version": "0.1.21",
"version": "0.1.22",
"description": "PowerSync collection for TanStack DB",
"author": "POWERSYNC",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/query-db-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/query-db-collection

## 1.0.14

### Patch Changes

- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
- @tanstack/[email protected]

## 1.0.13

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/query-db-collection/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/query-db-collection",
"version": "1.0.13",
"version": "1.0.14",
"description": "TanStack Query collection for TanStack DB",
"author": "Kyle Mathews",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/react-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/react-db

## 0.1.62

### Patch Changes

- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
- @tanstack/[email protected]

## 0.1.61

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/react-db/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/react-db",
"version": "0.1.61",
"version": "0.1.62",
"description": "React integration for @tanstack/db",
"author": "Kyle Mathews",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/rxdb-db-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/rxdb-db-collection

## 0.1.50

### Patch Changes

- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
- @tanstack/[email protected]

## 0.1.49

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/rxdb-db-collection/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/rxdb-db-collection",
"version": "0.1.49",
"version": "0.1.50",
"description": "RxDB collection for TanStack DB",
"author": "Kyle Mathews",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/solid-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/react-db

## 0.1.61

### Patch Changes

- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
- @tanstack/[email protected]

## 0.1.60

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/solid-db/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/solid-db",
"version": "0.1.60",
"version": "0.1.61",
"description": "Solid integration for @tanstack/db",
"author": "Kyle Mathews",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/svelte-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/svelte-db

## 0.1.61

### Patch Changes

- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
- @tanstack/[email protected]

## 0.1.60

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/svelte-db/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/svelte-db",
"version": "0.1.60",
"version": "0.1.61",
"description": "Svelte integration for @tanstack/db",
"author": "Kyle Mathews",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/trailbase-db-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/trailbase-db-collection

## 0.1.62

### Patch Changes

- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
- @tanstack/[email protected]

## 0.1.61

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/trailbase-db-collection/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/trailbase-db-collection",
"version": "0.1.61",
"version": "0.1.62",
"description": "TrailBase collection for TanStack DB",
"author": "Sebastian Jeltsch",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/vue-db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/vue-db

## 0.0.94

### Patch Changes

- Updated dependencies [[`c1247e8`](https://github.com/TanStack/db/commit/c1247e816950314da6d201613481577834c1d97a)]:
- @tanstack/[email protected]

## 0.0.93

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/vue-db/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/vue-db",
"version": "0.0.93",
"version": "0.0.94",
"description": "Vue integration for @tanstack/db",
"author": "Kyle Mathews",
"license": "MIT",
Expand Down
Loading