Skip to content

Commit

Permalink
Build: Drop Scala 2.12, upgrade some deps
Browse files Browse the repository at this point in the history
  • Loading branch information
raquo committed Feb 28, 2024
1 parent 429fd8c commit eda8410
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)](
Expand Down
5 changes: 2 additions & 3 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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(
Expand Down
2 changes: 0 additions & 2 deletions project/Versions.scala
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version = 1.8.2
sbt.version = 1.9.9
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -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")

Expand Down

0 comments on commit eda8410

Please sign in to comment.