xstate
5.33.4 · 7 Nov 2026MIT9M / weekRepositoryHomepagenpmAtom feed
Upgrading xstate From 4.38.3 to 5.0.0
1 release in betweenevery note read
Reading releases, release notes and advisories…
- 104
- changes to make
- 0
- advisories fixed
- 35
- new
- 6
- fixes
Before you upgrade
Tick each one off as you go- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
- Breaking5.0.0
Release by release
- Breaking
If context types are specified in the machine config, the
contextproperty will now be required: - Breaking
The third argument of
machine.transition(state, event)has been removed. Thecontextshould always be given as part of thestate. - Breaking
An error will be thrown if an
initialstate key is not specified for compound state nodes. For example: - Breaking
IDs for delayed events are no longer derived from event types so this won't work automatically:
- Breaking
17 other lines we could not sort, mostly version bumps
- 5.0.0
status:'active' | 'done' | 'error' | 'stopped' - 5.0.0
output: The output data of the actor when it has reachedstatus: 'done' - 5.0.0
error: The error thrown by the actor when it has reachedstatus: 'error' - 5.0.0
context: The context of the actor - 5.0.0
and([guard1, guard2, /* ... */])returnstrueif all guards evaluate to truthy, otherwisefalse - 5.0.0
or([guard1, guard2, /* ... */])returnstrueif any guard evaluates to truthy, otherwisefalse - 5.0.0
not(guard1)returnstrueif a single guard evaluates tofalse, otherwisetrue - 5.0.0
An event object (e.g.
{ type: 'someEvent' }) - 5.0.0
An SCXML event object.
- 5.0.0
✅
"*"
5 internal lines (docs, tests, tooling) left out.
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.