Releases: typeonce-dev/effect-machine
Release list
@typeonce/oxlint-plugin-effect-machine@0.37.0
@typeonce/oxlint-plugin-effect-machine@0.37.0
@typeonce/effect-machine@0.37.0
Minor Changes
-
794a12a: Add
Machine.waitFor(ref, predicate)for external Effects and tests awaiting a current or subsequent published snapshot. Type predicates narrow the result. Unmatched failures preserve their Cause, stopping fails withStoppedError, and completion without a match fails withCause.NoSuchElementError. ComposeEffect.timeoutto bound the wait; cancellation releases observation without stopping the machine.Effect, Stream, and timer invocations now run inside
Machine.invokespans with machine, state, source, and invocation identity. Use ordinary Effect tracing configuration to export them. This preserves resource ownership and does not propagate each sender's trace context through the mailbox.Fix indexed self-transitions and reentry for states without a value schema, so their invocations restart consistently with the generic runtime.
@typeonce/effect-machine-react@0.37.0
Patch Changes
- Updated dependencies [794a12a]
- @typeonce/effect-machine@0.37.0
@typeonce/effect-machine-devtools@0.37.0
Patch Changes
-
25998c0: Fix devtools charts failing to render retry transitions into compound states. Route repairs preserve the direction and clearance at both ends of each transition, including straight routes that need a detour to reach a state header.
Keep the devtools platform dependencies on the supported Effect prerelease so fresh installations can start the CLI without missing-module errors.
-
Updated dependencies [794a12a]
- @typeonce/effect-machine@0.37.0
@typeonce/oxlint-plugin-effect-machine@0.36.0
@typeonce/oxlint-plugin-effect-machine@0.36.0
@typeonce/effect-machine@0.36.0
Minor Changes
-
21fbf58: Pass machine input directly to root initial constructors, including parallel regions, without retaining startup-only values in root data. A root transition uses
{ target: targets.root, input }to reconstruct root and its initial children with fresh input;reenter: truerestarts the root lifecycle when the handler is at root. Root updates continue to use{ update: targets.root, data }and retain active children.Use
targetinstead ofinitialon event transitions. Named branch selectors now accept one construction object:select.checkout({ data: cart, states: { Review: { data: review } } }). Replace.from(value)with({ data: value }),.decoded(value)with({ decoded: true, data: value }), and chained owner updates withupdate: { data: owner }inside the same call. History fallbacks usetarget({ states: ... })with a complete tree containing their owner.Input remains limited to root construction and the root's initial callbacks. Nested initializers use state data and ancestors. Explicit subtree construction preserves source-local parallel retention, schema validation, and declared branch inspection.
@typeonce/effect-machine-react@0.36.0
Patch Changes
- Updated dependencies [21fbf58]
- @typeonce/effect-machine@0.36.0
@typeonce/effect-machine-devtools@0.36.0
Patch Changes
- Updated dependencies [21fbf58]
- @typeonce/effect-machine@0.36.0
@typeonce/oxlint-plugin-effect-machine@0.35.0
Minor Changes
-
e72b7f5: Declare initial edges and data together in
.handle. RemoveinitialfromMachine.state, removeinitialandinitialConfigurationfromMachine.make, and move shared startup data into the root handler'srootvalue or input callback. Each compound declaresinitial: { target, data? }; parallel handlers use aninitialmap of region data. Initial targets must be direct children and remain inspectable without executing constructors.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
fromcallbacks withdata, which accepts literals or callbacks. Supply already-decoded values with{ decoded: true, data: valueOrCallback }. For root or region data that itself containsdecoded: trueanddatafields, use a callback returning the ordinary schema input. Bound branch and history builders retain.fromand.decoded. Replace command-producinginitializecallbacks withentry/exithandlers or invocations; definitions become executable only after.handlecaptures their initial declarations.
@typeonce/oxlint-plugin-effect-machine@0.34.0
Minor Changes
-
c1b0693: Declare transitions as objects using references from
Machine.targets(Root). Replace event-local selector chains with{ target: targets.root.Ready, from: ({ event }) => ({ value: event.value }) }, and useupdatefor retained state data.initial,history,none: true,guard, andreenterexpress their respective operations explicitly.Register
effects,streams,timers,logic, andchildreninsideMachine.make, then invoke them with{ src, input?, onDone?, onFailure?, onElement?, onSnapshot? }. Required inputs and reachable outcome handlers are checked from the source types; unused sources do not add service requirements. Pass lazy Effect and Stream values directly, or use a function with one required input and provide an input mapper.Declare named
branchesinmakefor conditional outcomes, queued commands, or nested construction. A transition uses{ branches: "group", resolve }; itsselectconstructors come from the declared destinations. Ordinary transitions stay inline. Full root configuration construction remains available at initialization and history fallback; runtime transitions use explicit destinations and retained owner updates. Devtools, testing, React integrations, and lint rules follow the new declarations.