Skip to content

Commit e0c4e2d

Browse files
ci: Version Packages (#751)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 49bcaa5 commit e0c4e2d

File tree

30 files changed

+242
-88
lines changed

30 files changed

+242
-88
lines changed

.changeset/dark-items-dig.md

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

.changeset/offline-transactions-initial.md

Lines changed: 0 additions & 69 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.3
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`49bcaa5`](https://github.com/TanStack/db/commit/49bcaa5557ba8d647c947811ed6e0c2450159d84)]:
8+
- @tanstack/db@0.4.17
9+
- @tanstack/react-db@0.1.39
10+
311
## 0.0.2
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.2",
3+
"version": "0.0.3",
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.19
4+
5+
### Patch Changes
6+
7+
- Updated dependencies []:
8+
- @tanstack/electric-db-collection@0.1.41
9+
- @tanstack/query-db-collection@0.2.40
10+
- @tanstack/react-db@0.1.39
11+
- @tanstack/trailbase-db-collection@0.1.39
12+
313
## 0.1.18
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.18",
4+
"version": "0.1.19",
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.22
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`49bcaa5`](https://github.com/TanStack/db/commit/49bcaa5557ba8d647c947811ed6e0c2450159d84)]:
8+
- @tanstack/db@0.4.17
9+
310
## 0.1.21
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.21",
4+
"version": "0.1.22",
55
"author": "Ethan McDaniel",
66
"license": "MIT",
77
"repository": {

packages/db/CHANGELOG.md

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

3+
## 0.4.17
4+
5+
### Patch Changes
6+
7+
- Add offline-transactions package with robust offline-first capabilities ([#559](https://github.com/TanStack/db/pull/559))
8+
9+
New package `@tanstack/offline-transactions` provides a comprehensive offline-first transaction system with:
10+
11+
**Core Features:**
12+
- Persistent outbox pattern for reliable transaction processing
13+
- Leader election for multi-tab coordination (Web Locks API with BroadcastChannel fallback)
14+
- Automatic storage capability detection with graceful degradation
15+
- Retry logic with exponential backoff and jitter
16+
- Sequential transaction processing (FIFO ordering)
17+
18+
**Storage:**
19+
- Automatic fallback chain: IndexedDB → localStorage → online-only
20+
- Detects and handles private mode, SecurityError, QuotaExceededError
21+
- Custom storage adapter support
22+
- Diagnostic callbacks for storage failures
23+
24+
**Developer Experience:**
25+
- TypeScript-first with full type safety
26+
- Comprehensive test suite (25 tests covering leader failover, storage failures, e2e scenarios)
27+
- Works in all modern browsers and server-side rendering environments
28+
29+
**@tanstack/db improvements:**
30+
- Enhanced duplicate instance detection (dev-only, iframe-aware, with escape hatch)
31+
- Better environment detection for SSR and worker contexts
32+
33+
Example usage:
34+
35+
```typescript
36+
import {
37+
startOfflineExecutor,
38+
IndexedDBAdapter,
39+
} from "@tanstack/offline-transactions"
40+
41+
const executor = startOfflineExecutor({
42+
collections: { todos: todoCollection },
43+
storage: new IndexedDBAdapter(),
44+
mutationFns: {
45+
syncTodos: async ({ transaction, idempotencyKey }) => {
46+
// Sync mutations to backend
47+
await api.sync(transaction.mutations, idempotencyKey)
48+
},
49+
},
50+
onStorageFailure: (diagnostic) => {
51+
console.warn("Running in online-only mode:", diagnostic.message)
52+
},
53+
})
54+
55+
// Create offline transaction
56+
const tx = executor.createOfflineTransaction({
57+
mutationFnName: "syncTodos",
58+
autoCommit: false,
59+
})
60+
61+
tx.mutate(() => {
62+
todoCollection.insert({ id: "1", text: "Buy milk", completed: false })
63+
})
64+
65+
await tx.commit() // Persists to outbox and syncs when online
66+
```
67+
368
## 0.4.16
469

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

0 commit comments

Comments
 (0)