Skip to content

Commit

Permalink
chore: general versions bump
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinHH committed Dec 22, 2024
1 parent 1d0a4fb commit 3d73583
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 31 deletions.
11 changes: 5 additions & 6 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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
)
}
22 changes: 12 additions & 10 deletions project/Versions.scala
Original file line number Diff line number Diff line change
@@ -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"
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.9.6
sbt.version = 1.10.6
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -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")

Expand Down
Original file line number Diff line number Diff line change
@@ -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]

Expand All @@ -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] = {
Expand Down

0 comments on commit 3d73583

Please sign in to comment.