xstate
5.33.4 · 7 Nov 2026MIT9M / weekRepositoryHomepagenpmAtom feed
5.33.4 is the newest release of 5.x.
In short
1 new1 fixed
Release note
Patch Changes
Fixed
initialTransition(andtransition) throwing"Actor with system ID '...' already exists"when the machine contains aninvokewith asystemId.Root cause:
createInertActorScopeusedcreateActor(logic)internally, which eagerly rangetInitialSnapshotduring construction and registered anysystemId-carrying child actors in the system. When the caller then rangetInitialSnapshot(ortransition) via the returned scope, the same system was reused, causing the duplicate-registration error.Fix: After creating the internal actor,
createInertActorScopenow replaces the actor's system reference with a freshly-created system. Child actors spawned by the subsequent caller-drivengetInitialSnapshot/transitioninvocation therefore register into a clean system with no pre-existing entries.const machine = createMachine({ initial: 'idle', states: { idle: { invoke: { src: fromPromise(async () => 42), systemId: 'myActor' // previously caused: "Actor with system ID 'myActor' already exists" } } } }); // Now works correctly — returns [snapshot, actions] without throwing const [snapshot, actions] = initialTransition(machine);Add missing https:// protocol to the Stately Studio link in the README
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.