Registry / testing / fetch-queue

fetch-queue

JSON →
library1.0.3jsnpmunverified

A lightweight, drop-in replacement for the native fetch API that queues HTTP requests to manage concurrency and implement automatic retries. Version 1.0.3 is the current stable release; the project appears to be in maintenance mode with no recent updates since 2021. Unlike generic queue libraries, fetch-queue is purpose-built for fetch and provides a simple API with zero dependencies, supporting custom queues with configurable concurrency, retry counts, retry delays, base URLs, and retryable HTTP status codes. It also offers debugging, queue status checks, and queue destruction. GPLv3 licensed.

testingdevops
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Default import; the package does not ship TypeScript types.

import fetchQueue from 'fetch-queue'

Named import; no subpath exports.

import { debugQueue } from 'fetch-queue'

Named import; CommonJS require possible but discouraged.

import { createQueue } from 'fetch-queue'

Named import, no known wrong pattern.

import { checkQueue } from 'fetch-queue'

Named import, no known wrong pattern.

import { killQueue } from 'fetch-queue'

Named import, no known wrong pattern.

import { destroyQueue } from 'fetch-queue'

Shows drop-in replacement for fetch using default queue with Promise.allSettled.

import fetchQueue from 'fetch-queue' // Default queue: processes requests sequentially (concurrent: 1) with 1 retry Promise.allSettled([ fetchQueue('https://httpbin.org/post', { method: 'POST', body: JSON.stringify({ test: 1 }) }).then(resp => resp.json()), fetchQueue('https://httpbin.org/post', { method: 'POST', body: JSON.stringify({ test: 2 }) }).then(resp => resp.json()) ]).then(results => { console.log('All done', results) }).catch(err => { console.error('Queue error', err) })
Debug
Known footguns
gotchaThe package does not ship TypeScript type definitions; TypeScript users must declare module types themselves.
gotchaThe default queue has concurrent: 1 and retries: 1; many users expect higher concurrency or no retries.
gotchaThe package only works in environments where the global fetch API is available (modern browsers, Node 18+). No polyfill bundled.
gotchadestroyQueue rejects with an error if queue doesn't exist; checkQueue returns undefined for non-existent queues.
deprecatedPackage is licensed under GPLv3, which may be incompatible with proprietary or MIT-licensed projects.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
8 hits · last 30 days
gptbot
3
Resources