Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions .changeset/handler-owned-initial-edges.md

This file was deleted.

25 changes: 25 additions & 0 deletions packages/devtools/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# @typeonce/effect-machine-devtools

## 0.35.0

### Minor Changes

- e72b7f5: Declare initial edges and data together in `.handle`. Remove `initial` from `Machine.state`, remove `initial` and `initialConfiguration` from `Machine.make`, and move shared startup data into the root handler's `root` value or input callback. Each compound declares `initial: { target, data? }`; parallel handlers use an `initial` map of region data. Initial targets must be direct children and remain inspectable without executing constructors.

```ts
const root = Machine.state({ states: { Locked: {}, Unlocked: {} } });
const targets = Machine.targets(root);
const machine = Machine.make({
root,
events: Machine.events({ Coin: {} }),
}).handle({
initial: { target: targets.root.Locked },
states: { Locked: { on: { Coin: { target: targets.root.Unlocked } } } },
});
```

Replace declarative `from` callbacks with `data`, which accepts literals or callbacks. Supply already-decoded values with `{ decoded: true, data: valueOrCallback }`. For root or region data that itself contains `decoded: true` and `data` fields, use a callback returning the ordinary schema input. Bound branch and history builders retain `.from` and `.decoded`. Replace command-producing `initialize` callbacks with `entry`/`exit` handlers or invocations; definitions become executable only after `.handle` captures their initial declarations.

### Patch Changes

- Updated dependencies [e72b7f5]
- @typeonce/effect-machine@0.35.0

## 0.34.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/devtools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typeonce/effect-machine-devtools",
"version": "0.34.0",
"version": "0.35.0",
"description": "Local development tools for Effect Machine",
"author": "Sandro Maglione",
"repository": {
Expand Down
25 changes: 25 additions & 0 deletions packages/effect-machine-react/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# @typeonce/effect-machine-react

## 0.35.0

### Minor Changes

- e72b7f5: Declare initial edges and data together in `.handle`. Remove `initial` from `Machine.state`, remove `initial` and `initialConfiguration` from `Machine.make`, and move shared startup data into the root handler's `root` value or input callback. Each compound declares `initial: { target, data? }`; parallel handlers use an `initial` map of region data. Initial targets must be direct children and remain inspectable without executing constructors.

```ts
const root = Machine.state({ states: { Locked: {}, Unlocked: {} } });
const targets = Machine.targets(root);
const machine = Machine.make({
root,
events: Machine.events({ Coin: {} }),
}).handle({
initial: { target: targets.root.Locked },
states: { Locked: { on: { Coin: { target: targets.root.Unlocked } } } },
});
```

Replace declarative `from` callbacks with `data`, which accepts literals or callbacks. Supply already-decoded values with `{ decoded: true, data: valueOrCallback }`. For root or region data that itself contains `decoded: true` and `data` fields, use a callback returning the ordinary schema input. Bound branch and history builders retain `.from` and `.decoded`. Replace command-producing `initialize` callbacks with `entry`/`exit` handlers or invocations; definitions become executable only after `.handle` captures their initial declarations.

### Patch Changes

- Updated dependencies [e72b7f5]
- @typeonce/effect-machine@0.35.0

## 0.34.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/effect-machine-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typeonce/effect-machine-react",
"version": "0.34.0",
"version": "0.35.0",
"description": "React ownership hooks for Effect Machine atoms",
"author": "Sandro Maglione",
"repository": {
Expand Down
20 changes: 20 additions & 0 deletions packages/effect-machine/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# @typeonce/effect-machine

## 0.35.0

### Minor Changes

- e72b7f5: Declare initial edges and data together in `.handle`. Remove `initial` from `Machine.state`, remove `initial` and `initialConfiguration` from `Machine.make`, and move shared startup data into the root handler's `root` value or input callback. Each compound declares `initial: { target, data? }`; parallel handlers use an `initial` map of region data. Initial targets must be direct children and remain inspectable without executing constructors.

```ts
const root = Machine.state({ states: { Locked: {}, Unlocked: {} } });
const targets = Machine.targets(root);
const machine = Machine.make({
root,
events: Machine.events({ Coin: {} }),
}).handle({
initial: { target: targets.root.Locked },
states: { Locked: { on: { Coin: { target: targets.root.Unlocked } } } },
});
```

Replace declarative `from` callbacks with `data`, which accepts literals or callbacks. Supply already-decoded values with `{ decoded: true, data: valueOrCallback }`. For root or region data that itself contains `decoded: true` and `data` fields, use a callback returning the ordinary schema input. Bound branch and history builders retain `.from` and `.decoded`. Replace command-producing `initialize` callbacks with `entry`/`exit` handlers or invocations; definitions become executable only after `.handle` captures their initial declarations.

## 0.34.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/effect-machine/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typeonce/effect-machine",
"version": "0.34.0",
"version": "0.35.0",
"description": "Schema-first state machines and statecharts for Effect",
"author": "Sandro Maglione",
"repository": {
Expand Down
20 changes: 20 additions & 0 deletions packages/oxlint-plugin/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# @typeonce/oxlint-plugin-effect-machine

## 0.35.0

### Minor Changes

- e72b7f5: Declare initial edges and data together in `.handle`. Remove `initial` from `Machine.state`, remove `initial` and `initialConfiguration` from `Machine.make`, and move shared startup data into the root handler's `root` value or input callback. Each compound declares `initial: { target, data? }`; parallel handlers use an `initial` map of region data. Initial targets must be direct children and remain inspectable without executing constructors.

```ts
const root = Machine.state({ states: { Locked: {}, Unlocked: {} } });
const targets = Machine.targets(root);
const machine = Machine.make({
root,
events: Machine.events({ Coin: {} }),
}).handle({
initial: { target: targets.root.Locked },
states: { Locked: { on: { Coin: { target: targets.root.Unlocked } } } },
});
```

Replace declarative `from` callbacks with `data`, which accepts literals or callbacks. Supply already-decoded values with `{ decoded: true, data: valueOrCallback }`. For root or region data that itself contains `decoded: true` and `data` fields, use a callback returning the ordinary schema input. Bound branch and history builders retain `.from` and `.decoded`. Replace command-producing `initialize` callbacks with `entry`/`exit` handlers or invocations; definitions become executable only after `.handle` captures their initial declarations.

## 0.34.0

### Minor Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/oxlint-plugin/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@typeonce/oxlint-plugin-effect-machine",
"version": "0.34.0",
"version": "0.35.0",
"description": "Oxlint rules for Effect Machine models",
"author": "Sandro Maglione",
"repository": {
Expand Down