# statelyai/xstate · RepoSense Release & Migration Intelligence

> Fixes assertEvent type narrowing for generic parameters and wildcards. Update dependency. Migration: None.

## Metadata
- **Repository URL**: https://github.com/statelyai/xstate
- **Primary Package**: `xstate` (NPM)
- **Categories**: `AI-AGENT`, `STATE_MANAGEMENT`
- **Latest Version**: `xstate@5.33.4`
- **Semantic Status**: `COMPATIBLE`
- **Bundle Size Impact (unavailable)**: `Size Unavailable`
- **Atom Ingestion Feed**: https://github.com/statelyai/xstate/releases.atom

## The Human Context (Plain-English Pitch)
XState is an orchestration library for modeling application logic and state machines in JavaScript and TypeScript. As applications grow complex, managing asynchronous flows, side effects, and UI transitions with uncoordinated boolean flags often leads to impossible states and race conditions. XState provides a formal, predictable way to declare and execute states and events with compile-time type safety.

## Stage 1 Executive Summary ([Core Change] + [Required Action] + [Migration Effort])
Fixes assertEvent type narrowing for generic parameters and wildcards. Update dependency. Migration: None.

## Breaking Changes & Required Actions
- Fixes `assertEvent` type narrowing when operating on generic parameters (`<TEvent extends EventUnion>`), resolving false-positive 'Property does not exist' compiler errors.
- Maintains narrowing for union-of-literals event types across both concrete and generic event inputs.
- Aligns type inference with runtime behavior for partial wildcard descriptors (such as `'FEEDBACK.*'`) in `assertEvent` and `ExtractEvent` by retaining bare prefix events.

## Migration Snippet
```ts
npm install xstate@5.33.4
```

## Ecosystem Compatibility Matrix & Graph Warnings
- **TypeScript >=5.0** [`COMPATIBLE`]: Maintains compatibility with modern TypeScript type narrowing and generic constraints.
- **Node.js >=18** [`COMPATIBLE`]: Standard runtime support remains unaffected by compile-time type-level fixes.

## Zero-Noise Release Timeline
- **xstate@5.33.4** (2026-11-07) [COMPATIBLE]: Fixes assertEvent type narrowing for generic parameters and wildcards. Update dependency. Migration: None.
- **xstate@6.0.0-alpha.73** (2026-11-02) [WARNING]: Ships `xstate@xstate@6.0.0-alpha.73` with upstream runtime. Pre-release build; test in staging. Migration: Low.

## Upgrade & Migration Q&A (GEO Direct Answers)
### Is statelyai/xstate xstate@5.33.4 safe to upgrade in production?
statelyai/xstate xstate@5.33.4 is classified as COMPATIBLE (PATCH release). Fixes assertEvent type narrowing for generic parameters and wildcards. Update dependency. Migration: None.

### What breaking changes or compatibility risks exist in statelyai/xstate xstate@5.33.4?
No breaking API changes or peer dependency conflicts are recorded for statelyai/xstate xstate@5.33.4 in the RepoSense compatibility graph.

### What is the bundle size impact of xstate xstate@5.33.4?
Measured bundle size telemetry is currently unavailable for xstate xstate@5.33.4; verify build output locally before deploying.

### How do I upgrade xstate to xstate@5.33.4?
Upgrade xstate to xstate@5.33.4 by running "npm install xstate@xstate@5.33.4" and applying the migration steps: npm install xstate@5.33.4
