Skip to content

Commit ac42951

Browse files
ci: Version Packages (#718)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 970616b commit ac42951

File tree

27 files changed

+131
-50
lines changed

27 files changed

+131
-50
lines changed

.changeset/fix-collection-cleanup-order.md

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

examples/angular/todos/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# todos
22

3+
## 0.0.15
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`970616b`](https://github.com/TanStack/db/commit/970616b6db723d1716eecd5076417de5d6e9a884)]:
8+
- @tanstack/db@0.4.14
9+
- @tanstack/angular-db@0.1.19
10+
311
## 0.0.14
412

513
### Patch Changes

examples/angular/todos/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "todos",
3-
"version": "0.0.14",
3+
"version": "0.0.15",
44
"scripts": {
55
"ng": "ng",
66
"start": "ng serve",

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.14",
1919
"@tanstack/query-core": "^5.90.5",
20-
"@tanstack/query-db-collection": "^0.2.35",
21-
"@tanstack/react-db": "^0.1.35",
20+
"@tanstack/query-db-collection": "^0.2.36",
21+
"@tanstack/react-db": "^0.1.36",
2222
"@tanstack/react-router": "^1.133.15",
2323
"@tanstack/react-router-devtools": "^1.133.15",
2424
"@tanstack/react-router-with-query": "^1.130.17",

examples/react/todo/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# examples/react/todo
22

3+
## 0.1.15
4+
5+
### Patch Changes
6+
7+
- Updated dependencies []:
8+
- @tanstack/electric-db-collection@0.1.38
9+
- @tanstack/query-db-collection@0.2.36
10+
- @tanstack/react-db@0.1.36
11+
- @tanstack/trailbase-db-collection@0.1.36
12+
313
## 0.1.14
414

515
### Patch Changes

examples/react/todo/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-example-react-todo",
33
"private": true,
4-
"version": "0.1.14",
4+
"version": "0.1.15",
55
"dependencies": {
66
"@tanstack/electric-db-collection": "workspace:^",
77
"@tanstack/query-core": "^5.90.5",

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.19
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`970616b`](https://github.com/TanStack/db/commit/970616b6db723d1716eecd5076417de5d6e9a884)]:
8+
- @tanstack/db@0.4.14
9+
310
## 0.1.18
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.18",
4+
"version": "0.1.19",
55
"author": "Ethan McDaniel",
66
"license": "MIT",
77
"repository": {

packages/db/CHANGELOG.md

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

3+
## 0.4.14
4+
5+
### Patch Changes
6+
7+
- Fix collection cleanup to fire status:change event with 'cleaned-up' status ([#714](https://github.com/TanStack/db/pull/714))
8+
9+
Previously, when a collection was garbage collected, event handlers were removed before the status was changed to 'cleaned-up'. This prevented listeners from receiving the status:change event, breaking the collection factory pattern where collections listen for cleanup to remove themselves from a cache.
10+
11+
Now, the cleanup process:
12+
1. Cleans up sync, state, changes, and indexes
13+
2. Sets status to 'cleaned-up' (fires the event)
14+
3. Finally cleans up event handlers
15+
16+
This enables the collection factory pattern:
17+
18+
```typescript
19+
const cache = new Map<string, ReturnType<typeof createCollection>>()
20+
21+
const getTodoCollection = (id: string) => {
22+
if (!cache.has(id)) {
23+
const collection = createCollection(/* ... */)
24+
25+
collection.on("status:change", ({ status }) => {
26+
if (status === "cleaned-up") {
27+
cache.delete(id) // This now works!
28+
}
29+
})
30+
31+
cache.set(id, collection)
32+
}
33+
return cache.get(id)!
34+
}
35+
```
36+
337
## 0.4.13
438

539
### 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.4.13",
4+
"version": "0.4.14",
55
"dependencies": {
66
"@standard-schema/spec": "^1.0.0",
77
"@tanstack/db-ivm": "workspace:*"

0 commit comments

Comments
 (0)