Skip to content
Open
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
10 changes: 0 additions & 10 deletions .changeset/defer-term-behind-queued-reads.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/ordered-loader-superseded-failure.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/persisted-initial-render-split.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/react-db-strip-dev-warnings.md

This file was deleted.

7 changes: 0 additions & 7 deletions .changeset/skip-complete-collection-setup.md

This file was deleted.

6 changes: 0 additions & 6 deletions .changeset/sqlite-connection-closed-error.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/tidy-opfs-close.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 @@ -27,8 +27,8 @@
"@angular/forms": "^20.3.16",
"@angular/platform-browser": "^20.3.16",
"@angular/router": "^20.3.16",
"@tanstack/angular-db": "^0.2.12",
"@tanstack/db": "^0.15.2",
"@tanstack/angular-db": "^0.2.13",
"@tanstack/db": "^0.15.3",
"rxjs": "^7.8.2",
"tslib": "^2.8.1",
"zone.js": "~0.15.0"
Expand Down
10 changes: 5 additions & 5 deletions examples/electron/offline-first/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@
"postinstall": "prebuild-install --runtime electron --target 41.0.0 --arch arm64 || echo 'prebuild-install failed, try: npx @electron/rebuild'"
},
"dependencies": {
"@tanstack/electron-db-sqlite-persistence": "^0.2.13",
"@tanstack/node-db-sqlite-persistence": "^0.2.37",
"@tanstack/offline-transactions": "^1.1.4",
"@tanstack/query-db-collection": "^1.4.8",
"@tanstack/react-db": "^0.5.12",
"@tanstack/electron-db-sqlite-persistence": "^0.2.14",
"@tanstack/node-db-sqlite-persistence": "^0.2.38",
"@tanstack/offline-transactions": "^1.1.5",
"@tanstack/query-db-collection": "^1.4.9",
"@tanstack/react-db": "^0.5.13",
"@tanstack/react-query": "^5.90.20",
"better-sqlite3": "^12.6.2",
"react": "^19.2.4",
Expand Down
10 changes: 5 additions & 5 deletions examples/react-native/offline-transactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@
"@op-engineering/op-sqlite": "^15.2.5",
"@react-native-async-storage/async-storage": "2.1.2",
"@react-native-community/netinfo": "11.4.1",
"@tanstack/db": "^0.15.2",
"@tanstack/offline-transactions": "^1.1.4",
"@tanstack/query-db-collection": "^1.4.8",
"@tanstack/react-db": "^0.5.12",
"@tanstack/react-native-db-sqlite-persistence": "^0.2.37",
"@tanstack/db": "^0.15.3",
"@tanstack/offline-transactions": "^1.1.5",
"@tanstack/query-db-collection": "^1.4.9",
"@tanstack/react-db": "^0.5.13",
"@tanstack/react-native-db-sqlite-persistence": "^0.2.38",
"@tanstack/react-query": "^5.90.20",
"expo": "~53.0.26",
"expo-constants": "~17.1.0",
Expand Down
10 changes: 5 additions & 5 deletions examples/react-native/shopping-list/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
"@op-engineering/op-sqlite": "^15.2.5",
"@react-native-async-storage/async-storage": "2.1.2",
"@react-native-community/netinfo": "11.4.1",
"@tanstack/db": "^0.15.2",
"@tanstack/electric-db-collection": "^0.6.3",
"@tanstack/offline-transactions": "^1.1.4",
"@tanstack/react-db": "^0.5.12",
"@tanstack/react-native-db-sqlite-persistence": "^0.2.37",
"@tanstack/db": "^0.15.3",
"@tanstack/electric-db-collection": "^0.6.4",
"@tanstack/offline-transactions": "^1.1.5",
"@tanstack/react-db": "^0.5.13",
"@tanstack/react-native-db-sqlite-persistence": "^0.2.38",
"@tanstack/react-query": "^5.90.20",
"expo": "~53.0.26",
"expo-constants": "~17.1.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/react/action-enforcement/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"dependencies": {
"@tanstack/query-core": "^5.90.20",
"@tanstack/query-db-collection": "^1.4.8",
"@tanstack/react-db": "^0.5.12",
"@tanstack/query-db-collection": "^1.4.9",
"@tanstack/react-db": "^0.5.13",
"react": "^19.2.4",
"react-dom": "^19.2.4"
},
Expand Down
4 changes: 2 additions & 2 deletions examples/react/next-ssr-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"test:e2e": "pnpm --filter @tanstack/db build && pnpm --filter @tanstack/react-db build && playwright test"
},
"dependencies": {
"@tanstack/db": "^0.15.2",
"@tanstack/react-db": "^0.5.12",
"@tanstack/db": "^0.15.3",
"@tanstack/react-db": "^0.5.13",
"next": "^16.3.1",
"react": "^19.2.4",
"react-dom": "^19.2.4"
Expand Down
10 changes: 5 additions & 5 deletions examples/react/offline-transactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@
"build": "vite build && tsc --noEmit"
},
"dependencies": {
"@tanstack/browser-db-sqlite-persistence": "^0.2.37",
"@tanstack/db": "^0.15.2",
"@tanstack/offline-transactions": "^1.1.4",
"@tanstack/query-db-collection": "^1.4.8",
"@tanstack/react-db": "^0.5.12",
"@tanstack/browser-db-sqlite-persistence": "^0.2.38",
"@tanstack/db": "^0.15.3",
"@tanstack/offline-transactions": "^1.1.5",
"@tanstack/query-db-collection": "^1.4.9",
"@tanstack/react-db": "^0.5.13",
"@tanstack/react-query": "^5.90.20",
"@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.159.5",
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.15.2",
"@tanstack/react-db": "^0.5.12",
"@tanstack/db": "^0.15.3",
"@tanstack/react-db": "^0.5.13",
"mitt": "^3.0.1",
"react": "^19.2.4",
"react-dom": "^19.2.4"
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.20",
"@tanstack/query-db-collection": "^1.4.8",
"@tanstack/react-db": "^0.5.12",
"@tanstack/query-db-collection": "^1.4.9",
"@tanstack/react-db": "^0.5.13",
"@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-devtools": "^1.159.5",
"@tanstack/react-router-with-query": "^1.130.17",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/start-ssr-e2e/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"test:e2e:hosted": "playwright test"
},
"dependencies": {
"@tanstack/react-db": "^0.5.12",
"@tanstack/react-db": "^0.5.13",
"@tanstack/react-router": "^1.170.41",
"@tanstack/react-router-with-db": "^0.1.0",
"@tanstack/react-start": "^1.168.60",
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.31",
"dependencies": {
"@tanstack/electric-db-collection": "^0.6.3",
"@tanstack/electric-db-collection": "^0.6.4",
"@tanstack/query-core": "^5.90.20",
"@tanstack/query-db-collection": "^1.4.8",
"@tanstack/react-db": "^0.5.12",
"@tanstack/query-db-collection": "^1.4.9",
"@tanstack/react-db": "^0.5.13",
"@tanstack/react-router": "^1.170.41",
"@tanstack/react-start": "^1.168.60",
"@tanstack/trailbase-db-collection": "^0.1.123",
"@tanstack/trailbase-db-collection": "^0.1.124",
"cors": "^2.8.6",
"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.39",
"dependencies": {
"@tanstack/electric-db-collection": "^0.6.3",
"@tanstack/electric-db-collection": "^0.6.4",
"@tanstack/query-core": "^5.90.20",
"@tanstack/query-db-collection": "^1.4.8",
"@tanstack/solid-db": "^0.3.12",
"@tanstack/query-db-collection": "^1.4.9",
"@tanstack/solid-db": "^0.3.13",
"@tanstack/solid-router": "^1.170.38",
"@tanstack/solid-start": "^1.168.57",
"@tanstack/trailbase-db-collection": "^0.1.123",
"@tanstack/trailbase-db-collection": "^0.1.124",
"cors": "^2.8.6",
"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.2.13

### Patch Changes

- Updated dependencies [[`30175be`](https://github.com/TanStack/db/commit/30175be483fa70799da579e2c407fb7ed9f2b435), [`37b8fc2`](https://github.com/TanStack/db/commit/37b8fc2c5abd08e9128ec3606c6534aaec3ae67e)]:
- @tanstack/db@0.15.3

## 0.2.12

### 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.2.12",
"version": "0.2.13",
"description": "Angular integration for @tanstack/db",
"author": "Ethan McDaniel",
"license": "MIT",
Expand Down
11 changes: 11 additions & 0 deletions packages/browser-db-sqlite-persistence/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,16 @@
# @tanstack/browser-db-sqlite-persistence

## 0.2.38

### Patch Changes

- Add `SQLiteConnectionClosedError`. A browser OPFS connection now rejects requests made after close starts with this error instead of `InvalidPersistedCollectionConfigError`. ([#2213](https://github.com/TanStack/db/pull/2213))

- Reject pending OPFS requests when closing the SQLite connection, including when the worker reports a close error. Close now stops accepting requests when it starts, and concurrent `close()` calls share one outcome. The OPFS worker handles one request at a time, so close waits for earlier queries instead of failing while one waits for the OPFS access handle. ([#2213](https://github.com/TanStack/db/pull/2213))

- Updated dependencies [[`205ab71`](https://github.com/TanStack/db/commit/205ab7158d81680c3cc4f06cd9ebe62b30911a5a), [`37b8fc2`](https://github.com/TanStack/db/commit/37b8fc2c5abd08e9128ec3606c6534aaec3ae67e), [`205ab71`](https://github.com/TanStack/db/commit/205ab7158d81680c3cc4f06cd9ebe62b30911a5a), [`b052e91`](https://github.com/TanStack/db/commit/b052e91c79201ee376771f99503566e736e3d0dd)]:
- @tanstack/db-sqlite-persistence-core@0.5.0

## 0.2.37

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/browser-db-sqlite-persistence/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/browser-db-sqlite-persistence",
"version": "0.2.37",
"version": "0.2.38",
"description": "Browser wa-sqlite persisted collection adapter for TanStack DB",
"author": "TanStack Team",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/capacitor-db-sqlite-persistence/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/capacitor-db-sqlite-persistence

## 0.2.38

### Patch Changes

- Updated dependencies [[`205ab71`](https://github.com/TanStack/db/commit/205ab7158d81680c3cc4f06cd9ebe62b30911a5a), [`37b8fc2`](https://github.com/TanStack/db/commit/37b8fc2c5abd08e9128ec3606c6534aaec3ae67e), [`205ab71`](https://github.com/TanStack/db/commit/205ab7158d81680c3cc4f06cd9ebe62b30911a5a), [`b052e91`](https://github.com/TanStack/db/commit/b052e91c79201ee376771f99503566e736e3d0dd)]:
- @tanstack/db-sqlite-persistence-core@0.5.0

## 0.2.37

### Patch Changes
Expand Down
8 changes: 8 additions & 0 deletions packages/capacitor-db-sqlite-persistence/e2e/app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @tanstack/capacitor-db-sqlite-persistence-e2e-app

## 0.0.50

### Patch Changes

- Updated dependencies [[`30175be`](https://github.com/TanStack/db/commit/30175be483fa70799da579e2c407fb7ed9f2b435), [`37b8fc2`](https://github.com/TanStack/db/commit/37b8fc2c5abd08e9128ec3606c6534aaec3ae67e)]:
- @tanstack/db@0.15.3
- @tanstack/capacitor-db-sqlite-persistence@0.2.38

## 0.0.49

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/capacitor-db-sqlite-persistence-e2e-app",
"private": true,
"version": "0.0.49",
"version": "0.0.50",
"type": "module",
"scripts": {
"build": "vite build",
Expand Down
2 changes: 1 addition & 1 deletion packages/capacitor-db-sqlite-persistence/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/capacitor-db-sqlite-persistence",
"version": "0.2.37",
"version": "0.2.38",
"description": "Capacitor SQLite persisted collection adapter for TanStack DB",
"author": "TanStack Team",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/cloudflare-durable-objects-db-sqlite-persistence

## 0.2.38

### Patch Changes

- Updated dependencies [[`205ab71`](https://github.com/TanStack/db/commit/205ab7158d81680c3cc4f06cd9ebe62b30911a5a), [`37b8fc2`](https://github.com/TanStack/db/commit/37b8fc2c5abd08e9128ec3606c6534aaec3ae67e), [`205ab71`](https://github.com/TanStack/db/commit/205ab7158d81680c3cc4f06cd9ebe62b30911a5a), [`b052e91`](https://github.com/TanStack/db/commit/b052e91c79201ee376771f99503566e736e3d0dd)]:
- @tanstack/db-sqlite-persistence-core@0.5.0

## 0.2.37

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/cloudflare-durable-objects-db-sqlite-persistence",
"version": "0.2.37",
"version": "0.2.38",
"description": "Cloudflare Durable Object SQLite persisted collection adapter for TanStack DB",
"author": "TanStack Team",
"license": "MIT",
Expand Down
23 changes: 23 additions & 0 deletions packages/db-sqlite-persistence-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# @tanstack/db-sqlite-persistence-core

## 0.5.0

### Minor Changes

- Reloaded persisted collections now read their rows before they write a leader election term. A collection still takes its leader lock when it subscribes, but it reserves its durable term only after the database work already queued on the shared scheduler has settled, or as soon as something needs a leader during that election: a local write, a follower request, a sync commit during startup, or `ensureLeadership`. A need that an earlier leader already served does not let a later takeover skip the wait. A tab that takes over treats the departed leader's route as gone, so a sync commit queued behind one of its reads goes to the new leader and settles without waiting out an RPC timeout. The Electron renderer applies the same rule to its own hydrations. The renderer now has a hydration scope, so its startup runs as one hydration, as a Browser tab's does, and a restart keeps its metadata and row reads in one scope, so a term cannot run between them. ([#2219](https://github.com/TanStack/db/pull/2219))

`ensureLeadership` now resolves when this node becomes leader, keeps its place in the Web Locks queue instead of replacing its lock request, and rejects if the coordinator is disposed.

Migration for custom persistence adapters: `runInRegularScope` is now a `RegularScope`, which must also provide `afterQueuedWork()`. It resolves once every operation queued or running on the adapter's scheduler at the call has settled. An adapter without a scheduler can return a promise that settles with its running hydrations. A coordinator now rejects an adapter whose `runInRegularScope` lacks `afterQueuedWork` with `InvalidPersistenceAdapterError`.

### Patch Changes

- Apps without a persisted Collection no longer bundle the persisted initial-render wait. The persistence adapter now supplies the wait, so a typical app is about 230 bytes smaller after gzip. ([#2228](https://github.com/TanStack/db/pull/2228))

- Reloads no longer repeat setup that is already complete. A reopened persisted collection checks its tables, indexes, triggers, and bookkeeping rows in the same query that reads its registration, and runs its nine setup statements only when something is missing. Each adapter checks database-wide setup with one query and runs it only when a table, index, or migrated column is missing, instead of about 19 statements on every load. The write-only global `schema_version` row, which adapters with different schema versions overwrote on every load, is no longer created or written. ([#2219](https://github.com/TanStack/db/pull/2219))

A tab no longer rereads all of a collection's rows after its own write. It used to record the write's stream position before that write's commit notice arrived, so the notice looked like a gap and triggered `pullSince` and a full row scan.

- Add `SQLiteConnectionClosedError`. A browser OPFS connection now rejects requests made after close starts with this error instead of `InvalidPersistedCollectionConfigError`. ([#2213](https://github.com/TanStack/db/pull/2213))

- Updated dependencies [[`30175be`](https://github.com/TanStack/db/commit/30175be483fa70799da579e2c407fb7ed9f2b435), [`37b8fc2`](https://github.com/TanStack/db/commit/37b8fc2c5abd08e9128ec3606c6534aaec3ae67e)]:
- @tanstack/db@0.15.3

## 0.4.12

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/db-sqlite-persistence-core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/db-sqlite-persistence-core",
"version": "0.4.12",
"version": "0.5.0",
"description": "SQLite persisted collection core for TanStack DB",
"author": "TanStack Team",
"license": "MIT",
Expand Down
Loading