Skip to content

Commit 3ee1d7e

Browse files
ci: Version Packages (#764)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent a34383e commit 3ee1d7e

File tree

29 files changed

+149
-59
lines changed

29 files changed

+149
-59
lines changed

.changeset/fast-localstorage-mutations.md

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

examples/react/paced-mutations-demo/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @tanstack/db-example-paced-mutations-demo
22

3+
## 0.0.6
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`75470a8`](https://github.com/TanStack/db/commit/75470a8297f316b4817601b2ea92cb9b21cc7829)]:
8+
- @tanstack/db@0.4.19
9+
- @tanstack/react-db@0.1.42
10+
311
## 0.0.5
412

513
### Patch Changes

examples/react/paced-mutations-demo/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-example-paced-mutations-demo",
3-
"version": "0.0.5",
3+
"version": "0.0.6",
44
"private": true,
55
"type": "module",
66
"scripts": {

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.22
4+
5+
### Patch Changes
6+
7+
- Updated dependencies []:
8+
- @tanstack/electric-db-collection@0.1.43
9+
- @tanstack/query-db-collection@0.2.42
10+
- @tanstack/react-db@0.1.42
11+
- @tanstack/trailbase-db-collection@0.1.41
12+
313
## 0.1.21
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.21",
4+
"version": "0.1.22",
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.24
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`75470a8`](https://github.com/TanStack/db/commit/75470a8297f316b4817601b2ea92cb9b21cc7829)]:
8+
- @tanstack/db@0.4.19
9+
310
## 0.1.23
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.23",
4+
"version": "0.1.24",
55
"author": "Ethan McDaniel",
66
"license": "MIT",
77
"repository": {

packages/db/CHANGELOG.md

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

3+
## 0.4.19
4+
5+
### Patch Changes
6+
7+
- Significantly improve localStorage collection performance during rapid mutations ([#760](https://github.com/TanStack/db/pull/760))
8+
9+
Optimizes localStorage collections to eliminate redundant storage reads, providing dramatic performance improvements for use cases with rapid mutations (e.g., text input with live query rendering).
10+
11+
**Performance Improvements:**
12+
- **67% reduction in localStorage I/O operations** - from 3 reads + 1 write per mutation down to just 1 write
13+
- Eliminated 2 JSON parse operations per mutation
14+
- Eliminated 1 full collection diff operation per mutation
15+
- Leverages in-memory cache (`lastKnownData`) instead of reading from storage on every mutation
16+
17+
**What Changed:**
18+
1. **Mutation handlers** now use in-memory cache instead of loading from storage before mutations
19+
2. **Post-mutation sync** eliminated - no longer triggers redundant storage reads after local mutations
20+
3. **Manual transactions** (`acceptMutations`) optimized to use in-memory cache
21+
22+
**Before:** Each mutation performed 3 I/O operations:
23+
- `loadFromStorage()` - read + JSON parse
24+
- Modify data
25+
- `saveToStorage()` - JSON stringify + write
26+
- `processStorageChanges()` - another read + parse + diff
27+
28+
**After:** Each mutation performs 1 I/O operation:
29+
- Modify in-memory data ✨ No I/O!
30+
- `saveToStorage()` - JSON stringify + write
31+
32+
**Safety:**
33+
- Cross-tab synchronization still works correctly via storage event listeners
34+
- All 50 tests pass including 8 new tests specifically for rapid mutations and edge cases
35+
- 92.3% code coverage on local-storage.ts
36+
- `lastKnownData` cache kept in sync with storage through initial load, mutations, and cross-tab events
37+
38+
This optimization is particularly impactful for applications with:
39+
- Real-time text input with live query rendering
40+
- Frequent mutations to localStorage-backed collections
41+
- Multiple rapid sequential mutations
42+
343
## 0.4.18
444

545
### 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.18",
4+
"version": "0.4.19",
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.1.43
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`75470a8`](https://github.com/TanStack/db/commit/75470a8297f316b4817601b2ea92cb9b21cc7829)]:
8+
- @tanstack/db@0.4.19
9+
310
## 0.1.42
411

512
### Patch Changes

0 commit comments

Comments
 (0)