Skip to content

Releases: typeonce-dev/effect-machine

@typeonce/oxlint-plugin-effect-machine@0.37.0

Choose a tag to compare

@github-actions github-actions released this 14 Sep 08:51
dde2b81
@typeonce/oxlint-plugin-effect-machine@0.37.0

@typeonce/effect-machine@0.37.0

Choose a tag to compare

@github-actions github-actions released this 14 Sep 08:51
dde2b81

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 with StoppedError, and completion without a match fails with Cause.NoSuchElementError. Compose Effect.timeout to bound the wait; cancellation releases observation without stopping the machine.

    Effect, Stream, and timer invocations now run inside Machine.invoke spans 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

Choose a tag to compare

@github-actions github-actions released this 14 Sep 08:51
dde2b81

Patch Changes

  • Updated dependencies [794a12a]
    • @typeonce/effect-machine@0.37.0

@typeonce/effect-machine-devtools@0.37.0

Choose a tag to compare

@github-actions github-actions released this 14 Sep 08:51
dde2b81

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

Choose a tag to compare

@github-actions github-actions released this 10 Sep 07:50
89daed9
@typeonce/oxlint-plugin-effect-machine@0.36.0

@typeonce/effect-machine@0.36.0

Choose a tag to compare

@github-actions github-actions released this 10 Sep 07:50
89daed9

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: true restarts the root lifecycle when the handler is at root. Root updates continue to use { update: targets.root, data } and retain active children.

    Use target instead of initial on 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 with update: { data: owner } inside the same call. History fallbacks use target({ 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

Choose a tag to compare

@github-actions github-actions released this 10 Sep 07:50
89daed9

Patch Changes

  • Updated dependencies [21fbf58]
    • @typeonce/effect-machine@0.36.0

@typeonce/effect-machine-devtools@0.36.0

Choose a tag to compare

@github-actions github-actions released this 10 Sep 07:50
89daed9

Patch Changes

  • Updated dependencies [21fbf58]
    • @typeonce/effect-machine@0.36.0

@typeonce/oxlint-plugin-effect-machine@0.35.0

Choose a tag to compare

@github-actions github-actions released this 09 Sep 17:01
4914add

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.

    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.

@typeonce/oxlint-plugin-effect-machine@0.34.0

Choose a tag to compare

@github-actions github-actions released this 09 Sep 12:37
c258c14

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 use update for retained state data. initial, history, none: true, guard, and reenter express their respective operations explicitly.

    Register effects, streams, timers, logic, and children inside Machine.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 branches in make for conditional outcomes, queued commands, or nested construction. A transition uses { branches: "group", resolve }; its select constructors 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.