Skip to content

Commit

Permalink
Update Scala to 3.3.1, ScalaJs to 1.14.0 & Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
FabioPinheiro committed Nov 7, 2023
1 parent 55ee01c commit 89a5d31
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
12 changes: 4 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ resolvers ++= Resolver.sonatypeOssRepos("snapshots")

inThisBuild(
Seq(
scalaVersion := "3.3.0", // Also update docs/publishWebsite.sh and any ref to scala-3.3.0
scalaVersion := "3.3.1", // Also update docs/publishWebsite.sh and any ref to scala-3.3.1
)
)

Expand All @@ -16,7 +16,6 @@ lazy val V = new {
val munit = "1.0.0-M10" // "0.7.29"

// // https://mvnrepository.com/artifact/org.scala-js/scalajs-dom
// val scalajsDom = "2.4.0"
// // val scalajsLogging = "1.1.2-SNAPSHOT" //"1.1.2"

// // https://mvnrepository.com/artifact/dev.zio/zio
Expand Down Expand Up @@ -60,8 +59,6 @@ lazy val D = new {
// .cross(CrossVersion.for3Use2_13)
// )

// val dom = Def.setting("org.scala-js" %%% "scalajs-dom" % V.scalajsDom)

val zio = Def.setting("dev.zio" %%% "zio" % V.zio)
// val zioStreams = Def.setting("dev.zio" %%% "zio-streams" % V.zio)
val zioJson = Def.setting("dev.zio" %%% "zio-json" % V.zioJson)
Expand Down Expand Up @@ -99,7 +96,6 @@ lazy val NPM = new {

val materialDesign = Seq("material-components-web" -> V.materialComponents)

val sha1 = Seq("js-sha1" -> "0.6.0", "@types/js-sha1" -> "0.6.0")
val sha256 = Seq("js-sha256" -> "0.9.0")
}

Expand Down Expand Up @@ -187,7 +183,7 @@ lazy val httpUtils = crossProject(JSPlatform, JVMPlatform) // project
libraryDependencies += D.scalaDID.value,
)
.jsConfigure(scalaJSBundlerConfigure)
.jsSettings(Compile / npmDependencies ++= NPM.sha1 ++ NPM.sha256)
.jsSettings(Compile / npmDependencies ++= NPM.sha256)
.jvmSettings(
libraryDependencies += D.zioHttp.value,
)
Expand Down Expand Up @@ -251,7 +247,7 @@ lazy val mediator = project
// pipelineStages ++= Seq(digest, gzip), //Compression - If you serve your Scala.js application from a web server, you should additionally gzip the resulting .js files.
Compile / unmanagedResourceDirectories += baseDirectory.value / "src" / "main" / "extra-resources",
// Compile / unmanagedResourceDirectories += (baseDirectory.value.toPath.getParent.getParent / "docs-build" / "target" / "mdoc").toFile,
// Compile / unmanagedResourceDirectories += (baseDirectory.value.toPath.getParent.getParent / "serviceworker" / "target" / "scala-3.3.0" / "fmgp-serviceworker-fastopt").toFile,
// Compile / unmanagedResourceDirectories += (baseDirectory.value.toPath.getParent.getParent / "serviceworker" / "target" / "scala-3.3.1" / "fmgp-serviceworker-fastopt").toFile,
Compile / compile := ((Compile / compile) dependsOn scalaJSPipeline).value,
// Frontend dependency configuration
Assets / WebKeys.packagePrefix := "public/",
Expand All @@ -272,7 +268,7 @@ lazy val webapp = project
libraryDependencies ++= Seq(D.laminar.value, D.waypoint.value, D.upickle.value),
libraryDependencies ++= Seq(D.zio.value, D.zioJson.value),
libraryDependencies ++= Seq(D.scalaDID.value, D.scalaDID_peer.value),
Compile / npmDependencies ++= NPM.qrcode ++ NPM.materialDesign ++ NPM.sha1 ++ NPM.sha256,
Compile / npmDependencies ++= NPM.qrcode ++ NPM.materialDesign ++ NPM.sha256,
)
.settings(
stShortModuleNames := true,
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
val scalaJSVersion = sys.env.getOrElse("SCALAJS_VERSION", "1.13.2")
val scalaJSVersion = sys.env.getOrElse("SCALAJS_VERSION", "1.14.0")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)
Expand Down
4 changes: 2 additions & 2 deletions webapp/index-fastopt.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- https://material.io/develop/web/getting-started -->
<!-- <link href="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.css" rel="stylesheet"> -->
<link
href="./target/scala-3.3.0/scalajs-bundler/main/node_modules/material-components-web/dist/material-components-web.min.css"
href="./target/scala-3.3.1/scalajs-bundler/main/node_modules/material-components-web/dist/material-components-web.min.css"
rel="stylesheet">
<!-- <script src="https://unpkg.com/material-components-web@latest/dist/material-components-web.min.js"></script> -->
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons">
Expand All @@ -24,7 +24,7 @@
}
</script>
<!-- My APP -->
<script type="text/javascript" src="./target/scala-3.3.0/scalajs-bundler/main/webapp-fastopt-bundle.js"></script>
<script type="text/javascript" src="./target/scala-3.3.1/scalajs-bundler/main/webapp-fastopt-bundle.js"></script>
</head>

<body style="margin:0;">
Expand Down
2 changes: 1 addition & 1 deletion webapp/index-fullopt.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400,500" rel="stylesheet">
<link href="https://fonts.googleapis.com/css?family=Material+Icons&display=block" rel="stylesheet">
<!-- <script src="https://cdn.jsdelivr.net/npm/ipfs-http-client/dist/index.min.js"></script> -->
<script type="text/javascript" src="./target/scala-3.3.0/scalajs-bundler/main/webapp-fastopt-bundle.js"></script>
<script type="text/javascript" src="./target/scala-3.3.1/scalajs-bundler/main/webapp-fastopt-bundle.js"></script>
</head>

<body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import MyRouter._
@JSExportTopLevel("AppUtils")
object AppUtils {

def onEnterPress = onKeyPress.filter(_.keyCode == dom.ext.KeyCode.Enter)
def onEnterPress = onKeyPress.filter(_.keyCode == dom.KeyCode.Enter)

val menuClickObserver = Observer[dom.MouseEvent](onNext = ev => {
import typings.materialDrawer.mod.MDCDrawer
Expand Down

0 comments on commit 89a5d31

Please sign in to comment.