Skip to content

Commit 79a115b

Browse files
Version Packages
1 parent aa4947f commit 79a115b

5 files changed

Lines changed: 36 additions & 41 deletions

File tree

.changeset/brave-cats-listen.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/curly-effects-invoke.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

.changeset/live-machine-inspection.md

Lines changed: 0 additions & 20 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,40 @@
11
# @typeonce/effect-machine
22

3+
## 0.13.0
4+
5+
### Minor Changes
6+
7+
- 0ca9134: Upgrade the exact Effect peer dependency and companion Effect packages to `4.0.0-rc.109`.
8+
- aa4947f: Require every `Machine.invoke` `effect` source to be a factory evaluated when its owning state is entered. This gives lifecycle callbacks immediate output and failure inference while making Effect construction timing explicit.
9+
10+
Wrap previously direct Effects in a zero-argument function:
11+
12+
```ts
13+
Machine.invoke({
14+
id: "load",
15+
effect: () => load,
16+
onDone: ({ output, target }) => target.none()
17+
})
18+
```
19+
20+
- c8728e5: Add live, root-scoped machine inspection through `Machine.prepare(machine).inspection` and `AtomMachine.inspection(machineAtom)`.
21+
22+
The hot Effect `Stream` observes ordered creation, initialization, mailbox delivery and processing, state changes, emissions, Effect and timer activities, and termination for a prepared root and all locally owned descendants:
23+
24+
```ts
25+
const prepared = yield * Machine.prepare(machine)
26+
27+
yield *
28+
prepared.inspection.pipe(
29+
Stream.runForEach((event) => Console.log(event.sequence, event.subject.id, event._tag)),
30+
Effect.forkScoped({ startImmediately: true })
31+
)
32+
33+
const ref = yield * prepared.start
34+
```
35+
36+
Inspection is non-replayed, never fails, and completes with the root. Its session ids and ordering are local to one prepared ownership tree; distributed identity and delivery remain an Effect Cluster concern.
37+
338
## 0.12.0
439

540
### Minor Changes

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@typeonce/effect-machine",
3-
"version": "0.12.0",
3+
"version": "0.13.0",
44
"description": "Schema-first state machines and statecharts for Effect",
55
"author": "Sandro Maglione",
66
"repository": {

0 commit comments

Comments
 (0)