bunqueue v2.8.4
Fixes 5 bugs. Failed jobs were not enumerable on the storage path.
To install bunqueue v2.8.4
Section titled “To install bunqueue v2.8.4”bun add bunqueue@2.8.4npm install bunqueue@2.8.4To upgrade bunqueue
Section titled “To upgrade bunqueue”bun add bunqueue@latestBugfixes
Section titled “Bugfixes”Two ways the counts and the per-state lists could disagree:
-
Failed jobs were not enumerable on the storage path. A job that exhausts its attempts is moved to the
dlqtable and itsjobsrow is removed, sogetJobs({ state: 'failed' })/getFailedAsync()ranSELECT … FROM jobs WHERE state='failed'and came back empty, even thoughfailedcounted it,getJobState()returned'failed', andgetJob(id)found it (standalone server, and embedded with adataPath). The storage path now also reads the DLQ for'failed', mirroring the in-memory path. The unfilteredgetJobs()likewise includes failed jobs. -
pause()double-counted. A single ready job was reported under bothwaitingandpaused, whilegetJobs({ state: 'paused' })returned[]. Now follows BullMQ semantics: a paused queue reports its ready jobs (waiting and prioritized) underpaused, withwaiting: 0/prioritized: 0, and lists them viagetJobs({ state: 'paused' }). A job is never counted in two buckets at once. Applied consistently across the client SDK, the TCPGetJobCountshandler, and the dashboard detail endpoint (which also gains apausedjob list).
Also fixed a pagination defect surfaced by the DLQ merge: offset-unaware sources (DLQ, paused/waiting-children views) are now gathered from index 0, merged, and sliced once, so paged queries no longer duplicate or drop rows.
Behavior change: getJobCounts() on a paused queue previously returned the waiting
count under both waiting and paused; it now returns waiting: 0, paused: N. The
monitoring aggregate getStats() (and /stats / Prometheus) keeps reporting physical
counts and is unaffected.
Bugfixes
Section titled “Bugfixes”package.json declared engines.node >= 18, but the client cannot run on Node: the
published ESM uses directory/extensionless specifiers (Node’s resolver rejects them with
ERR_UNSUPPORTED_DIR_IMPORT) and the TCP transport relies on Bun globals (Bun.connect,
Bun.file, Bun.hash, …) with no Node fallback.
- Dropped
nodefromengines(nowbun >= 1.3.9only). - Added a
"bun"export condition (the real entry) and a"node"condition pointing at a single self-contained stub on every subpath (.,./client,./queue,./mcp,./workflow). Importing from Node now fails fast with a clear “bunqueue is Bun-only…” error instead of a cryptic resolver crash; Bun resolves the real entry unchanged. - Added a runtime guard for the bundled path (browser/neutral-target bundle run on Node).
Thanks to 1 contributor!
Section titled “Thanks to 1 contributor!”← bunqueue v2.8.3 · Release on GitHub · Commits since v2.8.3 · Full changelog · All posts