Releases: Devessier/brainy
Fix issue with transitions without target from root state node
Fix issue with transitions from root state node
Events caught by the root state node can now transition properly to another state node.
Previously an error was thrown because we assumed that all transitions had to be made from the parent of the state node that caught the event. This was not correct for the root state node.
Fix issue with sibling transitions in compound states
Transitions from sibling to sibling now work. Tests have been added to guarantee that.
Add context to errors to ease debugging
We especially improved the error returned by the validator when it encounters an invalid transition.
Fix issue with compound states transitions
There were issues with compound states transitions validations and with compound targets.
Now compound states transitions are correctly validated preemptively and compound targets work the same as with XState.
Fix issue with context given to initial transition actions
Now the initial transition actions are called with the correct context value.
Add option to disable mutex safety
We added an option to disable mutex usage. This is absolutely not recommended to use it in most cases.
Implement Send action
The Send action allows to declaratively send an event to a state machine. The event will be sent when the action will be called. It happens during a transition, when entering a state or when exiting a state.
Fix issue with blank target
We understand blank targets as transitions to the state node itself.
Implement hierarchical states
We implemented compound states. Compound states allow to prevent state explosion and to scope nested states.
State nodes now have a .Matches(parentStateValue ...StateType)
method to get whether or not the state matches the parent state given as parameter.