@thi.ng/fibers 1.0.22 → 1.0.24
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/CHANGELOG.md +8 -1
- package/README.md +3 -3
- package/ops.js +3 -3
- package/package.json +18 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
-
- **Last updated**: 2024-12-
|
|
3
|
+
- **Last updated**: 2024-12-27T14:11:37Z
|
|
4
4
|
- **Generator**: [thi.ng/monopub](https://thi.ng/monopub)
|
|
5
5
|
|
|
6
6
|
All notable changes to this project will be documented in this file.
|
|
@@ -9,6 +9,13 @@ See [Conventional Commits](https://conventionalcommits.org/) for commit guidelin
|
|
|
9
9
|
**Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
|
|
10
10
|
and/or version bumps of transitive dependencies.
|
|
11
11
|
|
|
12
|
+
### [1.0.24](https://github.com/thi-ng/umbrella/tree/@thi.ng/fibers@1.0.24) (2024-12-27)
|
|
13
|
+
|
|
14
|
+
#### ♻️ Refactoring
|
|
15
|
+
|
|
16
|
+
- update timestamp handling ([d0a7922](https://github.com/thi-ng/umbrella/commit/d0a7922))
|
|
17
|
+
- update deps & imports
|
|
18
|
+
|
|
12
19
|
### [1.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/fibers@1.0.1) (2024-04-20)
|
|
13
20
|
|
|
14
21
|
#### ♻️ Refactoring
|
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
[](https://mastodon.thi.ng/@toxi)
|
|
8
8
|
|
|
9
9
|
> [!NOTE]
|
|
10
|
-
> This is one of
|
|
10
|
+
> This is one of 200 standalone projects, maintained as part
|
|
11
11
|
> of the [@thi.ng/umbrella](https://github.com/thi-ng/umbrella/) monorepo
|
|
12
12
|
> and anti-framework.
|
|
13
13
|
>
|
|
@@ -403,19 +403,19 @@ For Node.js REPL:
|
|
|
403
403
|
const fib = await import("@thi.ng/fibers");
|
|
404
404
|
```
|
|
405
405
|
|
|
406
|
-
Package sizes (brotli'd, pre-treeshake): ESM: 2.
|
|
406
|
+
Package sizes (brotli'd, pre-treeshake): ESM: 2.44 KB
|
|
407
407
|
|
|
408
408
|
## Dependencies
|
|
409
409
|
|
|
410
410
|
- [@thi.ng/api](https://github.com/thi-ng/umbrella/tree/develop/packages/api)
|
|
411
411
|
- [@thi.ng/arrays](https://github.com/thi-ng/umbrella/tree/develop/packages/arrays)
|
|
412
|
-
- [@thi.ng/bench](https://github.com/thi-ng/umbrella/tree/develop/packages/bench)
|
|
413
412
|
- [@thi.ng/buffers](https://github.com/thi-ng/umbrella/tree/develop/packages/buffers)
|
|
414
413
|
- [@thi.ng/checks](https://github.com/thi-ng/umbrella/tree/develop/packages/checks)
|
|
415
414
|
- [@thi.ng/errors](https://github.com/thi-ng/umbrella/tree/develop/packages/errors)
|
|
416
415
|
- [@thi.ng/idgen](https://github.com/thi-ng/umbrella/tree/develop/packages/idgen)
|
|
417
416
|
- [@thi.ng/logger](https://github.com/thi-ng/umbrella/tree/develop/packages/logger)
|
|
418
417
|
- [@thi.ng/random](https://github.com/thi-ng/umbrella/tree/develop/packages/random)
|
|
418
|
+
- [@thi.ng/timestamp](https://github.com/thi-ng/umbrella/tree/develop/packages/timestamp)
|
|
419
419
|
|
|
420
420
|
Note: @thi.ng/api is in _most_ cases a type-only import (not used at runtime)
|
|
421
421
|
|
package/ops.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { shuffle as $shuffle } from "@thi.ng/arrays/shuffle";
|
|
2
|
-
import { now, timeDiff } from "@thi.ng/
|
|
2
|
+
import { now, timeDiff } from "@thi.ng/timestamp";
|
|
3
3
|
import { SYSTEM } from "@thi.ng/random/system";
|
|
4
4
|
import {
|
|
5
5
|
STATE_ACTIVE,
|
|
@@ -46,7 +46,7 @@ const timeSlice = (body, maxTime, opts) => fiber(function* () {
|
|
|
46
46
|
do {
|
|
47
47
|
if ($fiber.state > STATE_ACTIVE || $fiber.next() > STATE_ACTIVE)
|
|
48
48
|
return;
|
|
49
|
-
} while (timeDiff(t0
|
|
49
|
+
} while (timeDiff(t0) < maxTime);
|
|
50
50
|
yield;
|
|
51
51
|
}
|
|
52
52
|
}, opts);
|
|
@@ -62,7 +62,7 @@ const timeSliceIterable = (src, consume, maxTime, opts) => fiber(function* () {
|
|
|
62
62
|
return;
|
|
63
63
|
}
|
|
64
64
|
buf.push(value);
|
|
65
|
-
} while (timeDiff(t0
|
|
65
|
+
} while (timeDiff(t0) < maxTime);
|
|
66
66
|
consume(buf);
|
|
67
67
|
yield;
|
|
68
68
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@thi.ng/fibers",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.24",
|
|
4
4
|
"description": "Process hierarchies & operators for cooperative multitasking",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -19,6 +19,10 @@
|
|
|
19
19
|
{
|
|
20
20
|
"type": "patreon",
|
|
21
21
|
"url": "https://patreon.com/thing_umbrella"
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
"type": "liberapay",
|
|
25
|
+
"url": "https://liberapay.com/thi.ng"
|
|
22
26
|
}
|
|
23
27
|
],
|
|
24
28
|
"author": "Karsten Schmidt (https://thi.ng)",
|
|
@@ -36,20 +40,20 @@
|
|
|
36
40
|
"tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
|
|
37
41
|
},
|
|
38
42
|
"dependencies": {
|
|
39
|
-
"@thi.ng/api": "^8.11.
|
|
40
|
-
"@thi.ng/arrays": "^2.10.
|
|
41
|
-
"@thi.ng/
|
|
42
|
-
"@thi.ng/
|
|
43
|
-
"@thi.ng/
|
|
44
|
-
"@thi.ng/
|
|
45
|
-
"@thi.ng/
|
|
46
|
-
"@thi.ng/
|
|
47
|
-
"@thi.ng/
|
|
43
|
+
"@thi.ng/api": "^8.11.15",
|
|
44
|
+
"@thi.ng/arrays": "^2.10.8",
|
|
45
|
+
"@thi.ng/buffers": "^0.2.1",
|
|
46
|
+
"@thi.ng/checks": "^3.6.17",
|
|
47
|
+
"@thi.ng/errors": "^2.5.21",
|
|
48
|
+
"@thi.ng/idgen": "^2.2.55",
|
|
49
|
+
"@thi.ng/logger": "^3.0.25",
|
|
50
|
+
"@thi.ng/random": "^4.1.6",
|
|
51
|
+
"@thi.ng/timestamp": "^1.1.0"
|
|
48
52
|
},
|
|
49
53
|
"devDependencies": {
|
|
50
|
-
"@microsoft/api-extractor": "^7.48.
|
|
51
|
-
"esbuild": "^0.24.
|
|
52
|
-
"typedoc": "^0.27.
|
|
54
|
+
"@microsoft/api-extractor": "^7.48.1",
|
|
55
|
+
"esbuild": "^0.24.2",
|
|
56
|
+
"typedoc": "^0.27.6",
|
|
53
57
|
"typescript": "^5.7.2"
|
|
54
58
|
},
|
|
55
59
|
"keywords": [
|
|
@@ -113,5 +117,5 @@
|
|
|
113
117
|
"status": "alpha",
|
|
114
118
|
"year": 2023
|
|
115
119
|
},
|
|
116
|
-
"gitHead": "
|
|
120
|
+
"gitHead": "48bf4c22bf23f88ac99f435106af2214f79a0be1\n"
|
|
117
121
|
}
|