Skip to content

Commit

Permalink
Merge pull request #1095 from japgolly/updates
Browse files Browse the repository at this point in the history
Dependency updates
  • Loading branch information
rpiaggio authored Jul 11, 2024
2 parents c6e3bbf + 188d225 commit be32f3d
Show file tree
Hide file tree
Showing 12 changed files with 51 additions and 37 deletions.
24 changes: 24 additions & 0 deletions doc/changelog/2.1.2.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 2.1.2

### Fixes

* Components that only used the `useEffect` family of hooks were not invoking them.

* Fixed the source map uri to point to the correct location

### Dependencies

* Upgrade sbt to 1.10.1
* Upgrade Scala to 2.13.14 and 3.3.0
* Upgrade Scala.js to 1.16.0
* Upgrade microlibs to 4.1.0
* Upgrade sbt-ci-release to 1.5.12
* Upgrade sbt-scalafix to 0.12.1
* Upgrade kindprojector to 0.13.3
* Upgrade cats to 2.12.0
* Upgrade cats-effect to 3.5.4
* Upgrade monocle3 to 3.2.0
* Upgrade scalajs-dom to 2.8.0
* Upgrade sourcecode 0.4.2
* Upgrade macrotaskExecutor to 1.1.1
* Upgrade semanticdb to 4.9.8
7 changes: 0 additions & 7 deletions doc/changelog/next.md

This file was deleted.

