Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalafmt-core to 3.0.5 #72

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.0.4
version=3.0.5
runner.dialect = "scala213"
fileOverride {
"glob:**/scala-3/**" {
Expand Down
52 changes: 26 additions & 26 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ inThisBuild(
),
)

lazy val commonSettings = Seq.concat(
lazy val commonSettings = Seq.concat(
ScalaOptions.fixOptions,
scalacOptions ++= {
val sourcesGithubUrl = s"https://raw.githubusercontent.com/tulz-app/laminext/${git.gitHeadCommit.value.get}/"
Expand All @@ -49,62 +49,62 @@ lazy val commonSettings = Seq.concat(
}
)

lazy val bundlerSettings = Seq(
lazy val bundlerSettings = Seq(
jsEnv := new net.exoego.jsenv.jsdomnodejs.JSDOMNodeJSEnv(),
installJsdom / version := DependencyVersions.jsdom,
Test / requireJsDomEnv := true,
useYarn := true
)

lazy val baseDependencies = Seq(
lazy val baseDependencies = Seq(
libraryDependencies ++= Seq.concat(
Dependencies.laminar.value,
Dependencies.stringdiff.value,
Dependencies.domtestutils.value
)
)

lazy val catsDependencies = Seq(
lazy val catsDependencies = Seq(
libraryDependencies ++= Seq.concat(
Dependencies.cats.value
)
)

lazy val circeDependencies = Seq(
lazy val circeDependencies = Seq(
libraryDependencies ++= Seq.concat(
Dependencies.circe.value
)
)

lazy val upickleDependencies = Seq(
lazy val upickleDependencies = Seq(
libraryDependencies ++= Seq.concat(
Dependencies.upickle.value
)
)

lazy val base =
lazy val base =
project
.in(file("modules/base"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.settings(baseDependencies)

lazy val `core` =
lazy val `core` =
project
.in(file("modules/core"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.settings(baseDependencies)

lazy val `validation-core` =
lazy val `validation-core` =
project
.in(file("modules/validation-core"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.settings(baseDependencies)
.dependsOn(`base`, `core`)

lazy val `validation-cats` =
lazy val `validation-cats` =
project
.in(file("modules/validation-cats"))
.enablePlugins(ScalaJSPlugin)
Expand All @@ -113,36 +113,36 @@ lazy val `validation-cats` =
.settings(catsDependencies)
.dependsOn(`validation-core`)

lazy val `fsm` =
lazy val `fsm` =
project
.in(file("modules/fsm"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.settings(baseDependencies)

lazy val `markdown` =
lazy val `markdown` =
project
.in(file("modules/markdown"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.settings(baseDependencies)

lazy val `videojs` =
lazy val `videojs` =
project
.in(file("modules/videojs"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.settings(baseDependencies)
.dependsOn(`core`)

lazy val `highlight` =
lazy val `highlight` =
project
.in(file("modules/highlight"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.settings(baseDependencies)

lazy val `ui` =
lazy val `ui` =
project
.in(file("modules/ui"))
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
Expand All @@ -151,7 +151,7 @@ lazy val `ui` =
.settings(baseDependencies)
.dependsOn(`base`, `core`)

lazy val `tailwind` =
lazy val `tailwind` =
project
.in(file("modules/tailwind"))
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
Expand All @@ -169,14 +169,14 @@ lazy val `tailwind-default-theme` =
.settings(baseDependencies)
.dependsOn(`tailwind`)

lazy val `websocket` =
lazy val `websocket` =
project
.in(file("modules/websocket"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.settings(baseDependencies)

lazy val `websocket-circe` =
lazy val `websocket-circe` =
project
.in(file("modules/websocket-circe"))
.enablePlugins(ScalaJSPlugin)
Expand All @@ -185,7 +185,7 @@ lazy val `websocket-circe` =
.settings(circeDependencies)
.dependsOn(`websocket`)

lazy val `websocket-upickle` =
lazy val `websocket-upickle` =
project
.in(file("modules/websocket-upickle"))
.enablePlugins(ScalaJSPlugin)
Expand All @@ -194,15 +194,15 @@ lazy val `websocket-upickle` =
.settings(upickleDependencies)
.dependsOn(`websocket`)

lazy val `fetch` =
lazy val `fetch` =
project
.in(file("modules/fetch"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.settings(baseDependencies)
.dependsOn(`core`, `util`)

lazy val `fetch-circe` =
lazy val `fetch-circe` =
project
.in(file("modules/fetch-circe"))
.enablePlugins(ScalaJSPlugin)
Expand All @@ -211,7 +211,7 @@ lazy val `fetch-circe` =
.settings(circeDependencies)
.dependsOn(`fetch`)

lazy val `fetch-upickle` =
lazy val `fetch-upickle` =
project
.in(file("modules/fetch-upickle"))
.enablePlugins(ScalaJSPlugin)
Expand All @@ -220,14 +220,14 @@ lazy val `fetch-upickle` =
.settings(upickleDependencies)
.dependsOn(`fetch`)

lazy val `util` =
lazy val `util` =
project
.in(file("modules/util"))
.enablePlugins(ScalaJSPlugin)
.settings(commonSettings)
.settings(baseDependencies)

lazy val website = project
lazy val website = project
.in(file("website"))
.enablePlugins(ScalaJSPlugin)
.enablePlugins(EmbeddedFilesPlugin)
Expand Down Expand Up @@ -271,13 +271,13 @@ lazy val website = project
`fetch-upickle`
)

lazy val noPublish = Seq(
lazy val noPublish = Seq(
publishLocal / skip := true,
publish / skip := true,
publishTo := Some(Resolver.file("Unused transient repository", file("target/unusedrepo")))
)

lazy val root = project
lazy val root = project
.in(file("."))
.settings(noPublish)
.settings(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class AmendedHtmlTagPartial[R <: dom.html.Element, AmType <: AmAny](
amendments = amendments ++ mods
this.asInstanceOf[AmendedHtmlTagPartial[R, NewAmType]]
}
def amended[NewAmType <: AmAny]: AmendedHtmlTagPartial[R, NewAmType] =
def amended[NewAmType <: AmAny]: AmendedHtmlTagPartial[R, NewAmType] =
this.asInstanceOf[AmendedHtmlTagPartial[R, NewAmType]]

def build[NewAmType <: AmAny]: AmendedHtmlTag[R, NewAmType] = new AmendedHtmlTag[R, NewAmType](original, amendments)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class DelayForEventStream[A](
}
}

override def onError(nextError: Throwable, transaction: Transaction): Unit = {
override def onError(nextError: Throwable, transaction: Transaction): Unit = {
val _ = new Transaction(fireError(nextError, _))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class DropEventStream[A](
fireValue(nextValue, transaction)
}

override def onError(nextError: Throwable, transaction: Transaction): Unit =
override def onError(nextError: Throwable, transaction: Transaction): Unit =
fireError(nextError, transaction)

}
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ class EventStreamEitherT[A, B](val value: EventStream[Either[A, B]]) {

def toOption: EventStreamOptionT[B] = new EventStreamOptionT(value.map(_.toOption))

def collectRight: EventStream[B] =
def collectRight: EventStream[B] =
value.collect { case Right(b) => b }

def collectLeft: EventStream[A] =
def collectLeft: EventStream[A] =
value.collect { case Left(a) => a }

def bimap[C, D](fa: A => C, fb: B => D): EventStreamEitherT[C, D] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,20 @@ class LifecycleEventStream[A](

override protected val topoRank: Int = Protected.topoRank(parent) + 1

override protected def onNext(nextParentValue: A, transaction: Transaction): Unit = {
override protected def onNext(nextParentValue: A, transaction: Transaction): Unit = {
fireValue(nextParentValue, transaction)
}

override protected def onError(nextError: Throwable, transaction: Transaction): Unit = {
fireError(nextError, transaction)
}

override protected[this] def onStart(): Unit = {
override protected[this] def onStart(): Unit = {
startCallback()
super.onStart()
}

override protected[this] def onStop(): Unit = {
override protected[this] def onStop(): Unit = {
stopCallback()
super.onStop()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class MutationObserverBinders(
attributeFilter: js.UndefOr[js.Array[String]] = js.undefined
) {

@inline def -->[El <: ReactiveElement[org.scalajs.dom.raw.HTMLElement]](sink: Sink[Seq[MutationRecord]]): BinderWithStartStop[El] = {
@inline def -->[El <: ReactiveElement[org.scalajs.dom.raw.HTMLElement]](sink: Sink[Seq[MutationRecord]]): BinderWithStartStop[El] = {
new MutationObserverBinder(
t => sink.toObserver.onNext(t),
MutationObserverInit(
Expand Down Expand Up @@ -48,7 +48,7 @@ class MutationObserverBinders(
)
}

@inline def bind[El <: ReactiveElement[org.scalajs.dom.raw.HTMLElement]](sink: Sink[Seq[MutationRecord]]): BinderWithStartStop[El] = -->(sink)
@inline def bind[El <: ReactiveElement[org.scalajs.dom.raw.HTMLElement]](sink: Sink[Seq[MutationRecord]]): BinderWithStartStop[El] = -->(sink)

@inline def bind[El <: ReactiveElement[org.scalajs.dom.raw.HTMLElement]](onNext: Seq[MutationRecord] => Unit): BinderWithStartStop[El] = -->(onNext)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ import io.laminext.domext.ResizeObserverEntry

object ResizeObserverBinders {

@inline def -->[El <: ReactiveElement[org.scalajs.dom.raw.HTMLElement]](sink: Sink[ResizeObserverEntry]): BinderWithStartStop[El] = {
@inline def -->[El <: ReactiveElement[org.scalajs.dom.raw.HTMLElement]](sink: Sink[ResizeObserverEntry]): BinderWithStartStop[El] = {
new ResizeObserverBinder(t => sink.toObserver.onNext(t))
}

@inline def -->[El <: ReactiveElement[org.scalajs.dom.raw.HTMLElement]](onNext: ResizeObserverEntry => Unit): BinderWithStartStop[El] = {
new ResizeObserverBinder(onNext)
}

@inline def bind[El <: ReactiveElement[org.scalajs.dom.raw.HTMLElement]](sink: Sink[ResizeObserverEntry]): BinderWithStartStop[El] = -->(sink)
@inline def bind[El <: ReactiveElement[org.scalajs.dom.raw.HTMLElement]](sink: Sink[ResizeObserverEntry]): BinderWithStartStop[El] = -->(sink)

@inline def bind[El <: ReactiveElement[org.scalajs.dom.raw.HTMLElement]](onNext: ResizeObserverEntry => Unit): BinderWithStartStop[El] = -->(onNext)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class TakeEventStream[A](
fireValue(nextValue, transaction)
}

override def onError(nextError: Throwable, transaction: Transaction): Unit =
override def onError(nextError: Throwable, transaction: Transaction): Unit =
fireError(nextError, transaction)

}
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import scala.util.Try

class TeeObserver[T](observers: Seq[Observer[T]]) extends Observer[T] {

override def onNext(nextValue: T): Unit =
override def onNext(nextValue: T): Unit =
observers.foreach(_.onNext(nextValue))

override def onError(err: Throwable): Unit =
override def onError(err: Throwable): Unit =
observers.foreach(_.onError(err))

override def onTry(nextValue: Try[T]): Unit =
Expand Down
Loading