@thi.ng/random 4.1.8 → 4.1.9

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +3 -243
  2. package/package.json +5 -6
package/CHANGELOG.md CHANGED
@@ -1,9 +1,11 @@
1
1
  # Change Log
2
2
 
3
- - **Last updated**: 2025-01-21T15:46:53Z
3
+ - **Last updated**: 2025-01-23T13:39:11Z
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.
7
+ Only versions published since **2022-01-01** are listed here.
8
+ Please consult the Git history for older version information.
7
9
  See [Conventional Commits](https://conventionalcommits.org/) for commit guidelines.
8
10
 
9
11
  **Note:** Unlisted _patch_ versions only involve non-code or otherwise excluded changes
@@ -102,245 +104,3 @@ and/or version bumps of transitive dependencies.
102
104
 
103
105
  - update IRandom, add SFC32 impl ([970d7f4](https://github.com/thi-ng/umbrella/commit/970d7f4))
104
106
  - add pickRandomKey(), weightedRandomKey() ([9b8ed07](https://github.com/thi-ng/umbrella/commit/9b8ed07))
105
-
106
- ### [3.2.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@3.2.2) (2021-11-21)
107
-
108
- #### 🩹 Bug fixes
109
-
110
- - off-by-one error in ARandom ([0bf9828](https://github.com/thi-ng/umbrella/commit/0bf9828))
111
-
112
- ## [3.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@3.2.0) (2021-11-17)
113
-
114
- #### 🚀 Features
115
-
116
- - Using workspaces for local tools ([bf7a404](https://github.com/thi-ng/umbrella/commit/bf7a404))
117
- Improving the overall build ergonomics
118
- - introduced a tools workspaces
119
- - imported it in all needed packages/examples
120
- - inclusive project root
121
-
122
- #### ♻️ Refactoring
123
-
124
- - testrunner to binary ([4ebbbb2](https://github.com/thi-ng/umbrella/commit/4ebbbb2))
125
- this commit reverts (partly) changes made in:
126
- ef346d7a8753590dc9094108a3d861a8dbd5dd2c
127
- overall purpose is better testament ergonomics:
128
- instead of having to pass NODE_OPTIONS with every invocation
129
- having a binary to handle this for us.
130
-
131
- ### [3.1.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@3.1.4) (2021-11-10)
132
-
133
- #### ♻️ Refactoring
134
-
135
- - update all countdown loops ([a5f374b](https://github.com/thi-ng/umbrella/commit/a5f374b))
136
-
137
- ## [3.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@3.1.0) (2021-10-25)
138
-
139
- #### 🚀 Features
140
-
141
- - add pickRandom() ([0899aed](https://github.com/thi-ng/umbrella/commit/0899aed))
142
-
143
- ### [3.0.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@3.0.1) (2021-10-13)
144
-
145
- #### ♻️ Refactoring
146
-
147
- - update imports in all pkgs ([5fa2b6f](https://github.com/thi-ng/umbrella/commit/5fa2b6f))
148
- - add .js suffix for all relative imports
149
- - update imports in all tests/pkgs ([effd591](https://github.com/thi-ng/umbrella/commit/effd591))
150
-
151
- # [3.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@3.0.0) (2021-10-12)
152
-
153
- #### 🛑 Breaking changes
154
-
155
- - major update of ALL pkgs (export maps, ESM only) ([0d1d6ea](https://github.com/thi-ng/umbrella/commit/0d1d6ea))
156
- - BREAKING CHANGE: discontinue CommonJS & UMD versions
157
- - only ESM modules will be published from now on
158
- - CJS obsolete due to ESM support in recent versions of node:
159
- - i.e. launch NodeJS via:
160
- - `node --experimental-specifier-resolution=node --experimental-repl-await`
161
- - in the node REPL use `await import(...)` instead of `require()`
162
- - UMD obsolete due to widespread browser support for ESM
163
- Also:
164
- - normalize/restructure/reorg all package.json files
165
- - cleanup all build scripts, remove obsolete
166
- - switch from mocha to [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament) for all tests
167
-
168
- #### ♻️ Refactoring
169
-
170
- - update all tests in _all_ pkgs ([8b582bc](https://github.com/thi-ng/umbrella/commit/8b582bc))
171
- - update all to use [@thi.ng/testament](https://github.com/thi-ng/umbrella/tree/main/packages/testament)
172
- - update all test stubs ([f2d6d53](https://github.com/thi-ng/umbrella/commit/f2d6d53))
173
- - update imports ([138571a](https://github.com/thi-ng/umbrella/commit/138571a))
174
- - update deps & imports in various pkgs ([e1cf29e](https://github.com/thi-ng/umbrella/commit/e1cf29e))
175
- - largely related to recent updates/restructuring of these packages:
176
- - api
177
- - defmulti
178
- - errors
179
- - logger
180
-
181
- ### [2.4.4](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@2.4.4) (2021-08-04)
182
-
183
- #### 🩹 Bug fixes
184
-
185
- - update weightedRandom() ([70afa70](https://github.com/thi-ng/umbrella/commit/70afa70))
186
- - assume missing weights as zero
187
-
188
- ## [2.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@2.4.0) (2021-04-19)
189
-
190
- #### 🚀 Features
191
-
192
- - add uniqueValuesFrom/uniqueIndices() ([3b3b5d8](https://github.com/thi-ng/umbrella/commit/3b3b5d8))
193
-
194
- #### 🩹 Bug fixes
195
-
196
- - HOF issue w/ exponential() ([12586b9](https://github.com/thi-ng/umbrella/commit/12586b9))
197
-
198
- #### ♻️ Refactoring
199
-
200
- - minor updates weightedRandom() ([c6741bc](https://github.com/thi-ng/umbrella/commit/c6741bc))
201
-
202
- ### [2.3.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@2.3.1) (2021-02-24)
203
-
204
- #### 🩹 Bug fixes
205
-
206
- - update weightedRandom() ([b1cf4d8](https://github.com/thi-ng/umbrella/commit/b1cf4d8))
207
- - don't throw error if total weights <= 0 (only print warning)
208
-
209
- ## [2.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@2.3.0) (2021-02-20)
210
-
211
- #### 🚀 Features
212
-
213
- - add coin()/fairCoin() ([ed66a64](https://github.com/thi-ng/umbrella/commit/ed66a64))
214
-
215
- #### ♻️ Refactoring
216
-
217
- - update uuid() ([91372d9](https://github.com/thi-ng/umbrella/commit/91372d9))
218
- - reuse fn from [@thi.ng/hex](https://github.com/thi-ng/umbrella/tree/main/packages/hex)
219
-
220
- ## [2.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@2.2.0) (2021-01-13)
221
-
222
- #### 🚀 Features
223
-
224
- - add opt start/end for randomBytes() ([4d095da](https://github.com/thi-ng/umbrella/commit/4d095da))
225
- - add CRYPTO IRandom impl ([94e69c1](https://github.com/thi-ng/umbrella/commit/94e69c1))
226
-
227
- #### 🩹 Bug fixes
228
-
229
- - add opt start index arg for uuid() ([268ec3f](https://github.com/thi-ng/umbrella/commit/268ec3f))
230
-
231
- #### ⏱ Performance improvements
232
-
233
- - minor update weightedRandom() ([258fd7b](https://github.com/thi-ng/umbrella/commit/258fd7b))
234
- - avoid sorting if no weights are given
235
-
236
- #### ♻️ Refactoring
237
-
238
- - minor update randomID() ([9d278ad](https://github.com/thi-ng/umbrella/commit/9d278ad))
239
-
240
- ### [2.1.2](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@2.1.2) (2020-12-07)
241
-
242
- #### ♻️ Refactoring
243
-
244
- - update type-only imports in various tests/pkgs ([3fd9c24](https://github.com/thi-ng/umbrella/commit/3fd9c24))
245
-
246
- ### [2.1.1](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@2.1.1) (2020-11-26)
247
-
248
- #### 🩹 Bug fixes
249
-
250
- - add missing subdir to pkg "files" ([916dbe7](https://github.com/thi-ng/umbrella/commit/916dbe7))
251
-
252
- ## [2.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@2.1.0) (2020-11-24)
253
-
254
- #### 🚀 Features
255
-
256
- - add randomBytesFrom(), update UUID fns ([b31c872](https://github.com/thi-ng/umbrella/commit/b31c872))
257
- - add [@thi.ng/hex](https://github.com/thi-ng/umbrella/tree/main/packages/hex) dependency
258
- - update uuidv4Bytes() to take opt IRandom arg
259
- - refactor/optimize uuid()
260
- - add tests
261
- - add distribution HOFs, move gaussian() ([9328821](https://github.com/thi-ng/umbrella/commit/9328821))
262
- - add exponential(), geometric(), normal(), uniform() HOFs
263
- - migrate gaussian() to /distributions
264
-
265
- # [2.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@2.0.0) (2020-08-28)
266
-
267
- #### 🛑 Breaking changes
268
-
269
- - add INorm, extract gaussianCLT() ([c687598](https://github.com/thi-ng/umbrella/commit/c687598))
270
- - BREAKING CHANGE: remove gaussian() from IRandom,
271
- extract as standalone gaussianCLT()
272
- - update gaussianCLT() default args to be more meaningful
273
-
274
- #### 🩹 Bug fixes
275
-
276
- - off-by-one error in SYSTEM.int() ([ca0492d](https://github.com/thi-ng/umbrella/commit/ca0492d))
277
-
278
- #### ♻️ Refactoring
279
-
280
- - update imports/docstrings ([ecb2a36](https://github.com/thi-ng/umbrella/commit/ecb2a36))
281
-
282
- ## [1.4.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@1.4.0) (2020-03-01)
283
-
284
- #### 🚀 Features
285
-
286
- - add Xoshiro128, refactor default seeds ([b535628](https://github.com/thi-ng/umbrella/commit/b535628))
287
-
288
- #### 🩹 Bug fixes
289
-
290
- - use correct 160bit default seed for XorWow ([38d511b](https://github.com/thi-ng/umbrella/commit/38d511b))
291
-
292
- ## [1.3.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@1.3.0) (2020-02-25)
293
-
294
- #### 🚀 Features
295
-
296
- - add uuidv4Bytes() ([e9ea10f](https://github.com/thi-ng/umbrella/commit/e9ea10f))
297
-
298
- #### ♻️ Refactoring
299
-
300
- - update imports, internal restruct ([8548a80](https://github.com/thi-ng/umbrella/commit/8548a80))
301
-
302
- ## [1.2.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@1.2.0) (2020-01-26)
303
-
304
- #### 🚀 Features
305
-
306
- - add randomBytes() wrapper ([c536bcd](https://github.com/thi-ng/umbrella/commit/c536bcd))
307
-
308
- ### [1.1.15](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@1.1.15) (2020-01-24)
309
-
310
- #### ⏱ Performance improvements
311
-
312
- - minor update ARandom.norm() ([babbbaa](https://github.com/thi-ng/umbrella/commit/babbbaa))
313
-
314
- ### [1.1.14](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@1.1.14) (2019-11-30)
315
-
316
- #### ♻️ Refactoring
317
-
318
- - update weightedRandom ([d609182](https://github.com/thi-ng/umbrella/commit/d609182))
319
-
320
- ## [1.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@1.1.0) (2019-02-15)
321
-
322
- #### 🚀 Features
323
-
324
- - add randomID() & weightedRandom() ([f719724](https://github.com/thi-ng/umbrella/commit/f719724))
325
-
326
- #### 🩹 Bug fixes
327
-
328
- - add opt scale arg to IRandom.float() ([5a7e448](https://github.com/thi-ng/umbrella/commit/5a7e448))
329
-
330
- # [1.0.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@1.0.0) (2019-01-21)
331
-
332
- #### 🛑 Breaking changes
333
-
334
- - update package build scripts & outputs, imports in ~50 packages ([b54b703](https://github.com/thi-ng/umbrella/commit/b54b703))
335
- - BREAKING CHANGE: enabled multi-outputs (ES6 modules, CJS, UMD)
336
- - build scripts now first build ES6 modules in package root, then call
337
- `scripts/bundle-module` to build minified CJS & UMD bundles in `/lib`
338
- - all imports MUST be updated to only refer to package level
339
- (not individual files anymore). tree shaking in user land will get rid of
340
- all unused imported symbols.
341
-
342
- ## [0.1.0](https://github.com/thi-ng/umbrella/tree/@thi.ng/random@0.1.0) (2018-11-24)
343
-
344
- #### 🚀 Features
345
-
346
- - re-import, extend & refactor random package (MBP2010) ([4aea85d](https://github.com/thi-ng/umbrella/commit/4aea85d))
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thi.ng/random",
3
- "version": "4.1.8",
3
+ "version": "4.1.9",
4
4
  "description": "Pseudo-random number generators w/ unified API, distributions, weighted choices, ID generation",
5
5
  "type": "module",
6
6
  "module": "./index.js",
@@ -40,14 +40,13 @@
40
40
  "tool:tangle": "../../node_modules/.bin/tangle src/**/*.ts"
41
41
  },
42
42
  "dependencies": {
43
- "@thi.ng/api": "^8.11.17",
44
- "@thi.ng/errors": "^2.5.23"
43
+ "@thi.ng/api": "^8.11.18",
44
+ "@thi.ng/errors": "^2.5.24"
45
45
  },
46
46
  "devDependencies": {
47
- "@microsoft/api-extractor": "^7.48.1",
48
47
  "esbuild": "^0.24.2",
49
48
  "typedoc": "^0.27.6",
50
- "typescript": "^5.7.2"
49
+ "typescript": "^5.7.3"
51
50
  },
52
51
  "keywords": [
53
52
  "binary",
@@ -161,5 +160,5 @@
161
160
  "ksuid"
162
161
  ]
163
162
  },
164
- "gitHead": "22f6d518aed5951bb37b406c8ae85a6c3e6be517\n"
163
+ "gitHead": "b92b48abda9941d608be8a2e1c83447e679a6f79\n"
165
164
  }