Skip to content

Commit

Permalink
scala 3 prep (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
cornerman authored Nov 12, 2023
1 parent d12e14e commit 7f70345
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 17 deletions.
16 changes: 8 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,23 @@ inThisBuild(
),
)

val isDotty = Def.setting(CrossVersion.partialVersion(scalaVersion.value).exists(_._1 == 3))

lazy val commonSettings = Seq(
addCompilerPlugin("org.typelevel" % "kind-projector" % "0.13.2" cross CrossVersion.full),
libraryDependencies ++=
Deps.scalatest.value % Test ::
Nil,
scalacOptions --= Seq("-Wconf:any&src=src_managed/.*"),

libraryDependencies ++= (if (isDotty.value) Nil
else
Seq(
compilerPlugin(("org.typelevel" %% "kind-projector" % "0.13.2").cross(CrossVersion.full)),
)),
)

lazy val jsSettings = Seq(
useYarn := true,
scalacOptions += {
val githubRepo = "fun-stack/fun-stack-scala"
val local = baseDirectory.value.toURI
val subProjectDir = baseDirectory.value.getName
val remote = s"https://raw.githubusercontent.com/${githubRepo}/${git.gitHeadCommit.value.get}"
s"-P:scalajs:mapSourceURI:$local->$remote/${subProjectDir}/"
},
)

lazy val core = project
Expand Down
2 changes: 1 addition & 1 deletion clientCore/src/main/scala/helper/EventSubscriber.scala
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ final class EventSubscriber(send: String => Unit) extends IncidentHandler[Subscr
send(subscribePayload(subscriptionKey))

private def doUnsubscribe(subscriptionKey: String): Unit = {
subscriptionByKey.remove(subscriptionKey): Unit
val _ = subscriptionByKey.remove(subscriptionKey)
send(unsubscribePayload(subscriptionKey))
}

Expand Down
2 changes: 1 addition & 1 deletion clientWeb/src/main/scala/Auth.scala
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class Auth(val auth: AuthAppConfig, website: WebsiteAppConfig) extends funstack.
if (shouldRedirect && check) {
sessionStorage.setItem(StorageKey.redirectFlag, "")
// needs to be in a timeout, otherwise messes with the history stack
dom.window.setTimeout(() => dom.window.location.href = authRequests.loginUrl, 0): Unit
val _ = dom.window.setTimeout(() => dom.window.location.href = authRequests.loginUrl, 0)
true
}
else false
Expand Down
2 changes: 1 addition & 1 deletion lambdaWsEventAuthorizer/src/main/scala/Handler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ object Handler {
val router = routerf(request)

val result: Future[Boolean] = ServerMessageSerdes.deserialize(record.Sns.Message) match {
case Right(n: Notification[SubscriptionEvent]) =>
case Right(n: Notification[SubscriptionEvent@unchecked]) =>
val (a, b, arg) = n.event.subscriptionKey.split("/") match {
case Array(a, b) => (a, b, "")
case Array(a, b, arg) => (a, b, arg)
Expand Down
8 changes: 4 additions & 4 deletions project/Deps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ object Deps {

// websocket connecitivity
val mycelium = new {
val version = "0.3.1"
val version = "0.4.0"
val core = s("com.github.cornerman" %%% "mycelium-core" % version)
val clientJs = s("com.github.cornerman" %%% "mycelium-client-js" % version)
}
Expand All @@ -40,7 +40,7 @@ object Deps {
}

val tapir = new {
val version = "1.8.0"
val version = "1.9.0"
val core = s("com.softwaremill.sttp.tapir" %%% "tapir-core" % version)
val lambda = s("com.softwaremill.sttp.tapir" %%% "tapir-aws-lambda" % version)
val circe = s("com.softwaremill.sttp.tapir" %%% "tapir-json-circe" % version)
Expand All @@ -51,7 +51,7 @@ object Deps {

// aws-sdk-js
val awsSdkJS = new {
val version = s"0.32.0-v${NpmDeps.awsSdkVersion}"
val version = s"0.33.0-v${NpmDeps.awsSdkVersion}"
val lambda = s("net.exoego" %%% "aws-sdk-scalajs-facade-lambda" % version)
val dynamodb = s("net.exoego" %%% "aws-sdk-scalajs-facade-dynamodb" % version)
val apigatewaymanagementapi = s("net.exoego" %%% "aws-sdk-scalajs-facade-apigatewaymanagementapi" % version)
Expand All @@ -62,7 +62,7 @@ object Deps {
}

object NpmDeps {
val awsSdkVersion = "2.798.0"
val awsSdkVersion = "2.892.0"
val awsSdk = "aws-sdk" -> awsSdkVersion
val jwtDecode = "jwt-decode" -> "3.1.2"
val nodeFetch = "node-fetch" -> "2.6.7"
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ addSbtPlugin("org.scalablytyped.converter" % "sbt-converter" % "1.0.0
// sane scalac options
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-git" % "1.0.2")

addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")

addSbtPlugin("com.thoughtworks.sbt-scala-js-map" % "sbt-scala-js-map" % "4.1.1")

0 comments on commit 7f70345

Please sign in to comment.