@turing-machine-js/builder 5.0.0 → 6.0.0

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/CHANGELOG.md CHANGED
@@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
+ ## [6.0.0] - 2026-05-09
8
+
9
+ ### Changed (BREAKING)
10
+
11
+ - **`peerDependencies."@turing-machine-js/machine"` widened from `^5.0.0` to `^6.0.0`** to match the v6 lockstep. Consumers pinned to `@turing-machine-js/machine@5` will see an unmet-peer warning when installing this version. The v6 dispatch-order change in the engine ([#119](https://github.com/mellonis/turing-machine-js/issues/119)) doesn't affect this package directly (the builder doesn't call `run()`).
12
+
13
+ Released in lockstep with `@turing-machine-js/machine` 6.0.0. No source or behavior changes in this package beyond the peer-dep widening.
14
+
7
15
  ## [5.0.0] - 2026-05-09
8
16
 
9
17
  ### Added
package/dist/index.d.ts CHANGED
@@ -5,10 +5,25 @@ export type States = Record<string, Record<string, {
5
5
  movement: keyof typeof movementsMap;
6
6
  state: string;
7
7
  }>>;
8
- export default function buildMachine({ alphabetString, initialState, finalStateList, states: stateNameToStateDeclarationMap, }: {
8
+ /**
9
+ * Per-state breakpoint config for the declarative builder. Filter values are
10
+ * raw alphabet characters (matching the input-symbol notation in `states`);
11
+ * the builder translates each to a `tapeBlock.symbol([char])`-interned
12
+ * Symbol at construction time. `true` is the wildcard.
13
+ *
14
+ * Out of scope (#101): final-state entries — `finalStateList` names map to
15
+ * `haltState`, which is not a state in the table. Pass `before` / `after`
16
+ * directly on `haltState.debug` if you need to pause on halt entry.
17
+ */
18
+ export type DebugConfigByState = Record<string, {
19
+ before?: true | string[];
20
+ after?: true | string[];
21
+ }>;
22
+ export default function buildMachine({ alphabetString, initialState, finalStateList, states: stateNameToStateDeclarationMap, debug, }: {
9
23
  alphabetString: string;
10
24
  initialState: string;
11
25
  finalStateList: string[];
12
26
  states: States;
27
+ debug?: DebugConfigByState;
13
28
  }): readonly [TuringMachine, State, Record<string, State>];
14
29
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@turing-machine-js/builder",
3
- "version": "5.0.0",
3
+ "version": "6.0.0",
4
4
  "description": "A turing machine builder — declarative state-table construction. Not actively developed by the author; the same state-table pattern is also shown as an inline example in @turing-machine-js/machine's README. Contributions welcome.",
5
5
  "engines": {
6
6
  "npm": ">=7.0.0"
@@ -25,7 +25,7 @@
25
25
  "builder"
26
26
  ],
27
27
  "peerDependencies": {
28
- "@turing-machine-js/machine": "^5.0.0"
28
+ "@turing-machine-js/machine": "^6.0.0"
29
29
  },
30
30
  "main": "dist/index.cjs",
31
31
  "module": "dist/index.mjs",
@@ -38,5 +38,5 @@
38
38
  "default": "./dist/index.mjs"
39
39
  }
40
40
  },
41
- "gitHead": "ccf9a4743965c2a4ea6340ce1de8f6596e094251"
41
+ "gitHead": "6c7b2ac3055470b56c6882471767c746f5a9d7fb"
42
42
  }