Packages

xstate

5.33.4 · 7 Nov 2026MIT9M / weekRepositoryHomepagenpmAtom feed

Upgrading xstate From 4.6.7 to 4.38.3

80 releases in betweennotes for 76

Reading releases, release notes and advisories…

Other targets from 4.6.7Latest5.33.4
  1. 4.6.7yours
  2. 12 releases
  3. 4.11.0breaking
  4. 66 releases
  5. 4.38.3target
6+
changes to make
0
advisories fixed
58+
new
135+
fixes

Counted from 76 of 80 release notes. Advisories are counted from the advisory database, in full.

Before you upgrade

Tick each one off as you go
  • Breaking4.11.0
  • Deprecated4.36.0
  • Deprecated4.33.6
  • Deprecated4.30.0
  • Deprecated4.20.1
  • Deprecated4.11.0

Release by release

  1. 4.38.3

    23 Oct 20231 fix
    • Fixed

      Fixed an issue with exit actions sometimes being called twice when a machine reaches its final state and leads its parent to stopping it at the same time.

  2. 4.38.2

    27 Jul 20231 fix
    • Fixed

      The cancel action was added to the main export:

  3. 4.38.1

    12 Jul 20231 fix
    • Fixed

      The pure(...) action creator is now properly typed so that it allows function actions:

  4. 4.38.0

    25 Jun 20231 new
    • New

      The log, pure, choose, and stop actions were added to the main export:

  5. 4.37.2

    26 Apr 20231 fix
    • Fixed

      The "Some implementations missing" type-level error will now mention what implementations are missing.

  6. 4.37.1

    23 Mar 20231 fix
    • Fixed

      Fixed forwardTo, escalate and sendUpdate to be compatible with required action types

  7. 4.37.0

    24 Feb 20231 new · 1 fix
    • New

      The new TagsFrom helper type extracts the type of tags from a state machine when typegen is enabled:

    • Fixed

      Fixed event type narrowing in some of the builtin actions.

  8. 4.36.0

    Deprecation13 Feb 20231 new · 2 fixes
    • Deprecated

      Deprecated send() action creator. Instead of that, you can use sendTo() to send events to other actors and raise() to send events to the "self" actor.

    • New

      All actions received a new generic: TExpressionEvent. To type things more correctly and allow TS to infer things better we need to distinguish between all events accepted by a machine (TEvent) and the event type that actions are "called" with (TExpressionEvent).

    • Fixed

      Fixed a class of inference problems for our builtin actions (assign, sendTo, etc).

    • Fixed

      Fixed inference for assign using PropertyAssigner, like here:

3 other lines we could not sort, mostly version bumps
  • Cloned state machine returned by .withConfig.

    4.9.0
  • .state getter defined for services.

    4.9.0
  • start method of services.

    4.9.0

8 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.