Skip to content

Commit 9f7cac6

Browse files
ci: Version Packages (#887)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 077fc1a commit 9f7cac6

File tree

27 files changed

+141
-43
lines changed

27 files changed

+141
-43
lines changed

.changeset/fix-query-collection-remount-cache.md

Lines changed: 0 additions & 27 deletions
This file was deleted.

examples/react/offline-transactions/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
},
1111
"dependencies": {
1212
"@tanstack/offline-transactions": ">=1.0.0",
13-
"@tanstack/query-db-collection": ">=1.0.3",
14-
"@tanstack/react-db": ">=0.1.48",
13+
"@tanstack/query-db-collection": ">=1.0.4",
14+
"@tanstack/react-db": ">=0.1.49",
1515
"@tanstack/react-query": "^5.90.10",
1616
"@tanstack/react-router": "^1.136.8",
1717
"@tanstack/react-router-devtools": "^1.136.8",

examples/react/projects/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,8 @@
1717
"dependencies": {
1818
"@tailwindcss/vite": "^4.1.17",
1919
"@tanstack/query-core": "^5.90.10",
20-
"@tanstack/query-db-collection": ">=1.0.3",
21-
"@tanstack/react-db": ">=0.1.48",
20+
"@tanstack/query-db-collection": ">=1.0.4",
21+
"@tanstack/react-db": ">=0.1.49",
2222
"@tanstack/react-router": "^1.136.8",
2323
"@tanstack/react-router-devtools": "^1.136.8",
2424
"@tanstack/react-router-with-query": "^1.130.17",

packages/angular-db/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @tanstack/angular-db
22

3+
## 0.1.31
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`077fc1a`](https://github.com/TanStack/db/commit/077fc1a418ca090d7533115888c09f3f609e36b2)]:
8+
- @tanstack/db@0.5.5
9+
310
## 0.1.30
411

512
### Patch Changes

packages/angular-db/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tanstack/angular-db",
33
"description": "Angular integration for @tanstack/db",
4-
"version": "0.1.30",
4+
"version": "0.1.31",
55
"author": "Ethan McDaniel",
66
"license": "MIT",
77
"repository": {

packages/db-collection-e2e/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @tanstack/db-collection-e2e
22

3+
## 0.0.7
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`077fc1a`](https://github.com/TanStack/db/commit/077fc1a418ca090d7533115888c09f3f609e36b2)]:
8+
- @tanstack/query-db-collection@1.0.4
9+
- @tanstack/db@0.5.5
10+
- @tanstack/electric-db-collection@0.2.5
11+
312
## 0.0.6
413

514
### Patch Changes

packages/db-collection-e2e/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@tanstack/db-collection-e2e",
3-
"version": "0.0.6",
3+
"version": "0.0.7",
44
"private": true,
55
"description": "End-to-end test suite for TanStack DB collections",
66
"type": "module",

packages/db/CHANGELOG.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# @tanstack/db
22

3+
## 0.5.5
4+
5+
### Patch Changes
6+
7+
- Fix data loss on component remount by implementing reference counting for QueryObserver lifecycle ([#870](https://github.com/TanStack/db/pull/870))
8+
9+
**What changed vs main:**
10+
11+
Previously, when live query subscriptions unsubscribed, there was no tracking of which rows were still needed by other active queries. This caused data loss during remounts.
12+
13+
This PR adds reference counting infrastructure to properly manage QueryObserver lifecycle:
14+
1. Pass same predicates to `unloadSubset` that were passed to `loadSubset`
15+
2. Use them to compute the queryKey (via `generateQueryKeyFromOptions`)
16+
3. Use existing machinery (`queryToRows` map) to find rows that query loaded
17+
4. Decrement the ref count
18+
5. GC rows where count reaches 0 (no longer referenced by any active query)
19+
20+
**Impact:**
21+
- Navigation back to previously loaded pages shows cached data immediately
22+
- No unnecessary refetches during quick remounts (< gcTime)
23+
- Multiple live queries with identical predicates correctly share QueryObservers
24+
- Proper row-level cleanup when last subscriber leaves
25+
- TanStack Query's cache lifecycle (gcTime) is fully respected
26+
- No data leakage from in-flight requests when unsubscribing
27+
328
## 0.5.4
429

530
### Patch Changes

packages/db/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@tanstack/db",
33
"description": "A reactive client store for building super fast apps on sync",
4-
"version": "0.5.4",
4+
"version": "0.5.5",
55
"dependencies": {
66
"@standard-schema/spec": "^1.0.0",
77
"@tanstack/db-ivm": "workspace:*",

packages/electric-db-collection/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @tanstack/electric-db-collection
22

3+
## 0.2.5
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`077fc1a`](https://github.com/TanStack/db/commit/077fc1a418ca090d7533115888c09f3f609e36b2)]:
8+
- @tanstack/db@0.5.5
9+
310
## 0.2.4
411

512
### Patch Changes

0 commit comments

Comments
 (0)