Changelog
Version v0.4.0
What’s Changed
Features
- Feature slices: New
mergeJobTypeRegistries()andmergeJobTypeProcessors()utilities for splitting job type definitions and processors into independent feature modules (slices), then merging them at the application level. Duplicate job types are detected at both compile time and runtime. - Cross-slice type safety:
defineJobTypesnow accepts an optionalTExternaltype parameter for compile-time validation of blocker and continueWith references across slice boundaries. - New type exports: Navigation types (
ResolvedJob,ResolvedJobChain,ResolvedJobWithBlockers, etc.), reference types (JobTypeReference,NominalJobTypeReference,StructuralJobTypeReference), and utility types (JobTypeRegistryDefinitions,EntryJobTypeDefinitions,BlockerChains,ContinuationJobs).
Improvements
- Narrowed trace context types:
ObservabilityAdapterandStateAdapterinterfaces now usestring | nullfor trace contexts instead ofunknown, making types more precise and predictable. - Postgres trace context columns changed from
jsonbtotextfor consistency with the narrowed types.
Breaking Changes
- Trace context types narrowed from
unknowntostring | null— affects customObservabilityAdapterandStateAdapterimplementations. - Postgres schema: trace columns changed from
jsonbtotext(migration required). - Navigation types renamed:
JobOf→ResolvedJob,JobChainOf→ResolvedJobChain,ChainJobTypes→ChainJobTypeNames,BlockedJobTypes→BlockedJobTypeNames,HasBlockers→JobTypeHasBlockers. - Handler/callback types renamed:
AttemptHandlerFn→AttemptHandler,PrepareFn→AttemptPrepare,CompleteFn→AttemptComplete,CompleteCallbackOptions→AttemptCompleteOptions,PrepareConfig→AttemptPrepareOptions. - Registry phantom property
$definitionsreplaced with symbol; useJobTypeRegistryDefinitions<T>utility type instead. PartialJobTypeReferencereplaced byJobTypeReferenceunion (NominalJobTypeReference | StructuralJobTypeReference).JobTypeRegistryConfignow requires agetTypeNamescallback.
Packages
All packages released at 0.4.0: queuert, @queuert/postgres, @queuert/sqlite, @queuert/redis, @queuert/nats, @queuert/otel, @queuert/dashboard.