Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
@xstate/graph@2.0.0
Major Changes
#4896
7c6e2ea
Thanks @davidkpiano! - Test model path generation now has the option to allow duplicate paths by settingallowDuplicatePaths: true
:By default,
allowDuplicatePaths
is set tofalse
:#4896
7c6e2ea
Thanks @davidkpiano! - TheadjacencyMapToArray(…)
helper function has been introduced, which converts an adjacency map to an array of{ state, event, nextState }
objects.#4896
7c6e2ea
Thanks @davidkpiano! - ThetraversalLimit
option has been renamed tolimit
:#4233
3d96d0f95
Thanks @davidkpiano! - RemovegetMachineShortestPaths
andgetMachineSimplePaths
#4238
b4f12a517
Thanks @davidkpiano! - The steps in the paths returned from functions likegetShortestPaths(...)
andgetSimplePaths(...)
have the following changes:step.event
property now represents theevent
object that resulted in the transition to thestep.state
, not the event that comes before the next step.path.steps
array now includes the targetpath.state
as the last step.path.steps
always has at least one step.step
now has the{ type: 'xstate.init' }
event#4896
7c6e2ea
Thanks @davidkpiano! - ThecreateTestMachine(…)
function has been removed. Use a normalcreateMachine(…)
orsetup(…).createMachine(…)
function instead to create machines for path generation.#4896
7c6e2ea
Thanks @davidkpiano! - Thefilter
andstopCondition
option for path generation has been renamed tostopWhen
, which is used to stop path generation when a condition is met. This is a breaking change, but it is a more accurate name for the option.#4896
7c6e2ea
Thanks @davidkpiano! - Path generation now supportsinput
for actor logic:#4896
7c6e2ea
Thanks @davidkpiano! - The test model "sync" methods have been removed, including:testModel.testPathSync(…)
testModel.testStateSync(…)
testPath.testSync(…)
The
async
methods should always be used instead.Minor Changes
5fb3c683d
Thanks @Andarist! -exports
field has been added to thepackage.json
manifest. It limits what files can be imported from a package - it's no longer possible to import from files that are not considered to be a part of the public API.Patch Changes
#4896
7c6e2ea
Thanks @davidkpiano! - The@xstate/graph
package now includes everything from@xstate/test
.#4308
af032db12
Thanks @davidkpiano! - Traversing state machines that have delayed transitions will now work as expected: