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
16 changes: 0 additions & 16 deletions .changeset/fix-await-match-inserts.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/fix-electric-null-params.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/fix-select-write-operations.md

This file was deleted.

2 changes: 1 addition & 1 deletion examples/react/offline-transactions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@tanstack/offline-transactions": "^1.0.2",
"@tanstack/query-db-collection": "^1.0.7",
"@tanstack/query-db-collection": "^1.0.8",
"@tanstack/react-db": "^0.1.56",
"@tanstack/react-query": "^5.90.12",
"@tanstack/react-router": "^1.140.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/react/projects/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"dependencies": {
"@tailwindcss/vite": "^4.1.17",
"@tanstack/query-core": "^5.90.12",
"@tanstack/query-db-collection": "^1.0.7",
"@tanstack/query-db-collection": "^1.0.8",
"@tanstack/react-db": "^0.1.56",
"@tanstack/react-router": "^1.140.0",
"@tanstack/react-router-devtools": "^1.140.0",
Expand Down
21 changes: 21 additions & 0 deletions packages/electric-db-collection/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,26 @@
# @tanstack/electric-db-collection

## 0.2.14

### Patch Changes

- Fix awaitMatch race condition on inserts and export isChangeMessage/isControlMessage. ([#1000](https://github.com/TanStack/db/pull/1000))

**Bug fixes:**
- Fixed race condition where `awaitMatch` would timeout on inserts when Electric synced faster than the API call
- Messages are now preserved in buffer until next batch arrives, allowing `awaitMatch` to find them
- Added `batchCommitted` flag to track commit state, consistent with `awaitTxId` semantics
- Fixed `batchCommitted` to also trigger on `snapshot-end` in `on-demand` mode (matching "ready" semantics)

**Export fixes:**
- `isChangeMessage` and `isControlMessage` are now exported from the package index as documented

- Fix invalid Electric proxy queries with missing params for null/undefined values ([#951](https://github.com/TanStack/db/pull/951))

When comparison operators were used with null/undefined values, the SQL compiler would generate placeholders ($1, $2) in the WHERE clause but skip adding the params to the dictionary. This resulted in invalid queries being sent to Electric.

Now all comparison operators (eq, gt, lt, gte, lte, like, ilike) throw a clear error when used with null/undefined values, since comparisons with NULL always evaluate to UNKNOWN in SQL. Users should use `isNull()` or `isUndefined()` to check for null values instead.

## 0.2.13

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

## 1.0.8

### Patch Changes

- Fix writeInsert/writeUpsert throwing error when collection uses select option ([#1023](https://github.com/TanStack/db/pull/1023))

When a Query Collection was configured with a `select` option to extract items from a wrapped API response (e.g., `{ data: [...], meta: {...} }`), calling `writeInsert()` or `writeUpsert()` would corrupt the query cache and trigger the error: "select() must return an array of objects".

The fix routes cache updates through a new `updateCacheData` function that preserves the wrapper structure by using the `select` function to identify which property contains the items array (via reference equality), then updates only that property while keeping metadata intact.

## 1.0.7

### 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.7",
"version": "1.0.8",
"description": "TanStack Query collection for TanStack DB",
"author": "Kyle Mathews",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.