Skip to content

Commit d0600f0

Browse files
committed
Update dependencies
1 parent 14f6643 commit d0600f0

File tree

6 files changed

+29
-31
lines changed

6 files changed

+29
-31
lines changed

Diff for: build.sbt

+9-11
Original file line numberDiff line numberDiff line change
@@ -11,22 +11,22 @@ scmInfo := Some(
1111
)
1212
)
1313

14-
scalaVersion := "3.3.1"
14+
scalaVersion := "3.4.2"
15+
16+
scalacOptions += "-Ykind-projector:underscores"
1517

1618
mainClass := Some("fr.janalyse.cem.Main")
1719

1820
lazy val versions = new {
19-
val sttp = "3.9.1"
20-
val zio = "2.0.21"
21+
val sttp = "3.9.7"
22+
val zio = "2.1.3"
2123
val zionio = "2.0.2"
2224
val zioproc = "0.7.2"
23-
val zioconfig = "4.0.0"
24-
val ziologging = "2.1.16"
25-
val ziolmdb = "1.7.1"
25+
val zioconfig = "4.0.2"
26+
val ziologging = "2.3.0"
27+
val ziolmdb = "1.8.0"
2628
val naturalsort = "1.0.4"
27-
val jgit = "6.8.0.202311291450-r"
28-
// val logback = "1.4.7"
29-
val log4j2 = "2.20.0"
29+
val jgit = "6.10.0.202406032230-r"
3030
}
3131

3232
libraryDependencies ++= Seq(
@@ -50,8 +50,6 @@ libraryDependencies ++= Seq(
5050
"org.eclipse.jgit" % "org.eclipse.jgit" % versions.jgit
5151
)
5252

53-
//excludeDependencies += "org.scala-lang.modules" % "scala-collection-compat_2.13"
54-
5553
testFrameworks += new TestFramework("zio.test.sbt.ZTestFramework")
5654

5755
enablePlugins(SbtTwirl)

Diff for: project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# suppress inspection "UnusedProperty" for whole file
2-
sbt.version=1.9.8
2+
sbt.version=1.10.0

Diff for: project/plugins.sbt

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0")
1+
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.4.0")
22
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
3-
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.21")
3+
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0")
44
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.3")
5-
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.9.16")
6-
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
7-
addSbtPlugin("com.typesafe.play" % "sbt-twirl" % "1.6.4")
5+
addSbtPlugin("com.github.sbt" % "sbt-native-packager" % "1.10.0")
6+
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
7+
addSbtPlugin("com.typesafe.play" % "sbt-twirl" % "1.6.6")

Diff for: src/main/scala/fr/janalyse/cem/Main.scala

+3-6
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ import zio.*
44
import zio.config.*
55
import zio.config.typesafe.*
66
import zio.config.magnolia.*
7-
8-
import zio.logging.{LogFormat, removeDefaultLoggers, consoleLogger}
7+
import zio.logging.{ConsoleLoggerConfig, LogFormat, consoleLogger}
98
import zio.logging.slf4j.bridge.Slf4jBridge
109
import sttp.client3.asynchttpclient.zio.AsyncHttpClientZioBackend
10+
import zio.Runtime.removeDefaultLoggers
1111
import zio.lmdb.{LMDB, LMDBConfig}
1212

1313
object Main extends ZIOAppDefault {
@@ -37,10 +37,7 @@ object Main extends ZIOAppDefault {
3737

3838
val configLayer = ZLayer.fromZIO(configProviderLogic.map(provider => Runtime.setConfigProvider(provider))).flatten
3939

40-
override val bootstrap =
41-
//removeDefaultLoggers ++ SLF4J.slf4j(format = LogFormat.colored) ++ ZLayer.fromZIO(configProviderLogic.map(provider => Runtime.setConfigProvider(provider))).flatten
42-
configLayer ++ (removeDefaultLoggers >>> configLayer >>> consoleLogger(configPath = "logger") >>> Slf4jBridge.initialize)
43-
40+
override val bootstrap = configLayer ++ ( removeDefaultLoggers >>> configLayer >>> consoleLogger() >>> Slf4jBridge.initialize)
4441

4542
val httpClientLayer = AsyncHttpClientZioBackend.layer()
4643

Diff for: src/main/scala/fr/janalyse/cem/RemoteGithubOperations.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ object RemoteGithubOperations {
170170
Obj(
171171
"description" -> Str(description),
172172
"public" -> Bool(publicBool),
173-
"files" -> Obj(files: _*)
173+
"files" -> Obj(files*)
174174
)
175175
}
176176

@@ -221,7 +221,7 @@ object RemoteGithubOperations {
221221

222222
Obj(
223223
"description" -> Str(description),
224-
"files" -> Obj(files: _*)
224+
"files" -> Obj(files*)
225225
)
226226
}
227227

Diff for: src/test/scala/fr/janalyse/cem/RemoteGithubOperationsSpec.scala

+9-6
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ import fr.janalyse.cem.model.WhatToDo.*
2424
import fr.janalyse.cem.tools.DescriptionTools.*
2525
import org.junit.runner.RunWith
2626
import sttp.client3.asynchttpclient.zio.AsyncHttpClientZioBackend
27+
import sttp.capabilities.zio.ZioStreams
28+
import sttp.capabilities.WebSockets
29+
import sttp.client3.testing.SttpBackendStub
2730
import zio.nio.file.Path
2831
import zio.lmdb.LMDB
2932

@@ -85,13 +88,13 @@ class RemoteGithubOperationsSpec extends ZIOSpecDefault {
8588
results <- githubRemoteExamplesChangesApply(config, todos)
8689
} yield results
8790

88-
val stubbedLayer = ZLayer.succeed(
89-
AsyncHttpClientZioBackend.stub
90-
.whenRequestMatches(_.uri.toString() == "https://api.github.com/gists/6e40f8239fa6828ab45a064b8131fdfc")
91-
.thenRespond("""{"id":"aa-bb", "html_url":"https://truc/aa-bb"}""")
92-
)
91+
val stub: SttpBackendStub[Task, Any] = AsyncHttpClientZioBackend.stub
92+
.whenRequestMatches(_.uri.toString() == "https://api.github.com/gists/6e40f8239fa6828ab45a064b8131fdfc")
93+
.thenRespond("""{"id":"aa-bb", "html_url":"https://truc/aa-bb"}""")
94+
95+
val stubLayer = ZLayer.succeed(stub)
9396

94-
logic.provide(stubbedLayer).map(result => assertTrue(true))
97+
logic.provide(stubLayer).map(result => assertTrue(true))
9598
}
9699

97100
// ----------------------------------------------------------------------------------------------

0 commit comments

Comments
 (0)