Repository navigation
Releases: rhymiz/simple-tasks
Release list
Release 3.0.0
Version 3 validates task payloads at the Redis boundary and waits for worker connections before reporting startup success.
Breaking changes:
- Every task requires a synchronous
parse(value: unknown)function. Enqueue and schedule calls validate the serialized payload; workers validate persisted payloads before calling handlers, and scheduler reads validate template data. - Import
defineTaskfrom@rhymiz/simple-tasks,runAllWorkersfrom@rhymiz/simple-tasks/runtime,closeAllQueuesfrom@rhymiz/simple-tasks/queues, and public types from@rhymiz/simple-tasks/types. runAllWorkers()returns commonTaskWorkerlifecycle handles and rejects if connections fail or exceedstartupTimeoutMs(10 seconds by default). No selected worker starts processing until all connections are ready.
The registry now retains task-specific types through worker factories without casts. Package checks install the npm tarball into a clean consumer and verify both runtime imports and TypeScript contracts.
Validated with BullMQ 5.58.8, 5.81.4, 6.0.0, and 6.3.4: build, typecheck, lint, 23 unit tests, installed package checks, Bun and Node Redis integration, scheduler E2E, and startup timeout/socket cleanup.
Release 2.0.0
Adds BullMQ 6 support and fixes queue routing, scheduler defaults, Node ESM imports, and connection lifecycle handling.
Upgrade requirements
- Requires BullMQ
>=5.58.8 <7. Earlier versions can silently ignore scheduler payload updates. - Resolved task queue names must be unique; ambiguous names and prefixes now throw.
- Invalid Redis ports and worker settings now fail before startup.
- Before upgrading to BullMQ 6, migrate legacy repeatable jobs while still on v5. Replace
repeatenqueues withtask.schedule,debouncewithdeduplication, andutc: truewithtz: 'UTC'. See BullMQ's migration guide.
Fixes and additions
- Published ESM imports resolve correctly in Node.
- Queue and worker configuration accept omitted connections; workers inherit producer connection and Redis key prefix unless explicitly overridden.
- Scheduler templates filter incompatible options from every defaults layer.
- Producer connections open lazily and can be closed with the new
closeAllQueues()export. - Handlers receive the BullMQ lock token and, where supported, cancellation signal.
- Producer retries use bounded defaults; worker startup errors clean up previously created workers.
- Includes the default Redis driver required by fresh BullMQ 6 installations.
Validation
Build, typechecking, lint, 14 unit tests, package imports, and Redis integration passed against BullMQ 5.58.8, 5.81.4, 6.0.0, and 6.3.4 on Bun and Node. CI runs the compatibility matrix before npm publication.