Skip to content

@xstate/codemod@0.1.0-beta.3

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 15 Nov 04:44
· 1 commit to next since this release
c442352

Patch Changes

  • 65afd99: Add eventless always transitions to xstate/fsm. Machines follow these transitions during initialization and after handled events until no eventless transition is enabled.

    import { createFSM } from 'xstate/fsm';
    
    const machine = createFSM({
      initial: 'checking',
      states: {
        checking: { always: { target: 'ready' } },
        ready: {}
      }
    });
    
    machine.initialState.value; // 'ready'

    Breaking beta change: xstate/fsm now requires object transition targets for on and always, matching the main XState API. Replace on: { GO: 'ready' } with on: { GO: { target: 'ready' } }. Keep initial: 'idle' unchanged. Transition functions must return an object or undefined.

    Run the @xstate/codemod string-targets transform to update inline FSM configurations. Review separately stored configurations and functions returning strings manually.

  • Updated dependencies [0eb9872]

  • Updated dependencies [417e5f4]

  • Updated dependencies [9eb940c]

  • Updated dependencies [65afd99]

    • xstate@6.0.0-beta.3