Skip to content

Commit

Permalink
Upgrade sbt-tpolecat to 0.5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Apr 9, 2024
1 parent bb02fd3 commit 7f06c82
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ addSbtPlugin("org.xerial.sbt" %% "sbt-sonatype" % "3.10.0")
addSbtPlugin("com.github.sbt" %% "sbt-pgp" % "2.2.1")
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.3.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.1")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.11.1")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.5.1")
addSbtPlugin("com.github.sbt" % "sbt-unidoc" % "0.5.0")
Expand Down
2 changes: 1 addition & 1 deletion tyrian/js/src/main/scala/tyrian/Sub.scala
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ object Sub:
/** A subscription that emits a `msg` based on the running time in seconds whenever the browser renders an animation
* frame.
*/
@nowarn("msg=discarded")
@nowarn("msg=unused")
def animationFrameTick[F[_]: Async, Msg](id: String)(toMsg: Double => Msg): Sub[F, Msg] =
Sub.make(
id,
Expand Down
4 changes: 2 additions & 2 deletions tyrian/js/src/main/scala/tyrian/http/Http.scala
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ object Http:
*/
def send[F[_]: Async, A, Msg](request: Request[A], resultToMessage: Decoder[Msg]): Cmd.Run[F, Msg, Msg] =

@nowarn("msg=discarded")
@nowarn("msg=unused")
def fetchTask(abortController: dom.AbortController): F[dom.Response] = Async[F].async_ { callback =>

val requestInit = new RequestInit {}
Expand All @@ -62,7 +62,7 @@ object Http:
()
}

@nowarn("msg=discarded")
@nowarn("msg=unused")
def textBodyTask(domResponse: dom.Response): F[String] = Async[F].async_ { callback =>
domResponse
.text()
Expand Down
2 changes: 1 addition & 1 deletion tyrian/js/src/test/scala/tyrian/CmdSubUtils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ object CmdSubUtils:
extension [A](sub: Sub[IO, A]) def run: (Either[Throwable, A] => Unit) => IO[Unit] = runSub(sub)

@SuppressWarnings(Array("scalafix:DisableSyntax.throw"))
@nowarn("msg=discarded")
@nowarn("msg=unused")
def runSub[A, Msg](sub: Sub[IO, Msg])(callback: Either[Throwable, A] => Unit): IO[Unit] =
sub match
case s: Sub.Observe[IO, A, Msg] @unchecked =>
Expand Down
6 changes: 4 additions & 2 deletions tyrian/js/src/test/scala/tyrian/CmdTests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,10 @@ class CmdTests extends munit.CatsEffectSuite {
.map(_ * 10)
)

mapped.cmd1.run.assertEquals(1000)
mapped.cmd2.run.assertEquals(100)
for {
_ <- mapped.cmd1.run.assertEquals(1000)
_ <- mapped.cmd2.run.assertEquals(100)
} yield ()
}

test("map - Batch") {
Expand Down

0 comments on commit 7f06c82

Please sign in to comment.