A TypeScript library to run extendable async queues with branching, context mutation, and optional locking scopes. Version 1.1.0 is the latest stable release. It differentiates itself by supporting action branching, runtime context extension, queue locking to prevent concurrent execution of same-scope actions across queues, and error handling per action with recovery. It provides both a QueueRunner (manages multiple queues with shared locking) and a standalone AsyncQueue. The library is ESM-only and ships with TypeScript types.
npm install async-queue-runnerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a queue that increments a value twice, stops if value >= 3, then adds another increment (never executed because queue aborted).
Use import syntax or set type: 'module' in package.json.
Use runner.add([new MyAction(options)]) instead of runner.add([MyAction]).
Use abort() early in execute() to stop future actions.
Provide a non-empty string to lockingClassFactory or any lock-related API.
Wrap predicate logic in try-catch or ensure it never throws.
class MyAction extends Action<Ctx> { ... }Ensure lock scope is a non-empty string, e.g., 'browser'.
import { QueueRunner } from 'async-queue-runner'; const runner = new QueueRunner();Ensure execute receives context with type `Ctx & QueueContext` or includes abort in destructuring.
No dependency data recorded yet.