Skip to content

Commit d60c69c

Browse files
committed
prepare scala 3 build
1 parent d12e14e commit d60c69c

File tree

6 files changed

+17
-17
lines changed

6 files changed

+17
-17
lines changed

build.sbt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,23 @@ inThisBuild(
2626
),
2727
)
2828

29+
val isDotty = Def.setting(CrossVersion.partialVersion(scalaVersion.value).exists(_._1 == 3))
30+
2931
lazy val commonSettings = Seq(
30-
addCompilerPlugin("org.typelevel" % "kind-projector" % "0.13.2" cross CrossVersion.full),
3132
libraryDependencies ++=
3233
Deps.scalatest.value % Test ::
3334
Nil,
3435
scalacOptions --= Seq("-Wconf:any&src=src_managed/.*"),
36+
37+
libraryDependencies ++= (if (isDotty.value) Nil
38+
else
39+
Seq(
40+
compilerPlugin(("org.typelevel" %% "kind-projector" % "0.13.2").cross(CrossVersion.full)),
41+
)),
3542
)
3643

3744
lazy val jsSettings = Seq(
3845
useYarn := true,
39-
scalacOptions += {
40-
val githubRepo = "fun-stack/fun-stack-scala"
41-
val local = baseDirectory.value.toURI
42-
val subProjectDir = baseDirectory.value.getName
43-
val remote = s"https://raw.githubusercontent.com/${githubRepo}/${git.gitHeadCommit.value.get}"
44-
s"-P:scalajs:mapSourceURI:$local->$remote/${subProjectDir}/"
45-
},
4646
)
4747

4848
lazy val core = project

clientCore/src/main/scala/helper/EventSubscriber.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ final class EventSubscriber(send: String => Unit) extends IncidentHandler[Subscr
1818
send(subscribePayload(subscriptionKey))
1919

2020
private def doUnsubscribe(subscriptionKey: String): Unit = {
21-
subscriptionByKey.remove(subscriptionKey): Unit
21+
val _ = subscriptionByKey.remove(subscriptionKey)
2222
send(unsubscribePayload(subscriptionKey))
2323
}
2424

clientWeb/src/main/scala/Auth.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ class Auth(val auth: AuthAppConfig, website: WebsiteAppConfig) extends funstack.
5454
if (shouldRedirect && check) {
5555
sessionStorage.setItem(StorageKey.redirectFlag, "")
5656
// needs to be in a timeout, otherwise messes with the history stack
57-
dom.window.setTimeout(() => dom.window.location.href = authRequests.loginUrl, 0): Unit
57+
val _ = dom.window.setTimeout(() => dom.window.location.href = authRequests.loginUrl, 0)
5858
true
5959
}
6060
else false

lambdaWsEventAuthorizer/src/main/scala/Handler.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ object Handler {
111111
val router = routerf(request)
112112

113113
val result: Future[Boolean] = ServerMessageSerdes.deserialize(record.Sns.Message) match {
114-
case Right(n: Notification[SubscriptionEvent]) =>
114+
case Right(n: Notification[SubscriptionEvent@unchecked]) =>
115115
val (a, b, arg) = n.event.subscriptionKey.split("/") match {
116116
case Array(a, b) => (a, b, "")
117117
case Array(a, b, arg) => (a, b, arg)

project/Deps.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ object Deps {
2525

2626
// websocket connecitivity
2727
val mycelium = new {
28-
val version = "0.3.1"
28+
val version = "0.4.0"
2929
val core = s("com.github.cornerman" %%% "mycelium-core" % version)
3030
val clientJs = s("com.github.cornerman" %%% "mycelium-client-js" % version)
3131
}
@@ -40,7 +40,7 @@ object Deps {
4040
}
4141

4242
val tapir = new {
43-
val version = "1.8.0"
43+
val version = "1.9.0"
4444
val core = s("com.softwaremill.sttp.tapir" %%% "tapir-core" % version)
4545
val lambda = s("com.softwaremill.sttp.tapir" %%% "tapir-aws-lambda" % version)
4646
val circe = s("com.softwaremill.sttp.tapir" %%% "tapir-json-circe" % version)
@@ -51,7 +51,7 @@ object Deps {
5151

5252
// aws-sdk-js
5353
val awsSdkJS = new {
54-
val version = s"0.32.0-v${NpmDeps.awsSdkVersion}"
54+
val version = s"0.33.0-v${NpmDeps.awsSdkVersion}"
5555
val lambda = s("net.exoego" %%% "aws-sdk-scalajs-facade-lambda" % version)
5656
val dynamodb = s("net.exoego" %%% "aws-sdk-scalajs-facade-dynamodb" % version)
5757
val apigatewaymanagementapi = s("net.exoego" %%% "aws-sdk-scalajs-facade-apigatewaymanagementapi" % version)
@@ -62,7 +62,7 @@ object Deps {
6262
}
6363

6464
object NpmDeps {
65-
val awsSdkVersion = "2.798.0"
65+
val awsSdkVersion = "2.892.0"
6666
val awsSdk = "aws-sdk" -> awsSdkVersion
6767
val jwtDecode = "jwt-decode" -> "3.1.2"
6868
val nodeFetch = "node-fetch" -> "2.6.7"

project/plugins.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ addSbtPlugin("org.scalablytyped.converter" % "sbt-converter" % "1.0.0
77
// sane scalac options
88
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0")
99

10-
addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2")
11-
1210
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
11+
12+
addSbtPlugin("com.thoughtworks.sbt-scala-js-map" % "sbt-scala-js-map" % "4.1.1")

0 commit comments

Comments
 (0)