Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Nov 3, 2025

This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.

Releases

@tanstack/offline-transactions@0.1.0

Minor Changes

  • Add offline-transactions package with robust offline-first capabilities (#559)

    New package @tanstack/offline-transactions provides a comprehensive offline-first transaction system with:

    Core Features:

    • Persistent outbox pattern for reliable transaction processing
    • Leader election for multi-tab coordination (Web Locks API with BroadcastChannel fallback)
    • Automatic storage capability detection with graceful degradation
    • Retry logic with exponential backoff and jitter
    • Sequential transaction processing (FIFO ordering)

    Storage:

    • Automatic fallback chain: IndexedDB → localStorage → online-only
    • Detects and handles private mode, SecurityError, QuotaExceededError
    • Custom storage adapter support
    • Diagnostic callbacks for storage failures

    Developer Experience:

    • TypeScript-first with full type safety
    • Comprehensive test suite (25 tests covering leader failover, storage failures, e2e scenarios)
    • Works in all modern browsers and server-side rendering environments

    @tanstack/db improvements:

    • Enhanced duplicate instance detection (dev-only, iframe-aware, with escape hatch)
    • Better environment detection for SSR and worker contexts

    Example usage:

    import {
      startOfflineExecutor,
      IndexedDBAdapter,
    } from "@tanstack/offline-transactions"
    
    const executor = startOfflineExecutor({
      collections: { todos: todoCollection },
      storage: new IndexedDBAdapter(),
      mutationFns: {
        syncTodos: async ({ transaction, idempotencyKey }) => {
          // Sync mutations to backend
          await api.sync(transaction.mutations, idempotencyKey)
        },
      },
      onStorageFailure: (diagnostic) => {
        console.warn("Running in online-only mode:", diagnostic.message)
      },
    })
    
    // Create offline transaction
    const tx = executor.createOfflineTransaction({
      mutationFnName: "syncTodos",
      autoCommit: false,
    })
    
    tx.mutate(() => {
      todoCollection.insert({ id: "1", text: "Buy milk", completed: false })
    })
    
    await tx.commit() // Persists to outbox and syncs when online

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

@tanstack/powersync-db-collection@0.1.0

Minor Changes

  • Initial Release (#747)

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

@tanstack/angular-db@0.1.22

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

@tanstack/db@0.4.17

Patch Changes

  • Add offline-transactions package with robust offline-first capabilities (#559)

    New package @tanstack/offline-transactions provides a comprehensive offline-first transaction system with:

    Core Features:

    • Persistent outbox pattern for reliable transaction processing
    • Leader election for multi-tab coordination (Web Locks API with BroadcastChannel fallback)
    • Automatic storage capability detection with graceful degradation
    • Retry logic with exponential backoff and jitter
    • Sequential transaction processing (FIFO ordering)

    Storage:

    • Automatic fallback chain: IndexedDB → localStorage → online-only
    • Detects and handles private mode, SecurityError, QuotaExceededError
    • Custom storage adapter support
    • Diagnostic callbacks for storage failures

    Developer Experience:

    • TypeScript-first with full type safety
    • Comprehensive test suite (25 tests covering leader failover, storage failures, e2e scenarios)
    • Works in all modern browsers and server-side rendering environments

    @tanstack/db improvements:

    • Enhanced duplicate instance detection (dev-only, iframe-aware, with escape hatch)
    • Better environment detection for SSR and worker contexts

    Example usage:

    import {
      startOfflineExecutor,
      IndexedDBAdapter,
    } from "@tanstack/offline-transactions"
    
    const executor = startOfflineExecutor({
      collections: { todos: todoCollection },
      storage: new IndexedDBAdapter(),
      mutationFns: {
        syncTodos: async ({ transaction, idempotencyKey }) => {
          // Sync mutations to backend
          await api.sync(transaction.mutations, idempotencyKey)
        },
      },
      onStorageFailure: (diagnostic) => {
        console.warn("Running in online-only mode:", diagnostic.message)
      },
    })
    
    // Create offline transaction
    const tx = executor.createOfflineTransaction({
      mutationFnName: "syncTodos",
      autoCommit: false,
    })
    
    tx.mutate(() => {
      todoCollection.insert({ id: "1", text: "Buy milk", completed: false })
    })
    
    await tx.commit() // Persists to outbox and syncs when online

@tanstack/electric-db-collection@0.1.41

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

@tanstack/query-db-collection@0.2.40

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

@tanstack/react-db@0.1.39

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

@tanstack/rxdb-db-collection@0.1.28

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

@tanstack/solid-db@0.1.39

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

@tanstack/svelte-db@0.1.39

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

@tanstack/trailbase-db-collection@0.1.39

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

@tanstack/vue-db@0.0.72

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17

@tanstack/db-example-paced-mutations-demo@0.0.3

Patch Changes

  • Updated dependencies [49bcaa5]:
    • @tanstack/db@0.4.17
    • @tanstack/react-db@0.1.39

@tanstack/db-example-react-todo@0.1.19

Patch Changes

  • Updated dependencies []:
    • @tanstack/electric-db-collection@0.1.41
    • @tanstack/query-db-collection@0.2.40
    • @tanstack/react-db@0.1.39
    • @tanstack/trailbase-db-collection@0.1.39

@github-actions github-actions bot force-pushed the changeset-release/main branch from 858d7cb to 0e81045 Compare November 3, 2025 23:35
@KyleAMathews KyleAMathews merged commit e0c4e2d into main Nov 3, 2025
@KyleAMathews KyleAMathews deleted the changeset-release/main branch November 3, 2025 23:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant