xstate
5.33.4 · 7 Nov 2026MIT9M / weekRepositoryHomepagenpmAtom feed
4.38.3 is the newest release of 4.x.
In short
1 new5 fixed
Release note
Patch Changes
Added some internal
@ts-ignorecomments to fix consuming projects that do not useskipLibCheck.Fixed an issue with context type being inferred from too many places within
createMachinecall and possibly ending up asanyfor the entire machine.Fixed an issue with not being able to call
createMachinein a generic context when the type for the context was generic and not concrete.Fixed an issue with context type defined using
schema.contextbeing sometimes widened based onconfig.context. If both are given theschema.contextshould always take precedence and should represent the complete type of the context.Fixed compatibility with Skypack by exporting some shared utilities from root entry of XState and consuming them directly in other packages (this avoids accessing those things using deep imports and thus it avoids creating those compatibility problems).
Fixed an issue with
ActorRefFromnot resolving the typegen metadata from machine types given to it. This could sometimes result in types assignability problems, especially when using machine factories andspawn.
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.