Skip to content

Releases: respawn-app/ApiResult

2.1.0

05 Jan 15:44
90d102a
Compare
Choose a tag to compare

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

08 Aug 12:37
9d7ff03
Compare
Choose a tag to compare

❔ Other

  • Bump kotlin to 2.0.10

2.0.0-beta02

26 Jul 09:46
d9d87d6
Compare
Choose a tag to compare

Maintenance update

  • bump gradle
  • migrate to new sonatype publishing workflow
  • Update minor dependencies

2.0.0-beta01

05 Jul 16:51
fbd8223
Compare
Choose a tag to compare
  • Fixed ClassCastExceptions on some operators
  • Updated dependencies
  • Added 129 tests for base result operators to prevent future issues

2.0.0-alpha01

18 Jun 17:01
28f3595
Compare
Choose a tag to compare

🚀 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

30 May 12:27
ae89f0d
Compare
Choose a tag to compare
  • 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

15 Apr 18:39
208dc65
Compare
Choose a tag to compare
  • 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

25 Dec 11:25
ad8b174
Compare
Choose a tag to compare
  • recoverIf has been renamed to tryRecoverIf, and recoverIf now is a function that should return an ApiResult. 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 of IllegalArgumentException
  • Fixed ApiResult builder function returning Loading. Previous behavior was to return Success, this reverts back to that
  • New operators - recoverIf, apply. Apply is the same as map but takes this as a parameter

1.0.2: Dependency updates, some new operators

11 Dec 15:19
2b37dfd
Compare
Choose a tag to compare
  • 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 to ApiResult.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

29 Aug 17:06
1.0.1
4b1cc50
Compare
Choose a tag to compare
  • 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