Skip to content

v0.15.0

Choose a tag to compare

@coji coji released this 30 Mar 00:28
· 79 commits to main since this release
1b95627

Breaking Changes

@coji/durably

  • trigger() return type changed to TriggerResult: Returns { run, disposition } where disposition is 'created' | 'idempotent' | 'coalesced'. Add coalesce: 'skip' option to reuse an existing pending run instead of throwing. concurrencyKey now enforces max 1 pending run per key (#148)

@coji/durably-react

  • useRunActions() no longer returns isLoading / error: Use React 19 useTransition for per-button pending UI and try/catch for error handling. Peer dependency raised to React 19+ (#179)

Added

@coji/durably

  • waitForRun(runId, options?): Wait for a run to reach terminal state, with timeout, onProgress, onLog callbacks. Uses event-first resolution with storage polling fallback (#151, #169)
  • maxConcurrentRuns option: Enable parallel run processing in the worker. Defaults to 1 (#173)
  • Event classification: Events classified as Domain or Operational with isDomainEvent() type guard (#169)
  • Automatic WAL checkpoint: Periodic WAL checkpoint during idle maintenance for local SQLite backends, preventing unbounded WAL file growth (#181)

@coji/durably-react

  • isTerminal / isActive on run objects and hooks: Derived status booleans replace manual status enumeration (#179)
  • useRuns status array filter: status option accepts RunStatus | RunStatus[] (#154)
  • createJobHooks().useRun() lifecycle callbacks: onStart, onComplete, onFail options (#155)
  • createJobHooks() options forwarding: All hook options forwarded transparently (#179)

Fixed

@coji/durably

  • TypedRun / TypedClientRun output type: Default output type no longer includes undefined, removing unnecessary undefined checks (#145)

See CHANGELOG.md for full details.