Skip to content

Commit

Permalink
Upgraded to react v17
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor-podzigun committed Nov 9, 2021
1 parent 6caa0e9 commit 5dfb08d
Show file tree
Hide file tree
Showing 6 changed files with 1,495 additions and 1,486 deletions.
30 changes: 19 additions & 11 deletions docs/showcase/assets/scommons-client-showcase-opt-library.js

Large diffs are not rendered by default.

2,895 changes: 1,469 additions & 1,426 deletions docs/showcase/assets/scommons-client-showcase-opt.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions project/plugins.sbt
@@ -1,8 +1,8 @@
//resolvers += "Typesafe repository" at "https://repo.typesafe.com/typesafe/releases/"
resolvers += "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/"

//addSbtPlugin(("org.scommons.sbt" % "sbt-scommons-plugin-sjs06" % "0.6.0-SNAPSHOT").changing())
addSbtPlugin("org.scommons.sbt" % "sbt-scommons-plugin-sjs06" % "0.6.0")
addSbtPlugin(("org.scommons.sbt" % "sbt-scommons-plugin-sjs06" % "0.7.0-SNAPSHOT").changing())
//addSbtPlugin("org.scommons.sbt" % "sbt-scommons-plugin-sjs06" % "0.7.0")

addSbtPlugin("com.typesafe.sbt" % "sbt-web" % "1.4.3")

Expand Down
6 changes: 3 additions & 3 deletions project/src/main/scala/common/Libs.scala
Expand Up @@ -6,10 +6,10 @@ import scommons.sbtplugin.project.CommonLibs

object Libs extends CommonLibs {

val scommonsNodejsVersion = "0.6.0"
val scommonsReactVersion = "0.6.0"
val scommonsNodejsVersion = "0.6.3"
val scommonsReactVersion = "1.0.0-SNAPSHOT"
private val scommonsApiVersion = "0.6.0"
private val sjsReactJsVer = "0.16.0"
private val sjsReactJsVer = "0.17.0-SNAPSHOT"

lazy val scommonsApiXhr = Def.setting("org.scommons.api" %%% "scommons-api-xhr" % scommonsApiVersion)

Expand Down
2 changes: 1 addition & 1 deletion project/src/main/scala/definitions/ClientUi.scala
Expand Up @@ -25,7 +25,7 @@ object ClientUi extends ScalaJsModule {

npmDependencies in Compile ++= Seq(
"react-modal" -> "3.14.3",
"react-select" -> "3.2.0",
"react-select" -> "3.2.0"
),

npmDevDependencies in Compile ++= Seq(
Expand Down
44 changes: 1 addition & 43 deletions project/src/main/scala/definitions/ScalaJsModule.scala
@@ -1,8 +1,6 @@
package definitions

import org.scalajs.jsenv.nodejs.NodeJSEnv
import org.scalajs.sbtplugin.ScalaJSPlugin
import org.scalajs.sbtplugin.ScalaJSPlugin.autoImport._
import sbt.Keys._
import sbt._
import scalajsbundler.sbtplugin.ScalaJSBundlerPlugin
Expand All @@ -18,47 +16,7 @@ trait ScalaJsModule extends ClientModule {
.settings(CommonClientModule.settings: _*)
.settings(
scommonsRequireWebpackInTest := true,
webpackConfigFile in Test := Some(baseDirectory.value / "test.webpack.config.js"),

npmDependencies in Compile ++= Seq(
"react" -> "^17.0.2",
"react-dom" -> "^17.0.2",
"react-redux" -> "^7.2.4",
"react-router" -> "5.2.1",
"react-router-dom" -> "5.2.1"
),
npmResolutions in Compile ++= Map(
"react" -> "^17.0.2",
"react-dom" -> "^17.0.2",
"react-redux" -> "^7.2.4",
"react-router" -> "5.2.1",
"react-router-dom" -> "5.2.1"
),

npmDependencies in Test ++= Seq(
"react" -> "^17.0.2",
"react-dom" -> "^17.0.2",
"react-redux" -> "^7.2.4",
"react-test-renderer" -> "^17.0.2",
"react-router" -> "5.2.1",
"react-router-dom" -> "5.2.1"
),
npmResolutions in Test ++= Map(
"react" -> "^17.0.2",
"react-dom" -> "^17.0.2",
"react-redux" -> "^7.2.4",
"react-test-renderer" -> "^17.0.2",
"react-router" -> "5.2.1",
"react-router-dom" -> "5.2.1"
),

// required for node.js >= v12.12.0
// see:
// https://github.com/nodejs/node/pull/29919
jsEnv in Test := new NodeJSEnv(NodeJSEnv.Config().withArgs(List("--enable-source-maps"))),
scalaJSLinkerConfig in Test ~= {
_.withSourceMap(true)
}
webpackConfigFile in Test := Some(baseDirectory.value / "test.webpack.config.js")
)
}
}

0 comments on commit 5dfb08d

Please sign in to comment.