jssm 5.143.6 → 5.143.8
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 +6 -6
- package/dist/cdn/instance.js +16 -12
- package/dist/cdn/viz.js +16 -12
- package/dist/cli/fsl-render.cjs +1 -1
- package/dist/cli/fsl.cjs +1 -1
- package/dist/deno/README.md +6 -6
- package/dist/deno/jssm.d.ts +22 -2
- package/dist/deno/jssm.js +1 -1
- package/dist/jssm.es5.cjs +1 -1
- package/dist/jssm.es5.iife.js +1 -1
- package/dist/jssm.es6.mjs +1 -1
- package/dist/jssm_viz.cjs +1 -1
- package/dist/jssm_viz.iife.cjs +1 -1
- package/dist/jssm_viz.mjs +1 -1
- package/jssm.es5.d.cts +22 -2
- package/jssm.es6.d.ts +22 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -18,10 +18,10 @@ Please edit the file it's derived from, instead: `./src/md/readme_base.md`
|
|
|
18
18
|
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
* Generated for version 5.143.
|
|
21
|
+
* Generated for version 5.143.8 at 6/12/2026, 1:28:17 AM
|
|
22
22
|
|
|
23
23
|
-->
|
|
24
|
-
# jssm 5.143.
|
|
24
|
+
# jssm 5.143.8
|
|
25
25
|
|
|
26
26
|
[**Try the live editor**](https://stonecypher.github.io/jssm-viz-demo/graph_explorer.html) ·
|
|
27
27
|
[Documentation](https://stonecypher.github.io/jssm/docs/) ·
|
|
@@ -281,7 +281,7 @@ That decision shows up everywhere downstream:
|
|
|
281
281
|
or run `npm run benny` against your own machine.
|
|
282
282
|
|
|
283
283
|
- **More thoroughly tested than any other JavaScript state-machine
|
|
284
|
-
library.** 6,
|
|
284
|
+
library.** 6,734 tests at 100.0% line coverage
|
|
285
285
|
([report](https://coveralls.io/github/StoneCypher/jssm)), plus
|
|
286
286
|
fuzz testing via `fast-check`, with parser test data across ten natural
|
|
287
287
|
languages and Emoji.
|
|
@@ -414,11 +414,11 @@ If your contribution is missing here, please open an issue.
|
|
|
414
414
|
|
|
415
415
|
<br/>
|
|
416
416
|
|
|
417
|
-
***6,
|
|
417
|
+
***6,734 tests***, run 58,808 times.
|
|
418
418
|
|
|
419
|
-
- 6,
|
|
419
|
+
- 6,208 specs with 100.0% coverage
|
|
420
420
|
- 526 fuzz tests with 3.3% coverage
|
|
421
|
-
- 5,
|
|
421
|
+
- 5,805 TypeScript lines - 1.2 tests per line, 10.1 generated tests per line
|
|
422
422
|
|
|
423
423
|
[](https://github.com/StoneCypher/jssm/actions)
|
|
424
424
|
[](https://www.npmjs.com/package/jssm)
|
package/dist/cdn/instance.js
CHANGED
|
@@ -22675,7 +22675,7 @@ var constants = /*#__PURE__*/Object.freeze({
|
|
|
22675
22675
|
* Useful for runtime diagnostics and for embedding in serialized machine
|
|
22676
22676
|
* snapshots so that deserializers can detect version-skew.
|
|
22677
22677
|
*/
|
|
22678
|
-
const version = "5.143.
|
|
22678
|
+
const version = "5.143.8";
|
|
22679
22679
|
|
|
22680
22680
|
// whargarbl lots of these return arrays could/should be sets
|
|
22681
22681
|
const { state_name_chars, state_name_first_chars, action_label_chars } = constants;
|
|
@@ -23047,8 +23047,11 @@ class Machine {
|
|
|
23047
23047
|
// membership so the dedup check is O(1) per edge rather than an O(out-degree)
|
|
23048
23048
|
// array scan (which made construction O(V*E) on dense graphs). #673
|
|
23049
23049
|
const seen_edges = new Map();
|
|
23050
|
-
// walk the transitions
|
|
23051
|
-
|
|
23050
|
+
// walk the transitions. single-lookup cursor fetches: each endpoint was
|
|
23051
|
+
// previously a get followed by a has on the same key (four hashes per
|
|
23052
|
+
// edge); the undefined check on the get's result carries the same
|
|
23053
|
+
// information. #706
|
|
23054
|
+
for (const tr of transitions) {
|
|
23052
23055
|
if (tr.from === undefined) {
|
|
23053
23056
|
throw new JssmError(this, `transition must define 'from': ${JSON.stringify(tr)}`);
|
|
23054
23057
|
}
|
|
@@ -23056,14 +23059,14 @@ class Machine {
|
|
|
23056
23059
|
throw new JssmError(this, `transition must define 'to': ${JSON.stringify(tr)}`);
|
|
23057
23060
|
}
|
|
23058
23061
|
// get the cursors. what a mess
|
|
23059
|
-
|
|
23060
|
-
|
|
23061
|
-
|
|
23062
|
+
let cursor_from = this._states.get(tr.from);
|
|
23063
|
+
if (cursor_from === undefined) {
|
|
23064
|
+
cursor_from = { name: tr.from, from: [], to: [], complete: complete.includes(tr.from) };
|
|
23062
23065
|
this._new_state(cursor_from);
|
|
23063
23066
|
}
|
|
23064
|
-
|
|
23065
|
-
|
|
23066
|
-
|
|
23067
|
+
let cursor_to = this._states.get(tr.to);
|
|
23068
|
+
if (cursor_to === undefined) {
|
|
23069
|
+
cursor_to = { name: tr.to, from: [], to: [], complete: complete.includes(tr.to) };
|
|
23067
23070
|
this._new_state(cursor_to);
|
|
23068
23071
|
}
|
|
23069
23072
|
// guard against existing connections being re-added — O(1) via the
|
|
@@ -23103,8 +23106,9 @@ class Machine {
|
|
|
23103
23106
|
this._after_mapping.set(tr.from, [tr.to, tr.after_time]);
|
|
23104
23107
|
}
|
|
23105
23108
|
// set up the mapping, so that edges can be looked up by endpoint pairs
|
|
23106
|
-
|
|
23107
|
-
if (
|
|
23109
|
+
let from_mapping = this._edge_map.get(tr.from);
|
|
23110
|
+
if (from_mapping === undefined) {
|
|
23111
|
+
from_mapping = new Map();
|
|
23108
23112
|
this._edge_map.set(tr.from, from_mapping);
|
|
23109
23113
|
}
|
|
23110
23114
|
// const to_mapping = from_mapping.get(tr.to);
|
|
@@ -23161,7 +23165,7 @@ class Machine {
|
|
|
23161
23165
|
}
|
|
23162
23166
|
*/
|
|
23163
23167
|
}
|
|
23164
|
-
}
|
|
23168
|
+
}
|
|
23165
23169
|
if (Array.isArray(property_definition)) {
|
|
23166
23170
|
property_definition.forEach(pr => {
|
|
23167
23171
|
this._property_keys.add(pr.name);
|
package/dist/cdn/viz.js
CHANGED
|
@@ -22700,7 +22700,7 @@ var constants = /*#__PURE__*/Object.freeze({
|
|
|
22700
22700
|
* Useful for runtime diagnostics and for embedding in serialized machine
|
|
22701
22701
|
* snapshots so that deserializers can detect version-skew.
|
|
22702
22702
|
*/
|
|
22703
|
-
const version = "5.143.
|
|
22703
|
+
const version = "5.143.8";
|
|
22704
22704
|
|
|
22705
22705
|
// whargarbl lots of these return arrays could/should be sets
|
|
22706
22706
|
const { state_name_chars, state_name_first_chars, action_label_chars } = constants;
|
|
@@ -23072,8 +23072,11 @@ class Machine {
|
|
|
23072
23072
|
// membership so the dedup check is O(1) per edge rather than an O(out-degree)
|
|
23073
23073
|
// array scan (which made construction O(V*E) on dense graphs). #673
|
|
23074
23074
|
const seen_edges = new Map();
|
|
23075
|
-
// walk the transitions
|
|
23076
|
-
|
|
23075
|
+
// walk the transitions. single-lookup cursor fetches: each endpoint was
|
|
23076
|
+
// previously a get followed by a has on the same key (four hashes per
|
|
23077
|
+
// edge); the undefined check on the get's result carries the same
|
|
23078
|
+
// information. #706
|
|
23079
|
+
for (const tr of transitions) {
|
|
23077
23080
|
if (tr.from === undefined) {
|
|
23078
23081
|
throw new JssmError(this, `transition must define 'from': ${JSON.stringify(tr)}`);
|
|
23079
23082
|
}
|
|
@@ -23081,14 +23084,14 @@ class Machine {
|
|
|
23081
23084
|
throw new JssmError(this, `transition must define 'to': ${JSON.stringify(tr)}`);
|
|
23082
23085
|
}
|
|
23083
23086
|
// get the cursors. what a mess
|
|
23084
|
-
|
|
23085
|
-
|
|
23086
|
-
|
|
23087
|
+
let cursor_from = this._states.get(tr.from);
|
|
23088
|
+
if (cursor_from === undefined) {
|
|
23089
|
+
cursor_from = { name: tr.from, from: [], to: [], complete: complete.includes(tr.from) };
|
|
23087
23090
|
this._new_state(cursor_from);
|
|
23088
23091
|
}
|
|
23089
|
-
|
|
23090
|
-
|
|
23091
|
-
|
|
23092
|
+
let cursor_to = this._states.get(tr.to);
|
|
23093
|
+
if (cursor_to === undefined) {
|
|
23094
|
+
cursor_to = { name: tr.to, from: [], to: [], complete: complete.includes(tr.to) };
|
|
23092
23095
|
this._new_state(cursor_to);
|
|
23093
23096
|
}
|
|
23094
23097
|
// guard against existing connections being re-added — O(1) via the
|
|
@@ -23128,8 +23131,9 @@ class Machine {
|
|
|
23128
23131
|
this._after_mapping.set(tr.from, [tr.to, tr.after_time]);
|
|
23129
23132
|
}
|
|
23130
23133
|
// set up the mapping, so that edges can be looked up by endpoint pairs
|
|
23131
|
-
|
|
23132
|
-
if (
|
|
23134
|
+
let from_mapping = this._edge_map.get(tr.from);
|
|
23135
|
+
if (from_mapping === undefined) {
|
|
23136
|
+
from_mapping = new Map();
|
|
23133
23137
|
this._edge_map.set(tr.from, from_mapping);
|
|
23134
23138
|
}
|
|
23135
23139
|
// const to_mapping = from_mapping.get(tr.to);
|
|
@@ -23186,7 +23190,7 @@ class Machine {
|
|
|
23186
23190
|
}
|
|
23187
23191
|
*/
|
|
23188
23192
|
}
|
|
23189
|
-
}
|
|
23193
|
+
}
|
|
23190
23194
|
if (Array.isArray(property_definition)) {
|
|
23191
23195
|
property_definition.forEach(pr => {
|
|
23192
23196
|
this._property_keys.add(pr.name);
|