Releases: DrewCarlson/mobius.kt
Releases · DrewCarlson/mobius.kt
v1.3.0
What's Changed
- Update to Kotlin 2 by @DrewCarlson in #244
- Add wasm targets by @DrewCarlson in #248
- Add
ExecutionPolicy.ThorttleLatest(window: Duration)
in 02c5539 - Enable atomicfu IR transformations e67d603
- Port upstream fixes 683bf84, d5ccace
Internal:
- Replace mobiuskt-codegen-test module with compilation tests in mobiuskt-codegen by @DrewCarlson in #249
Dependencies:
- Update Compose Multiplatform to v1.6.10 by @renovate in #244
- Update coroutines to v1.8.1 by @renovate in #237
- Update atomicfu to v0.24.0 by @renovate in #223
- Update ax.lifecycle to v2.8.0 by @renovate in #239
- Update dependency androidx.compose:compose-bom to v2024.05.00 by @renovate in #230
Full Changelog: v1.2.1...v1.3.0
v1.2.1
What's Changed
- Added
ExecutionPolicy
tosubtypeEffectHandler
to provide control over how handlers are executed. Documentation - #188 rememberMobiusLoop
now supports Jetpack Navigation scoping using ViewModels. Documentation - #189- Update to Kotlin 1.9.22 by @DrewCarlson in https://github.com/DrewCarlson/mobius.kt/pull/185]
- Implement
subtypeEffectHandler
overload without default value 6132bf5
Full Changelog: v1.1.0...v1.2.1
v1.2.0
What's Changed
- Added
ExecutionPolicy
tosubtypeEffectHandler
to provide control over how handlers are executed. Documentation - #188 rememberMobiusLoop
now supports Jetpack Navigation scoping using ViewModels. Documentation - #189- Update to Kotlin 1.9.22 by @DrewCarlson in #185
Full Changelog: v1.1.0...v1.2.0
v1.1.0
What's Changed
- Added project documentation
- Added Compose MobiusLoop utilities: Documentation
- Renamed
mobiuskt-update-generator-*
modules tomobiuskt-codegen-*
- Removed dependency on kotlinx.collections.immutable
MobiusLoopViewModel.create(...)
no longer requires anInit
function- Added
MobiusHooks.InternalLogger
for control over internal Mobius.kt logging: Documentation - Added
ignore<Effect>()
tosubtypeEffectHandler
to drop specific effects - Extract Js WorkRunner into
AsyncWorkRunner
- Upgrade to Kotlin 1.9.10
- Added
linuxArm64
,watchosDeviceArm64
, andtvosSimulatorArm64
targets - Removed
iosArm32
target
Full Changelog: v1.0.0-rc06...v1.1.0
v1.0.0-rc05
What's Changed
- Allow
InnerUpdate
eventExtractor to return null, enabling partial mapping of Outer event to Inner events. CallingInnerUpdate.update
with an event that maps to null is an error.
InnerUpdate.builder()
.eventExtractor { outer -> outer as? InnerEvent }
.build()
- Add
FilterEffectHandler
to help with effect routing inCompositeEffectHandler
when using reactive adapters and other configurations. The following extensions are available onConnectable
:filter { it !is Effect.A }
,exclude(Effect.A::class)
- Add
MappedEffectHandler
to help with mapping Effects and Events when usingCompositeEffectHandler
sealed class Effect {
// ...
data class DisplayPopupMessage(
val message: String,
) : Effect(), PopupMessageEffect
}
CompositeEffectHandler.from(
MySubtypeEffectHandler()
.asConnectable()
.exclude(PopupMessageEffect::class),
PopupMessageEffectHandler()
.asConnectable()
.mapped()
)
Update Spec Generator Changes
- When using a
sealed interface
for an Event type, generate branches which include theevent
parameter. Previously no branches were generated. - By default, Event types containing sealed classes will generate a method for each subtype.
sealed class Event {
sealed class DataLoaded : Event() {
data class Success(val data: JsonObject) : DataLoaded()
data class Error(val reason: String): DataLoaded()
}
}
// Generated Update Spec methods:
fun dataLoadedSuccess(model: Model, event: Event.DataLoaded.Success): Next<Model, Effect>
fun dataLoadedError(model: Model, event: Event.DataLoaded.Error): Next<Model, Effect>
- Added
@DisableSubtypeSpec
which can be applied to sealed class Event subtypes to restore the previous behavior of generating a single method.
sealed class Event {
@DisableSubtypeSpec
sealed class DataLoaded : Event() {
data class Success(val data: JsonObject) : DataLoaded()
data class Error(val reason: String): DataLoaded()
}
}
// Generated Update Spec methods:
fun dataLoaded(model: Model, event: Event.DataLoaded): Next<Model, Effect>
Dependencies:
- Update dependency org.jetbrains.kotlin.multiplatform to v1.7.22 by @renovate in #111
- Update ksp to v1.7.22-1.0.8 by @renovate in #112
- Update dependency org.slf4j:slf4j-api to v2.0.6 by @renovate in #114
- Update dependency org.robolectric:robolectric to v4.9.2 by @renovate in #116
- Update dependency androidx.test:runner to v1.5.2 by @renovate in #120
Full Changelog: v1.0.0-rc02...v1.0.0-rc05
v1.0.0-rc02
What's Changed
- Drop support for legacy native memory model
- Flow module improvements by @DrewCarlson in #108
- Use immutable collections internally by @DrewCarlson in #107
Dependencies:
- Update dependency org.robolectric:robolectric to v4.9 by @renovate in #94
- Update dependency org.jetbrains.kotlinx.kover to v0.6.1 by @renovate in #95
- Update dependency org.jetbrains.dokka to v1.7.20 by @renovate in #97
- Update atomicfu to v0.18.5 by @renovate in #100
- Update dependency org.jetbrains.kotlinx.binary-compatibility-validator to v0.12.1 by @renovate in #99
- Update dependency com.android.tools.build:gradle to v7.3.1 by @renovate in #89
- Update dependency org.jetbrains.kotlin.multiplatform to v1.7.21 by @renovate in #102
- Update ksp to v1.7.21-1.0.8 by @renovate in #104
- Update dependency org.slf4j:slf4j-api to v2.0.4 by @renovate in #106
- Update dependency androidx.test:runner to v1.5.1 by @renovate in #105
Full Changelog: v1.0.0-rc01...v1.0.0-rc02
v1.0.0-rc01
- Add
ExperimentalUpdateGenerator
toGenerateUpdate
annotation - Fix race condition when disposing WorkRunners in an active loop
- Darwin: Fix crash when using
WorkRunners.main()
v0.6.0
- Update to Kotlin 1.6.20-M1
- Add
@JsExport
to public API surface, which results in generally usable typescript definitions - Renamed
mobiuskt-update-spec
modules tomobiuskt-update-generator
- Replaced
@UpdateSpec
with@GenerateUpdate
which is applied to theUpdate<M, E, F>
class declaration
v0.5.2
- Add
MobiusLoopViewModel
- Hide
SubtypeEffectHandler
methods which include the kclass method parameter
v0.5.1
mobiskt-android
has been merged intomobiuskt-core
, previous 0.5.x and 0.4.x Android module release did not work correctly- Init logging from controllers