Repository navigation
-
(major)
Simplified the public API:- Breaking: removed the
pendingproperty from the queue handle. ReadgetState().pendinginstead. - Breaking: renamed the exported
RateFailureOutcometype toFailureOutcome, since bothrateOutcomeClassifierandretryClassifierreceive it. - Fire-and-forget callbacks may now return any value, so
throttle(() => fetch(url))type-checks. Onlyfalsestill counts as a failure.
- Breaking: removed the
-
(minor)
Ships a TanStack Intent agent skill,configure-throttled-queue, in the package. It teaches coding agents how to pick start rates versusconcurrency, classify failures for the adaptive rate and for retries, usecooldownFor,submit()handles and cancellation, and thepause/resume/stop/abortlifecycle. Load it withnpx @tanstack/intent load dynamic-throttled-queue#configure-throttled-queue. -
(minor)
Added a terminal"failed"lifecycle state: whenrateStrategythrows or returns a malformed decision, the queue discards pending work, reportsstate: "failed", and rejectswaitForIdle()with the strategy error. Fixedabort()leavingwaitForIdle()pending when no callback was active. -
(minor)
AddedcooldownFor(delay)and themaxCooldownoption: a server-directed cooldown that holds new starts without pausing the queue, suspends rate decisions while still counting failures, and is reported bygetState()ascooldownRemaining,cooldownsandcooldownTotal. -
(minor)
Addedsubmit(), which returns a per-item{ result, cancel }handle that settles exactly once on final success, final failure, cancellation,abort(), or strategy failure; callbacks now also receive their one-basedattemptnumber, andgetState()reportscanceled. -
(patch)
Moved@varlock/bumpyfromdependenciestodevDependencies, so installing the library no longer installs the release CLI. -
(patch)
FixedgetState().startedcounting phantom starts when a callback callsabort()partway through a batch. Internally, the queue, delayed retries, capacity reservations and idle notification moved behind one pending-work module. -
(patch)
Fixed settled adjustment timing to match the README: the window collected right after a backoff now holds the rate steady, empty collection intervals no longer produce a rate decision, and a backoff that ends with nothing queued no longer stops later callbacks from starting. -
(patch)
Fixed two timers that kept an idle queue alive. Canceling the last queued item while everyconcurrencyslot was busy left the interval rate tick running forever: it kept the Node.js process alive, kept callingrateStrategy, and made the next enqueue start its callback synchronously.cooldownFor()armed its expiry timer even with nothing queued, so a script that honoured aRetry-Afteron its last response stayed alive for the whole delay afterwaitForIdle()resolved. The cooldown timer is now armed only while work is queued; the deadline andcooldownRemainingare unchanged. -
(patch)
Fixednpm install dynamic-throttled-queuefailing withonly-allow: command not found. The published package ran the repository'spreinstallguard in every consumer project; that script is removed. -
(patch)
createThrottledQueuenow rejects an unknownretryBackoff.strategywithretryBackoff.strategy must be fixed, linear, or exponential. Before, it silently used the fixed delay. Internally, retry validation, the retry budget, the retry classifier and the backoff delay moved into one retry-policy module.
Published to
- ✅ npm