jssm 5.121.1 → 5.122.2

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.121.1 at 5/17/2026, 11:02:30 AM
21
+ * Generated for version 5.122.2 at 5/17/2026, 9:09:21 PM
22
22
 
23
23
  -->
24
- # jssm 5.121.1
24
+ # jssm 5.122.2
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,027 tests at 100.0% line coverage
284
+ library.** 6,041 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,10 +414,10 @@ If your contribution is missing here, please open an issue.
414
414
 
415
415
  <br/>
416
416
 
417
- ***6,027 tests***, run 56,814 times.
417
+ ***6,041 tests***, run 56,828 times.
418
418
 
419
- - 5,514 specs with 100.0% coverage
420
- - 513 fuzz tests with 20.2% coverage
419
+ - 5,528 specs with 100.0% coverage
420
+ - 513 fuzz tests with 4.6% coverage
421
421
  - 4,281 TypeScript lines - 1.4 tests per line, 13.3 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)
package/dist/cdn/viz.js CHANGED
@@ -21041,7 +21041,7 @@ var constants = /*#__PURE__*/Object.freeze({
21041
21041
  * Useful for runtime diagnostics and for embedding in serialized machine
21042
21042
  * snapshots so that deserializers can detect version-skew.
21043
21043
  */
21044
- const version = "5.121.1";
21044
+ const version = "5.122.2";
21045
21045
 
21046
21046
  // whargarbl lots of these return arrays could/should be sets
21047
21047
  const { state_name_chars, state_name_first_chars, action_label_chars } = constants;
@@ -21470,12 +21470,18 @@ class Machine {
21470
21470
  }
21471
21471
  // done building, do checks
21472
21472
  // assert all props are valid
21473
+ // _state_properties keys are always JSON.stringify([string, string]),
21474
+ // built by name_bind_prop_and_state which throws on non-strings — so the
21475
+ // non-array / non-string else-arms below are unreachable, not untested.
21473
21476
  this._state_properties.forEach((_value, key) => {
21474
21477
  const inside = JSON.parse(key);
21478
+ /* v8 ignore else */
21475
21479
  if (Array.isArray(inside)) {
21476
21480
  const j_property = inside[0];
21481
+ /* v8 ignore else */
21477
21482
  if (typeof j_property === 'string') {
21478
21483
  const j_state = inside[1];
21484
+ /* v8 ignore else */
21479
21485
  if (typeof j_state === 'string') {
21480
21486
  if (!(this.known_prop(j_property))) {
21481
21487
  throw new JssmError(this, `State "${j_state}" has property "${j_property}" which is not globally declared`);
@@ -23728,9 +23734,7 @@ class Machine {
23728
23734
  layers.push(theme.state);
23729
23735
  }
23730
23736
  });
23731
- if (this._state_style) {
23732
- layers.push(this._state_style);
23733
- }
23737
+ layers.push(this._state_style);
23734
23738
  // hooked state style
23735
23739
  // if (this.has_hooks(state)) {
23736
23740
  // layers.push(base_theme.hooked);
@@ -23747,9 +23751,7 @@ class Machine {
23747
23751
  layers.push(theme.terminal);
23748
23752
  }
23749
23753
  });
23750
- if (this._terminal_state_style) {
23751
- layers.push(this._terminal_state_style);
23752
- }
23754
+ layers.push(this._terminal_state_style);
23753
23755
  }
23754
23756
  // start state style
23755
23757
  if (this.is_start_state(state)) {
@@ -23759,9 +23761,7 @@ class Machine {
23759
23761
  layers.push(theme.start);
23760
23762
  }
23761
23763
  });
23762
- if (this._start_state_style) {
23763
- layers.push(this._start_state_style);
23764
- }
23764
+ layers.push(this._start_state_style);
23765
23765
  }
23766
23766
  // end state style
23767
23767
  if (this.is_end_state(state)) {
@@ -23771,9 +23771,7 @@ class Machine {
23771
23771
  layers.push(theme.end);
23772
23772
  }
23773
23773
  });
23774
- if (this._end_state_style) {
23775
- layers.push(this._end_state_style);
23776
- }
23774
+ layers.push(this._end_state_style);
23777
23775
  }
23778
23776
  // active state style
23779
23777
  if (this.state() === state) {
@@ -23783,9 +23781,7 @@ class Machine {
23783
23781
  layers.push(theme.active);
23784
23782
  }
23785
23783
  });
23786
- if (this._active_state_style) {
23787
- layers.push(this._active_state_style);
23788
- }
23784
+ layers.push(this._active_state_style);
23789
23785
  }
23790
23786
  const individual_style = {}, decl = this._state_declarations.get(state);
23791
23787
  individual_style.color = decl === null || decl === void 0 ? void 0 : decl.color;