{"id":45974,"library":"queue-async","title":"queue-async (deprecated; renamed d3-queue)","description":"This package has been renamed to d3-queue. It provided an asynchronous queue with configurable concurrency for managing task execution order and parallelism. The latest version is 1.2.1, but no further development occurs. Users should migrate to d3-queue, which is maintained as part of the D3 ecosystem. The original queue-async differs from alternatives like async.queue by offering a simpler API and integration with D3's deferred pattern.","status":"deprecated","version":"1.2.1","language":"javascript","source_language":"en","source_url":"https://github.com/mbostock/queue","tags":["javascript","asynchronous","async","queue"],"install":[{"cmd":"npm install queue-async","lang":"bash","label":"npm"},{"cmd":"yarn add queue-async","lang":"bash","label":"yarn"},{"cmd":"pnpm add queue-async","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"Replace require('queue-async') with import from 'd3-queue'.","wrong":"const queue = require('queue-async')","symbol":"queue","correct":"import { queue } from 'd3-queue'"},{"note":"CommonJS users should update to require('d3-queue') and destructure queue.","wrong":"const queue = require('queue-async')","symbol":"queue","correct":"const { queue } = require('d3-queue')"},{"note":"The default export is now from 'd3-queue'.","wrong":"import queue from 'queue-async'","symbol":"default export","correct":"import queue from 'd3-queue'"}],"quickstart":{"code":"const { queue } = require('d3-queue');\nconst q = queue(4); // concurrency 4\nq.defer(fetch, 'https://api.example.com/user1');\nq.defer(fetch, 'https://api.example.com/user2');\nq.awaitAll((error, results) => {\n  if (error) throw error;\n  console.log(results);\n});","lang":"javascript","description":"Demonstrates migrating from queue-async to d3-queue with concurrency control and async task deferral."},"warnings":[{"fix":"Replace all imports/requires from 'queue-async' with 'd3-queue'.","message":"'queue-async' is deprecated; use 'd3-queue' instead.","severity":"deprecated","affected_versions":">=1.0.0"},{"fix":"Update package.json and source imports.","message":"The function signature for defer and awaitAll remains identical, but the package name has changed.","severity":"gotcha","affected_versions":">=1.0.0"}],"env_vars":null,"search_vec":"'1.2.1':37 'altern':66 'api':73 'async':3,63,83 'async.queue':68 'asynchron':21,82 'concurr':25 'configur':24 'd3':7,16,48,57,77 'd3-queue':6,15,47 'defer':79 'deprec':4 'develop':41 'differ':64 'ecosystem':58 'execut':29 'integr':75 'javascript':81 'latest':34 'like':67 'maintain':52 'manag':27 'migrat':45 'occur':42 'offer':70 'order':30 'origin':60 'packag':10 'parallel':32 'part':54 'pattern':80 'provid':19 'queue':2,8,17,22,49,62,84 'queue-async':1,61 'renam':5,13 'simpler':72 'task':28 'user':43 'version':35","created_at":"2026-06-07T12:57:39.539109+00:00","updated_at":"2026-06-07T12:57:39.539109+00:00","problems":[{"fix":"Run 'npm install d3-queue' and update imports to 'd3-queue'.","cause":"Package renamed to d3-queue; old package not installed.","error":"Error: Cannot find module 'queue-async'"},{"fix":"Use named import: import { queue } from 'd3-queue'.","cause":"Incorrect import: using default import from 'queue-async' after switching to 'd3-queue'.","error":"TypeError: queue is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/mbostock/queue","github":"https://github.com/mbostock/queue","docs":null,"changelog":null,"pypi":null,"npm":"queue-async","openapi_spec":null,"status_page":null,"smithery":null,"categories":["devops"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}