Skip to content

Commit

Permalink
deps
Browse files Browse the repository at this point in the history
  • Loading branch information
yurique committed Dec 15, 2024
1 parent 0551baf commit 0bc063b
Show file tree
Hide file tree
Showing 13 changed files with 46 additions and 34 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.7.17
version = 3.8.4-RC3
runner.dialect = "scala213"
fileOverride {
"glob:**/scala-3/**" {
Expand Down
30 changes: 22 additions & 8 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import org.scalajs.linker.interface.ESVersion

import org.openqa.selenium.WebDriver
import org.openqa.selenium.chrome.ChromeDriver
import org.openqa.selenium.chrome.ChromeOptions
Expand All @@ -8,13 +7,16 @@ import org.openqa.selenium.firefox.FirefoxProfile
import org.openqa.selenium.remote.server.DriverFactory
import org.openqa.selenium.remote.server.DriverProvider

import scala.Ordering.Implicits.*
import org.scalajs.jsenv.jsdomnodejs.JSDOMNodeJSEnv
import org.scalajs.jsenv.selenium.SeleniumJSEnv

import java.util.concurrent.TimeUnit

import org.commonmark.parser.Parser
import org.commonmark.renderer.html.HtmlRenderer
import org.typelevel.scalacoptions.ScalaVersion.V3_0_0
import org.typelevel.scalacoptions.ScalacOption
import org.typelevel.scalacoptions.ScalacOptions

val disableWebsiteOnCI = true

Expand Down Expand Up @@ -124,20 +126,32 @@ inThisBuild(
),
)

lazy val commonSettings = Seq.concat(
ScalaOptions.fixOptions,
scalacOptions ++= {
lazy val commonSettings = Seq(
tpolecatScalacOptions ++= {
val sourcesGithubUrl = s"https://raw.githubusercontent.com/tulz-app/laminext/${git.gitHeadCommit.value.get}/"
val sourcesOptionName = CrossVersion.partialVersion(scalaVersion.value) match {
case Some((2, _)) => "-P:scalajs:mapSourceURI"
case Some((3, _)) => "-scalajs-mapSourceURI"
case _ => throw new RuntimeException(s"unexpected scalaVersion: ${scalaVersion.value}")
}
val moduleSourceRoot = file("").toURI.toString
Seq(
s"$sourcesOptionName:$moduleSourceRoot->$sourcesGithubUrl"
Set(
ScalacOption(s"$sourcesOptionName:$moduleSourceRoot->$sourcesGithubUrl", _ => true)
)
}
},
tpolecatExcludeOptions ++= Set(
ScalacOptions.warnDeadCode,
ScalacOptions.warnUnusedImports,
),
Test / tpolecatExcludeOptions ++= Set(
ScalacOptions.warnValueDiscard,
ScalacOptions.warnUnusedImports,
ScalacOptions.warnUnusedLocals,
ScalacOptions.warnUnusedImplicits,
ScalacOptions.warnUnusedPatVars,
ScalacOptions.warnDeadCode,
ScalacOptions.warnNonUnitStatement
),
)

lazy val baseDependencies = Seq(
Expand Down
2 changes: 1 addition & 1 deletion modules/fsm/src/main/scala/io/laminext/fsm/AirFSM.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ class AirFSM[State](initialState: State, initialStateRequests: EventStream[State
var currentSubscription: Subscription = null
ReactiveElement.bindSubscriptionUnsafe(element) { ctx =>
currentSubscription = stateChangeRequests.writer.addSource(initialStateRequests)(ctx.owner)
stateChangeRequests.events.foreach { nextState =>
val _ = stateChangeRequests.events.foreach { nextState =>
if (control.isDefinedAt((currentState, nextState))) {
val nextStateChangeRequests = control((currentState, nextState))
if (currentSubscription != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ object Modal {

private def calculateScrollbarWidth(): Double = {
val outer = div(styleAttr("visibility: hidden; width: 100px; msOverflowStyle: scrollbar")).ref
dom.document.body.appendChild(outer)
val _ = dom.document.body.appendChild(outer)
val widthNoScroll = outer.offsetWidth
outer.style.overflow = "scroll"
val inner = div(width := "100%").ref
outer.appendChild(inner)
val _ = outer.appendChild(inner)
val widthWithScroll = inner.offsetWidth
outer.parentNode.removeChild(outer)
val _ = outer.parentNode.removeChild(outer)
widthNoScroll - widthWithScroll
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ object VideoJSOptions {
if (sources.nonEmpty) obj.sources = sources.toJSArray
if (techOrder.nonEmpty) obj.techOrder = techOrder.toJSArray
aspectRatio.foreach(obj.aspectRatio = _)
bigPlayButton.foreach(obj.bigPlayButton = _)
controlBar.foreach(obj.controlBar = _)
defaultVolume.foreach(obj.defaultVolume = _)
html5.foreach(obj.html5 = _)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ trait Slider extends Component {
def disable(): Unit

/**
* Create the `Slider`s DOM element.
* Create the `Slider` s DOM element.
*
* @param type
* Type of element to create.
Expand Down Expand Up @@ -93,8 +93,8 @@ trait Slider extends Component {
*
* @return
* The current position of the Slider.
* - position.x for vertical `Slider`s
* - position.y for horizontal `Slider`s
* - position.x for vertical `Slider` s
* - position.y for horizontal `Slider` s
*/
def calculateDistance(event: EventTarget.Event): Double

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ class WebSocket[Receive, Send](
if (!bufferWhenDisconnected) {
sendBuffer.clear()
} else if (sendBuffer.size > bufferSize) {
sendBuffer.drop(sendBuffer.size - bufferSize)
val _ = sendBuffer.drop(sendBuffer.size - bufferSize)
}
}
connectedWS.foreach { ws =>
Expand Down
6 changes: 3 additions & 3 deletions project/DependencyVersions.scala
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
object DependencyVersions {

val jsdom = "16.4.0"
val laminar = "17.0.0"
val laminar = "17.2.0"
val `scala-test` = "3.2.9"
val stringdiff = "0.3.4"
val domtestutils = "18.0.1"
val cats = "2.10.0"
val cats = "2.12.0"
val upickle = "3.2.0"
val circe = "0.14.6"
val circe = "0.14.9"

// -- website

Expand Down
4 changes: 2 additions & 2 deletions project/ScalaVersions.scala
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
object ScalaVersions {
val v213 = "2.13.12"
val v3 = "3.3.1"
val v213 = "2.13.15"
val v3 = "3.3.4"
}
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.9.9
sbt.version=1.10.6
14 changes: 7 additions & 7 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
logLevel := Level.Warn

libraryDependencies += "org.commonmark" % "commonmark" % "0.21.0"
libraryDependencies += "org.commonmark" % "commonmark" % "0.24.0"
libraryDependencies += "org.scala-js" %% "scalajs-env-nodejs" % "1.4.0"
libraryDependencies += "org.scala-js" %% "scalajs-env-selenium" % "1.1.1"
libraryDependencies += "org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.1.0"
Expand All @@ -9,16 +9,16 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")

addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.2.1")
addSbtPlugin("com.github.sbt" % "sbt-pgp" % "2.3.1")

addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.10.0")
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.12.2")

//addSbtPlugin("io.github.davidgregory084" % "sbt-tpolecat" % "0.3.1")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.2")

addSbtPlugin("com.yurique" % "sbt-embedded-files" % "0.4.0")

addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.19.0")
addSbtPlugin("com.github.sbt" % "sbt-github-actions" % "0.24.0")

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

addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.13.1")
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ object WebSocketCirceExample
description = FileAsString("description.md")
)(() => {
import com.raquo.laminar.api.L._
div(
"temporarily commenting this out – circe's not ready for scala 3-RC2"
)

import com.raquo.laminar.api.L._
import com.raquo.laminar.api.L.CollectionCommand
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ object PageHeader {

private def moduleLink(
currentPage: Signal[Option[(SiteModule, Page)]]
)(module: SiteModule) =
)(module: SiteModule) =
a(
cls := "border-b-2 px-2 border-transparent flex font-display tracking-wide",
currentPage
Expand Down

0 comments on commit 0bc063b

Please sign in to comment.