From a2335cd54c5ce5027ebd55c56f870dd916ec7af5 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 28 Sep 2026 02:50:50 +0000 Subject: [PATCH] Version Packages --- .changeset/declared-state-path-tools.md | 6 ----- .changeset/declared-state-paths.md | 20 --------------- .changeset/typed-operation-boundary.md | 7 ----- packages/devtools/CHANGELOG.md | 9 +++++++ packages/devtools/package.json | 2 +- packages/effect-machine-react/CHANGELOG.md | 8 ++++++ packages/effect-machine-react/package.json | 2 +- packages/effect-machine/CHANGELOG.md | 30 ++++++++++++++++++++++ packages/effect-machine/package.json | 2 +- packages/oxlint-plugin/CHANGELOG.md | 6 +++++ packages/oxlint-plugin/package.json | 2 +- 11 files changed, 57 insertions(+), 37 deletions(-) delete mode 100644 .changeset/declared-state-path-tools.md delete mode 100644 .changeset/declared-state-paths.md delete mode 100644 .changeset/typed-operation-boundary.md diff --git a/.changeset/declared-state-path-tools.md b/.changeset/declared-state-path-tools.md deleted file mode 100644 index 429982aa..00000000 --- a/.changeset/declared-state-path-tools.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@typeonce/effect-machine-devtools": patch -"@typeonce/oxlint-plugin-effect-machine": patch ---- - -Show transition declarations with declared state paths such as `{ target: "Checkout.Review" }` and `{ initialize: … }` in the devtools. `no-async-planning-callback` also checks `initialize` input mappers. diff --git a/.changeset/declared-state-paths.md b/.changeset/declared-state-paths.md deleted file mode 100644 index 0b7e8910..00000000 --- a/.changeset/declared-state-paths.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"@typeonce/effect-machine": minor ---- - -Replace `Machine.targets(Root)` references with declared state paths. Transitions, initial edges, history, owner updates, and named branches now take dotted path strings, spelled the same way as snapshot paths. They are checked against the root passed to `make` and suggested by the editor. The root node is `"root"`, so a top-level state can no longer use that name. - -Restart the machine from fresh input with `initialize`, which replaces root targets. Machines without input use `initialize: true`, and branch declarations use `{ initialize: true }` with `select.branch({ input })`. - -```ts -Machine.make({ root: Root, input: Input, events: Events }).handle({ - initial: { target: "Idle" }, - on: { - Increment: { update: "root", data: ({ root }) => ({ ...root, count: root.count + 1 }) }, - Reset: { initialize: ({ event }) => ({ id: event.id }), reenter: true } - }, - states: { Idle: { on: { Resume: { history: "Checkout.recent" } } } } -}) -``` - -To migrate, remove `Machine.targets`. Replace `targets.root.A.B` with `"A.B"`, `update: targets.root` with `update: "root"`, and `{ target: targets.root, input }` with `{ initialize: input }`. Rename any top-level state named `root`. Declarations stored in variables before they reach `make` or `.handle` need `as const`. diff --git a/.changeset/typed-operation-boundary.md b/.changeset/typed-operation-boundary.md deleted file mode 100644 index bea0b730..00000000 --- a/.changeset/typed-operation-boundary.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -"@typeonce/effect-machine": patch ---- - -Check the public `Machine` operations against their implementations at compile time. - -`Machine.start`, `resume`, `plan`, `planInitial`, `can`, `enabled`, `isFinal`, `encodeSnapshot`, `decodeSnapshot`, `make`, and the event protocol builders no longer rely on unchecked casts, so their documented signatures now stay in sync with runtime behavior. Planning failures are classified consistently across runtime strategies: non-stabilization and schema failures stay typed, startup throws become `StartupError`, and other handler throws remain defects. diff --git a/packages/devtools/CHANGELOG.md b/packages/devtools/CHANGELOG.md index 68ba3c58..0325d8f5 100644 --- a/packages/devtools/CHANGELOG.md +++ b/packages/devtools/CHANGELOG.md @@ -1,5 +1,14 @@ # @typeonce/effect-machine-devtools +## 0.39.0 + +### Patch Changes + +- e20e054: Show transition declarations with declared state paths such as `{ target: "Checkout.Review" }` and `{ initialize: … }` in the devtools. `no-async-planning-callback` also checks `initialize` input mappers. +- Updated dependencies [e20e054] +- Updated dependencies [86968b6] + - @typeonce/effect-machine@0.39.0 + ## 0.38.1 ### Patch Changes diff --git a/packages/devtools/package.json b/packages/devtools/package.json index f3144bbe..cf492718 100644 --- a/packages/devtools/package.json +++ b/packages/devtools/package.json @@ -1,6 +1,6 @@ { "name": "@typeonce/effect-machine-devtools", - "version": "0.38.1", + "version": "0.39.0", "description": "Local development tools for Effect Machine", "author": "Sandro Maglione", "repository": { diff --git a/packages/effect-machine-react/CHANGELOG.md b/packages/effect-machine-react/CHANGELOG.md index 91d54c0a..67f362ff 100644 --- a/packages/effect-machine-react/CHANGELOG.md +++ b/packages/effect-machine-react/CHANGELOG.md @@ -1,5 +1,13 @@ # @typeonce/effect-machine-react +## 0.39.0 + +### Patch Changes + +- Updated dependencies [e20e054] +- Updated dependencies [86968b6] + - @typeonce/effect-machine@0.39.0 + ## 0.38.1 ### Patch Changes diff --git a/packages/effect-machine-react/package.json b/packages/effect-machine-react/package.json index f3c9e894..43f6a004 100644 --- a/packages/effect-machine-react/package.json +++ b/packages/effect-machine-react/package.json @@ -1,6 +1,6 @@ { "name": "@typeonce/effect-machine-react", - "version": "0.38.1", + "version": "0.39.0", "description": "React ownership hooks for Effect Machine atoms", "author": "Sandro Maglione", "repository": { diff --git a/packages/effect-machine/CHANGELOG.md b/packages/effect-machine/CHANGELOG.md index 46ea9592..c166a84a 100644 --- a/packages/effect-machine/CHANGELOG.md +++ b/packages/effect-machine/CHANGELOG.md @@ -1,5 +1,35 @@ # @typeonce/effect-machine +## 0.39.0 + +### Minor Changes + +- e20e054: Replace `Machine.targets(Root)` references with declared state paths. Transitions, initial edges, history, owner updates, and named branches now take dotted path strings, spelled the same way as snapshot paths. They are checked against the root passed to `make` and suggested by the editor. The root node is `"root"`, so a top-level state can no longer use that name. + + Restart the machine from fresh input with `initialize`, which replaces root targets. Machines without input use `initialize: true`, and branch declarations use `{ initialize: true }` with `select.branch({ input })`. + + ```ts + Machine.make({ root: Root, input: Input, events: Events }).handle({ + initial: { target: "Idle" }, + on: { + Increment: { + update: "root", + data: ({ root }) => ({ ...root, count: root.count + 1 }), + }, + Reset: { initialize: ({ event }) => ({ id: event.id }), reenter: true }, + }, + states: { Idle: { on: { Resume: { history: "Checkout.recent" } } } }, + }); + ``` + + To migrate, remove `Machine.targets`. Replace `targets.root.A.B` with `"A.B"`, `update: targets.root` with `update: "root"`, and `{ target: targets.root, input }` with `{ initialize: input }`. Rename any top-level state named `root`. Declarations stored in variables before they reach `make` or `.handle` need `as const`. + +### Patch Changes + +- 86968b6: Check the public `Machine` operations against their implementations at compile time. + + `Machine.start`, `resume`, `plan`, `planInitial`, `can`, `enabled`, `isFinal`, `encodeSnapshot`, `decodeSnapshot`, `make`, and the event protocol builders no longer rely on unchecked casts, so their documented signatures now stay in sync with runtime behavior. Planning failures are classified consistently across runtime strategies: non-stabilization and schema failures stay typed, startup throws become `StartupError`, and other handler throws remain defects. + ## 0.38.1 ### Patch Changes diff --git a/packages/effect-machine/package.json b/packages/effect-machine/package.json index dbad05f1..7a6ff4a8 100644 --- a/packages/effect-machine/package.json +++ b/packages/effect-machine/package.json @@ -1,6 +1,6 @@ { "name": "@typeonce/effect-machine", - "version": "0.38.1", + "version": "0.39.0", "description": "Schema-first state machines and statecharts for Effect", "author": "Sandro Maglione", "repository": { diff --git a/packages/oxlint-plugin/CHANGELOG.md b/packages/oxlint-plugin/CHANGELOG.md index f4e4e057..68b4d5b8 100644 --- a/packages/oxlint-plugin/CHANGELOG.md +++ b/packages/oxlint-plugin/CHANGELOG.md @@ -1,5 +1,11 @@ # @typeonce/oxlint-plugin-effect-machine +## 0.39.0 + +### Patch Changes + +- e20e054: Show transition declarations with declared state paths such as `{ target: "Checkout.Review" }` and `{ initialize: … }` in the devtools. `no-async-planning-callback` also checks `initialize` input mappers. + ## 0.38.1 ## 0.38.0 diff --git a/packages/oxlint-plugin/package.json b/packages/oxlint-plugin/package.json index 223d7096..1a6992d9 100644 --- a/packages/oxlint-plugin/package.json +++ b/packages/oxlint-plugin/package.json @@ -1,6 +1,6 @@ { "name": "@typeonce/oxlint-plugin-effect-machine", - "version": "0.38.1", + "version": "0.39.0", "description": "Oxlint rules for Effect Machine models", "author": "Sandro Maglione", "repository": {