jssm 5.143.6 → 5.143.7

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 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.6 at 6/11/2026, 7:50:45 PM
21
+ * Generated for version 5.143.7 at 6/11/2026, 8:01:49 PM
22
22
 
23
23
  -->
24
- # jssm 5.143.6
24
+ # jssm 5.143.7
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/) ·
@@ -418,7 +418,7 @@ If your contribution is missing here, please open an issue.
418
418
 
419
419
  - 6,201 specs with 100.0% coverage
420
420
  - 526 fuzz tests with 3.3% coverage
421
- - 5,782 TypeScript lines - 1.2 tests per line, 10.2 generated tests per line
421
+ - 5,781 TypeScript lines - 1.2 tests per line, 10.2 generated tests per line
422
422
 
423
423
  [![Actions Status](https://github.com/StoneCypher/jssm/workflows/Node%20CI/badge.svg)](https://github.com/StoneCypher/jssm/actions)
424
424
  [![NPM version](https://img.shields.io/npm/v/jssm.svg)](https://www.npmjs.com/package/jssm)
@@ -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.6";
22678
+ const version = "5.143.7";
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
- transitions.map((tr) => {
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
- const cursor_from = this._states.get(tr.from)
23060
- || { name: tr.from, from: [], to: [], complete: complete.includes(tr.from) };
23061
- if (!(this._states.has(tr.from))) {
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
- const cursor_to = this._states.get(tr.to)
23065
- || { name: tr.to, from: [], to: [], complete: complete.includes(tr.to) };
23066
- if (!(this._states.has(tr.to))) {
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
- const from_mapping = this._edge_map.get(tr.from) || new Map();
23107
- if (!(this._edge_map.has(tr.from))) {
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.6";
22703
+ const version = "5.143.7";
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
- transitions.map((tr) => {
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
- const cursor_from = this._states.get(tr.from)
23085
- || { name: tr.from, from: [], to: [], complete: complete.includes(tr.from) };
23086
- if (!(this._states.has(tr.from))) {
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
- const cursor_to = this._states.get(tr.to)
23090
- || { name: tr.to, from: [], to: [], complete: complete.includes(tr.to) };
23091
- if (!(this._states.has(tr.to))) {
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
- const from_mapping = this._edge_map.get(tr.from) || new Map();
23132
- if (!(this._edge_map.has(tr.from))) {
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);