NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1643 most downloaded on npm
Promise queue with concurrency control
Last release 2 months ago
22 Jul 2026
Ships unpredictably
gaps range from 2 weeks to 1.1 years
Most releases are documented
notes for 40 of 54 stable releases
2 versions withdrawn
withdrawn after publishing
10 years old
56 releases · first in 2016
Fix rate limiter delaying tasks in a fresh window when intervalCap > 1 89a10bb
Fix per-task timeout validation 9efde42
One column per quarter.
Fix onSizeLessThan() resolving late when the queue drains without a completion d9cf2be
onSizeLessThan() resolving late when the queue drains without a completion d9cf2beAdd timeoutRemaining to runningTasks 57d0a1a
Improve performance ( #244 ) 87077d0
Fix: Export PriorityQueue type ( #242 ) a20e1f3
Fix signal option not rejecting when task is aborted while queued a64b316
signal option not rejecting when task is aborted while queued a64b316
remove() method. See the built-in class.Add strict option for sliding window rate limiting 03b8156
Fix: Remove abort listener when operation completes ( #235 ) e9074f0
Remove throwOnTimeout option - timeouts now always throw e48716f
throwOnTimeout option - timeouts now always throw e48716f
const result = await queue.add(fn).catch(error => {
if (error instanceof TimeoutError) {
return undefined;
}
throw error;
});carryoverConcurrencyCount option to carryoverIntervalCount a6096de
.onError() 7c27e1d.onPendingZero() (#230) 62efb74pendingZero event (#230) 62efb74.runningTasks fad8ee4.isSaturated fad8ee4.onRateLimit() 701453e.onRateLimitCleared() 701453e.isRateLimited 701453erateLimit event 701453erateLimitCleared event 701453eDon't count aborted jobs in intervalCount (#220) 199614e
intervalCount (#220) 199614ehttps://github.com/sindresorhus/p-queue/compare/v8.1.0...v8.1.1
Add `.setPriority()` for updating priority of a queued promise function (#209) 6e5cbc9
.setPriority() for updating priority of a queued promise function (#209) 6e5cbc9https://github.com/sindresorhus/p-queue/compare/v8.0.1...v8.1.0
Fix TypeScript types for when tsconfig exactOptionalPropertyTypes is enabled (#202) ec4e2a3
exactOptionalPropertyTypes is enabled (#202) ec4e2a3https://github.com/sindresorhus/p-queue/compare/v8.0.0...v8.0.1
Removed the AbortError export. It now throws the built-in DOMException when using the signal option. 68dfe95
AbortError export. It now throws the built-in DOMException when using the signal option. 68dfe95DefaultAddOptions type to QueueAddOptionshttps://github.com/sindresorhus/p-queue/compare/v7.4.1...v8.0.0
Fix problem with importing into TypeScript project https://github.com/sindresorhus/p-queue/commit/9f7ad20d55c4e7324762f5624f773f73fa99e76c
https://github.com/sindresorhus/p-queue/compare/v7.4.0...v7.4.1
https://github.com/sindresorhus/p-queue/compare/v7.3.4...v7.4.0
https://github.com/sindresorhus/p-queue/compare/v7.3.4...v7.4.0
https://github.com/sindresorhus/p-queue/compare/v7.3.3...v7.3.4
https://github.com/sindresorhus/p-queue/compare/v7.3.3...v7.3.4
https://github.com/sindresorhus/p-queue/compare/v7.3.2...v7.3.3
https://github.com/sindresorhus/p-queue/compare/v7.3.2...v7.3.3
https://github.com/sindresorhus/p-queue/compare/v7.3.1...v7.3.2
https://github.com/sindresorhus/p-queue/compare/v7.3.1...v7.3.2
Fix .add() and .addAll() 8184655
.add() and .addAll() 8184655https://github.com/sindresorhus/p-queue/compare/v7.3.0...v7.3.1
https://github.com/sindresorhus/p-queue/compare/v7.2.0...v7.3.0
empty event 5362aa7https://github.com/sindresorhus/p-queue/compare/v7.2.0...v7.3.0
Support `AbortController` (#161) 394153f
AbortController (#161) 394153fhttps://github.com/sindresorhus/p-queue/compare/v7.1.0...v7.2.0
https://github.com/sindresorhus/p-queue/compare/v7.0.0...v7.1.0
https://github.com/sindresorhus/p-queue/compare/v7.0.0...v7.1.0
This package is now pure ESM. Please read this.
error & completed events (#130) a176837.onSizeLessThan() helper method (#131) 8d0a356https://github.com/sindresorhus/p-queue/compare/v6.6.2...v7.0.0
Fix obscure unhandled rejection when calling .clear() 933ea23
.clear() 933ea23https://github.com/sindresorhus/p-queue/compare/v6.6.1...v6.6.2
Improve import for VS Code a81be14
https://github.com/sindresorhus/p-queue/compare/v6.6.0...v6.6.1
Add add and next events (#111) edd2e8a
add and next events (#111) edd2e8ahttps://github.com/sindresorhus/p-queue/compare/v6.5.0...v6.6.0
Update to TypeScript 3.9 4b4d2fa b4f2158
https://github.com/sindresorhus/p-queue/compare/v6.4.0...v6.5.0
https://github.com/sindresorhus/p-queue/compare/v6.3.0...v6.4.0
idle event (#109) 54a017bhttps://github.com/sindresorhus/p-queue/compare/v6.3.0...v6.4.0
Add .sizeBy() method to find queue size by priority (#94) a9f5778 If you implement your own queue, you need to implement the filter method to use .siz
.sizeBy() method to find queue size by priority (#94) a9f5778
If you implement your own queue, you need to implement the filter method to use .sizeBy().https://github.com/sindresorhus/p-queue/compare/v6.2.1...v6.3.0
Fix problem with TimeoutError import (#88) db039dd
TimeoutError import (#88) db039ddhttps://github.com/sindresorhus/p-queue/compare/v6.2.0...v6.2.1
Don't include source maps in the package f79384b They were broken anyway and it doesn't have much value for TS as it compiles to readable JS.
https://github.com/sindresorhus/p-queue/compare/v6.1.1...v6.2.0
Fix typo in options logic when adding a task (#81) 90acaf2
https://github.com/sindresorhus/p-queue/compare/v6.1.0...v6.1.1
Add ability to update concurrency (#52) bc75c25
Enhancements:
.start() return the instance (#63) a347a6cFixes:
throwOnTimeout option (#75) 5e3f629https://github.com/sindresorhus/p-queue/compare/v6.0.2...v6.1.0
TypeScript - Properly export interfaces (#72) 6082a01
https://github.com/sindresorhus/p-queue/compare/v6.0.1...v6.0.2
Add missing package.json main field (#69) ed606e8
https://github.com/sindresorhus/p-queue/compare/v6.0.0...v6.0.1
Rewrite in TypeScript (#60) a9d3ad9 Note: This means that CommonJS users needs to import the package using: const {default: pQueue} = require('p-queue
Breaking:
const {default: pQueue} = require('p-queue');Enhancements:
https://github.com/sindresorhus/p-queue/compare/v5.0.0...v6.0.0
Require Node.js 8 https://github.com/sindresorhus/p-queue/commit/7ce42b317f950ca3a97eb9025deb64b63add7ac3
Breaking:
import pQueue from 'p-queue'; to import pQueue = require('p-queue');Use eventemitter3 module instead of Node.js EventEmitter (#58) 3827527 *(It's only a breaking change if you depend on EventEmitter methods that are no…
Breaking:
eventemitter3 module instead of Node.js EventEmitter (#58) 3827527
(It's only a breaking change if you depend on EventEmitter methods that are not available in eventemitter3. Read more)https://github.com/sindresorhus/p-queue/compare/v3.2.0...v4.0.0
Add TypeScript definition (#57) 6e9b998
https://github.com/sindresorhus/p-queue/compare/v3.1.0...v3.2.0
https://github.com/sindresorhus/p-queue/compare/v3.0.0...v3.1.0
active event (#49) 16f3928https://github.com/sindresorhus/p-queue/compare/v3.0.0...v3.1.0
Require Node.js 6 https://github.com/sindresorhus/p-queue/commit/d573a971fa7f7658f2169a8621aeef6fb1099502
Breaking:
Other:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →