From eda84104b321e4244e497cbded52def4c7a139c3 Mon Sep 17 00:00:00 2001 From: Nikita Gazarov Date: Tue, 27 Feb 2024 19:23:39 -0700 Subject: [PATCH] Build: Drop Scala 2.12, upgrade some deps --- README.md | 2 +- build.sbt | 5 ++--- project/Versions.scala | 2 -- project/build.properties | 2 +- project/plugins.sbt | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 20fef8a..067a043 100644 --- a/README.md +++ b/README.md @@ -342,7 +342,7 @@ So, `router.forcePage` is often the preferred way. Suppose you want to "remember" vertical scroll position on a certain page, so that when you navigate away from it and then come back, it's restored. Instead of maintaining complex global variables or cookies or whatever, just include this information in the Page. -Pages are serialized into History API state records, so when the user uses browser back button to come back to a page that he's already been to, it's not just the old URL that's restored, it's the whole Page state. On the contrary, if the user reloads the page or clicks a link that causes a page load instead of the History API transition, the Page state will be parsed from the URL, and since the URL does not include scroll position in our case, that will need to be the default scroll position of zero. +Pages are serialized into History API state records, so when the user uses browser back button to come back to a page that they've already been to, it's not just the old URL that's restored, it's the whole Page state. On the contrary, if the user reloads the page or clicks a link that causes a page load instead of the History API transition, the Page state will be parsed from the URL, and since the URL does not include scroll position in our case, that will need to be the default scroll position of zero. ```scala Route[NotePage, (Int, Int)]( diff --git a/build.sbt b/build.sbt index 6e56127..df0905f 100644 --- a/build.sbt +++ b/build.sbt @@ -68,7 +68,6 @@ lazy val jsSettings = Seq( s"${sourcesOptionName}:$localSourcesPath->$remoteSourcesPath" }, - scalaJSLinkerConfig ~= { _.withSourceMap(false) }, (Test / requireJsDomEnv) := true, (installJsdom / version) := Versions.JsDom, (webpack / version) := Versions.Webpack, @@ -83,8 +82,8 @@ lazy val releaseSettings = Seq( name := "Waypoint", normalizedName := "waypoint", organization := "com.raquo", - scalaVersion := Versions.Scala_2_13, - crossScalaVersions := Seq(Versions.Scala_3, Versions.Scala_2_13, Versions.Scala_2_12), + scalaVersion := Versions.Scala_3, + crossScalaVersions := Seq(Versions.Scala_3, Versions.Scala_2_13), homepage := Some(url("https://github.com/raquo/waypoint")), licenses += ("MIT", url("https://github.com/raquo/waypoint/blob/master/LICENSE.md")), scmInfo := Some( diff --git a/project/Versions.scala b/project/Versions.scala index d7cb2d2..aec6cac 100644 --- a/project/Versions.scala +++ b/project/Versions.scala @@ -1,7 +1,5 @@ object Versions { - val Scala_2_12 = "2.12.17" - val Scala_2_13 = "2.13.12" val Scala_3 = "3.3.1" diff --git a/project/build.properties b/project/build.properties index f344c14..49214c4 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version = 1.8.2 +sbt.version = 1.9.9 diff --git a/project/plugins.sbt b/project/plugins.sbt index a4f3c51..d865d18 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,7 +4,7 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0") addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.21.1") -addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.2.0") +addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2") addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.11")