Skip to content

Commit

Permalink
Release Play-JSON Scala 3 support in V3 (#2138) (#2161)
Browse files Browse the repository at this point in the history
  • Loading branch information
markarasev authored Apr 29, 2024
1 parent 246cdba commit bd8622f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ val play2JsonVersion: Option[(Long, Long)] => String = {
case Some((2, 11)) => "2.7.4"
case _ => "2.9.2"
}
val playJsonVersion = "3.0.0"
val playJsonVersion = "3.0.2"
val catsEffect_3_version = "3.5.1"
val fs2_3_version = "3.7.0"

Expand Down Expand Up @@ -950,10 +950,10 @@ lazy val playJson = (projectMatrix in file("json/play-json"))
scalaTest
)
.jvmPlatform(
scalaVersions = scala2alive,
scalaVersions = scala2alive ++ scala3,
settings = commonJvmSettings
)
.jsPlatform(scalaVersions = scala2alive, settings = commonJsSettings)
.jsPlatform(scalaVersions = scala2alive ++ scala3, settings = commonJsSettings)
.dependsOn(core, jsonCommon)

lazy val prometheusBackend = (projectMatrix in file("observability/prometheus-backend"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class PlayJsonTests extends AnyFlatSpec with Matchers with EitherValues {
val encoded = extractBody(basicRequest.body(outer))
val decoded = runJsonResponseAs(asJson[Outer])(encoded)

decoded.right.value shouldBe outer
decoded.value shouldBe outer
}

it should "set the content type" in {
Expand Down Expand Up @@ -136,7 +136,7 @@ class PlayJsonTests extends AnyFlatSpec with Matchers with EitherValues {

def runJsonResponseAs[A](responseAs: ResponseAs[A, Nothing]): String => A =
responseAs match {
case responseAs: MappedResponseAs[_, A, Nothing] =>
case responseAs: MappedResponseAs[_, _, _] =>
responseAs.raw match {
case ResponseAsByteArray =>
s => responseAs.g(s.getBytes(Utf8), ResponseMetadata(StatusCode.Ok, "", Nil))
Expand Down

0 comments on commit bd8622f

Please sign in to comment.