bunqueue v2.8.58
blog · release
bunqueue v2.8.58
Fixes 4 bugs. Queue now releases its constructor-owned shared TCP pool reference exactly once, so duplicate close() calls and disconnect() followed by close() cannot break unrelated Queue instances.
To install bunqueue v2.8.58
Section titled “To install bunqueue v2.8.58”bun add bunqueue@2.8.58npm install bunqueue@2.8.58To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestRemoved
Section titled “Removed”- Removed StrykerJS from the TypeScript SDK — mutation job, config, script,
dev dependency and the
qsoverride it needed. Its dependency graph produced every finding the weekly advisory gate reported (qsviatyped-rest-client, thenfast-uriviaajv), none of it reachable from the published client. The planners keep their fast-check coverage and the other five SDKs still run mutation. The dev dependency tree drops from 163 packages to 10 with a cleanbun audit.
Bugfixes
Section titled “Bugfixes”- Queue now releases its constructor-owned shared TCP pool reference exactly
once, so duplicate
close()calls anddisconnect()followed byclose()cannot break unrelated Queue instances. Worker shutdown is also monotonic: stalerun()orresume()callbacks are ignored afterclose()begins and cannot process another batch during teardown. - Made graceful cancellation, priority aging, scheduled S3 backups, and Cloud
Agent timers lifecycle-safe. Repeated starts/cancels now retain a single
owned handle, cleanup cannot leave an orphan generation behind, and stale
queued callbacks cannot resume work after stop. Existing cancellation timing
remains earliest-deadline-wins; synchronous processor and middleware throws
also release their exact cancellation generation, including when a user
circuit-breaker hook throws during outcome notification. In-process retry
now handles synchronous throws identically to rejected Promises, and
cancellation or
close()clears an armed backoff so processing cannot resume after shutdown. Circuit-breaker destruction is now terminal, so a retry rejected during shutdown cannot rearm its reset timer; explicit cancellation keeps its existing cooperative success/failure outcome behavior. - Fixed #113: Worker poll wake-ups are now coalesced into one earliest-deadline timer. A later backoff cannot postpone a wake-up that was already due sooner. Completed jobs no longer leave self-perpetuating timer chains that make idle CPU grow with the processed-job count, and pause/close clear the same timer ownership state.
- Embedded Queue, Worker, and QueueEvents construction now fails synchronously
when an explicit
dataPathconflicts with the process-wide QueueManager’s active database. Paths are canonicalized so equivalent relative, absolute, and symlink spellings remain compatible; omitted paths continue to join the active manager. This preventsdurable: truejobs from being accepted into memory after an earlier client initialized the singleton without storage.