A promise queue with concurrency control, rate-limiting, priority, timeout, and abort support. Current stable version is 8.0.4, a fork of the popular p-queue library modified to support both CommonJS and ESM without the original's ESM-only restriction. Released in lockstep with upstream but may bump minor versions independently. Key differentiators: works in CJS and ESM (unlike p-queue v7+ which is ESM-only), EventEmitter3-based, supports interval-based rate limiting, priority queuing, and AbortSignal cancellation. Useful for rate-limiting async operations like REST API calls or CPU/memory intensive tasks.
npm install p-queue-multiNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a PQueue with concurrency 1 and rate limiting, adds a task with priority, and logs the result.
Use require('p-queue-multi').default instead of require('p-queue-multi') or switch to dynamic import()Upgrade Node.js to version 18 or later
Set throwOnTimeout: true if you want timeout to reject the promise
Always attach .catch() to the promise returned by queue.add()
Pass the signal to your async function and listen for abort events
Set carryoverConcurrencyCount: true if pending tasks should count toward intervalCap
Use const PQueue = require('p-queue-multi').defaultRun npm install p-queue-multi and ensure Node.js >=18
Ensure you're using the PQueue class correctly: const queue = new PQueue()
Add .catch() to queue.add() promise or use try/catch with await
Check if the abort signal is being correctly used and handle the rejection gracefully