@thi.ng/fibers 1.0.23 → 1.0.25

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2024-12-12T10:11:58Z
3
+ - **Last updated**: 2025-01-04T21:07: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
  [![Mastodon Follow](https://img.shields.io/mastodon/follow/109331703950160316?domain=https%3A%2F%2Fmastodon.thi.ng&style=social)](https://mastodon.thi.ng/@toxi)
8
8
 
9
9
  > [!NOTE]
10
- > This is one of 199 standalone projects, maintained as part
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.45 KB
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
 
@@ -459,4 +459,4 @@ If this project contributes to an academic publication, please cite it as:
459
459
 
460
460
  ## License
461
461
 
462
- © 2023 - 2024 Karsten Schmidt // Apache License 2.0
462
+ © 2023 - 2025 Karsten Schmidt // Apache License 2.0
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/bench/now";
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, now()) < maxTime);
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, now()) < maxTime);
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.23",
3
+ "version": "1.0.25",
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.14",
40
- "@thi.ng/arrays": "^2.10.7",
41
- "@thi.ng/bench": "^3.6.7",
42
- "@thi.ng/buffers": "^0.2.0",
43
- "@thi.ng/checks": "^3.6.16",
44
- "@thi.ng/errors": "^2.5.20",
45
- "@thi.ng/idgen": "^2.2.54",
46
- "@thi.ng/logger": "^3.0.24",
47
- "@thi.ng/random": "^4.1.5"
43
+ "@thi.ng/api": "^8.11.16",
44
+ "@thi.ng/arrays": "^2.10.9",
45
+ "@thi.ng/buffers": "^1.0.1",
46
+ "@thi.ng/checks": "^3.6.18",
47
+ "@thi.ng/errors": "^2.5.22",
48
+ "@thi.ng/idgen": "^2.2.56",
49
+ "@thi.ng/logger": "^3.0.26",
50
+ "@thi.ng/random": "^4.1.7",
51
+ "@thi.ng/timestamp": "^1.1.1"
48
52
  },
49
53
  "devDependencies": {
50
- "@microsoft/api-extractor": "^7.48.0",
51
- "esbuild": "^0.24.0",
52
- "typedoc": "^0.27.4",
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": "113931a9094c28ae069bcea99adcf4222784d64f\n"
120
+ "gitHead": "56c1d57a96565bbcc8c06c73779a619bba0db368\n"
117
121
  }