Releases: respawn-app/ApiResult
Releases · respawn-app/ApiResult
2.1.0
Improvements
- optimize collection operators
- provide success value to
errorIf
operators - Provide ability to add a custom message for
require
- mark
ConditionNotSatisfiedException
as open - fix catching in nested coroutines for SuspendResult, optimize SuspendResult performance
- enable wasmWasi target
- Add tests for SuspendResult
Other
- bump gradle to 8.12
- update ci jvm to 23
- target sdk 35
- update readme
- bump agp
Dependencies:
Kotlin : 2.1
AGP 8.7
Android TargetSDK: 35
Coroutines: 1.10
2.0.0
❔ Other
- Bump kotlin to 2.0.10
2.0.0-beta02
Maintenance update
- bump gradle
- migrate to new sonatype publishing workflow
- Update minor dependencies
2.0.0-beta01
- Fixed ClassCastExceptions on some operators
- Updated dependencies
- Added 129 tests for base result operators to prevent future issues
2.0.0-alpha01
🚀 New Features
Breaking change: Refactor ApiResult to be an inline class. ApiResult can no longer be used in switch statements. Use the fold
function instead.
1.1.0
- Update to kotlin 2.0
- Update coroutines to 1.9.0
- Enable wasm-wasi target
- Breaking change: Make ApiResult.Loading no longer a companion object of ApiResult as it wasn't resolved correctly in when() branches
1.0.4
- Added Wasm target
- New extensions:
requireIs
,Flow.orThrow
,Flow.orNull
,accumulate
,mapResulting
and others
Full Changelog: 1.0.3...1.0.4
1.0.3
recoverIf
has been renamed totryRecoverIf
, andrecoverIf
now is a function that should return anApiResult
. This is done to prevent declaration clashes since kotlin doesn't yet know how to resolve overloads.- Kotlin 1.9.22
- NotFinishedException now extends
IllegalStateException
instead ofIllegalArgumentException
- Fixed
ApiResult
builder function returningLoading
. Previous behavior was to returnSuccess
, this reverts back to that - New operators -
recoverIf
,apply
. Apply is the same asmap
but takesthis
as a parameter
1.0.2: Dependency updates, some new operators
- Loading is now a companion object and an instance of
ApiResult
at the same time, so you can use all the rest of the operators on the static companion object instance ApiResult.flow
with non-api-result return type has been renamed toApiResult.tryFlow
because of the conflicts between the names of two functions. Unfortunately it seems impossible to resolve the overload dynamically- Same as above, but for
recover
.
1.0.1
- Added ApiResult.unit() map function
- Added mapError/recover overloads for typed/not typed versions
- Added a sample app
- Updated Readme with sleek badges
- Fixed Javadocs website
Full Changelog: 1.0.0...1.0.1