xstate
5.33.4 · 7 Nov 2026MIT9M / weekRepositoryHomepagenpmAtom feed
4.38.3 is the newest release of 4.x.
In short
2 new3 fixed
Release note
Minor Changes
The
descriptionproperty is a new top-level property for state nodes and transitions, that lets you provide text descriptions:const machine = createMachine({ // ... states: { active: { // ... description: 'The task is in progress', on: { DEACTIVATE: { // ... description: 'Deactivates the task' } } } } });Future Stately tooling will use the
descriptionto render automatically generated documentation, type hints, and enhancements to visual tools.Add optional type parameter to narrow type returned by
EventFrom. You can use it like this:type UpdateNameEvent = EventFrom<typeof userModel>;
Patch Changes
The
tagsproperty was missing from state's definitions. This is used when converting a state to a JSON string. Since this is how we serialize states within@xstate/inspectthis has caused inspected machines to miss thetagsinformation.Fixed an issue with tags being missed on a service state after starting that service using a state value, like this:
const service = interpret(machine).start('active'); service.state.hasTag('foo'); // this should now return a correct resultMeta data can now be specified for
invokeconfigs in theinvoke.metaproperty:const machine = createMachine({ // ... invoke: { src: (ctx, e) => findUser(ctx.userId), meta: { summary: 'Finds user', updatedAt: '2021-09-...', version: '4.12.2' // other descriptive meta properties } } });
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.