From 049b8912f2a888aa8be2248c73b3421fa3da186e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Mon, 1 Jun 2020 16:41:23 +0200 Subject: [PATCH 1/2] add deprecation notice link to d3@4 which is the last version including d3-queue the byte size of d3-queue@2 is not relevant anymore --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 975cfaf..bd55ac3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,8 @@ # d3-queue -A **queue** evaluates zero or more *deferred* asynchronous tasks with configurable concurrency: you control how many tasks run at the same time. When all the tasks complete, or an error occurs, the queue passes the results to your *await* callback. This library is similar to [Async.js](https://github.com/caolan/async)’s [parallel](https://github.com/caolan/async#paralleltasks-callback) (when *concurrency* is infinite), [series](https://github.com/caolan/async#seriestasks-callback) (when *concurrency* is 1), and [queue](https://github.com/caolan/async#queue), but features a much smaller footprint: as of release 2, d3-queue is about 700 bytes gzipped, compared to 4,300 for Async. +**Deprecation notice**: Consider using the native [Promise.all](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all) instead. + +A **queue** evaluates zero or more *deferred* asynchronous tasks with configurable concurrency: you control how many tasks run at the same time. When all the tasks complete, or an error occurs, the queue passes the results to your *await* callback. This library is similar to [Async.js](https://github.com/caolan/async)’s [parallel](https://github.com/caolan/async#paralleltasks-callback) (when *concurrency* is infinite), [series](https://github.com/caolan/async#seriestasks-callback) (when *concurrency* is 1), and [queue](https://github.com/caolan/async#queue), but features a smaller footprint. Each task is defined as a function that takes a callback as its last argument. For example, here’s a task that says hello after a short delay: @@ -111,7 +113,7 @@ To abort these requests, call `q.abort()`. ## Installing -If you use NPM, `npm install d3-queue`. If you use Bower, `bower install d3-queue`. Otherwise, download the [latest release](https://github.com/d3/d3-queue/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-queue.v3.min.js) or as part of [D3 4.0](https://github.com/d3/d3). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: +If you use NPM, `npm install d3-queue`. If you use Bower, `bower install d3-queue`. Otherwise, download the [latest release](https://github.com/d3/d3-queue/releases/latest). You can also load directly from [d3js.org](https://d3js.org), either as a [standalone library](https://d3js.org/d3-queue.v3.min.js) or as part of [D3 4.0](https://github.com/d3/d3/releases/tag/v4.13.0). AMD, CommonJS, and vanilla environments are supported. In vanilla, a `d3` global is exported: ```html @@ -122,7 +124,6 @@ var q = d3.queue(); ``` -[Try d3-queue in your browser.](https://tonicdev.com/npm/d3-queue) ## API Reference From 66157ce032001311d16d45fc637060cfafb7b3c5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philippe=20Rivi=C3=A8re?= Date: Mon, 1 Jun 2020 18:11:44 +0200 Subject: [PATCH 2/2] wording & link to p-queue --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index bd55ac3..cc0d6d2 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # d3-queue -**Deprecation notice**: Consider using the native [Promise.all](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all) instead. +**Deprecation notice**: Now that D3 uses Promises rather than callbacks (see [d3-fetch](https://github.com/d3/d3-fetch)), this library is no longer needed. Use [Promise.all](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise/all) instead, or [p-queue](https://github.com/sindresorhus/p-queue) if you need configurable concurrency. A **queue** evaluates zero or more *deferred* asynchronous tasks with configurable concurrency: you control how many tasks run at the same time. When all the tasks complete, or an error occurs, the queue passes the results to your *await* callback. This library is similar to [Async.js](https://github.com/caolan/async)’s [parallel](https://github.com/caolan/async#paralleltasks-callback) (when *concurrency* is infinite), [series](https://github.com/caolan/async#seriestasks-callback) (when *concurrency* is 1), and [queue](https://github.com/caolan/async#queue), but features a smaller footprint.