github statelyai/xstate @xstate/test@2.0.0-alpha.4

latest release: @xstate/vue@6.0.0-alpha.4
pre-releaseone hour ago

Major Changes

  • 5b6df81: @xstate/test/effect-schema now requires stable Effect 4 (effect@^4.0.0). fromEffectSchema() builds fast-check arbitraries from the schema's AST. It supports primitives, literals, enums, unions, arrays, tuples, structs with optional properties, records with string keys, and refinements. Unsupported nodes such as Schema.Date throw an error naming the node. Pass override to supply an arbitrary for them:

    import * as fc from 'fast-check';
    import * as Schema from 'effect/Schema';
    import { fromEffectSchema } from '@xstate/test/effect-schema';
    
    fromEffectSchema(Schema.Struct({ at: Schema.Date }), {
      override: (ast) =>
        ast._tag === 'Declaration' ? fc.date({ noInvalidDate: true }) : undefined
    });
  • 5b6df81: The @xstate/test entry point no longer exports the internal types PropertyExecutionConfig and PropertyTargetObservation.

    The vitest peer dependency now accepts Vitest 3 and Vitest 4.

Don't miss a new xstate release

NewReleases is sending notifications on new releases.