Skip to content

Commit 2e7d812

Browse files
committed
1.2.1
1 parent afeb532 commit 2e7d812

File tree

10 files changed

+23
-27
lines changed

10 files changed

+23
-27
lines changed

docs/QueueStats.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ <h2>QueueStats</h2>
7070

7171
<dt class="tag-source">Source:</dt>
7272
<dd class="tag-source"><ul class="dummy"><li>
73-
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line116">line 116</a>
73+
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line115">line 115</a>
7474
</li></ul></dd>
7575

7676

@@ -121,7 +121,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.ex
121121
<br class="clear">
122122

123123
<footer>
124-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jun 02 2021 17:59:32 GMT+0200 (Central European Summer Time)
124+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Tue Apr 05 2022 14:45:49 GMT+0200 (Central European Summer Time)
125125
</footer>
126126

127127
<script> prettyPrint(); </script>

docs/global.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,7 @@ <h4 class="name" id="flush"><span class="type-signature"></span>flush<span class
294294

295295
<dt class="tag-source">Source:</dt>
296296
<dd class="tag-source"><ul class="dummy"><li>
297-
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line134">line 134</a>
297+
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line133">line 133</a>
298298
</li></ul></dd>
299299

300300

@@ -615,7 +615,7 @@ <h4 class="name" id="stat"><span class="type-signature"></span>stat<span class="
615615

616616
<dt class="tag-source">Source:</dt>
617617
<dd class="tag-source"><ul class="dummy"><li>
618-
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line120">line 120</a>
618+
<a href="queue.js.html">queue.js</a>, <a href="queue.js.html#line119">line 119</a>
619619
</li></ul></dd>
620620

621621

@@ -903,7 +903,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.ex
903903
<br class="clear">
904904

905905
<footer>
906-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jun 02 2021 17:59:32 GMT+0200 (Central European Summer Time)
906+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Tue Apr 05 2022 14:45:49 GMT+0200 (Central European Summer Time)
907907
</footer>
908908

909909
<script> prettyPrint(); </script>

docs/index.html

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ <h1>Typical usage</h1>
6868
<pre class="prettyprint source lang-js"><code>import Queue from 'async-await-queue';
6969
</code></pre>
7070
<p>(or read the <a href="https://mmomtchev.github.io/Queue/">jsdoc</a>)</p>
71+
<p><em><strong>IMPORTANT</strong></em> Keep in mind that when running asynchronous code without explicitly <code>await</code>ing it, you should always handle the eventual Promise rejections by a <code>.catch()</code> statement.</p>
7172
<pre class="prettyprint source lang-js"><code>const Queue = require('async-await-queue');
7273
/* No more than 2 concurrent tasks with
7374
* at least 100ms between two tasks
@@ -118,8 +119,6 @@ <h1>Typical usage</h1>
118119
/* The third call will wait for the previous two to complete
119120
* plus the time needed to make this at least 100ms
120121
* after the second call
121-
* The first argument needs to be unique for every
122-
* task on the queue
123122
*/
124123
q.push(myq.run(() =>
125124
download(site)
@@ -201,7 +200,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.ex
201200
<br class="clear">
202201

203202
<footer>
204-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jun 02 2021 17:59:32 GMT+0200 (Central European Summer Time)
203+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Tue Apr 05 2022 14:45:49 GMT+0200 (Central European Summer Time)
205204
</footer>
206205

207206
<script> prettyPrint(); </script>

docs/module.exports_module.exports.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.ex
273273
<br class="clear">
274274

275275
<footer>
276-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jun 02 2021 17:59:32 GMT+0200 (Central European Summer Time)
276+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Tue Apr 05 2022 14:45:49 GMT+0200 (Central European Summer Time)
277277
</footer>
278278

279279
<script> prettyPrint(); </script>

docs/queue.js.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,13 @@ <h1 class="page-title">Source: queue.js</h1>
135135
const id = Symbol();
136136
return this.wait(id, priority)
137137
.then(() => job())
138-
.finally((r) => {
138+
.finally(() => {
139139
this.end(id);
140-
return r;
141140
});
142141
}
143142

144143
/**
145-
* @interface QueueStats {running: {number}, waiting: {number}, last: {number}}
144+
* @interface QueueStats {running: number, waiting: number, last: number}
146145
*/
147146

148147
/**
@@ -197,7 +196,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="module.ex
197196
<br class="clear">
198197

199198
<footer>
200-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Wed Jun 02 2021 17:59:32 GMT+0200 (Central European Summer Time)
199+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.7</a> on Tue Apr 05 2022 14:45:49 GMT+0200 (Central European Summer Time)
201200
</footer>
202201

203202
<script> prettyPrint(); </script>

index.es.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,14 +107,13 @@ class Queue {
107107
const id = Symbol();
108108
return this.wait(id, priority)
109109
.then(() => job())
110-
.finally((r) => {
110+
.finally(() => {
111111
this.end(id);
112-
return r;
113112
});
114113
}
115114

116115
/**
117-
* @interface QueueStats {running: {number}, waiting: {number}, last: {number}}
116+
* @interface QueueStats {running: number, waiting: number, last: number}
118117
*/
119118

120119
/**
@@ -154,4 +153,4 @@ class Queue {
154153
}
155154
}
156155

157-
export default Queue;
156+
export { Queue as default };

index.umd.js

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
(function (global, factory) {
22
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
33
typeof define === 'function' && define.amd ? define(factory) :
4-
(global = global || self, global.default = factory());
5-
}(this, (function () { 'use strict';
4+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global["default"] = factory());
5+
})(this, (function () { 'use strict';
66

77
class Queue {
88
/**
@@ -113,14 +113,13 @@
113113
const id = Symbol();
114114
return this.wait(id, priority)
115115
.then(() => job())
116-
.finally((r) => {
116+
.finally(() => {
117117
this.end(id);
118-
return r;
119118
});
120119
}
121120

122121
/**
123-
* @interface QueueStats {running: {number}, waiting: {number}, last: {number}}
122+
* @interface QueueStats {running: number, waiting: number, last: number}
124123
*/
125124

126125
/**
@@ -162,4 +161,4 @@
162161

163162
return Queue;
164163

165-
})));
164+
}));

index.umd.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "async-await-queue",
3-
"version": "1.2.0",
3+
"version": "1.2.1",
44
"description": "async/await simple priority queues",
55
"main": "index.umd.min.js",
66
"module": "index.es.js",

0 commit comments

Comments
 (0)