@thi.ng/random 3.6.12 → 3.6.14

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**: 2023-11-04T22:20:11Z
3
+ - **Last updated**: 2023-11-09T10:28:19Z
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,12 @@ 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
+ ### [3.6.13](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@3.6.13) (2023-11-09)
13
+
14
+ #### ♻️ Refactoring
15
+
16
+ - update all tests (packages A-S) ([e3085e4](https://github.com/thi-ng/umbrella/commit/e3085e4))
17
+
12
18
  ### [3.6.6](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@3.6.6) (2023-10-05)
13
19
 
14
20
  #### 🩹 Bug fixes
package/README.md CHANGED
@@ -94,7 +94,7 @@ For Node.js REPL:
94
94
  const random = await import("@thi.ng/random");
95
95
  ```
96
96
 
97
- Package sizes (brotli'd, pre-treeshake): ESM: 1.88 KB
97
+ Package sizes (brotli'd, pre-treeshake): ESM: 1.99 KB
98
98
 
99
99
  ## Dependencies
100
100
 
package/crypto.js CHANGED
@@ -11,6 +11,9 @@ import { randomBytes } from "./random-bytes.js";
11
11
  *
12
12
  */
13
13
  export class Crypto extends ARandom {
14
+ buffer;
15
+ u32;
16
+ i;
14
17
  /**
15
18
  * @param size - buffer size in bytes (will be rounded to next multiple of 4)
16
19
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/random",
3
- "version": "3.6.12",
3
+ "version": "3.6.14",
4
4
  "description": "Pseudo-random number generators w/ unified API, distributions, weighted choices, ID generation",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -28,23 +28,22 @@
28
28
  "clean": "rimraf --glob '*.js' '*.d.ts' '*.map' doc distributions",
29
29
  "doc": "typedoc --excludePrivate --excludeInternal --out doc src/index.ts",
30
30
  "doc:ae": "mkdir -p .ae/doc .ae/temp && api-extractor run --local --verbose",
31
- "doc:readme": "yarn doc:stats && tools:readme",
32
- "doc:stats": "tools:module-stats",
31
+ "doc:readme": "bun ../../tools/src/module-stats.ts && bun ../../tools/src/readme.ts",
33
32
  "pub": "yarn npm publish --access public",
34
- "test": "testament test"
33
+ "test": "bun test"
35
34
  },
36
35
  "dependencies": {
37
- "@thi.ng/api": "^8.9.6",
38
- "@thi.ng/checks": "^3.4.6",
39
- "@thi.ng/errors": "^2.4.0",
40
- "@thi.ng/hex": "^2.3.18"
36
+ "@thi.ng/api": "^8.9.8",
37
+ "@thi.ng/checks": "^3.4.8",
38
+ "@thi.ng/errors": "^2.4.2",
39
+ "@thi.ng/hex": "^2.3.20"
41
40
  },
42
41
  "devDependencies": {
43
- "@microsoft/api-extractor": "^7.38.0",
44
- "@thi.ng/testament": "^0.3.24",
42
+ "@microsoft/api-extractor": "^7.38.2",
43
+ "@thi.ng/testament": "^0.4.1",
45
44
  "rimraf": "^5.0.5",
46
45
  "tools": "^0.0.1",
47
- "typedoc": "^0.25.2",
46
+ "typedoc": "^0.25.3",
48
47
  "typescript": "^5.2.2"
49
48
  },
50
49
  "keywords": [
@@ -156,5 +155,5 @@
156
155
  "ksuid"
157
156
  ]
158
157
  },
159
- "gitHead": "336bd1bf95825b3c318a3ab49c54451c94aaa883\n"
158
+ "gitHead": "669a3151e4302480244fe3e60eff5e732ea5b7a7\n"
160
159
  }
package/sfc32.js CHANGED
@@ -8,6 +8,7 @@ import { DEFAULT_SEED_128 } from "./constants.js";
8
8
  * - http://pracrand.sourceforge.net/
9
9
  */
10
10
  export class SFC32 extends ARandom {
11
+ buffer;
11
12
  constructor(seed = DEFAULT_SEED_128) {
12
13
  super();
13
14
  this.buffer = new Uint32Array(4);
package/smush32.js CHANGED
@@ -8,6 +8,7 @@ import { DEFAULT_SEED_32 } from "./constants.js";
8
8
  * - https://gist.github.com/voidqk/d112165a26b45244a65298933c0349a4
9
9
  */
10
10
  export class Smush32 extends ARandom {
11
+ buffer;
11
12
  constructor(seed = DEFAULT_SEED_32) {
12
13
  super();
13
14
  this.buffer = new Uint32Array([seed, 0]);
package/xorshift128.js CHANGED
@@ -5,6 +5,7 @@ import { DEFAULT_SEED_128 } from "./constants.js";
5
5
  * Reference: https://en.wikipedia.org/wiki/Xorshift
6
6
  */
7
7
  export class XorShift128 extends ARandom {
8
+ buffer;
8
9
  constructor(seed = DEFAULT_SEED_128) {
9
10
  super();
10
11
  this.buffer = new Uint32Array(4);
package/xorwow.js CHANGED
@@ -5,6 +5,7 @@ import { DEFAULT_SEED_160 } from "./constants.js";
5
5
  * Reference: https://en.wikipedia.org/wiki/Xorshift#xorwow
6
6
  */
7
7
  export class XorWow extends ARandom {
8
+ buffer;
8
9
  constructor(seed = DEFAULT_SEED_160) {
9
10
  super();
10
11
  this.buffer = new Uint32Array(5);
package/xoshiro128.js CHANGED
@@ -7,6 +7,7 @@ import { DEFAULT_SEED_128 } from "./constants.js";
7
7
  * - http://prng.di.unimi.it/xoshiro128plusplus.c
8
8
  */
9
9
  export class Xoshiro128 extends ARandom {
10
+ buffer;
10
11
  constructor(seed = DEFAULT_SEED_128) {
11
12
  super();
12
13
  this.buffer = new Uint32Array(4);
package/xsadd.js CHANGED
@@ -5,6 +5,7 @@ import { DEFAULT_SEED_32 } from "./constants.js";
5
5
  * Reference: https://github.com/MersenneTwister-Lab/XSadd/blob/develop/xsadd.h
6
6
  */
7
7
  export class XsAdd extends ARandom {
8
+ buffer;
8
9
  constructor(seed = DEFAULT_SEED_32) {
9
10
  super();
10
11
  this.buffer = new Uint32Array(4);