- Exposes state on
InvalidStateTransition
- Added additional information to invalid transition error messages.
- Added type argument to State to allow for the ability to add customer behaviour to your states. This is a breaking change as it will require you to update your state classes to include the type argument.
- Converted the default usages of the library to be non-suspending. Added the suspending variants back as
*Async
. - Added the transition to the persist function and moved persist to be an open method instead of function injection constructor argument.
- As promised with the 0.5 release, the Arrow specific library has been removed. Please migrate to
lib
.- Replace
NonEmptySet
withStates
. - Replace ErrorOr/Either with
Result
.
- Replace
- Removed the v0.3 API. Please migrate to the new API.
- Introduced States as a proxy for NonEmptySet when defining Transitions. This allows for safer transition definitions in the non-Arrow library.
- The Arrow specific library will eventually be removed, as the non-Arrow presenting API has equivalent semantics.
- Upon request, introduced a new API that uses kotlin native types and does not include Arrow as a dependency.
The original lib is renamed
lib-arrow
.
- Refined type aliases on Transitioner so that implementations are free to define a base transition type that may
implement common functionality. For example, a new base transition type can define a common way to execute
side-effects that occur in pre and post hook transitioner functions. See TransitionerTest use of
specificToThisTransitionType
for an example.
- Changes to new API's method signatures and types required to integrate with its first real project.
StateMachine.verify
no longer requires a second argument to declare the base type of the state machine. This is now inferred from the first argument.`
StateMachine.mermaid
is a new utility that will generate mermaid diagram from your state machine.- New simplified API is being introduced to make it easier to use the library. This can be found in the package
app.cash.kfsm
. It is not yet ready for production use, but we are looking for feedback on the new API.
- Initial release from internal