Skip to content

Commit

Permalink
upgrades
Browse files Browse the repository at this point in the history
  • Loading branch information
daviddenton committed Feb 17, 2024
1 parent cbffa55 commit a39d6d6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ This list is not intended to be all-encompassing - it will document major and br
when appropriate:

### v2.13.1.0
- **all** : Upgrade of dependencies
- **state4k** : [New module] Simple state machine modelling

### v2.13.0.0
Expand Down
12 changes: 6 additions & 6 deletions state4k/src/test/kotlin/dev/forkhandles/state4k/example.kt
Original file line number Diff line number Diff line change
Expand Up @@ -24,23 +24,23 @@ val exampleStateMachine = StateMachine<MyState, MyEntity, MyEvent, MyCommandType
{ _, _ -> Success(Unit) },
EntityStateLens(MyEntity::state) { entity, state -> entity.copy(state = state) },
buildState(one)
.transition<OneToTwoEvent>(two, { e, o -> o.copy(data = OneToTwoEvent.data) }, firedOnTwo)
.transition<OneToFourEvent>(four, { e, o -> o.copy(data = OneToFourEvent.data) })
.transition<OneToSixEvent>(six, { e, o -> o.copy(data = OneToSixEvent.data) }, eject),
.transition<OneToTwoEvent>(two, { _, o -> o.copy(data = OneToTwoEvent.data) }, firedOnTwo)
.transition<OneToFourEvent>(four, { _, o -> o.copy(data = OneToFourEvent.data) })
.transition<OneToSixEvent>(six, { _, o -> o.copy(data = OneToSixEvent.data) }, eject),
buildState(two)
.transition<TwoToThreeEvent>(
three,
{ e, o -> o.copy(data = TwoToThreeEvent.data) },
{ _, o -> o.copy(data = TwoToThreeEvent.data) },
firedOnThree
),
buildState(three)
.transition<ThreeToFourEvent>(
four,
{ e, o -> o.copy(data = ThreeToFourEvent.data) },
{ _, o -> o.copy(data = ThreeToFourEvent.data) },
eject
),
buildState(four)
.transition<ThreeToFourEvent>(five, { e, o -> o.copy(data = ThreeToFourEvent.data) })
.transition<ThreeToFourEvent>(five, { _, o -> o.copy(data = ThreeToFourEvent.data) })
)

fun buildState(start: MyState) = StateBuilder<MyState, MyEntity, MyCommandType>(start)
10 changes: 7 additions & 3 deletions versions.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,19 @@ version.com.fasterxml.jackson.core..jackson-databind=2.16.1

version.com.natpryce..hamkrest=1.8.0.1

version.junit.jupiter=5.10.1
version.junit.jupiter=5.10.2

version.kotest=5.6.2
## # available=5.7.0
## # available=5.7.1
## # available=5.7.2
## # available=5.8.0

version.kotlin=1.9.22

version.kotlinx.coroutines=1.7.3
version.kotlinx.coroutines=1.8.0

version.kotlinx.serialization=1.6.2
version.kotlinx.serialization=1.6.3

version.strikt=0.34.1

Expand Down

0 comments on commit a39d6d6

Please sign in to comment.