time-queues 1.0.3 → 1.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/package.json +8 -3
- package/src/ListQueue.js +1 -6
- package/src/when-dom-loaded.js +3 -3
- package/src/when-loaded.js +3 -3
package/README.md
CHANGED
|
@@ -330,6 +330,8 @@ This project is licensed under the BSD-3-Clause License.
|
|
|
330
330
|
|
|
331
331
|
## Release History
|
|
332
332
|
|
|
333
|
+
* 1.0.5 *Technical release: updated deps, more tests.*
|
|
334
|
+
* 1.0.4 *Bug fixes and code simplifications.*
|
|
333
335
|
* 1.0.3 *Updated deps (`list-toolkit`) to fix a minor bug.*
|
|
334
336
|
* 1.0.2 *Updated deps (`list-toolkit`).*
|
|
335
337
|
* 1.0.1 *Minor update in README. No need to upgrade.*
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "time-queues",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.5",
|
|
4
4
|
"description": "Time queues to organize multitasking and scheduled tasks.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -11,6 +11,9 @@
|
|
|
11
11
|
"test:bun": "tape6-bun --flags FO",
|
|
12
12
|
"test:deno-original": "tape6-deno --flags FO",
|
|
13
13
|
"test:deno": "deno run -A `tape6-runner main` --flags FO",
|
|
14
|
+
"test:proc": "tape6-proc --flags FO",
|
|
15
|
+
"test:proc:bun": "bun run `npx tape6-proc --self` --flags FO",
|
|
16
|
+
"test:proc:deno": "deno run -A `npx tape6-proc --self` --flags FO --runFileArgs -A",
|
|
14
17
|
"start": "tape6-server --trace"
|
|
15
18
|
},
|
|
16
19
|
"repository": {
|
|
@@ -39,14 +42,16 @@
|
|
|
39
42
|
"importmap": {
|
|
40
43
|
"imports": {
|
|
41
44
|
"tape-six": "/node_modules/tape-six/index.js",
|
|
45
|
+
"list-toolkit/": "/node_modules/list-toolkit/src/",
|
|
42
46
|
"time-queues/": "/src/"
|
|
43
47
|
}
|
|
44
48
|
}
|
|
45
49
|
},
|
|
46
50
|
"devDependencies": {
|
|
47
|
-
"tape-six": "^0.
|
|
51
|
+
"tape-six": "^1.0.2",
|
|
52
|
+
"tape-six-proc": "^1.0.0"
|
|
48
53
|
},
|
|
49
54
|
"dependencies": {
|
|
50
|
-
"list-toolkit": "^2.
|
|
55
|
+
"list-toolkit": "^2.2.1"
|
|
51
56
|
}
|
|
52
57
|
}
|
package/src/ListQueue.js
CHANGED
|
@@ -40,12 +40,7 @@ export class ListQueue extends MicroTaskQueue {
|
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
dequeue(task) {
|
|
43
|
-
|
|
44
|
-
if (node.value === task) {
|
|
45
|
-
List.pop(node);
|
|
46
|
-
break;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
43
|
+
this.list.removeNode(task);
|
|
49
44
|
if (!this.paused && this.list.isEmpty && this.stopQueue)
|
|
50
45
|
this.stopQueue = (this.stopQueue(), null);
|
|
51
46
|
return this;
|
package/src/when-dom-loaded.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ValueList from 'list-toolkit/value-list.js';
|
|
4
4
|
|
|
5
|
-
const waitingForDom = new
|
|
5
|
+
const waitingForDom = new ValueList();
|
|
6
6
|
|
|
7
7
|
export const remove = fn => {
|
|
8
8
|
for (const node of waitingForDom.getNodeIterable()) {
|
|
9
9
|
if (node.value === fn) {
|
|
10
|
-
|
|
10
|
+
waitingForDom.removeNode(node);
|
|
11
11
|
return true;
|
|
12
12
|
}
|
|
13
13
|
}
|
package/src/when-loaded.js
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
import
|
|
3
|
+
import ValueList from 'list-toolkit/value-list.js';
|
|
4
4
|
|
|
5
|
-
const waitingForLoad = new
|
|
5
|
+
const waitingForLoad = new ValueList();
|
|
6
6
|
|
|
7
7
|
export const remove = fn => {
|
|
8
8
|
for (const node of waitingForLoad.getNodeIterable()) {
|
|
9
9
|
if (node.value === fn) {
|
|
10
|
-
|
|
10
|
+
waitingForLoad.removeNode(node);
|
|
11
11
|
return true;
|
|
12
12
|
}
|
|
13
13
|
}
|