Repository: caolan/async
Pull request #1824 (2022-03-01 15:06:34)

Bump @babel/eslint-parser from 7.16.5 to 7.17.0
Bumps [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) from 7.16.5 to 7.17.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/babel/babel/releases"><code>@​babel/eslint-parser</code>'s releases</a>.</em></p>
<blockquote>
<h2>v7.17.0 (2022-02-02)</h2>
<p>Thanks <a href="https://github.com/atti187"><code>@​atti187</code></a> and <a href="https://github.com/phulin"><code>@​phulin</code></a> for your first PRs!</p>
<h4>:rocket: New Feature</h4>
<ul>
<li><code>babel-cli</code>, <code>babel-core</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14065">#14065</a> Allow plugins/presets to indicate external dependencies (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-core</code>, <code>babel-parser</code>, <code>babel-traverse</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14174">#14174</a> Expose <code>.index</code> on Position to internally track nodes location (<a href="https://github.com/tolmasky"><code>@​tolmasky</code></a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-parser</code>, <code>babel-plugin-proposal-pipeline-operator</code>, <code>babel-plugin-syntax-pipeline-operator</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/13973">#13973</a> proposal-pipe: Add support for <code>^^</code> and <code>@@</code> topics (<a href="https://github.com/js-choi"><code>@​js-choi</code></a>)</li>
</ul>
</li>
<li><code>babel-traverse</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/13940">#13940</a> Add new method to check if node is null or not (<a href="https://github.com/danez"><code>@​danez</code></a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-parser</code>, <code>babel-plugin-syntax-destructuring-private</code>, <code>babel-standalone</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/13931">#13931</a> Parse destructuring private fields (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-helper-create-class-features-plugin</code>, <code>babel-helpers</code>, <code>babel-plugin-proposal-decorators</code>, <code>babel-plugin-syntax-decorators</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>, <code>babel-standalone</code>, <code>babel-types</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14004">#14004</a> Add new decorators transform (<a href="https://github.com/pzuraq"><code>@​pzuraq</code></a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-parser</code>, <code>babel-traverse</code>, <code>babel-types</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/13681">#13681</a> Add the <code>decoratorsAutoAccessors</code> parser plugin (<a href="https://github.com/pzuraq"><code>@​pzuraq</code></a>)</li>
</ul>
</li>
<li><code>babel-core</code>, <code>babel-helper-create-regexp-features-plugin</code>, <code>babel-plugin-proposal-unicode-sets-regex</code>, <code>babel-plugin-syntax-unicode-sets-regex</code>, <code>babel-plugin-transform-dotall-regex</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14125">#14125</a> Add transform support for the &quot;regexp unicode sets&quot; proposal (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14086">#14086</a> Add parser support for the &quot;regexp unicode sets&quot; proposal (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-register</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14087">#14087</a> Expose <code>@babel/register/experimental-worker</code> (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>:bug: Bug Fix</h4>
<ul>
<li><code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14145">#14145</a> Reinterpret &lt;&lt; when parsing TS type arguments (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-runtime</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14187">#14187</a> Normalize absolute paths on Windows (<a href="https://github.com/atti187"><code>@​atti187</code></a>)</li>
</ul>
</li>
</ul>
<h4>:memo: Documentation</h4>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14223">#14223</a> Remove Babel 6 from SECURITY.md (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
<h4>:house: Internal</h4>
<ul>
<li><code>babel-helper-fixtures</code>, <code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14201">#14201</a> Fuzz test location-related parser options (<a href="https://github.com/tolmasky"><code>@​tolmasky</code></a>)</li>
</ul>
</li>
<li><code>babel-compat-data</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14208">#14208</a> Update compat data (specifically for rhino 1.7.14) (<a href="https://github.com/phulin"><code>@​phulin</code></a>)</li>
</ul>
</li>
<li>Other
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14190">#14190</a> chore: run tscheck on babel 8 breaking test (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
</ul>
<h4>:running_woman: Performance</h4>
<ul>
<li><code>babel-cli</code>, <code>babel-core</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14209">#14209</a> Switch to <code>@ampproject/remapping</code> to merge source maps (<a href="https://github.com/jridgewell"><code>@​jridgewell</code></a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 10</h4>
<ul>
<li>Chris Garrett (<a href="https://github.com/pzuraq"><code>@​pzuraq</code></a>)</li>
<li>Daniel Tschinder (<a href="https://github.com/danez"><code>@​danez</code></a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/babel/babel/blob/main/CHANGELOG.md"><code>@​babel/eslint-parser</code>'s changelog</a>.</em></p>
<blockquote>
<h2>v7.17.0 (2022-02-02)</h2>
<h4>:rocket: New Feature</h4>
<ul>
<li><code>babel-cli</code>, <code>babel-core</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14065">#14065</a> Allow plugins/presets to indicate external dependencies (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-core</code>, <code>babel-parser</code>, <code>babel-traverse</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14174">#14174</a> Expose <code>.index</code> on Position to internally track nodes location (<a href="https://github.com/tolmasky"><code>@​tolmasky</code></a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-parser</code>, <code>babel-plugin-proposal-pipeline-operator</code>, <code>babel-plugin-syntax-pipeline-operator</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/13973">#13973</a> proposal-pipe: Add support for <code>^^</code> and <code>@@</code> topics (<a href="https://github.com/js-choi"><code>@​js-choi</code></a>)</li>
</ul>
</li>
<li><code>babel-traverse</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/13940">#13940</a> Add new method to check if node is null or not (<a href="https://github.com/danez"><code>@​danez</code></a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-parser</code>, <code>babel-plugin-syntax-destructuring-private</code>, <code>babel-standalone</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/13931">#13931</a> Parse destructuring private fields (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-helper-create-class-features-plugin</code>, <code>babel-helpers</code>, <code>babel-plugin-proposal-decorators</code>, <code>babel-plugin-syntax-decorators</code>, <code>babel-runtime-corejs2</code>, <code>babel-runtime-corejs3</code>, <code>babel-runtime</code>, <code>babel-standalone</code>, <code>babel-types</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14004">#14004</a> Add new decorators transform (<a href="https://github.com/pzuraq"><code>@​pzuraq</code></a>)</li>
</ul>
</li>
<li><code>babel-generator</code>, <code>babel-parser</code>, <code>babel-traverse</code>, <code>babel-types</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/13681">#13681</a> Add the <code>decoratorsAutoAccessors</code> parser plugin (<a href="https://github.com/pzuraq"><code>@​pzuraq</code></a>)</li>
</ul>
</li>
<li><code>babel-core</code>, <code>babel-helper-create-regexp-features-plugin</code>, <code>babel-plugin-proposal-unicode-sets-regex</code>, <code>babel-plugin-syntax-unicode-sets-regex</code>, <code>babel-plugin-transform-dotall-regex</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14125">#14125</a> Add transform support for the &quot;regexp unicode sets&quot; proposal (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14086">#14086</a> Add parser support for the &quot;regexp unicode sets&quot; proposal (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-register</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14087">#14087</a> Expose <code>@babel/register/experimental-worker</code> (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>:bug: Bug Fix</h4>
<ul>
<li><code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14145">#14145</a> Reinterpret &lt;&lt; when parsing TS type arguments (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-runtime</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14187">#14187</a> Normalize absolute paths on Windows (<a href="https://github.com/atti187"><code>@​atti187</code></a>)</li>
</ul>
</li>
</ul>
<h4>:memo: Documentation</h4>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14223">#14223</a> Remove Babel 6 from SECURITY.md (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
<h4>:house: Internal</h4>
<ul>
<li><code>babel-helper-fixtures</code>, <code>babel-parser</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14201">#14201</a> Fuzz test location-related parser options (<a href="https://github.com/tolmasky"><code>@​tolmasky</code></a>)</li>
</ul>
</li>
<li><code>babel-compat-data</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14208">#14208</a> Update compat data (specifically for rhino 1.7.14) (<a href="https://github.com/phulin"><code>@​phulin</code></a>)</li>
</ul>
</li>
<li>Other
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14190">#14190</a> chore: run tscheck on babel 8 breaking test (<a href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
</ul>
<h4>:running_woman: Performance</h4>
<ul>
<li><code>babel-cli</code>, <code>babel-core</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14209">#14209</a> Switch to <code>@ampproject/remapping</code> to merge source maps (<a href="https://github.com/jridgewell"><code>@​jridgewell</code></a>)</li>
</ul>
</li>
</ul>
<h2>v7.16.12 (2022-01-22)</h2>
<h4>:bug: Bug Fix</h4>
<ul>
<li><code>babel-core</code>
<ul>
<li><a href="https://github-redirect.dependabot.com/babel/babel/pull/14192">#14192</a> Avoid dynamic import when it's not needed (<a href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/babel/babel/commit/38c23cded40af3ccc8d2c39dbe165e9b446e55a3"><code>38c23cd</code></a> v7.17.0</li>
<li><a href="https://github.com/babel/babel/commit/df27d542ef3871c342b085e41206d21a86673c1d"><code>df27d54</code></a> proposal-pipe: Add support for <code>^^</code> and <code>@@</code> topics (<a href="https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser/issues/13973">#13973</a>)</li>
<li>See full diff in <a href="https://github.com/babel/babel/commits/v7.17.0/eslint/babel-eslint-parser">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=@babel/eslint-parser&package-manager=npm_and_yarn&previous-version=7.16.5&new-version=7.17.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>


Patch:
diff --git a/lib/internal/queue.js b/lib/internal/queue.js
index 886fe7a..75712c2 100644
--- a/lib/internal/queue.js
+++ b/lib/internal/queue.js
@@ -60,12 +60,11 @@ export default function queue(worker, concurrency, payload) {
             res(args)
         }
 
-        var item = {
+        var item = q._createTaskItem(
             data,
-            callback: rejectOnError ?
-                promiseCallback :
+            rejectOnError ? promiseCallback :
                 (callback || promiseCallback)
-        };
+        );
 
         if (insertAtFront) {
             q._tasks.unshift(item);
@@ -147,6 +146,12 @@ export default function queue(worker, concurrency, payload) {
     var isProcessing = false;
     var q = {
         _tasks: new DLL(),
+        _createTaskItem (data, callback) {
+            return {
+                data,
+                callback
+            };
+        },
         *[Symbol.iterator] () {
             yield* q._tasks[Symbol.iterator]()
         },
diff --git a/lib/priorityQueue.js b/lib/priorityQueue.js
index 53ea017..e418e48 100644
--- a/lib/priorityQueue.js
+++ b/lib/priorityQueue.js
@@ -1,4 +1,3 @@
-import setImmediate from './setImmediate.js'
 import queue from './queue.js'
 import Heap from './internal/Heap.js'
 
@@ -19,54 +18,51 @@ import Heap from './internal/Heap.js'
  * @param {number} concurrency - An `integer` for determining how many `worker`
  * functions should be run in parallel.  If omitted, the concurrency defaults to
  * `1`.  If the concurrency is `0`, an error is thrown.
- * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are two
+ * @returns {module:ControlFlow.QueueObject} A priorityQueue object to manage the tasks. There are three
  * differences between `queue` and `priorityQueue` objects:
  * * `push(task, priority, [callback])` - `priority` should be a number. If an
  *   array of `tasks` is given, all tasks will be assigned the same priority.
- * * The `unshift` method was removed.
+ * * `pushAsync(task, priority, [callback])` - the same as `priorityQueue.push`,
+ *   except this returns a promise that rejects if an error occurs.
+ * * The `unshift` and `unshiftAsync` methods were removed.
  */
 export default function(worker, concurrency) {
     // Start with a normal queue
     var q = queue(worker, concurrency);
-    var processingScheduled = false;
+
+    var {
+        push,
+        pushAsync
+    } = q;
 
     q._tasks = new Heap();
+    q._createTaskItem = ({data, priority}, callback) => {
+        return {
+            data,
+            priority,
+            callback
+        };
+    };
 
-    // Override push to accept second parameter representing priority
-    q.push = function(data, priority = 0, callback = () => {}) {
-        if (typeof callback !== 'function') {
-            throw new Error('task callback must be a function');
-        }
-        q.started = true;
-        if (!Array.isArray(data)) {
-            data = [data];
-        }
-        if (data.length === 0 && q.idle()) {
-            // call drain immediately if there are no tasks
-            return setImmediate(() => q.drain());
+    function createDataItems(tasks, priority) {
+        if (!Array.isArray(tasks)) {
+            return {data: tasks, priority};
         }
+        return tasks.map(data => { return {data, priority}; });
+    }
 
-        for (var i = 0, l = data.length; i < l; i++) {
-            var item = {
-                data: data[i],
-                priority,
-                callback
-            };
-
-            q._tasks.push(item);
-        }
+    // Override push to accept second parameter representing priority
+    q.push = function(data, priority = 0, callback) {
+        return push(createDataItems(data, priority), callback);
+    };
 
-        if (!processingScheduled) {
-            processingScheduled = true;
-            setImmediate(() => {
-                processingScheduled = false;
-                q.process();
-            });
-        }
+    q.pushAsync = function(data, priority = 0, callback) {
+        return pushAsync(createDataItems(data, priority), callback);
     };
 
-    // Remove unshift function
+    // Remove unshift functions
     delete q.unshift;
+    delete q.unshiftAsync;
 
     return q;
 }
diff --git a/package-lock.json b/package-lock.json
index 52e3e5a..cd1c4b0 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -287,9 +287,9 @@
       }
     },
     "node_modules/@babel/eslint-parser": {
-      "version": "7.16.5",
-      "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.16.5.tgz",
-      "integrity": "sha512-mUqYa46lgWqHKQ33Q6LNCGp/wPR3eqOYTUixHFsfrSQqRxH0+WOzca75iEjFr5RDGH1dDz622LaHhLOzOuQRUA==",
+      "version": "7.17.0",
+      "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.17.0.tgz",
+      "integrity": "sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==",
       "dev": true,
       "dependencies": {
         "eslint-scope": "^5.1.1",
@@ -886,17 +886,26 @@
         "node": ">=6.0.0"
       }
     },
+    "node_modules/@colors/colors": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",
+      "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==",
+      "dev": true,
+      "engines": {
+        "node": ">=0.1.90"
+      }
+    },
     "node_modules/@eslint/eslintrc": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz",
-      "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==",
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz",
+      "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==",
       "dev": true,
       "dependencies": {
         "ajv": "^6.12.4",
         "debug": "^4.3.2",
-        "espree": "^9.2.0",
+        "espree": "^9.3.1",
         "globals": "^13.9.0",
-        "ignore": "^4.0.6",
+        "ignore": "^5.2.0",
         "import-fresh": "^3.2.1",
         "js-yaml": "^4.1.0",
         "minimatch": "^3.0.4",
@@ -913,9 +922,9 @@
       "dev": true
     },
     "node_modules/@eslint/eslintrc/node_modules/debug": {
-      "version": "4.3.3",
-      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
-      "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+      "version": "4.3.4",
+      "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+      "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
       "dev": true,
       "dependencies": {
         "ms": "2.1.2"
@@ -930,9 +939,9 @@
       }
     },
     "node_modules/@eslint/eslintrc/node_modules/globals": {
-      "version": "13.12.0",
-      "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz",
-      "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==",
+      "version": "13.13.0",
+      "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz",
+      "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==",
       "dev": true,
       "dependencies": {
         "type-fest": "^0.20.2"
@@ -3197,15 +3206,6 @@
       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
       "dev": true
     },
-    "node_modules/colors": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
-      "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
-      "dev": true,
-      "engines": {
-        "node": ">=0.1.90"
-      }
-    },
     "node_modules/combine-source-map": {
       "version": "0.8.0",
       "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz",
@@ -3932,12 +3932,12 @@
       }
     },
     "node_modules/eslint": {
-      "version": "8.8.0",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz",
-      "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==",
+      "version": "8.14.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz",
+      "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==",
       "dev": true,
       "dependencies": {
-        "@eslint/eslintrc": "^1.0.5",
+        "@eslint/eslintrc": "^1.2.2",
         "@humanwhocodes/config-array": "^0.9.2",
         "ajv": "^6.10.0",
         "chalk": "^4.0.0",
@@ -3945,10 +3945,10 @@
         "debug": "^4.3.2",
         "doctrine": "^3.0.0",
         "escape-string-regexp": "^4.0.0",
-        "eslint-scope": "^7.1.0",
+        "eslint-scope": "^7.1.1",
         "eslint-utils": "^3.0.0",
-        "eslint-visitor-keys": "^3.2.0",
-        "espree": "^9.3.0",
+        "eslint-visitor-keys": "^3.3.0",
+        "espree": "^9.3.1",
         "esquery": "^1.4.0",
         "esutils": "^2.0.2",
         "fast-deep-equal": "^3.1.3",
@@ -3992,6 +3992,28 @@
         "eslint": ">=2.0.0"
       }
     },
+    "node_modules/eslint-scope": {
+      "version": "7.1.1",
+      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz",
+      "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==",
+      "dev": true,
+      "dependencies": {
+        "esrecurse": "^4.3.0",
+        "estraverse": "^5.2.0"
+      },
+      "engines": {
+        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+      }
+    },
+    "node_modules/eslint-scope/node_modules/estraverse": {
+      "version": "5.3.0",
+      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+      "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+      "dev": true,
+      "engines": {
+        "node": ">=4.0"
+      }
+    },
     "node_modules/eslint-utils": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
@@ -4020,9 +4042,9 @@
       }
     },
     "node_modules/eslint-visitor-keys": {
-      "version": "3.2.0",
-      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz",
-      "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==",
+      "version": "3.3.0",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz",
+      "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==",
       "dev": true,
       "engines": {
         "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
@@ -4115,28 +4137,6 @@
         "url": "https://github.com/sponsors/sindresorhus"
       }
     },
-    "node_modules/eslint/node_modules/eslint-scope": {
-      "version": "7.1.0",
-      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz",
-      "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==",
-      "dev": true,
-      "dependencies": {
-        "esrecurse": "^4.3.0",
-        "estraverse": "^5.2.0"
-      },
-      "engines": {
-        "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
-      }
-    },
-    "node_modules/eslint/node_modules/estraverse": {
-      "version": "5.3.0",
-      "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
-      "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
-      "dev": true,
-      "engines": {
-        "node": ">=4.0"
-      }
-    },
     "node_modules/eslint/node_modules/glob-parent": {
       "version": "6.0.2",
       "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
@@ -4173,15 +4173,6 @@
         "node": ">=8"
       }
     },
