Packages

xstate

5.33.4 · 7 Nov 2026MIT9M / weekRepositoryHomepagenpmAtom feed

Upgrading xstate From 4.38.3 to 5.33.4

74 releases in betweennotes for 37

Reading releases, release notes and advisories…

  1. 4.38.3yours
  2. 5.0.0major
  3. 16 releases
  4. 5.7.1breaking
  5. 55 releases
  6. 5.33.4target
  7. 30 pre
102+
changes to make
0
advisories fixed
65+
new
25+
fixes

Counted from 37 of 74 release notes, and the breaking changes of 1 pre-release on the way to a major. Advisories are counted from the advisory database, in full.

Before you upgrade

Tick each one off as you go
  • Breaking5.7.1
  • 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

  1. 5.33.4

    7 Nov 20261 fix
    • Fixed

      core: Fix assertEvent narrowing when the event type is behind a generic type parameter

  2. 5.33.3

    17 Oct 20261 fix
    • Fixed

      Fixed child actors not being stopped when a machine errors because of an unhandled error from an invoked actor. The remaining invoked and spawned actors are now stopped (and their cleanup functions are called) before the machine settles in the error state, instead of being left running as orphans.

  3. 5.33.2

    15 Sep 20261 fix
    • Fixed

      Fixed metadata types in generic history values, snapshot nodes, and directed graph results. These containers now accept arbitrary state and transition metadata consistently with AnyStateNode and AnyTransitionDefinition, avoiding unsafe-type warnings when inspecting machines through generic APIs.

  4. 5.33.1

    15 Sep 20261 fix
    • Fixed

      AnyStateNode and AnyStateNodeDefinition now widen the TStateMeta and TTransitionMeta parameters that were added to StateNode and StateNodeDefinition in 5.33.0. Those parameters default to MetaObject, while the nodes of an AnyStateMachine have them as any, so tooling that tracks any (such as @typescript-eslint's no-unsafe-argument and no-unsafe-return) reported every node read off an untyped machine as unsafe:

  5. 5.33.0

    12 Sep 20261 new
    • New

      State and transition metadata can now use separate types:

  6. 5.32.6

    25 Aug 20261 fix
    • Fixed

      Machine snapshots now retain their machine-specific methods when initialization fails, so methods such as snapshot.matches(...) remain available on error snapshots.

  7. 5.32.1 – 5.32.55 releases, no release note

  8. 5.32.0

    27 May 20261 new
    • New

      Export InspectedTransitionEvent from xstate.

17 other lines we could not sort, mostly version bumps
  • status: 'active' | 'done' | 'error' | 'stopped'

    5.0.0
  • output: The output data of the actor when it has reached status: 'done'

    5.0.0
  • error: The error thrown by the actor when it has reached status: 'error'

    5.0.0
  • context: The context of the actor

    5.0.0
  • and([guard1, guard2, /* ... */]) returns true if all guards evaluate to truthy, otherwise false

    5.0.0
  • or([guard1, guard2, /* ... */]) returns true if any guard evaluates to truthy, otherwise false

    5.0.0
  • not(guard1) returns true if a single guard evaluates to false, otherwise true

    5.0.0
  • An event object (e.g. { type: 'someEvent' })

    5.0.0
  • An SCXML event object.

    5.0.0
  • ✅ "*"

    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.