Skip to content

Commit 8a3cbf4

Browse files
Upgraded Scala.js to v1.5.1 (#10)
1 parent d2fbf81 commit 8a3cbf4

File tree

12 files changed

+71
-72
lines changed

12 files changed

+71
-72
lines changed

README.md

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
[![CI](https://github.com/scommons/scalajs-reactjs/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/scommons/scalajs-reactjs/actions/workflows/ci.yml?query=workflow%3Aci+branch%3Amaster)
44
[![scala-index](https://index.scala-lang.org/scommons/scalajs-reactjs/scalajs-reactjs-core/latest.svg)](https://index.scala-lang.org/scommons/scalajs-reactjs/scalajs-reactjs-core)
5-
[![Scala.js](https://www.scala-js.org/assets/badges/scalajs-1.1.0.svg)](https://www.scala-js.org)
5+
[![Scala.js](https://www.scala-js.org/assets/badges/scalajs-1.5.0.svg)](https://www.scala-js.org)
66

77
Develop React applications with Scala.
88

9-
It is compatible with Scala `2.13+`, Scala.js `1.1+` and with React.js `v17+`.
9+
It is compatible with Scala `2.13+`, Scala.js `1.5+` and with React.js `v17+`.
1010

1111
Optionally include `react-router` and `react-redux` facades, too.
1212

@@ -44,12 +44,12 @@ ReactDOM.render(<.div(^.id := "hello-world")("Hello, World!"), mountNode)
4444
2. Depend on the libraries.
4545
```
4646
libraryDependencies ++= Seq(
47-
"org.scommons.shogowada" %%% "scalajs-reactjs-core" % "0.17.1", // For react facade
48-
"org.scommons.shogowada" %%% "scalajs-reactjs-dom" % "0.17.1", // For react-dom facade
47+
"org.scommons.shogowada" %%% "scalajs-reactjs-core" % [version], // For react facade
48+
"org.scommons.shogowada" %%% "scalajs-reactjs-dom" % [version], // For react-dom facade
4949
50-
"org.scommons.shogowada" %%% "scalajs-reactjs-router-dom" % "0.17.1", // Optional. For react-router-dom facade
51-
"org.scommons.shogowada" %%% "scalajs-reactjs-redux" % "0.17.1", // Optional. For react-redux facade
52-
"org.scommons.shogowada" %%% "scalajs-reactjs-redux-devtools" % "0.17.1" // Optional. For redux-devtools facade
50+
"org.scommons.shogowada" %%% "scalajs-reactjs-router-dom" % [version], // Optional. For react-router-dom facade
51+
"org.scommons.shogowada" %%% "scalajs-reactjs-redux" % [version], // Optional. For react-redux facade
52+
"org.scommons.shogowada" %%% "scalajs-reactjs-redux-devtools" % [version] // Optional. For redux-devtools facade
5353
)
5454
```
5555

build.sbt

+53-53
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ val StaticTagsVersion = "2.7.1-SNAPSHOT"
1010
val commonSettings = Seq(
1111
organization := "org.scommons.shogowada",
1212

13-
scalaVersion := "2.13.1",
13+
scalaVersion := "2.13.5",
1414
scalacOptions ++= Seq(
1515
"-deprecation", "-unchecked", "-feature", "-Xcheckinit", "-target:jvm-1.8", "-Xfatal-warnings"
1616
),
@@ -20,7 +20,7 @@ val commonSettings = Seq(
2020
sonatypeProfileName := "org.scommons",
2121
publishArtifact := false,
2222
publishMavenStyle := true,
23-
publishArtifact in Test := false,
23+
Test / publishArtifact := false,
2424
publishTo := sonatypePublishToBundle.value,
2525
pomExtra := {
2626
<url>https://github.com/scommons/scalajs-reactjs</url>
@@ -56,7 +56,7 @@ val commonSettings = Seq(
5656
lazy val root = (project in file("."))
5757
.settings(commonSettings: _*)
5858
.settings(
59-
skip in publish := true,
59+
publish / skip := true,
6060
publish := ((): Unit),
6161
publishLocal := ((): Unit),
6262
publishM2 := ((): Unit)
@@ -90,11 +90,11 @@ lazy val core = project.in(file("core"))
9090
libraryDependencies ++= Seq(
9191
"org.scommons.shogowada" %%% "statictags" % StaticTagsVersion
9292
),
93-
npmDependencies in Compile ++= Seq(
93+
Compile / npmDependencies ++= Seq(
9494
"react" -> ReactVersion
9595
),
96-
(webpack in(Compile, fastOptJS)) := Seq(),
97-
(webpack in(Compile, fullOptJS)) := Seq(),
96+
(Compile / fastOptJS / webpack) := Seq(),
97+
(Compile / fullOptJS / webpack) := Seq(),
9898
publishArtifact := true
9999
)
100100
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
@@ -104,13 +104,13 @@ lazy val dom = project.in(file("dom"))
104104
.settings(
105105
name := "scalajs-reactjs-dom",
106106
libraryDependencies ++= Seq(
107-
"org.scala-js" %%% "scalajs-dom" % "0.9.8"
107+
"org.scala-js" %%% "scalajs-dom" % "2.2.0"
108108
),
109-
npmDependencies in Compile ++= Seq(
109+
Compile / npmDependencies ++= Seq(
110110
"react-dom" -> ReactVersion
111111
),
112-
(webpack in(Compile, fastOptJS)) := Seq(),
113-
(webpack in(Compile, fullOptJS)) := Seq(),
112+
(Compile / fastOptJS / webpack) := Seq(),
113+
(Compile / fullOptJS / webpack) := Seq(),
114114
publishArtifact := true
115115
)
116116
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
@@ -120,11 +120,11 @@ lazy val history = project.in(file("history"))
120120
.settings(commonSettings: _*)
121121
.settings(
122122
name := "scalajs-history",
123-
npmDependencies in Compile ++= Seq(
123+
Compile / npmDependencies ++= Seq(
124124
"history" -> HistoryVersion
125125
),
126-
(webpack in(Compile, fastOptJS)) := Seq(),
127-
(webpack in(Compile, fullOptJS)) := Seq(),
126+
(Compile / fastOptJS / webpack) := Seq(),
127+
(Compile / fullOptJS / webpack) := Seq(),
128128
publishArtifact := true
129129
)
130130
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
@@ -133,11 +133,11 @@ lazy val router = project.in(file("router"))
133133
.settings(commonSettings: _*)
134134
.settings(
135135
name := "scalajs-reactjs-router",
136-
npmDependencies in Compile ++= Seq(
136+
Compile / npmDependencies ++= Seq(
137137
"react-router" -> ReactRouterVersion
138138
),
139-
(webpack in(Compile, fastOptJS)) := Seq(),
140-
(webpack in(Compile, fullOptJS)) := Seq(),
139+
(Compile / fastOptJS / webpack) := Seq(),
140+
(Compile / fullOptJS / webpack) := Seq(),
141141
publishArtifact := true
142142
)
143143
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
@@ -147,11 +147,11 @@ lazy val routerDom = project.in(file("router-dom"))
147147
.settings(commonSettings: _*)
148148
.settings(
149149
name := "scalajs-reactjs-router-dom",
150-
npmDependencies in Compile ++= Seq(
150+
Compile / npmDependencies ++= Seq(
151151
"react-router-dom" -> ReactRouterVersion
152152
),
153-
(webpack in(Compile, fastOptJS)) := Seq(),
154-
(webpack in(Compile, fullOptJS)) := Seq(),
153+
(Compile / fastOptJS / webpack) := Seq(),
154+
(Compile / fullOptJS / webpack) := Seq(),
155155
publishArtifact := true
156156
)
157157
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
@@ -161,12 +161,12 @@ lazy val redux = project.in(file("redux"))
161161
.settings(commonSettings: _*)
162162
.settings(
163163
name := "scalajs-reactjs-redux",
164-
npmDependencies in Compile ++= Seq(
164+
Compile / npmDependencies ++= Seq(
165165
"react-redux" -> ReactReduxVersion,
166166
"redux" -> ReduxVersion
167167
),
168-
(webpack in(Compile, fastOptJS)) := Seq(),
169-
(webpack in(Compile, fullOptJS)) := Seq(),
168+
(Compile / fastOptJS / webpack) := Seq(),
169+
(Compile / fullOptJS / webpack) := Seq(),
170170
publishArtifact := true
171171
)
172172
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
@@ -176,11 +176,11 @@ lazy val reduxDevTools = project.in(file("redux-devtools"))
176176
.settings(commonSettings: _*)
177177
.settings(
178178
name := "scalajs-reactjs-redux-devtools",
179-
npmDependencies in Compile ++= Seq(
179+
Compile / npmDependencies ++= Seq(
180180
"redux-devtools-extension" -> ReduxDevToolsVersion
181181
),
182-
(webpack in(Compile, fastOptJS)) := Seq(),
183-
(webpack in(Compile, fullOptJS)) := Seq(),
182+
(Compile / fastOptJS / webpack) := Seq(),
183+
(Compile / fullOptJS / webpack) := Seq(),
184184
publishArtifact := true
185185
)
186186
.enablePlugins(ScalaJSPlugin, ScalaJSBundlerPlugin)
@@ -189,7 +189,7 @@ lazy val reduxDevTools = project.in(file("redux-devtools"))
189189
val exampleCommonSettings = commonSettings ++ Seq(
190190
name := "scalajs-reactjs-example",
191191
scalaJSUseMainModuleInitializer := true,
192-
(unmanagedResourceDirectories in Compile) += baseDirectory.value / "src" / "main" / "webapp"
192+
(Compile / unmanagedResourceDirectories) += baseDirectory.value / "src" / "main" / "webapp"
193193
)
194194

195195
lazy val exampleCustomVirtualDOM = project.in(file("example") / "custom-virtual-dom")
@@ -289,38 +289,38 @@ lazy val exampleTest = project.in(file("example") / "test")
289289
libraryDependencies ++= Seq(
290290
"org.eclipse.jetty" % "jetty-server" % "9.+",
291291

292-
"org.scalatestplus" %% "selenium-3-141" % "3.2.2.0",
293-
"org.scalatest" %% "scalatest" % "3.2.2"
292+
"org.scalatestplus" %% "selenium-3-141" % "3.2.9.0",
293+
"org.scalatest" %% "scalatest" % "3.2.9"
294294
).map(_ % "it,test"),
295295

296-
parallelExecution in Test := false,
297-
parallelExecution in IntegrationTest := false,
296+
Test / parallelExecution := false,
297+
IntegrationTest / parallelExecution := false,
298298

299299
javaOptions ++= Seq(
300-
s"-Dtarget.path.custom-virtual-dom=${(crossTarget in exampleCustomVirtualDOM).value}",
301-
s"-Dtarget.path.helloworld=${(crossTarget in exampleHelloWorld).value}",
302-
s"-Dtarget.path.helloworld-function=${(crossTarget in exampleHelloWorldFunction).value}",
303-
s"-Dtarget.path.interactive-helloworld=${(crossTarget in exampleInteractiveHelloWorld).value}",
304-
s"-Dtarget.path.lifecycle=${(crossTarget in exampleLifecycle).value}",
305-
s"-Dtarget.path.redux-devtools=${(crossTarget in exampleReduxDevTools).value}",
306-
s"-Dtarget.path.redux-middleware=${(crossTarget in exampleReduxMiddleware).value}",
307-
s"-Dtarget.path.router=${(crossTarget in exampleRouter).value}",
308-
s"-Dtarget.path.style=${(crossTarget in exampleStyle).value}",
309-
s"-Dtarget.path.todo-app=${(crossTarget in exampleTodoApp).value}",
310-
s"-Dtarget.path.todo-app-redux=${(crossTarget in exampleTodoAppRedux).value}"
300+
s"-Dtarget.path.custom-virtual-dom=${(exampleCustomVirtualDOM / crossTarget).value}",
301+
s"-Dtarget.path.helloworld=${(exampleHelloWorld / crossTarget).value}",
302+
s"-Dtarget.path.helloworld-function=${(exampleHelloWorldFunction / crossTarget).value}",
303+
s"-Dtarget.path.interactive-helloworld=${(exampleInteractiveHelloWorld / crossTarget).value}",
304+
s"-Dtarget.path.lifecycle=${(exampleLifecycle / crossTarget).value}",
305+
s"-Dtarget.path.redux-devtools=${(exampleReduxDevTools / crossTarget).value}",
306+
s"-Dtarget.path.redux-middleware=${(exampleReduxMiddleware / crossTarget).value}",
307+
s"-Dtarget.path.router=${(exampleRouter / crossTarget).value}",
308+
s"-Dtarget.path.style=${(exampleStyle / crossTarget).value}",
309+
s"-Dtarget.path.todo-app=${(exampleTodoApp / crossTarget).value}",
310+
s"-Dtarget.path.todo-app-redux=${(exampleTodoAppRedux / crossTarget).value}"
311311
),
312-
(test in IntegrationTest) := (test in IntegrationTest).dependsOn(
313-
webpack in fastOptJS in Compile in exampleCustomVirtualDOM,
314-
webpack in fastOptJS in Compile in exampleHelloWorld,
315-
webpack in fastOptJS in Compile in exampleHelloWorldFunction,
316-
webpack in fastOptJS in Compile in exampleInteractiveHelloWorld,
317-
webpack in fastOptJS in Compile in exampleLifecycle,
318-
webpack in fastOptJS in Compile in exampleReduxDevTools,
319-
webpack in fastOptJS in Compile in exampleReduxMiddleware,
320-
webpack in fastOptJS in Compile in exampleRouter,
321-
webpack in fastOptJS in Compile in exampleStyle,
322-
webpack in fastOptJS in Compile in exampleTodoApp,
323-
webpack in fastOptJS in Compile in exampleTodoAppRedux
312+
(IntegrationTest / test) := (IntegrationTest / test).dependsOn(
313+
exampleCustomVirtualDOM / Compile / fastOptJS / webpack,
314+
exampleHelloWorld / Compile / fastOptJS / webpack,
315+
exampleHelloWorldFunction / Compile / fastOptJS / webpack,
316+
exampleInteractiveHelloWorld / Compile / fastOptJS / webpack,
317+
exampleLifecycle / Compile / fastOptJS / webpack,
318+
exampleReduxDevTools / Compile / fastOptJS / webpack,
319+
exampleReduxMiddleware / Compile / fastOptJS / webpack,
320+
exampleRouter / Compile / fastOptJS / webpack,
321+
exampleStyle / Compile / fastOptJS / webpack,
322+
exampleTodoApp / Compile / fastOptJS / webpack,
323+
exampleTodoAppRedux / Compile / fastOptJS / webpack
324324
).value,
325325
fork := true
326326
)

dom/src/main/scala/io/github/shogowada/scalajs/reactjs/events/SyntheticEvent.scala

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package io.github.shogowada.scalajs.reactjs.events
22

3-
import org.scalajs.dom.raw.HTMLElement
4-
import org.scalajs.dom.{DataTransfer, EventTarget, TouchList}
3+
import org.scalajs.dom._
54

65
import scala.scalajs.js
76

example/interactive-helloworld/src/main/scala/io/github/shogowada/scalajs/reactjs/example/interactive/helloworld/Main.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import io.github.shogowada.scalajs.reactjs.events.FormSyntheticEvent
77
import io.github.shogowada.scalajs.reactjs.example.interactive.helloworld.LetterCase.{DEFAULT, LOWER_CASE, LetterCase, UPPER_CASE}
88
import io.github.shogowada.scalajs.reactjs.{React, ReactDOM}
99
import org.scalajs.dom
10-
import org.scalajs.dom.raw.HTMLInputElement
10+
import org.scalajs.dom.HTMLInputElement
1111

1212
import scala.scalajs.js.annotation.JSExport
1313

example/redux-devtools/src/main/scala/io/github/shogowada/scalajs/reactjs/example/redux/devtools/Main.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import io.github.shogowada.scalajs.reactjs.redux.devtools.ReduxDevTools
1111
import io.github.shogowada.scalajs.reactjs.redux.{Action, ReactRedux, Redux}
1212
import io.github.shogowada.scalajs.reactjs.{React, ReactDOM}
1313
import org.scalajs.dom
14-
import org.scalajs.dom.raw.HTMLInputElement
14+
import org.scalajs.dom.HTMLInputElement
1515

1616
import scala.scalajs.js.annotation.JSExport
1717

example/redux-middleware/src/main/scala/io/github/shogowada/scalajs/reactjs/example/redux/middleware/Main.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import io.github.shogowada.scalajs.reactjs.redux.devtools.ReduxDevTools
1010
import io.github.shogowada.scalajs.reactjs.redux.{Action, ReactRedux, Redux, Store}
1111
import io.github.shogowada.scalajs.reactjs.{React, ReactDOM}
1212
import org.scalajs.dom
13-
import org.scalajs.dom.raw.HTMLInputElement
13+
import org.scalajs.dom.HTMLInputElement
1414

1515
import scala.concurrent.ExecutionContext.Implicits.global
1616
import scala.concurrent.Future

example/router/src/main/scala/io/github/shogowada/scalajs/reactjs/example/router/Main.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import io.github.shogowada.scalajs.reactjs.router.dom.RouterDOM._
99
import io.github.shogowada.scalajs.reactjs.router.{RouterProps, WithRouter}
1010
import io.github.shogowada.scalajs.reactjs.{React, ReactDOM}
1111
import org.scalajs.dom
12-
import org.scalajs.dom.raw.HTMLInputElement
12+
import org.scalajs.dom.HTMLInputElement
1313

1414
import scala.scalajs.js.annotation.JSExport
1515

example/todo-app-redux/src/main/scala/io/github/shogowada/scalajs/reactjs/example/todoappredux/PresentationalComponents.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import io.github.shogowada.scalajs.reactjs.VirtualDOM._
77
import io.github.shogowada.scalajs.reactjs.elements.ReactElement
88
import io.github.shogowada.scalajs.reactjs.events.{FormSyntheticEvent, SyntheticEvent}
99
import io.github.shogowada.scalajs.reactjs.example.todoappredux.ContainerComponents._
10-
import org.scalajs.dom.raw.HTMLInputElement
10+
import org.scalajs.dom.HTMLInputElement
1111

1212
object Todo {
1313
case class Props(onClick: () => Unit, todoItem: TodoItem)

example/todo-app/src/main/scala/io/github/shogowada/scalajs/reactjs/example/todoapp/Main.scala

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import io.github.shogowada.scalajs.reactjs.elements.ReactElement
66
import io.github.shogowada.scalajs.reactjs.events.{FormSyntheticEvent, SyntheticEvent}
77
import io.github.shogowada.scalajs.reactjs.{React, ReactDOM}
88
import org.scalajs.dom
9-
import org.scalajs.dom.raw.HTMLInputElement
9+
import org.scalajs.dom.HTMLInputElement
1010

1111
import scala.scalajs.js
1212
import scala.scalajs.js.annotation.JSExport

project/build.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
sbt.version=1.2.8
1+
sbt.version=1.5.2

project/plugins.sbt

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11

22
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0")
33

4-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.1.0")
5-
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.18.0")
4+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.5.1")
5+
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.20.0")
66

77
addSbtPlugin("org.xerial.sbt" % "sbt-sonatype" % "3.9.5")
88
addSbtPlugin("com.jsuereth" % "sbt-pgp" % "1.1.0")

version.sbt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
version in ThisBuild := sys.env.getOrElse("version", default = "0.17.2-SNAPSHOT").stripPrefix("v")
1+
ThisBuild / version := sys.env.getOrElse("version", default = "1.0.0-SNAPSHOT").stripPrefix("v")

0 commit comments

Comments
 (0)