# What changed in xstate

> 25 changes in xstate 5 from its official release notes, upgrade guides and advisories: 1 breaking, 11 new APIs and options. Each one cited. Sources checked 2026-10-17. HTML: https://unstale.sh/npm/xstate/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## xstate 5

### Breaking changes

- Targeting a history state that is a direct child of an unvisited parallel state with no default target now enters the parallel state's initial configuration instead of doing nothing. (5.32.4) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.32.4)

### New APIs and options

- Add types.transitionMeta to type transition metadata separately from state metadata; when omitted, types.meta continues to apply to both. (5.33.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.33.0)
- Exports InspectedTransitionEvent from xstate, making it available to developers. (5.32.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.32.0)
- Adds mapState(snapshot, mapper) to map a snapshot to values based on active states. (5.31.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.31.0)
- Adds an option to configure the maximum number of microsteps allowed before throwing an infinite loop error; it defaults to Infinity. (5.31.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.31.0)
- Adds an option to xstate/graph traversal helpers and createTestModel to control which events are explored from each state, enabling enabled-only traversal. (5.30.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.30.0)
- Adds a method that derives a Readable from an actor snapshot, with subscribe and synchronous get access; subscriptions emit only when the selected value changes. (5.29.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.29.0)
- States with route: {} and an explicit id can be navigated to from anywhere using an xstate.route event; routes can also use guards for conditional navigation. (5.28.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.28.0)
- Returns an array of snapshot-and-actions tuples for each microstep in the initial transition. (5.27.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.27.0)
- Returns an array of snapshot-and-actions tuples for each microstep in a transition. (5.27.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.27.0)
- Adds a utility that returns all transitions available from the current state. (5.26.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.26.0)
- Adds a method to incrementally extend machine setup configurations with actions, guards, and delays that can reference base definitions and support chaining. (5.24.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.24.0)

### Behavior and default changes

- assertEvent now supports partial descriptors, allowing checks for events whose type starts with a given prefix. (5.25.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.25.0)

### Fixes and other changes

- When an unhandled error from an invoked actor causes a machine to error, remaining invoked and spawned actors are stopped and their cleanup functions called before the machine settles in the error state. (5.33.3) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.33.3)
- Generic history values, snapshot nodes, and directed graph results now accept arbitrary state and transition metadata consistently, avoiding unsafe-type warnings when inspecting machines through generic APIs. (5.33.2) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.33.2)
- AnyStateNode, AnyStateNodeDefinition, and AnyTransitionDefinition now widen their metadata parameters to match nodes of an AnyStateMachine, avoiding unsafe-argument and unsafe-return reports. (5.33.1) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.33.1)
- Machine snapshots retain their machine-specific methods when initialization fails, keeping methods such as snapshot.matches(...) available on error snapshots. (5.32.6) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.32.6)
- Sending an event containing unserializable data to a stopped actor no longer throws; the development-only warning is emitted safely. (5.32.5) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.32.5)
- Fixes initialTransition and transition throwing a duplicate system ID error when a machine contains an invoke with a systemId. (5.32.3) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.32.3)
- When guards on an exact event descriptor all fail, matching wildcard descriptor transitions are now tried as fallback. (5.32.2) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.32.2)
- Fixes children snapshot union pollution for typed invoke. (5.32.1) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.32.1)
- Named guards registered with setup({ guards }) are now resolved for route.guard. (5.31.1) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.31.1)
- Types are exported so setup() declaration emit works. (5.28.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.28.0)
- Fixes cleanup of systemId for nested children when stopChild is used. (5.25.1) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.25.1)
- Fixes a bug in Cordova when iterating an empty Map. (5.25.0) — [release notes](https://github.com/statelyai/xstate/releases/tag/xstate%405.25.0)
