jssm 5.157.1 → 5.157.3

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.157.1 at 7/2/2026, 1:36:48 AM
21
+ * Generated for version 5.157.3 at 7/2/2026, 7:29:57 AM
22
22
 
23
23
  -->
24
- # jssm 5.157.1
24
+ # jssm 5.157.3
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/) ·
@@ -312,7 +312,7 @@ That decision shows up everywhere downstream:
312
312
  or run `npm run benny` against your own machine.
313
313
 
314
314
  - **More thoroughly tested than any other JavaScript state-machine
315
- library.** 7,866 tests at 100.0% line coverage
315
+ library.** 7,870 tests at 100.0% line coverage
316
316
  ([report](https://coveralls.io/github/StoneCypher/jssm)), plus
317
317
  fuzz testing via `fast-check`, with parser test data across ten natural
318
318
  languages and Emoji.
@@ -445,11 +445,11 @@ If your contribution is missing here, please open an issue.
445
445
 
446
446
  <br/>
447
447
 
448
- ***7,866 tests***, run 82,908 times.
448
+ ***7,870 tests***, run 82,912 times.
449
449
 
450
- - 7,108 specs with 100.0% coverage
451
- - 758 fuzz tests with 53.5% coverage
452
- - 9,879 TypeScript lines - 0.8 tests per line, 8.4 generated tests per line
450
+ - 7,112 specs with 100.0% coverage
451
+ - 758 fuzz tests with 52.9% coverage
452
+ - 9,969 TypeScript lines - 0.8 tests per line, 8.3 generated tests per line
453
453
 
454
454
  [![Actions Status](https://github.com/StoneCypher/jssm/workflows/Node%20CI/badge.svg)](https://github.com/StoneCypher/jssm/actions)
455
455
  [![NPM version](https://img.shields.io/npm/v/jssm.svg)](https://www.npmjs.com/package/jssm)
@@ -22750,6 +22750,12 @@ function fold_graph_config(aliases, explicit_block) {
22750
22750
  * semantic error thrown will carry a `source_location` span
22751
22751
  * pointing at the offending statement.
22752
22752
  *
22753
+ * @throws {JssmError} If the document declares no transitions (for example a
22754
+ * states-first document of only `state` blocks) — a
22755
+ * machine requires at least one transition; also for
22756
+ * repeated property definitions, group errors, and other
22757
+ * semantic problems noted throughout.
22758
+ *
22753
22759
  */
22754
22760
  function compile(tree) {
22755
22761
  const results = {
@@ -22836,6 +22842,14 @@ function compile(tree) {
22836
22842
  // for the same (source_state, action) by depth-specificity before any
22837
22843
  // further processing (the runtime would otherwise reject the duplicates).
22838
22844
  const assembled_transitions = resolve_transition_conflicts(results['transition']);
22845
+ // A machine with no transitions cannot be constructed (and previously
22846
+ // crashed right here with a raw TypeError reading `[0].from`). This is a
22847
+ // natural mid-authoring document shape — state blocks first, wiring later —
22848
+ // and the editor's lint shows this message verbatim, so name the actual
22849
+ // problem instead of leaking an internal error.
22850
+ if (assembled_transitions.length === 0) {
22851
+ throw new JssmError(undefined, 'This machine has no transitions, only declarations; a machine requires at least one transition (like `a -> b;`)');
22852
+ }
22839
22853
  const result_cfg = {
22840
22854
  start_states: results.start_states.length ? results.start_states : [assembled_transitions[0].from],
22841
22855
  end_states: results.end_states,
@@ -23578,7 +23592,7 @@ var constants = /*#__PURE__*/Object.freeze({
23578
23592
  * Useful for runtime diagnostics and for embedding in serialized machine
23579
23593
  * snapshots so that deserializers can detect version-skew.
23580
23594
  */
23581
- const version = "5.157.1";
23595
+ const version = "5.157.3";
23582
23596
 
23583
23597
  // whargarbl lots of these return arrays could/should be sets
23584
23598
  const { state_name_chars, state_name_first_chars, action_label_chars } = constants;
package/dist/cdn/viz.js CHANGED
@@ -22775,6 +22775,12 @@ function fold_graph_config(aliases, explicit_block) {
22775
22775
  * semantic error thrown will carry a `source_location` span
22776
22776
  * pointing at the offending statement.
22777
22777
  *
22778
+ * @throws {JssmError} If the document declares no transitions (for example a
22779
+ * states-first document of only `state` blocks) — a
22780
+ * machine requires at least one transition; also for
22781
+ * repeated property definitions, group errors, and other
22782
+ * semantic problems noted throughout.
22783
+ *
22778
22784
  */
22779
22785
  function compile(tree) {
22780
22786
  const results = {
@@ -22861,6 +22867,14 @@ function compile(tree) {
22861
22867
  // for the same (source_state, action) by depth-specificity before any
22862
22868
  // further processing (the runtime would otherwise reject the duplicates).
22863
22869
  const assembled_transitions = resolve_transition_conflicts(results['transition']);
22870
+ // A machine with no transitions cannot be constructed (and previously
22871
+ // crashed right here with a raw TypeError reading `[0].from`). This is a
22872
+ // natural mid-authoring document shape — state blocks first, wiring later —
22873
+ // and the editor's lint shows this message verbatim, so name the actual
22874
+ // problem instead of leaking an internal error.
22875
+ if (assembled_transitions.length === 0) {
22876
+ throw new JssmError(undefined, 'This machine has no transitions, only declarations; a machine requires at least one transition (like `a -> b;`)');
22877
+ }
22864
22878
  const result_cfg = {
22865
22879
  start_states: results.start_states.length ? results.start_states : [assembled_transitions[0].from],
22866
22880
  end_states: results.end_states,
@@ -23603,7 +23617,7 @@ var constants = /*#__PURE__*/Object.freeze({
23603
23617
  * Useful for runtime diagnostics and for embedding in serialized machine
23604
23618
  * snapshots so that deserializers can detect version-skew.
23605
23619
  */
23606
- const version = "5.157.1";
23620
+ const version = "5.157.3";
23607
23621
 
23608
23622
  // whargarbl lots of these return arrays could/should be sets
23609
23623
  const { state_name_chars, state_name_first_chars, action_label_chars } = constants;
@@ -108,7 +108,7 @@ function parseFslArgs(argv, spec) {
108
108
  return { positional, flags, helpText };
109
109
  }
110
110
 
111
- const getVersion = () => "5.157.1";
111
+ const getVersion = () => "5.157.3";
112
112
  const SPEC = {
113
113
  flags: {
114
114
  help: { short: "h", boolean: true },