From 3d73583f703d7bdb2d828dff82af1b51f26c723b Mon Sep 17 00:00:00 2001 From: Martin Hansen Date: Sun, 22 Dec 2024 15:54:51 +0100 Subject: [PATCH] chore: general versions bump --- build.sbt | 11 +++++----- project/Versions.scala | 22 ++++++++++--------- project/build.properties | 2 +- project/plugins.sbt | 2 +- .../github/mahh/doko/shared/json/Json.scala | 14 +----------- 5 files changed, 20 insertions(+), 31 deletions(-) diff --git a/build.sbt b/build.sbt index 1d187e9..cf13aac 100644 --- a/build.sbt +++ b/build.sbt @@ -13,12 +13,10 @@ val sharedSettings = Seq( "-Xmax-inlines:80" ), libraryDependencies ++= Seq( - "org.scalameta" %%% "munit", - "org.scalameta" %%% "munit-scalacheck" - ).map(_ % Versions.munitVersion % "test"), - libraryDependencies ++= Seq( - "io.github.martinhh" %%% "scalacheck-derived" % Versions.scalacheckDerivedVersion % "test" - ) + "org.scalameta" %%% "munit" % Versions.munitVersion, + "org.scalameta" %%% "munit-scalacheck" % Versions.munitScalacheckVersion, + "io.github.martinhh" %%% "scalacheck-derived" % Versions.scalacheckDerivedVersion + ).map(_ % "test") ) lazy val shared = @@ -109,6 +107,7 @@ lazy val http4sServer = "org.http4s" %% "http4s-ember-server" % Versions.http4sVersion, "org.http4s" %% "http4s-circe" % Versions.http4sVersion, "org.http4s" %% "http4s-dsl" % Versions.http4sVersion, + "org.typelevel" %% "log4cats-slf4j" % Versions.log4CatsVersion, "ch.qos.logback" % "logback-classic" % Versions.logBackVersion ) } diff --git a/project/Versions.scala b/project/Versions.scala index 2deeeda..c5a64a4 100644 --- a/project/Versions.scala +++ b/project/Versions.scala @@ -1,16 +1,18 @@ object Versions { - val scalaVersion = "3.3.1" + val scalaVersion = "3.3.3" - val pekkoVersion = "1.0.1" - val pekkoHttpVersion = "1.0.0" - val catsVersion = "2.9.0" - val logBackVersion = "1.2.11" - val circeVersion = "0.14.6" - val scalaJsDomVersion = "2.3.0" + val pekkoVersion = "1.1.2" + val pekkoHttpVersion = "1.1.0" + val catsVersion = "2.12.0" + val logBackVersion = "1.3.14" + val log4CatsVersion = "2.7.0" + val circeVersion = "0.14.10" + val scalaJsDomVersion = "2.8.0" val laminarVersion = "16.0.0" val laminextVersion = "0.16.2" - val munitVersion = "0.7.29" - val scalacheckDerivedVersion = "0.4.2" - val http4sVersion = "1.0.0-M40" + val munitVersion = "1.0.3" + val munitScalacheckVersion = "1.0.0" + val scalacheckDerivedVersion = "0.5.0" + val http4sVersion = "1.0.0-M44" } diff --git a/project/build.properties b/project/build.properties index 4790c79..25ff9a6 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.9.6 \ No newline at end of file +sbt.version = 1.10.6 \ No newline at end of file diff --git a/project/plugins.sbt b/project/plugins.sbt index 93b1643..abb0707 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -1,6 +1,6 @@ addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") -addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2") +addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.17.0") addSbtPlugin("io.spray" % "sbt-revolver" % "0.9.1") diff --git a/shared-circe/src/main/scala/io/github/mahh/doko/shared/json/Json.scala b/shared-circe/src/main/scala/io/github/mahh/doko/shared/json/Json.scala index 2f76084..ce5894b 100644 --- a/shared-circe/src/main/scala/io/github/mahh/doko/shared/json/Json.scala +++ b/shared-circe/src/main/scala/io/github/mahh/doko/shared/json/Json.scala @@ -1,14 +1,12 @@ package io.github.mahh.doko.shared.json -import scala.deriving.Mirror - /** * Wraps current json codec implementation (circe) to make it easier to change it. * * The future of circe seems to be uncertain (especially for scala 3), so this shall ensure it will be rather simple to * replace it. */ -object Json { +object Json extends io.circe.generic.AutoDerivation { type Decoder[A] = io.circe.Decoder[A] @@ -18,16 +16,6 @@ object Json { def Encoder: io.circe.Encoder.type = io.circe.Encoder - // decorate the companions to enable "derives Encoder, Decoder" syntax: - - extension (companion: io.circe.Decoder.type) - inline def derived[A](using m: Mirror.Of[A]): Decoder[A] = - io.circe.generic.semiauto.deriveDecoder - - extension (companion: io.circe.Encoder.type) - inline def derived[A](using m: Mirror.Of[A]): Encoder[A] = - io.circe.generic.semiauto.deriveEncoder - type DecodeError = io.circe.Error def decode[A: Decoder](json: String): Either[DecodeError, A] = {