-    "node_modules/eslint/node_modules/ignore": {
-      "version": "5.2.0",
-      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
-      "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==",
-      "dev": true,
-      "engines": {
-        "node": ">= 4"
-      }
-    },
     "node_modules/eslint/node_modules/js-yaml": {
       "version": "4.1.0",
       "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
@@ -4237,23 +4228,23 @@
       }
     },
     "node_modules/espree": {
-      "version": "9.3.0",
-      "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz",
-      "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==",
+      "version": "9.3.1",
+      "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz",
+      "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==",
       "dev": true,
       "dependencies": {
         "acorn": "^8.7.0",
         "acorn-jsx": "^5.3.1",
-        "eslint-visitor-keys": "^3.1.0"
+        "eslint-visitor-keys": "^3.3.0"
       },
       "engines": {
         "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
       }
     },
     "node_modules/espree/node_modules/acorn": {
-      "version": "8.7.0",
-      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz",
-      "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==",
+      "version": "8.7.1",
+      "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz",
+      "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==",
       "dev": true,
       "bin": {
         "acorn": "bin/acorn"
@@ -4593,9 +4584,9 @@
       ]
     },
     "node_modules/fs-extra": {
-      "version": "10.0.0",
-      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
-      "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
+      "version": "10.1.0",
+      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
+      "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
       "dev": true,
       "dependencies": {
         "graceful-fs": "^4.2.0",
@@ -4998,9 +4989,9 @@
       "dev": true
     },
     "node_modules/ignore": {
-      "version": "4.0.6",
-      "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
-      "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
+      "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==",
       "dev": true,
       "engines": {
         "node": ">= 4"
@@ -5808,15 +5799,15 @@
       }
     },
     "node_modules/karma": {
-      "version": "6.3.13",
-      "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.13.tgz",
-      "integrity": "sha512-64lbtHBnM/sG7XKvitSQVlImKYNugyjw4K2e8cZYrlZm0GwoWrfsrkzgS/KWY/r3+fVM/2xvT/JN6MyfdttxLw==",
+      "version": "6.3.19",
+      "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.19.tgz",
+      "integrity": "sha512-NDhWckzES/Y9xMiddyU1RzaKL76/scCsu8Mp0vR0Z3lQRvC3p72+Ab4ppoxs36S9tyPNX5V48yvaV++RNEBPZw==",
       "dev": true,
       "dependencies": {
+        "@colors/colors": "1.5.0",
         "body-parser": "^1.19.0",
         "braces": "^3.0.2",
         "chokidar": "^3.5.1",
-        "colors": "1.4.0",
         "connect": "^3.7.0",
         "di": "^0.0.1",
         "dom-serialize": "^2.2.1",
@@ -5828,10 +5819,11 @@
         "log4js": "^6.4.1",
         "mime": "^2.5.2",
         "minimatch": "^3.0.4",
+        "mkdirp": "^0.5.5",
         "qjobs": "^1.2.0",
         "range-parser": "^1.2.1",
         "rimraf": "^3.0.2",
-        "socket.io": "^4.2.0",
+        "socket.io": "^4.4.1",
         "source-map": "^0.6.1",
         "tmp": "^0.2.1",
         "ua-parser-js": "^0.7.30",
@@ -6053,6 +6045,18 @@
         "node": ">=8"
       }
     },
+    "node_modules/karma/node_modules/mkdirp": {
+      "version": "0.5.6",
+      "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+      "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+      "dev": true,
+      "dependencies": {
+        "minimist": "^1.2.6"
+      },
+      "bin": {
+        "mkdirp": "bin/cmd.js"
+      }
+    },
     "node_modules/karma/node_modules/rimraf": {
       "version": "3.0.2",
       "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -6514,9 +6518,9 @@
       }
     },
     "node_modules/minimist": {
-      "version": "1.2.5",
-      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
-      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
+      "version": "1.2.6",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+      "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
       "dev": true
     },
     "node_modules/mkdirp": {
@@ -8036,9 +8040,9 @@
       }
     },
     "node_modules/rollup": {
-      "version": "2.66.1",
-      "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.66.1.tgz",
-      "integrity": "sha512-crSgLhSkLMnKr4s9iZ/1qJCplgAgrRY+igWv8KhG/AjKOJ0YX/WpmANyn8oxrw+zenF3BXWDLa7Xl/QZISH+7w==",
+      "version": "2.71.1",
+      "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.71.1.tgz",
+      "integrity": "sha512-lMZk3XfUBGjrrZQpvPSoXcZSfKcJ2Bgn+Z0L1MoW2V8Wh7BVM+LOBJTPo16yul2MwL59cXedzW1ruq3rCjSRgw==",
       "dev": true,
       "bin": {
         "rollup": "dist/bin/rollup"
@@ -8105,9 +8109,9 @@
       "dev": true
     },
     "node_modules/semver": {
-      "version": "7.3.5",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
-      "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+      "version": "7.3.7",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
+      "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
       "dev": true,
       "dependencies": {
         "lru-cache": "^6.0.0"
@@ -9303,9 +9307,9 @@
       "dev": true
     },
     "node_modules/yargs": {
-      "version": "17.3.1",
-      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz",
-      "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==",
+      "version": "17.4.1",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz",
+      "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==",
       "dev": true,
       "dependencies": {
         "cliui": "^7.0.2",
@@ -9845,9 +9849,9 @@
       }
     },
     "@babel/eslint-parser": {
-      "version": "7.16.5",
-      "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.16.5.tgz",
-      "integrity": "sha512-mUqYa46lgWqHKQ33Q6LNCGp/wPR3eqOYTUixHFsfrSQqRxH0+WOzca75iEjFr5RDGH1dDz622LaHhLOzOuQRUA==",
+      "version": "7.17.0",
+      "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.17.0.tgz",
+      "integrity": "sha512-PUEJ7ZBXbRkbq3qqM/jZ2nIuakUBqCYc7Qf52Lj7dlZ6zERnqisdHioL0l4wwQZnmskMeasqUNzLBFKs3nylXA==",
       "dev": true,
       "requires": {
         "eslint-scope": "^5.1.1",
@@ -10302,17 +10306,23 @@
       "integrity": "sha512-sR4eaSrnM7BV7QPzGfEX5paG/6wrZM3I0HDzfIAK06ESvo9oy3xBuVBxE3MbQaKNhvg8g/ixjMWo2CGpzpHsDA==",
       "dev": true
     },
+    "@colors/colors": {
+      "version": "1.5.0",
+      "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz",
+      "integrity": "sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==",
+      "dev": true
+    },
     "@eslint/eslintrc": {
-      "version": "1.0.5",
-      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.0.5.tgz",
-      "integrity": "sha512-BLxsnmK3KyPunz5wmCCpqy0YelEoxxGmH73Is+Z74oOTMtExcjkr3dDR6quwrjh1YspA8DH9gnX1o069KiS9AQ==",
+      "version": "1.2.2",
+      "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.2.tgz",
+      "integrity": "sha512-lTVWHs7O2hjBFZunXTZYnYqtB9GakA1lnxIf+gKq2nY5gxkkNi/lQvveW6t8gFdOHTg6nG50Xs95PrLqVpcaLg==",
       "dev": true,
       "requires": {
         "ajv": "^6.12.4",
         "debug": "^4.3.2",
-        "espree": "^9.2.0",
+        "espree": "^9.3.1",
         "globals": "^13.9.0",
-        "ignore": "^4.0.6",
+        "ignore": "^5.2.0",
         "import-fresh": "^3.2.1",
         "js-yaml": "^4.1.0",
         "minimatch": "^3.0.4",
@@ -10326,18 +10336,18 @@
           "dev": true
         },
         "debug": {
-          "version": "4.3.3",
-          "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.3.tgz",
-          "integrity": "sha512-/zxw5+vh1Tfv+4Qn7a5nsbcJKPaSvCDhojn6FEl9vupwK2VCSDtEiEtqr8DFtzYFOdz63LBkxec7DYuc2jon6Q==",
+          "version": "4.3.4",
+          "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+          "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
           "dev": true,
           "requires": {
             "ms": "2.1.2"
           }
         },
         "globals": {
-          "version": "13.12.0",
-          "resolved": "https://registry.npmjs.org/globals/-/globals-13.12.0.tgz",
-          "integrity": "sha512-uS8X6lSKN2JumVoXrbUz+uG4BYG+eiawqm3qFcT7ammfbUHeCBoJMlHcec/S3krSk73/AE/f0szYFmgAA3kYZg==",
+          "version": "13.13.0",
+          "resolved": "https://registry.npmjs.org/globals/-/globals-13.13.0.tgz",
+          "integrity": "sha512-EQ7Q18AJlPwp3vUDL4mKA0KXrXyNIQyWon6T6XQiBQF0XHvRsiCSrWmmeATpUzdJN2HhWZU6Pdl0a9zdep5p6A==",
           "dev": true,
           "requires": {
             "type-fest": "^0.20.2"
@@ -12409,12 +12419,6 @@
       "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==",
       "dev": true
     },
-    "colors": {
-      "version": "1.4.0",
-      "resolved": "https://registry.npmjs.org/colors/-/colors-1.4.0.tgz",
-      "integrity": "sha512-a+UqTh4kgZg/SlGvfbzDHpgRu7AAQOmmqRHJnxhRZICKFUT91brVhNNt58CMWU9PsBbv3PDCZUHbVxuDiH2mtA==",
-      "dev": true
-    },
     "combine-source-map": {
       "version": "0.8.0",
       "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz",
@@ -13026,12 +13030,12 @@
       "dev": true
     },
     "eslint": {
-      "version": "8.8.0",
-      "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.8.0.tgz",
-      "integrity": "sha512-H3KXAzQGBH1plhYS3okDix2ZthuYJlQQEGE5k0IKuEqUSiyu4AmxxlJ2MtTYeJ3xB4jDhcYCwGOg2TXYdnDXlQ==",
+      "version": "8.14.0",
+      "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.14.0.tgz",
+      "integrity": "sha512-3/CE4aJX7LNEiE3i6FeodHmI/38GZtWCsAtsymScmzYapx8q1nVVb+eLcLSzATmCPXw5pT4TqVs1E0OmxAd9tw==",
       "dev": true,
       "requires": {
-        "@eslint/eslintrc": "^1.0.5",
+        "@eslint/eslintrc": "^1.2.2",
         "@humanwhocodes/config-array": "^0.9.2",
         "ajv": "^6.10.0",
         "chalk": "^4.0.0",
@@ -13039,10 +13043,10 @@
         "debug": "^4.3.2",
         "doctrine": "^3.0.0",
         "escape-string-regexp": "^4.0.0",
-        "eslint-scope": "^7.1.0",
+        "eslint-scope": "^7.1.1",
         "eslint-utils": "^3.0.0",
-        "eslint-visitor-keys": "^3.2.0",
-        "espree": "^9.3.0",
+        "eslint-visitor-keys": "^3.3.0",
+        "espree": "^9.3.1",
         "esquery": "^1.4.0",
         "esutils": "^2.0.2",
         "fast-deep-equal": "^3.1.3",
@@ -13123,22 +13127,6 @@
           "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==",
           "dev": true
         },
-        "eslint-scope": {
-          "version": "7.1.0",
-          "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.0.tgz",
-          "integrity": "sha512-aWwkhnS0qAXqNOgKOK0dJ2nvzEbhEvpy8OlJ9kZ0FeZnA6zpjv1/Vei+puGFFX7zkPCkHHXb7IDX3A+7yPrRWg==",
-          "dev": true,
-          "requires": {
-            "esrecurse": "^4.3.0",
-            "estraverse": "^5.2.0"
-          }
-        },
-        "estraverse": {
-          "version": "5.3.0",
-          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
-          "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
-          "dev": true
-        },
         "glob-parent": {
           "version": "6.0.2",
           "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
@@ -13163,12 +13151,6 @@
           "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==",
           "dev": true
         },
-        "ignore": {
-          "version": "5.2.0",
-          "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
-          "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==",
-          "dev": true
-        },
         "js-yaml": {
           "version": "4.1.0",
           "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz",
@@ -13217,6 +13199,24 @@
       "dev": true,
       "requires": {}
     },
+    "eslint-scope": {
+      "version": "7.1.1",
+      "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.1.1.tgz",
+      "integrity": "sha512-QKQM/UXpIiHcLqJ5AOyIW7XZmzjkzQXYE54n1++wb0u9V/abW3l9uQnxX8Z5Xd18xyKIMTUAyQ0k1e8pz6LUrw==",
+      "dev": true,
+      "requires": {
+        "esrecurse": "^4.3.0",
+        "estraverse": "^5.2.0"
+      },
+      "dependencies": {
+        "estraverse": {
+          "version": "5.3.0",
+          "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+          "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+          "dev": true
+        }
+      }
+    },
     "eslint-utils": {
       "version": "3.0.0",
       "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz",
@@ -13235,26 +13235,26 @@
       }
     },
     "eslint-visitor-keys": {
-      "version": "3.2.0",
-      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.2.0.tgz",
-      "integrity": "sha512-IOzT0X126zn7ALX0dwFiUQEdsfzrm4+ISsQS8nukaJXwEyYKRSnEIIDULYg1mCtGp7UUXgfGl7BIolXREQK+XQ==",
+      "version": "3.3.0",
+      "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz",
+      "integrity": "sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA==",
       "dev": true
     },
     "espree": {
-      "version": "9.3.0",
-      "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.0.tgz",
-      "integrity": "sha512-d/5nCsb0JcqsSEeQzFZ8DH1RmxPcglRWh24EFTlUEmCKoehXGdpsx0RkHDubqUI8LSAIKMQp4r9SzQ3n+sm4HQ==",
+      "version": "9.3.1",
+      "resolved": "https://registry.npmjs.org/espree/-/espree-9.3.1.tgz",
+      "integrity": "sha512-bvdyLmJMfwkV3NCRl5ZhJf22zBFo1y8bYh3VYb+bfzqNB4Je68P2sSuXyuFquzWLebHpNd2/d5uv7yoP9ISnGQ==",
       "dev": true,
       "requires": {
         "acorn": "^8.7.0",
         "acorn-jsx": "^5.3.1",
-        "eslint-visitor-keys": "^3.1.0"
+        "eslint-visitor-keys": "^3.3.0"
       },
       "dependencies": {
         "acorn": {
-          "version": "8.7.0",
-          "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.0.tgz",
-          "integrity": "sha512-V/LGr1APy+PXIwKebEWrkZPwoeoF+w1jiOBUmuxuiUIaOHtob8Qc9BTrYo7VuI5fR8tqsy+buA2WFooR5olqvQ==",
+          "version": "8.7.1",
+          "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.7.1.tgz",
+          "integrity": "sha512-Xx54uLJQZ19lKygFXOWsscKUbsBZW0CPykPhVQdhIeIwrbPmJzqeASDInc8nKBnp/JT6igTs82qPXz069H8I/A==",
           "dev": true
         }
       }
@@ -13504,9 +13504,9 @@
       "dev": true
     },
     "fs-extra": {
-      "version": "10.0.0",
-      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.0.0.tgz",
-      "integrity": "sha512-C5owb14u9eJwizKGdchcDUQeFtlSHHthBk8pbX9Vc1PFZrLombudjDnNns88aYslCyF6IY5SUw3Roz6xShcEIQ==",
+      "version": "10.1.0",
+      "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-10.1.0.tgz",
+      "integrity": "sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ==",
       "dev": true,
       "requires": {
         "graceful-fs": "^4.2.0",
@@ -13808,9 +13808,9 @@
       "dev": true
     },
     "ignore": {
-      "version": "4.0.6",
-      "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz",
-      "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==",
+      "version": "5.2.0",
+      "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.0.tgz",
+      "integrity": "sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ==",
       "dev": true
     },
     "import-fresh": {
@@ -14389,15 +14389,15 @@
       }
     },
     "karma": {
-      "version": "6.3.13",
-      "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.13.tgz",
-      "integrity": "sha512-64lbtHBnM/sG7XKvitSQVlImKYNugyjw4K2e8cZYrlZm0GwoWrfsrkzgS/KWY/r3+fVM/2xvT/JN6MyfdttxLw==",
+      "version": "6.3.19",
+      "resolved": "https://registry.npmjs.org/karma/-/karma-6.3.19.tgz",
+      "integrity": "sha512-NDhWckzES/Y9xMiddyU1RzaKL76/scCsu8Mp0vR0Z3lQRvC3p72+Ab4ppoxs36S9tyPNX5V48yvaV++RNEBPZw==",
       "dev": true,
       "requires": {
+        "@colors/colors": "1.5.0",
         "body-parser": "^1.19.0",
         "braces": "^3.0.2",
         "chokidar": "^3.5.1",
-        "colors": "1.4.0",
         "connect": "^3.7.0",
         "di": "^0.0.1",
         "dom-serialize": "^2.2.1",
@@ -14409,10 +14409,11 @@
         "log4js": "^6.4.1",
         "mime": "^2.5.2",
         "minimatch": "^3.0.4",
+        "mkdirp": "^0.5.5",
         "qjobs": "^1.2.0",
         "range-parser": "^1.2.1",
         "rimraf": "^3.0.2",
-        "socket.io": "^4.2.0",
+        "socket.io": "^4.4.1",
         "source-map": "^0.6.1",
         "tmp": "^0.2.1",
         "ua-parser-js": "^0.7.30",
@@ -14472,6 +14473,15 @@
           "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
           "dev": true
         },
+        "mkdirp": {
+          "version": "0.5.6",
+          "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz",
+          "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==",
+          "dev": true,
+          "requires": {
+            "minimist": "^1.2.6"
+          }
+        },
         "rimraf": {
           "version": "3.0.2",
           "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
@@ -14946,9 +14956,9 @@
       }
     },
     "minimist": {
-      "version": "1.2.5",
-      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz",
-      "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==",
+      "version": "1.2.6",
+      "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.6.tgz",
+      "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==",
       "dev": true
     },
     "mkdirp": {
@@ -16171,9 +16181,9 @@
       }
     },
     "rollup": {
-      "version": "2.66.1",
-      "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.66.1.tgz",
-      "integrity": "sha512-crSgLhSkLMnKr4s9iZ/1qJCplgAgrRY+igWv8KhG/AjKOJ0YX/WpmANyn8oxrw+zenF3BXWDLa7Xl/QZISH+7w==",
+      "version": "2.71.1",
+      "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.71.1.tgz",
+      "integrity": "sha512-lMZk3XfUBGjrrZQpvPSoXcZSfKcJ2Bgn+Z0L1MoW2V8Wh7BVM+LOBJTPo16yul2MwL59cXedzW1ruq3rCjSRgw==",
       "dev": true,
       "requires": {
         "fsevents": "~2.3.2"
@@ -16226,9 +16236,9 @@
       "dev": true
     },
     "semver": {
-      "version": "7.3.5",
-      "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.5.tgz",
-      "integrity": "sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==",
+      "version": "7.3.7",
+      "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.7.tgz",
+      "integrity": "sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==",
       "dev": true,
       "requires": {
         "lru-cache": "^6.0.0"
@@ -17186,9 +17196,9 @@
       "dev": true
     },
     "yargs": {
-      "version": "17.3.1",
-      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz",
-      "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==",
+      "version": "17.4.1",
+      "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.4.1.tgz",
+      "integrity": "sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g==",
       "dev": true,
       "requires": {
         "cliui": "^7.0.2",


Test patch:
diff --git a/test/es2017/awaitableFunctions.js b/test/es2017/awaitableFunctions.js
index f961857..d68a18f 100644
--- a/test/es2017/awaitableFunctions.js
+++ b/test/es2017/awaitableFunctions.js
@@ -540,7 +540,7 @@ module.exports = function () {
     it('should work with queues', async () => {
         const q = async.queue(async (data) => {
             if (data === 2) throw new Error('oh noes')
-            await new Promise(resolve => setTimeout(resolve, 10))
+            await new Promise(resolve => setTimeout(() => resolve(data), 10))
             return data
         }, 5)
 
@@ -561,7 +561,7 @@ module.exports = function () {
         const multiP = Promise.all(q.push([9, 10]))
 
         await q.drain()
-        await multiP
+        const res = await multiP
         expect(calls.join()).to.eql([
             'saturated',
             'push cb 1',
@@ -581,6 +581,62 @@ module.exports = function () {
         expect(emptyCalls).to.eql([
             'empty',
         ])
+
+        expect(res).to.eql([
+            9,
+            10
+        ])
+    })
+
+    it('should work with priorityQueues', async () => {
+        const q = async.priorityQueue(async (data) => {
+            if (data === 2) throw new Error('oh noes')
+            await new Promise(resolve => setTimeout(() => resolve(data), 10))
+            return data
+        }, 5)
+
+        const calls = []
+        const errorCalls = []
+        const emptyCalls = []
+        q.error().catch(d => errorCalls.push('error ' + d))
+        q.saturated().then(() => calls.push('saturated'))
+        q.unsaturated().then(() => calls.push('unsaturated'))
+        q.empty().then(() => emptyCalls.push('empty'))
+
+        q.push(1, 1).then(d => calls.push('push cb ' + d))
+        q.push(2, 1).then(d => errorCalls.push('push cb ' + d))
+        q.push([3, 4, 5, 6], 0).map(p => p.then(d => calls.push('push cb ' + d)))
+        q.push(7, 3).then(d => calls.push('push cb ' + d))
+        q.push(8, 3).then(d => calls.push('push cb ' + d))
+
+        const multiP = Promise.all(q.push([9, 10], 1))
+
+        await q.drain()
+        const res = await multiP
+        expect(calls.join()).to.eql([
+            'saturated',
+            'push cb 3',
+            'push cb 4',
+            'push cb 5',
+            'push cb 6',
+            'push cb 1',
+            'unsaturated',
+            'push cb 7',
+            'push cb 8'
+        ].join())
+
+        expect(errorCalls).to.eql([
+            'push cb undefined',
+            'error Error: oh noes',
+        ])
+        expect(emptyCalls).to.eql([
+            'empty',
+        ])
+
+        expect(res).to.eql([
+            9,
+            10
+        ])
     })
 
     /*
diff --git a/test/priorityQueue.js b/test/priorityQueue.js
index 564a0d6..40f7fe6 100644
--- a/test/priorityQueue.js
+++ b/test/priorityQueue.js
@@ -16,13 +16,13 @@ describe('priorityQueue', () => {
         q.push(1, 1.4, (err, arg) => {
             expect(err).to.equal('error');
             expect(arg).to.equal('arg');
-            expect(q.length()).to.equal(2);
+            expect(q.length()).to.equal(3);
             call_order.push('callback ' + 1);
         });
         q.push(2, 0.2, (err, arg) => {
             expect(err).to.equal('error');
             expect(arg).to.equal('arg');
-            expect(q.length()).to.equal(3);
+            expect(q.length()).to.equal(4);
             call_order.push('callback ' + 2);
         });
         q.push(3, 3.8, (err, arg) => {
@@ -31,26 +31,25 @@ describe('priorityQueue', () => {
             expect(q.length()).to.equal(0);
             call_order.push('callback ' + 3);
         });
-        q.push(4, 2.9, (err, arg) => {
+        q.push(['arr', 'arr'], 2.9, (err, arg) => {
             expect(err).to.equal('error');
             expect(arg).to.equal('arg');
-            expect(q.length()).to.equal(1);
-            call_order.push('callback ' + 4);
+            call_order.push('callback arr');
         });
-        expect(q.length()).to.equal(4);
+        expect(q.length()).to.equal(5);
         expect(q.concurrency).to.equal(1);
 
         q.drain(() => {
             expect(call_order).to.eql([
                 'process 2', 'callback 2',
                 'process 1', 'callback 1',
-                'process 4', 'callback 4',
+                'process arr', 'callback arr',
+                'process arr', 'callback arr',
                 'process 3', 'callback 3'
             ]);
             expect(q.concurrency).to.equal(1);
             expect(q.length()).to.equal(0);
-            q.push([])
-            expect(q.length()).to.equal(0)
+            expect(q.idle()).to.be.equal(true);
             done()
         });
         try {
@@ -79,27 +78,32 @@ describe('priorityQueue', () => {
             expect(err).to.equal('error');
             expect(arg).to.equal('arg');
             expect(q.length()).to.equal(2);
+            expect(q.running()).to.equal(1);
             call_order.push('callback ' + 1);
         });
         q.push(2, 0.2, (err, arg) => {
             expect(err).to.equal('error');
             expect(arg).to.equal('arg');
             expect(q.length()).to.equal(1);
+            expect(q.running()).to.equal(1);
             call_order.push('callback ' + 2);
         });
         q.push(3, 3.8, (err, arg) => {
             expect(err).to.equal('error');
             expect(arg).to.equal('arg');
             expect(q.length()).to.equal(0);
+            expect(q.running()).to.equal(1);
             call_order.push('callback ' + 3);
         });
         q.push(4, 2.9, (err, arg) => {
             expect(err).to.equal('error');
             expect(arg).to.equal('arg');
             expect(q.length()).to.equal(0);
+            expect(q.running()).to.equal(0);
             call_order.push('callback ' + 4);
         });
         expect(q.length()).to.equal(4);
+        expect(q.running()).to.equal(0);
         expect(q.concurrency).to.equal(2);
 
         q.drain(() => {
@@ -111,10 +115,30 @@ describe('priorityQueue', () => {
             ]);
             expect(q.concurrency).to.equal(2);
             expect(q.length()).to.equal(0);
+            expect(q.running()).to.equal(0);
             done();
         });
     });
 
+    it('pushAsync', done => {
+        const calls = [];
+        const q = async.priorityQueue((task, cb) => {
+            if (task === 2) return cb(new Error('fail'));
+            cb();
+        })
+
+        q.pushAsync(1, 1, () => { throw new Error('should not be called') }).then(() => calls.push(1));
+        q.pushAsync(2, 0).catch(err => {
+            expect(err.message).to.equal('fail');
+            calls.push(2);
+        });
+        q.pushAsync([3, 4], 0).map(p => p.then(() => calls.push('arr')));
+        q.drain(() => setTimeout(() => {
+            expect(calls).to.eql([2, 'arr', 'arr', 1]);
+            done();
+        }));
+    });
+
     it('pause in worker with concurrency', (done) => {
         var call_order = [];
         var q = async.priorityQueue((task, callback) => {
@@ -144,6 +168,104 @@ describe('priorityQueue', () => {
         });
     });
 
+    it('kill', (done) => {
+        var q = async.priorityQueue((/*task, callback*/) => {
+            setTimeout(() => {
+                throw new Error("Function should never be called");
+            }, 20);
+        }, 1);
+        q.drain(() => {
+            throw new Error("Function should never be called");
+        });
+
+        q.push(0);
+
+        q.kill();
+
+        setTimeout(() => {
+            expect(q.length()).to.equal(0);
+            done();
+        }, 40);
+    });
+
+    context('q.workersList():', () => {
+        it('should be the same length as running()', (done) => {
+            var q = async.priorityQueue((task, cb) => {
+                async.setImmediate(() => {
+                    expect(q.workersList().length).to.equal(q.running());
+                    cb();
+                });
+            }, 2);
+
+            q.drain(() => {
+                expect(q.workersList().length).to.equal(0);
+                expect(q.running()).to.equal(0);
+                done();
+            });
+
+            q.push('foo', 2);
+            q.push('bar', 1);
+            q.push('baz', 0);
+        });
+
+        it('should contain the items being processed', (done) => {
+            var itemsBeingProcessed = {
+                'foo': [
+                    {data: 'bar', priority: 1},
+                    {data: 'foo', priority: 2}
+                ],
+                'foo_cb': [
+                    {data: 'foo', priority: 2}
+                ],
+                'bar': [
+                    {data: 'baz', priority: 0},
+                    {data: 'bar', priority: 1}
+                ],
+                'bar_cb': [
+                    {data: 'bar', priority: 1},
+                    {data: 'foo', priority: 2}
+                ],
+                'baz': [
+                    {data: 'baz', priority: 0}
+                ],
+                'baz_cb': [
+                    {data: 'baz', priority: 0},
+                    {data: 'bar', priority: 1}
+                ]
+            };
+
+            function getWorkersListData(q) {
+                return q.workersList().map(({data, priority}) => {
+                    return {data, priority};
+                });
+            }
+
+            var q = async.priorityQueue((task, cb) => {
+                expect(
+                    getWorkersListData(q)
+                ).to.eql(itemsBeingProcessed[task]);
+                expect(q.workersList().length).to.equal(q.running());
+                async.setImmediate(() => {
+                    expect(
+                        getWorkersListData(q)
+                    ).to.eql(itemsBeingProcessed[task+'_cb']);
+                    expect(q.workersList().length).to.equal(q.running());
+                    cb();
+                });
+            }, 2);
+
+            q.drain(() => {
+                expect(q.workersList()).to.eql([]);
+                expect(q.workersList().length).to.equal(q.running());
+                done();
+            });
+
+            q.push('foo', 2);
+            q.push('bar', 1);
+            q.push('baz', 0);
+        });
+    });
+
     context('q.saturated(): ', () => {
         it('should call the saturated callback if tasks length is concurrency', (done) => {
             var calls = [];
@@ -247,6 +369,27 @@ describe('priorityQueue', () => {
         });
     });
 
+    it('should call the drain callback if receives an empty push', (done) => {
+        var call_order = [];
+
+        var q = async.priorityQueue((task, callback) => {
+            call_order.push(task);
+            callback('error', 'arg');
+        }, 1);
+
+        q.drain(() => {
+            call_order.push('drain')
+            expect(call_order).to.eql([
+                'drain'
+            ]);
+            expect(q.length()).to.equal(0);
+            expect(q.running()).to.equal(0);
+            done();
+        });
+
+        q.push([], 1, () => { throw new Error('should not be called') });
+    });
+
     it('should not call the drain callback if receives empty push and tasks are still pending', (done) => {
         var call_order = [];
 
@@ -282,4 +425,49 @@ describe('priorityQueue', () => {
 
         q.push([], 1, () => {});
     });
+
+    it('should be iterable', (done) => {
+        var q = async.priorityQueue((data, cb) => {
+            if (data === 3) {
+                q.push(6)
+                expect([...q]).to.eql([4, 5, 6]);
+            }
+            async.setImmediate(cb);
+        });
+
+        q.push([1, 2, 3, 4, 5]);
+
+        expect([...q]).to.eql([1, 2, 3, 4, 5]);
+
+        q.drain(() => {
+            expect([...q]).to.eql([]);
+            done();
+        });
+    });
+
+    it('should error when calling unshift', () => {
+        var q = async.priorityQueue(() => {});
+        expect(() => {
+            q.unshift(1);
+        }).to.throw();
+    });
+
+    it('should error when calling unshiftAsync', () => {
+        var q = async.priorityQueue(() => {});
+        expect(() => {
+            q.unshiftAsync(1);
+        }).to.throw();
+    });
+
+    it('should error when the callback is called more than once', (done) => {
+        var q = async.priorityQueue((task, callback) => {
+            callback();
+            expect(() => {
+                callback();
+            }).to.throw();
+            done();
+        }, 2);
+
+        q.push(1);
+    });
 });
diff --git a/test/queue.js b/test/queue.js
index f99e91a..615dd6b 100644
--- a/test/queue.js
+++ b/test/queue.js
@@ -170,7 +170,6 @@ describe('queue', function(){
         })
         q.pushAsync([3, 4]).map(p => p.then(() => calls.push('arr')))
         q.drain(() => setTimeout(() => {
-            console.log('drain')
             expect(calls).to.eql([1, 2, 'arr', 'arr'])
             done()
         }))
@@ -190,7 +189,6 @@ describe('queue', function(){
         })
         q.unshiftAsync([3, 4]).map(p => p.then(() => calls.push('arr')))
         q.drain(() => setTimeout(() => {
-            console.log('drain')
             expect(calls).to.eql(['arr', 'arr', 2, 1])
             done()
         }))