Repository navigation
@xstate/codemod@0.1.0-alpha.3
Pre-release
Pre-release
·
15 commits
to main
since this release
Minor Changes
-
d2c518b: Public names are consistent before the beta. The old names are not kept as aliases.
Before After serializeMachine(machine)machineToJSON(machine)(returnsMachineJSON)createMachineFromConfig(json, sources)machineFromJSON(json, sources)createLogiccreateStepLogicLogicActorLogic,LogicActorRef,LogicSnapshotStepActorLogic,StepActorRef,StepSnapshotLogicConfig,LogicArgs,LogicEnqueue,LogicFunctionStepLogicConfig,StepLogicArgs,StepLogicEnqueue,StepLogicFunctionLogicPatch,LogicEffectStateStepPatch,StepEffectStateLogicEffectExecutableEffectEffectDescriptor,getEffectDescriptorExecutableEffectDescriptor,describeExecutableEffectcheckStateIn(snapshot, value)snapshot.matches(value)state node contextSchemastate node schemas: { context }StrictSetupStateTargetsFlag,StrictSetupStateTargetsMarkerStrictSetupStateTargetsMarker,StrictSetupStateMarkersmachineConfigToJSON(config)is unchanged and now returnsMachineJSON.Removed exports:
listenerLogic,subscriptionLogic(usecreateListenerLogic()/createSubscriptionLogic()),__unsafe_getAllOwnEventDescriptors(usegetAllOwnEventsfromxstate/graph),toObserver,pathToStateValue,SpecialTargets, and thedevToolsactor option type.The
report-removed-apiscodemod reportstoObserver,pathToStateValueandSpecialTargets, and itsstateInhint suggestssnapshot.matches(...).- import { createLogic, serializeMachine } from 'xstate'; + import { createStepLogic, machineToJSON } from 'xstate';