Changelog
Version v0.7.0
What’s Changed
Features
- Savepoint support for TransactionHooks — New
withSavepoint(fn)andcreateSavepoint()methods enable partial rollback of buffered side effects (notifications, observability events) within a transaction without discarding the entire transaction’s work. Hook definitions can now provide acheckpointcallback via the new optionalHookDef.checkpointfield. HookDefandTransactionHooksSavepointtypes are now exported from@queuert/core.
Bug Fixes
- Lease renewal scoped to staged mode — Lease renewal after
getJobBlockersno longer runs in atomic/deferred modes where the transaction stays open and renewal is unnecessary. - Error handler transaction rollback — When the error handler’s
runInTransactionfails, prepare and complete transactions are now properly rejected (rolled back) instead of resolved, preventing jobs from being left in inconsistent state. - Default
TJobIdtype corrected —PgStateAdapterandSqliteStateAdaptertype defaults changed fromstringtoUUID, matching actual runtime behavior.
Breaking Changes
StateAdapter.withSavepointis now a required method (previously optional) with a simplified positional signature:withSavepoint(txCtx, fn). Custom state adapter implementations must add this method.- Default
TJobIdgeneric onPgStateAdapterandSqliteStateAdapterchanged fromstringtoUUID. Code relying on the previousstringdefault may see new type errors.
Packages
All packages released at 0.7.0: queuert, @queuert/postgres, @queuert/sqlite, @queuert/redis, @queuert/nats, @queuert/otel, @queuert/dashboard.