2 changes: 1 addition & 1 deletion downstream-tests/scalafix.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ ThisBuild / scalacOptions ++= {

ThisBuild / semanticdbEnabled := true

ThisBuild / semanticdbVersion := "4.5.9"
ThisBuild / semanticdbVersion := "4.9.8"

ThisBuild / scalafixScalaBinaryVersion := "2.13"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ final class CallbackOption[+A](val underlyingRepr: CallbackOption.UnderlyingRepr
def asCallback: CallbackTo[Option[A]] =
CallbackTo lift cbfn

inline def map[B](f: A => B)(using inline ev: MapGuard[B]): CallbackOption[ev.Out] =
inline def map[B](f: A => B)(using ev: MapGuard[B]): CallbackOption[ev.Out] =
unsafeMap(f)

private[react] def unsafeMap[B](f: A => B): CallbackOption[B] =
Expand All @@ -192,7 +192,7 @@ final class CallbackOption[+A](val underlyingRepr: CallbackOption.UnderlyingRepr
/**
* Alias for `map`.
*/
inline def |>[B](f: A => B)(using inline ev: MapGuard[B]): CallbackOption[ev.Out] =
inline def |>[B](f: A => B)(using ev: MapGuard[B]): CallbackOption[ev.Out] =
map(f)

def flatMapOption[B](f: A => Option[B]): CallbackOption[B] =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,11 +306,11 @@ final class CallbackTo[+A] /*private[react]*/ (private[CallbackTo] val trampolin
inline def runNow(): A =
trampoline.run

inline def map[B](f: A => B)(using inline ev: MapGuard[B]): CallbackTo[ev.Out] =
inline def map[B](f: A => B)(using ev: MapGuard[B]): CallbackTo[ev.Out] =
new CallbackTo(trampoline.map(f))

/** Alias for `map`. */
inline def |>[B](inline f: A => B)(using inline ev: MapGuard[B]): CallbackTo[ev.Out] =
inline def |>[B](inline f: A => B)(using ev: MapGuard[B]): CallbackTo[ev.Out] =
map(f)

inline def flatMap[B](f: A => CallbackTo[B]): CallbackTo[B] =
Expand Down Expand Up @@ -589,7 +589,7 @@ final class CallbackTo[+A] /*private[react]*/ (private[CallbackTo] val trampolin


/** Convenience-method to run additional code after this callback. */
inline def thenRun[B](inline runNext: B)(using inline ev: MapGuard[B]): CallbackTo[ev.Out] =
inline def thenRun[B](inline runNext: B)(using ev: MapGuard[B]): CallbackTo[ev.Out] =
this >> CallbackTo(runNext)

/** Convenience-method to run additional code before this callback. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ object ReusabilityMacros {
var set = Set.empty[String]
for (e <- es)
if set.contains(e)
then quotes.reflect.report.throwError(s"Duplicate field specified: \"$e\"")
then quotes.reflect.report.errorAndAbort(s"Duplicate field specified: \"$e\"")
else set += e
new FieldExclusions(set)
}
Expand Down Expand Up @@ -219,7 +219,7 @@ object ReusabilityMacros {
then s"Specified field ${fs.head} doesn't exist."
else s"Specified fields ${fs.mkString(", ")} don't exist."
val err = s"Failed to derive a Reusability instance for ${Type.show[A]}: $subErr"
quotes.reflect.report.throwError(err)
quotes.reflect.report.errorAndAbort(err)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@ package japgolly.scalajs.react.component.builder
import japgolly.microlibs.compiletime.MacroEnv.*
import japgolly.scalajs.react.{Children, PropsChildren}
import japgolly.scalajs.react.component.builder.Lifecycle.RenderScope
import japgolly.scalajs.react.component.Generic
import japgolly.scalajs.react.component.Scala.BackendScope
import japgolly.scalajs.react.util.DefaultEffects.{Async => DefaultA, Sync => DefaultS}
import japgolly.scalajs.react.vdom.VdomNode
import scala.language.`3.0`
import scala.quoted.*
Expand Down Expand Up @@ -36,7 +38,7 @@ object ComponentBuilderMacros {
t => monoName(t) == name
}

def lambdaBody(input: Expr[Input]): Expr[B] = {
def lambdaBody(input: Expr[BackendScope[P, S]]): Expr[B] = {
MacroUtils.NewInstance.of[B](
findTermArg = Some { (valDef, fail) =>
import quotes.reflect.*
Expand Down
18 changes: 9 additions & 9 deletions library/project/Dependencies.scala
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,22 @@ object Dependencies {
object Ver {

// Externally observable
val cats = "2.7.0"
val catsEffect = "3.3.11"
val cats = "2.12.0"
val catsEffect = "3.5.4"
val microlibs = "4.1.0"
val monocle2 = "2.1.0"
val monocle3 = "3.1.0"
val scala2 = "2.13.8"
val scala3 = "3.1.2"
val scalaJsDom = "2.0.0"
val sourcecode = "0.2.8"
val monocle3 = "3.2.0"
val scala2 = "2.13.14"
val scala3 = "3.3.0"
val scalaJsDom = "2.8.0"
val sourcecode = "0.4.2"

// Internal
val betterMonadicFor = "0.3.1"
val catsTestkitScalaTest = "2.1.5"
val disciplineScalaTest = "2.1.5"
val kindProjector = "0.13.2"
val macrotaskExecutor = "1.0.0"
val kindProjector = "0.13.3"
val macrotaskExecutor = "1.1.1"
val nyaya = "1.0.0"
val reactJs = "17.0.2"
val scalaJsJavaTime = "1.0.0"
Expand Down
2 changes: 1 addition & 1 deletion library/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.6.2
sbt.version=1.10.1
6 changes: 3 additions & 3 deletions library/project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ libraryDependencies ++= Seq(
"org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.1.0",
"org.scala-js" %% "scalajs-env-selenium" % "1.1.1")

addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")
8 changes: 1 addition & 7 deletions library/scalafix.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,4 @@ ThisBuild / scalacOptions ++= {
ThisBuild / semanticdbEnabled := true

// NOTE: Upgrade downstream-tests/scalafix.sbt too!
ThisBuild / semanticdbVersion := "4.5.9"

ThisBuild / scalafixScalaBinaryVersion := "2.13"

ThisBuild / scalafixDependencies ++= Seq(
"com.github.liancheng" %% "organize-imports" % "0.6.0"
)
ThisBuild / semanticdbVersion := "4.9.8"
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,8 @@ object ScalaComponentPTest extends TestSuite {

assertEq("willUnmountCount", willUnmountCount, 0)
mounted = Comp(null).renderIntoDOM(mountNode)
assertOuterHTMLMatches(el(), "<div>Error: Cannot read propert(y|ies) of null.*</div>")
// Error message varies between development and production modes
assertOuterHTMLMatches(el(), "<div>(?:Error: Cannot read propert(y|ies) of null.*|Error: java\\.lang\\.NullPointerException)</div>")
assertEq("willUnmountCount", willUnmountCount, 1)
mounted.withEffectsPure.getDOMNode
}
Expand Down

0 comments on commit be32f3d

Please sign in to comment.