Skip to content

Commit 3d15bcd

Browse files
Version Packages (#116)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
1 parent 2a84cd2 commit 3d15bcd

3 files changed

Lines changed: 19 additions & 17 deletions

File tree

.changeset/calm-machines-prepare.md

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

CHANGELOG.md

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

3+
## 0.11.0
4+
5+
### Minor Changes
6+
7+
- 2a84cd2: Add `Machine.prepare` for composing snapshot and emission streams before a machine initializes, while keeping `Machine.start` as the one-step convenience.
8+
9+
```ts
10+
const prepared = yield * Machine.prepare(machine)
11+
yield *
12+
prepared.emissions.pipe(
13+
Stream.runForEach(handleEmission),
14+
Effect.forkScoped({ startImmediately: true })
15+
)
16+
const ref = yield * prepared.start
17+
```
18+
19+
AtomMachine emission streams use the same preparation boundary, and machine definitions now expose `definition.invoke(...)` so invocation `self` and `parent` references use the exact public input and `parentEvents` protocols.
20+
321
## 0.10.0
422

523
### 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.10.0",
3+
"version": "0.11.0",
44
"description": "Schema-first state machines and statecharts for Effect",
55
"author": "Sandro Maglione",
66
"repository": {

0 commit comments

Comments
 (0)