File tree 12 files changed +51
-37
lines changed
callback/src/main/scala-3/japgolly/scalajs/react/callback
coreGeneric/src/main/scala-3/japgolly/scalajs/react
tests/src/test/scala/japgolly/scalajs/react/core
12 files changed +51
-37
lines changed Original file line number Diff line number Diff line change
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
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ThisBuild / scalacOptions ++= {
10
10
11
11
ThisBuild / semanticdbEnabled := true
12
12
13
- ThisBuild / semanticdbVersion := " 4.5.9 "
13
+ ThisBuild / semanticdbVersion := " 4.9.8 "
14
14
15
15
ThisBuild / scalafixScalaBinaryVersion := " 2.13"
16
16
Original file line number Diff line number Diff line change @@ -183,7 +183,7 @@ final class CallbackOption[+A](val underlyingRepr: CallbackOption.UnderlyingRepr
183
183
def asCallback : CallbackTo [Option [A ]] =
184
184
CallbackTo lift cbfn
185
185
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 ] =
187
187
unsafeMap(f)
188
188
189
189
private [react] def unsafeMap [B ](f : A => B ): CallbackOption [B ] =
@@ -192,7 +192,7 @@ final class CallbackOption[+A](val underlyingRepr: CallbackOption.UnderlyingRepr
192
192
/**
193
193
* Alias for `map`.
194
194
*/
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 ] =
196
196
map(f)
197
197
198
198
def flatMapOption [B ](f : A => Option [B ]): CallbackOption [B ] =
Original file line number Diff line number Diff line change @@ -306,11 +306,11 @@ final class CallbackTo[+A] /*private[react]*/ (private[CallbackTo] val trampolin
306
306
inline def runNow (): A =
307
307
trampoline.run
308
308
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 ] =
310
310
new CallbackTo (trampoline.map(f))
311
311
312
312
/** 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 ] =
314
314
map(f)
315
315
316
316
inline def flatMap [B ](f : A => CallbackTo [B ]): CallbackTo [B ] =
@@ -589,7 +589,7 @@ final class CallbackTo[+A] /*private[react]*/ (private[CallbackTo] val trampolin
589
589
590
590
591
591
/** 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 ] =
593
593
this >> CallbackTo (runNext)
594
594
595
595
/** Convenience-method to run additional code before this callback. */
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ object ReusabilityMacros {
188
188
var set = Set .empty[String ]
189
189
for (e <- es)
190
190
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\" " )
192
192
else set += e
193
193
new FieldExclusions (set)
194
194
}
@@ -219,7 +219,7 @@ object ReusabilityMacros {
219
219
then s " Specified field ${fs.head} doesn't exist. "
220
220
else s " Specified fields ${fs.mkString(" , " )} don't exist. "
221
221
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)
223
223
}
224
224
}
225
225
Original file line number Diff line number Diff line change @@ -3,7 +3,9 @@ package japgolly.scalajs.react.component.builder
3
3
import japgolly .microlibs .compiletime .MacroEnv .*
4
4
import japgolly .scalajs .react .{Children , PropsChildren }
5
5
import japgolly .scalajs .react .component .builder .Lifecycle .RenderScope
6
+ import japgolly .scalajs .react .component .Generic
6
7
import japgolly .scalajs .react .component .Scala .BackendScope
8
+ import japgolly .scalajs .react .util .DefaultEffects .{Async => DefaultA , Sync => DefaultS }
7
9
import japgolly .scalajs .react .vdom .VdomNode
8
10
import scala .language .`3.0`
9
11
import scala .quoted .*
@@ -36,7 +38,7 @@ object ComponentBuilderMacros {
36
38
t => monoName(t) == name
37
39
}
38
40
39
- def lambdaBody (input : Expr [Input ]): Expr [B ] = {
41
+ def lambdaBody (input : Expr [BackendScope [ P , S ] ]): Expr [B ] = {
40
42
MacroUtils .NewInstance .of[B ](
41
43
findTermArg = Some { (valDef, fail) =>
42
44
import quotes .reflect .*
Original file line number Diff line number Diff line change @@ -9,22 +9,22 @@ object Dependencies {
9
9
object Ver {
10
10
11
11
// 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 "
14
14
val microlibs = " 4.1.0"
15
15
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 "
21
21
22
22
// Internal
23
23
val betterMonadicFor = " 0.3.1"
24
24
val catsTestkitScalaTest = " 2.1.5"
25
25
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 "
28
28
val nyaya = " 1.0.0"
29
29
val reactJs = " 17.0.2"
30
30
val scalaJsJavaTime = " 1.0.0"
Original file line number Diff line number Diff line change 1
- sbt.version =1.6.2
1
+ sbt.version =1.10.1
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ libraryDependencies ++= Seq(
2
2
" org.scala-js" %% " scalajs-env-jsdom-nodejs" % " 1.1.0" ,
3
3
" org.scala-js" %% " scalajs-env-selenium" % " 1.1.1" )
4
4
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 " )
7
7
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" )
Original file line number Diff line number Diff line change @@ -8,10 +8,4 @@ ThisBuild / scalacOptions ++= {
8
8
ThisBuild / semanticdbEnabled := true
9
9
10
10
// 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"
Original file line number Diff line number Diff line change @@ -169,7 +169,8 @@ object ScalaComponentPTest extends TestSuite {
169
169
170
170
assertEq(" willUnmountCount" , willUnmountCount, 0 )
171
171
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>" )
173
174
assertEq(" willUnmountCount" , willUnmountCount, 1 )
174
175
mounted.withEffectsPure.getDOMNode
175
176
}
You can’t perform that action at this time.
0 commit comments