louis993546 / Compose-Composer

Build UI with Jetpack Compose OTG
MIT License
0 stars 1 forks source link

Bump moshi-sealed-codegen from 0.12.0 to 0.17.2 #112

Closed dependabot[bot] closed 2 years ago

dependabot[bot] commented 2 years ago

Bumps moshi-sealed-codegen from 0.12.0 to 0.17.2.

Release notes

Sourced from moshi-sealed-codegen's releases.

0.17.2

Fix: Fix IR lookups of setOf() overloads. There are two setOf() functions with one arg - one is the vararg and the other is a shorthand for Collections.singleton(element). It's important we pick the right one, otherwise we can accidentally send a vararg array into the singleton() function.

Dependency updates:

Kotlin 1.6.21
kotlinpoet 1.11.0
kotlinx-metadata 0.4.2

0.17.1

Fix: Fix support for nested sealed types that don't use @JsonClass.

0.17.0

New: moshi-sealed now supports nested sealed subtypes!

In some cases, it's useful to have more than one level of sealed types that share the same label key.

sealed interface Response {
  data class Success(val value: String) : Response
  sealed interface Failure : Response {
   data class ErrorMap(val errors: List<String>) : Failure
   data class ErrorString(val error: String) : Failure
  }
}

moshi-sealed now supports this out of the box via @NestedSealed annotation. Simply indicate the nested type with this annotation.

@JsonClass(generateAdapter = true, generator = "sealed:type")
sealed interface Response {
  @TypeLabel("success")
  @JsonClass(generateAdapter = true)
  data class Success(val value: String) : Response

@​NestedSealed sealed interface Failure : Response { @​TypeLabel("error_map") @​JsonClass(generateAdapter = true) data class ErrorMap(val errors: List<String>) : Failure

@TypeLabel(&quot;error_string&quot;)
@JsonClass(generateAdapter = true)
data class ErrorString(val error: String) : Failure

</tr></table>

... (truncated)

Changelog

Sourced from moshi-sealed-codegen's changelog.

Version 0.17.2

2022-05-27

Fix: Fix IR lookups of setOf() overloads. There are two setOf() functions with one arg - one is the vararg and the other is a shorthand for Collections.singleton(element). It's important we pick the right one, otherwise we can accidentally send a vararg array into the singleton() function.

Dependency updates:

Kotlin 1.6.21
kotlinpoet 1.11.0
kotlinx-metadata 0.4.2

Version 0.17.1

2022-03-09

Fix: Fix support for nested sealed types that don't use @JsonClass.

Version 0.17.0

2022-02-16

New: moshi-sealed now supports nested sealed subtypes!

In some cases, it's useful to have more than one level of sealed types that share the same label key.

sealed interface Response {
  data class Success(val value: String) : Response
  sealed interface Failure : Response {
   data class ErrorMap(val errors: List<String>) : Failure
   data class ErrorString(val error: String) : Failure
  }
}

moshi-sealed now supports this out of the box via @NestedSealed annotation. Simply indicate the nested type with this annotation.

@JsonClass(generateAdapter = true, generator = "sealed:type")
sealed interface Response {
  @TypeLabel("success")
</tr></table> 

... (truncated)

Commits


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
dependabot[bot] commented 2 years ago

Superseded by #113.