Skip to content
Open
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-common.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# this file by hand! Instead, if you wish to make changes, you should
# make a PR to sbt-lucuma.

version = "3.8.3"
version = "3.9.10"
style = default

runner.dialect = scala3
Expand Down
8 changes: 3 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@ lazy val core = crossProject(JVMPlatform, JSPlatform)
Settings.Libraries.Log4Cats.value
)
.jsSettings(
libraryDependencies ++= {
libraryDependencies ++=
Settings.Libraries.ScalaJSReact.value
}
)

lazy val testkit = crossProject(JVMPlatform, JSPlatform)
Expand Down Expand Up @@ -65,9 +64,8 @@ lazy val tests = crossProject(JVMPlatform, JSPlatform)
Settings.Libraries.MonocleLaw.value).map(_ % Test)
)
.jsSettings(
libraryDependencies ++= {
Settings.Libraries.ScalaJSReactTest.value.map(_ % Test)
},
libraryDependencies ++=
Settings.Libraries.ScalaJSReactTest.value.map(_ % Test),
jsEnv := new lucuma.LucumaJSDOMNodeJSEnv(),
scalaJSLinkerConfig ~= { _.withModuleKind(ModuleKind.CommonJSModule) }
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,9 @@ object UseAsyncEffect {
* Run async effect and cancel previously running instances, thus avoiding race conditions.
* Allows returning a cleanup effect.
*/
final def useAsyncEffectWithDepsBy[G, D: Reusability](deps: Ctx => D)(effect: Ctx => D => G)(
using
final def useAsyncEffectWithDepsBy[G, D: Reusability](
deps: Ctx => D
)(effect: Ctx => D => G)(using
step: Step,
G: EffectWithCleanup[G, DefaultA]
): step.Self =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ object UseEffectStreamResource:
.allocated
supervisor <- (latch.get >> close).start // Close the resource if the stream terminates.
yield
// Cleanup closes resource and cancels the supervisor, unless resource is already closed.
(supervisor.cancel >> close).when:
latch.tryGet.map(_.isEmpty)
// Cleanup closes resource and cancels the supervisor, unless resource is already closed.
(supervisor.cancel >> close).when:
latch.tryGet.map(_.isEmpty)

/**
* Open a `Resource[Async, fs.Stream[Async, Unit]]` on each render, and drain the stream by
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ class UseSingleEffect[F[_]](
latch
.modify: oldLatch =>
(
newLatch.some, // Replace current latch with a new one.
newLatch.some, // Replace current latch with a new one.
oldLatch.map(endOldEffect).orEmpty >> // Cancel and cleanup old effect, if any.
startNewEffect(effect, newLatch) // Start new effect.
startNewEffect(effect, newLatch) // Start new effect.
)
.flatten
.uncancelable // We can't cancel before new latch is set, otherwise we deadlock.
Expand Down
2 changes: 1 addition & 1 deletion modules/core/shared/src/main/scala/crystal/Throttler.scala
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class Throttler[F[_]: Temporal] private (
(queued.set(none) >> isRunning.getAndSet(true)).uncancelable
.flatMap:
case false =>
(Temporal[F].sleep(spacedBy).both(f) >> // Completes when both complete.
(Temporal[F].sleep(spacedBy).both(f) >> // Completes when both complete.
(isRunning.set(false) >> queued.getAndSet(none)).uncancelable
.flatMap(_.map(submit).orEmpty)).start.void // Execute everything in background.
case true =>
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.13.1")
libraryDependencies += "edu.gemini" %% "lucuma-jsdom" % "0.13.1"
addSbtPlugin("edu.gemini" % "sbt-lucuma-lib" % "0.14.7")
libraryDependencies += "edu.gemini" %% "lucuma-jsdom" % "0.14.7"
Loading