Releases: sindresorhus/p-queue
Releases · sindresorhus/p-queue
v9.0.0
Breaking
- Require Node.js 20 b2600d5
- Remove
throwOnTimeout
option - timeouts now always throw e48716f- It was a mistake to not throw on timeouts and the option made it complicated to handle types.
- If you really need the old behavior back:
const result = await queue.add(fn).catch(error => { if (error instanceof TimeoutError) { return undefined; } throw error; });
Improvements
- Rename
carryoverConcurrencyCount
option tocarryoverIntervalCount
a6096de- The old name still works, but will be removed in the next major version.
- Add
.onError()
7c27e1d - Add
.onPendingZero()
(#230) 62efb74 - Add
pendingZero
event (#230) 62efb74 - Add
.runningTasks
fad8ee4 - Add
.isSaturated
fad8ee4 - Add
.onRateLimit()
701453e - Add
.onRateLimitCleared()
701453e - Add
.isRateLimited
701453e - Add
rateLimit
event 701453e - Add
rateLimitCleared
event 701453e
Fixes
- Fix stack overflow with many aborted tasks 81cbae2
- Fix interval cap race condition with high concurrency 7fea658
- Fix interval timing when queue becomes empty between task additions 7b3f53e
- Fix priority default handling for undefined values 439d512
v8.1.1
v8.1.0
- Add
.setPriority()
for updating priority of a queued promise function (#209) 6e5cbc9
v8.0.1
v8.0.0
v7.4.1
- Fix problem with importing into TypeScript project 9f7ad20
v7.4.0
- Update dependencies f216e33