xstate
5.33.4 · 7 Nov 2026MIT9M / weekRepositoryHomepagenpmAtom feed
Your version
5.33.4 is the newest release of 5.x.
In short
1 new2 fixed
Release note
Minor Changes
Introduce
toPromise(actor), which creates a promise from anactorthat resolves with the actor snapshot'soutputwhen done, or rejects with the actor snapshot'serrorwhen it fails.import { createMachine, createActor, toPromise } from 'xstate'; const machine = createMachine({ // ... states: { // ... done: { type: 'final', output: 42 } } }); const actor = createActor(machine); actor.start(); const output = await toPromise(actor); console.log(output); // => 42
Patch Changes
Fixed an issue with
spawnwithinassignnot returning a narrowed downActorReftype on TypeScrip 5.0Fixed an issue that caused a
completelistener to be called instead of theerrorone when the actor was subscribed after being stopped.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.