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
5 changes: 0 additions & 5 deletions .changeset/fix-ref-union-collapse-b.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/nested-toarray-shared-buffer-overlap.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.16",
"@angular/platform-browser": "^20.3.16",
"@angular/router": "^20.3.16",
"@tanstack/angular-db": "^0.1.72",
"@tanstack/db": "^0.6.12",
"@tanstack/angular-db": "^0.1.73",
"@tanstack/db": "^0.6.13",
"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 40.2.1 --arch arm64 || echo 'prebuild-install failed, try: npx @electron/rebuild'"
},
"dependencies": {
"@tanstack/electron-db-sqlite-persistence": "^0.1.16",
"@tanstack/node-db-sqlite-persistence": "^0.2.4",
"@tanstack/offline-transactions": "^1.0.37",
"@tanstack/query-db-collection": "^1.0.44",
"@tanstack/react-db": "^0.1.90",
"@tanstack/electron-db-sqlite-persistence": "^0.1.17",
"@tanstack/node-db-sqlite-persistence": "^0.2.5",
"@tanstack/offline-transactions": "^1.0.38",
"@tanstack/query-db-collection": "^1.0.45",
"@tanstack/react-db": "^0.1.91",
"@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.6.12",
"@tanstack/offline-transactions": "^1.0.37",
"@tanstack/query-db-collection": "^1.0.44",
"@tanstack/react-db": "^0.1.90",
"@tanstack/react-native-db-sqlite-persistence": "^0.2.4",
"@tanstack/db": "^0.6.13",
"@tanstack/offline-transactions": "^1.0.38",
"@tanstack/query-db-collection": "^1.0.45",
"@tanstack/react-db": "^0.1.91",
"@tanstack/react-native-db-sqlite-persistence": "^0.2.5",
"@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.6.12",
"@tanstack/electric-db-collection": "^0.3.10",
"@tanstack/offline-transactions": "^1.0.37",
"@tanstack/react-db": "^0.1.90",
"@tanstack/react-native-db-sqlite-persistence": "^0.2.4",
"@tanstack/db": "^0.6.13",
"@tanstack/electric-db-collection": "^0.3.11",
"@tanstack/offline-transactions": "^1.0.38",
"@tanstack/react-db": "^0.1.91",
"@tanstack/react-native-db-sqlite-persistence": "^0.2.5",
"@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/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.4",
"@tanstack/db": "^0.6.12",
"@tanstack/offline-transactions": "^1.0.37",
"@tanstack/query-db-collection": "^1.0.44",
"@tanstack/react-db": "^0.1.90",
"@tanstack/browser-db-sqlite-persistence": "^0.2.5",
"@tanstack/db": "^0.6.13",
"@tanstack/offline-transactions": "^1.0.38",
"@tanstack/query-db-collection": "^1.0.45",
"@tanstack/react-db": "^0.1.91",
"@tanstack/react-query": "^5.90.20",
"@tanstack/react-router": "^1.159.5",
"@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.6.12",
"@tanstack/react-db": "^0.1.90",
"@tanstack/db": "^0.6.13",
"@tanstack/react-db": "^0.1.91",
"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.0.44",
"@tanstack/react-db": "^0.1.90",
"@tanstack/query-db-collection": "^1.0.45",
"@tanstack/react-db": "^0.1.91",
"@tanstack/react-router": "^1.159.5",
"@tanstack/react-router-devtools": "^1.159.5",
"@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.25",
"dependencies": {
"@tanstack/electric-db-collection": "^0.3.10",
"@tanstack/electric-db-collection": "^0.3.11",
"@tanstack/query-core": "^5.90.20",
"@tanstack/query-db-collection": "^1.0.44",
"@tanstack/react-db": "^0.1.90",
"@tanstack/query-db-collection": "^1.0.45",
"@tanstack/react-db": "^0.1.91",
"@tanstack/react-router": "^1.159.5",
"@tanstack/react-start": "^1.159.5",
"@tanstack/trailbase-db-collection": "^0.1.90",
"@tanstack/trailbase-db-collection": "^0.1.91",
"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.35",
"dependencies": {
"@tanstack/electric-db-collection": "^0.3.10",
"@tanstack/electric-db-collection": "^0.3.11",
"@tanstack/query-core": "^5.90.20",
"@tanstack/query-db-collection": "^1.0.44",
"@tanstack/solid-db": "^0.2.26",
"@tanstack/query-db-collection": "^1.0.45",
"@tanstack/solid-db": "^0.2.27",
"@tanstack/solid-router": "^1.159.5",
"@tanstack/solid-start": "^1.159.5",
"@tanstack/trailbase-db-collection": "^0.1.90",
"@tanstack/trailbase-db-collection": "^0.1.91",
"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.1.73

### Patch Changes

- Updated dependencies [[`99e9afe`](https://github.com/TanStack/db/commit/99e9afed46ab4083d66609a3e37ee44103c2177f), [`816b667`](https://github.com/TanStack/db/commit/816b6671c2cc9806715f6e6ed4410b3f4efb5afb)]:
- @tanstack/db@0.6.13

## 0.1.72

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

## 0.2.5

### Patch Changes

- Updated dependencies []:
- @tanstack/db-sqlite-persistence-core@0.2.5

## 0.2.4

### 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.4",
"version": "0.2.5",
"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.5

### Patch Changes

- Updated dependencies []:
- @tanstack/db-sqlite-persistence-core@0.2.5

## 0.2.4

### 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.17

### Patch Changes

- Updated dependencies [[`99e9afe`](https://github.com/TanStack/db/commit/99e9afed46ab4083d66609a3e37ee44103c2177f), [`816b667`](https://github.com/TanStack/db/commit/816b6671c2cc9806715f6e6ed4410b3f4efb5afb)]:
- @tanstack/db@0.6.13
- @tanstack/capacitor-db-sqlite-persistence@0.2.5

## 0.0.16

### 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.16",
"version": "0.0.17",
"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.4",
"version": "0.2.5",
"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.5

### Patch Changes

- Updated dependencies []:
- @tanstack/db-sqlite-persistence-core@0.2.5

## 0.2.4

### 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.4",
"version": "0.2.5",
"description": "Cloudflare Durable Object SQLite persisted collection adapter for TanStack DB",
"author": "TanStack Team",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/db-sqlite-persistence-core/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/db-sqlite-persistence-core

## 0.2.5

### Patch Changes

- Updated dependencies [[`99e9afe`](https://github.com/TanStack/db/commit/99e9afed46ab4083d66609a3e37ee44103c2177f), [`816b667`](https://github.com/TanStack/db/commit/816b6671c2cc9806715f6e6ed4410b3f4efb5afb)]:
- @tanstack/db@0.6.13

## 0.2.4

### 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.2.4",
"version": "0.2.5",
"description": "SQLite persisted collection core for TanStack DB",
"author": "TanStack Team",
"license": "MIT",
Expand Down
12 changes: 12 additions & 0 deletions packages/db/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @tanstack/db

## 0.6.13

### Patch Changes

- Fix `.select()` collapsing discriminated-union fields to the intersection of common keys (#1511). `Ref<T>` now distributes over `T` so `keyof (A | B | C)` no longer reduces the union to its common keys, and `ExtractRef<T>` now distinguishes a real branded `Ref` (where the underlying user type `U` can be returned directly) from a spread-produced inline object (which still needs to be projected through `ResultTypeFromSelect`). This preserves discriminated unions both when the field is selected at the top level and when the field is nested inside another selected object. The real-`Ref` detection uses a strict structural equivalence against the canonical `Ref<U>` shape, so spread-derived objects that keep the same keys but change a field's type (e.g. `{ ...u, code: u.slug }`) or drop an optional key (e.g. `const { nickname, ...rest } = u`) are projected through `ResultTypeFromSelect` instead of being collapsed back to `U`. ([#1597](https://github.com/TanStack/db/pull/1597))

- fix(db): keep deeply nested includes in sync when sibling groups share nested correlation keys ([#1607](https://github.com/TanStack/db/pull/1607))

Deeply nested includes could drop or stop updating nested rows when sibling parent groups shared the same nested correlation key, especially when one sibling group was inserted after the initial load. Shared nested pipeline buffers were being drained through route state that was scoped too narrowly, so one branch could consume a buffered update before other branches that referenced the same nested row received it.

Nested route state is now shared at the same scope as the nested buffer and routes updates to every concrete destination branch before clearing the buffer. Snapshot replay still seeds late-arriving sibling groups with already-materialized rows, and recursive pending-change detection ensures deeper routed updates are flushed back up through the result tree.

## 0.6.12

### 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.6.12",
"version": "0.6.13",
"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.3.11

### Patch Changes

- Updated dependencies [[`99e9afe`](https://github.com/TanStack/db/commit/99e9afed46ab4083d66609a3e37ee44103c2177f), [`816b667`](https://github.com/TanStack/db/commit/816b6671c2cc9806715f6e6ed4410b3f4efb5afb)]:
- @tanstack/db@0.6.13

## 0.3.10

### 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.3.10",
"version": "0.3.11",
"description": "ElectricSQL collection for TanStack DB",
"author": "Kyle Mathews",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/electron-db-sqlite-persistence/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/electron-db-sqlite-persistence

## 0.1.17

### Patch Changes

- Updated dependencies []:
- @tanstack/db-sqlite-persistence-core@0.2.5

## 0.1.16

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/electron-db-sqlite-persistence/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/electron-db-sqlite-persistence",
"version": "0.1.16",
"version": "0.1.17",
"description": "Electron SQLite persisted collection bridge for TanStack DB",
"author": "TanStack Team",
"license": "MIT",
Expand Down
7 changes: 7 additions & 0 deletions packages/expo-db-sqlite-persistence/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# @tanstack/expo-db-sqlite-persistence

## 0.2.5

### Patch Changes

- Updated dependencies []:
- @tanstack/db-sqlite-persistence-core@0.2.5

## 0.2.4

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# @tanstack/expo-db-sqlite-persistence-e2e-app

## 0.0.17

### Patch Changes

- Updated dependencies [[`99e9afe`](https://github.com/TanStack/db/commit/99e9afed46ab4083d66609a3e37ee44103c2177f), [`816b667`](https://github.com/TanStack/db/commit/816b6671c2cc9806715f6e6ed4410b3f4efb5afb)]:
- @tanstack/db@0.6.13
- @tanstack/expo-db-sqlite-persistence@0.2.5

## 0.0.16

### Patch Changes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@tanstack/expo-db-sqlite-persistence-e2e-app",
"private": true,
"version": "0.0.16",
"version": "0.0.17",
"main": "index.js",
"scripts": {
"start": "expo start",
Expand Down
2 changes: 1 addition & 1 deletion packages/expo-db-sqlite-persistence/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@tanstack/expo-db-sqlite-persistence",
"version": "0.2.4",
"version": "0.2.5",
"description": "Expo SQLite persisted collection adapter for TanStack DB",
"author": "TanStack Team",
"license": "MIT",
Expand Down
Loading