Skip to content

Commit be32f3d

Browse files
authored
Merge pull request #1095 from japgolly/updates
Dependency updates
2 parents c6e3bbf + 188d225 commit be32f3d

File tree

12 files changed

+51
-37
lines changed

12 files changed

+51
-37
lines changed

doc/changelog/2.1.2.md

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# 2.1.2
2+
3+
### Fixes
4+
5+
* Components that only used the `useEffect` family of hooks were not invoking them.
6+
7+
* Fixed the source map uri to point to the correct location
8+
9+
### Dependencies
10+
11+
* Upgrade sbt to 1.10.1
12+
* Upgrade Scala to 2.13.14 and 3.3.0
13+
* Upgrade Scala.js to 1.16.0
14+
* Upgrade microlibs to 4.1.0
15+
* Upgrade sbt-ci-release to 1.5.12
16+
* Upgrade sbt-scalafix to 0.12.1
17+
* Upgrade kindprojector to 0.13.3
18+
* Upgrade cats to 2.12.0
19+
* Upgrade cats-effect to 3.5.4
20+
* Upgrade monocle3 to 3.2.0
21+
* Upgrade scalajs-dom to 2.8.0
22+
* Upgrade sourcecode 0.4.2
23+
* Upgrade macrotaskExecutor to 1.1.1
24+
* Upgrade semanticdb to 4.9.8

doc/changelog/next.md

-7
This file was deleted.

downstream-tests/scalafix.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ ThisBuild / scalacOptions ++= {
1010

1111
ThisBuild / semanticdbEnabled := true
1212

13-
ThisBuild / semanticdbVersion := "4.5.9"
13+
ThisBuild / semanticdbVersion := "4.9.8"
1414

1515
ThisBuild / scalafixScalaBinaryVersion := "2.13"
1616

library/callback/src/main/scala-3/japgolly/scalajs/react/callback/CallbackOption.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ final class CallbackOption[+A](val underlyingRepr: CallbackOption.UnderlyingRepr
183183
def asCallback: CallbackTo[Option[A]] =
184184
CallbackTo lift cbfn
185185

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

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

198198
def flatMapOption[B](f: A => Option[B]): CallbackOption[B] =

library/callback/src/main/scala-3/japgolly/scalajs/react/callback/CallbackTo.scala

+3-3
Original file line numberDiff line numberDiff line change
@@ -306,11 +306,11 @@ final class CallbackTo[+A] /*private[react]*/ (private[CallbackTo] val trampolin
306306
inline def runNow(): A =
307307
trampoline.run
308308

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

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

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

590590

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

595595
/** Convenience-method to run additional code before this callback. */

library/coreGeneric/src/main/scala-3/japgolly/scalajs/react/ReusabilityMacros.scala

+2-2
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ object ReusabilityMacros {
188188
var set = Set.empty[String]
189189
for (e <- es)
190190
if set.contains(e)
191-
then quotes.reflect.report.throwError(s"Duplicate field specified: \"$e\"")
191+
then quotes.reflect.report.errorAndAbort(s"Duplicate field specified: \"$e\"")
192192
else set += e
193193
new FieldExclusions(set)
194194
}
@@ -219,7 +219,7 @@ object ReusabilityMacros {
219219
then s"Specified field ${fs.head} doesn't exist."
220220
else s"Specified fields ${fs.mkString(", ")} don't exist."
221221
val err = s"Failed to derive a Reusability instance for ${Type.show[A]}: $subErr"
222-
quotes.reflect.report.throwError(err)
222+
quotes.reflect.report.errorAndAbort(err)
223223
}
224224
}
225225

library/coreGeneric/src/main/scala-3/japgolly/scalajs/react/component/builder/ComponentBuilderMacros.scala

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@ package japgolly.scalajs.react.component.builder
33
import japgolly.microlibs.compiletime.MacroEnv.*
44
import japgolly.scalajs.react.{Children, PropsChildren}
55
import japgolly.scalajs.react.component.builder.Lifecycle.RenderScope
6+
import japgolly.scalajs.react.component.Generic
67
import japgolly.scalajs.react.component.Scala.BackendScope
8+
import japgolly.scalajs.react.util.DefaultEffects.{Async => DefaultA, Sync => DefaultS}
79
import japgolly.scalajs.react.vdom.VdomNode
810
import scala.language.`3.0`
911
import scala.quoted.*
@@ -36,7 +38,7 @@ object ComponentBuilderMacros {
3638
t => monoName(t) == name
3739
}
3840

39-
def lambdaBody(input: Expr[Input]): Expr[B] = {
41+
def lambdaBody(input: Expr[BackendScope[P, S]]): Expr[B] = {
4042
MacroUtils.NewInstance.of[B](
4143
findTermArg = Some { (valDef, fail) =>
4244
import quotes.reflect.*

library/project/Dependencies.scala

+9-9
Original file line numberDiff line numberDiff line change
@@ -9,22 +9,22 @@ object Dependencies {
99
object Ver {
1010

1111
// Externally observable
12-
val cats = "2.7.0"
13-
val catsEffect = "3.3.11"
12+
val cats = "2.12.0"
13+
val catsEffect = "3.5.4"
1414
val microlibs = "4.1.0"
1515
val monocle2 = "2.1.0"
16-
val monocle3 = "3.1.0"
17-
val scala2 = "2.13.8"
18-
val scala3 = "3.1.2"
19-
val scalaJsDom = "2.0.0"
20-
val sourcecode = "0.2.8"
16+
val monocle3 = "3.2.0"
17+
val scala2 = "2.13.14"
18+
val scala3 = "3.3.0"
19+
val scalaJsDom = "2.8.0"
20+
val sourcecode = "0.4.2"
2121

2222
// Internal
2323
val betterMonadicFor = "0.3.1"
2424
val catsTestkitScalaTest = "2.1.5"
2525
val disciplineScalaTest = "2.1.5"
26-
val kindProjector = "0.13.2"
27-
val macrotaskExecutor = "1.0.0"
26+
val kindProjector = "0.13.3"
27+
val macrotaskExecutor = "1.1.1"
2828
val nyaya = "1.0.0"
2929
val reactJs = "17.0.2"
3030
val scalaJsJavaTime = "1.0.0"

library/project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.6.2
1+
sbt.version=1.10.1

library/project/plugins.sbt

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ libraryDependencies ++= Seq(
22
"org.scala-js" %% "scalajs-env-jsdom-nodejs" % "1.1.0",
33
"org.scala-js" %% "scalajs-env-selenium" % "1.1.1")
44

5-
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.10.1")
6-
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.10")
5+
addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.12.1")
6+
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
77
addSbtPlugin("org.scala-js" % "sbt-jsdependencies" % "1.0.2")
8-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.10.0")
8+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.16.0")

library/scalafix.sbt

+1-7
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,4 @@ ThisBuild / scalacOptions ++= {
88
ThisBuild / semanticdbEnabled := true
99

1010
// NOTE: Upgrade downstream-tests/scalafix.sbt too!
11-
ThisBuild / semanticdbVersion := "4.5.9"
12-
13-
ThisBuild / scalafixScalaBinaryVersion := "2.13"
14-
15-
ThisBuild / scalafixDependencies ++= Seq(
16-
"com.github.liancheng" %% "organize-imports" % "0.6.0"
17-
)
11+
ThisBuild / semanticdbVersion := "4.9.8"

library/tests/src/test/scala/japgolly/scalajs/react/core/ScalaComponentTest.scala

+2-1
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,8 @@ object ScalaComponentPTest extends TestSuite {
169169

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

0 commit comments

Comments
 (0)