Skip to content

Commit

Permalink
Upgraded scala.js and scalatest libs
Browse files Browse the repository at this point in the history
  • Loading branch information
viktor-podzigun committed May 29, 2021
1 parent 05cbcd1 commit f443c8c
Show file tree
Hide file tree
Showing 9 changed files with 25 additions and 27 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ env:
- secure: M4EAZH5WhJ9VHIlAHr1d0YqrM6bpaeP4meyUmE26ITDSrMaSvwvilTgYkGmADJomlYk1zFV3WXuA2DobdFnqP5ERlqw0uvzKl4P5HEbNUgQ/4tqey3JEQ+TiCd/qVBdtIbN5PH0lkiyVr5Xwd+VWNRyxOVLYzNi62h6hL5BbZNTdLyCQSqw+o5tfcmssz9TnvsIfyIsDwigWUs8B8fcjIkuJaSvp8fT/rjLy0iDgjdSrExsJBp18jvKClofjKlgh6L5SSy1JZOeoiRBlHWn1qgCIE770FWdT3xFJJOutUMf5i3kMM92jU9wUM+89wiv+DDH7sfvWd1Rlg2YfEIWbYpTTlLqEw039x70OrHcJ/dLCeVZGzXQ01LfhUYHPt007G+xy6kKoIP2kjQwQDuo8Bx9DLYsY8bIy9D8yYcPdRIoatMaxESsbExRgpOE9Mv2WI40uoNdi5vN2QGQo4c0QkW3yhik3RnMfLth+FEX+FK68oWeZV1QDvyBHQs0bnluDjU0PDHtJXG0qMNeiH9GMVXn3ohVkgtGmy0lEYdhLBCOwS4MTz+PwVNibk+kUQQk7DBExOwZ2W4xYXrksnEYqo31MP7n/REFyobhznhnA+H1Q7YvvK44GZaxj8+nBsGEBvZgpXMRQ9ZArtC4JvS/pVynqVY4kDw5KEBpSgm0bQ2U=
- secure: e8Ah+LiGDuSlcz1F74vdnP0Vq6H+BiKg4KHe7OrcjjVFPJ642iBN27w6X9c9bnHwXi4PFvK4Wl+Xyd1Uvub673nG9miUy+mK+s/keDFD8sOrTMpgQqWBxg91fDYYBzIKXdFEmpnZPx+DdnHC875GjgAuxqTWzcXT1skb6Ns4rzsYCATsk17EZYFRIEHLuZL6xQxKlD0r/OfW8/Ib2iSEtaGeicmqjLx+zmfsgSaKcjMOvGi0k0FDIHKSGLLFMrxXr8CPB00WwaKLI04hFuILI8UP/ksf9npCYZsFr0sQmXqoqiNUowZEWrnfu4R9KQmr4B7v1WJQxUz0ofh77S6Q87AKoK1Whj70mj/ASRsXHSr1yOHUYaMhZEJlA4MTKYx0QO4cTVBTrLMKrCUeOocnNNUgM2SaYZNP2Sx9Id4c8QQuUb7LvrTAetEAylyMuQCBJnhgwfpExAES5/pNG+AOr3bkh1Q3DGfijFMN0GXgVaROVMzSOoXbRYqdQv0C86Fr6nZBOEu1KtLowzb7GWgsQaP76v3A+dyw+inIFqVn38OrkWHjER2mYnudSu4xmuK5nLoZqFhOeulRIIgDnPyJ4Ufr5M3fM961x75waU+jkliH0fFoIwMaPEaF8o5pVuk4Xcg1s1gQ65lTC9AsA1gXYltgUp6i7TwJpSw7iUqa8p8=
before_install:
- nvm install 10 &&
nvm use 10
- nvm install 12 &&
nvm use 12
- node --version &&
npm --version
- if [ $TRAVIS_PULL_REQUEST = 'false' ]; then
Expand All @@ -24,10 +24,10 @@ script:
if [ "$TRAVIS_PULL_REQUEST" == "false" ] && [ "$TRAVIS_BRANCH" == "master" -o "$TRAVIS_BRANCH" == "$TRAVIS_TAG" ]; then
if [ -z "$TRAVIS_TAG" ]; then
echo "Publish a snapshot";
sbt ";^^1.0.2 ;clean ;publish";
sbt ";^^1.0.2 ;clean ;publishSigned";
else
echo "Publish a release version=$TRAVIS_TAG";
version=$TRAVIS_TAG sbt ";^^1.0.2 ;clean ;publishSigned ;sonatypeRelease";
version=$TRAVIS_TAG sbt ";^^1.0.2 ;clean ;publishSigned ;sonatypeBundleRelease";
fi
else
echo "This is not a master branch commit. Skipping the publish/release step";
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
[![Build Status](https://travis-ci.com/scommons/sbt-scommons-plugin.svg?branch=master)](https://travis-ci.com/scommons/sbt-scommons-plugin)
[![Coverage Status](https://coveralls.io/repos/github/scommons/sbt-scommons-plugin/badge.svg?branch=master)](https://coveralls.io/github/scommons/sbt-scommons-plugin?branch=master)
[![scala-index](https://index.scala-lang.org/scommons/sbt-scommons-plugin/sbt-scommons-plugin/latest.svg)](https://index.scala-lang.org/scommons/sbt-scommons-plugin/sbt-scommons-plugin)
[![Scala.js](https://www.scala-js.org/assets/badges/scalajs-0.6.17.svg)](https://www.scala-js.org)
[![Scala.js](https://www.scala-js.org/assets/badges/scalajs-0.6.29.svg)](https://www.scala-js.org)

## sbt-scommons-plugin
Sbt auto-plugins with common tasks/utils for Scala Commons modules
Expand Down
21 changes: 8 additions & 13 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,10 @@ lazy val `sbt-scommons-plugin` = (project in file("."))
coverageHighlighting := false,
coverageExcludedPackages := ".*mecha.*;.*project.*",

addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "0.6.0"),
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.26"),
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.14.0"),
addSbtPlugin("ch.epfl.scala" % "sbt-web-scalajs-bundler" % "0.14.0"),
addSbtPlugin("org.portable-scala" % "sbt-scalajs-crossproject" % "1.0.0"),
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "0.6.31"),
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler-sjs06" % "0.16.0"),
addSbtPlugin("ch.epfl.scala" % "sbt-web-scalajs-bundler-sjs06" % "0.16.0"),

// when updating plugins versions here,
// don't forget to set the same versions in `scommons.sbtplugin.project.CommonLibs` !!!
Expand All @@ -61,11 +61,11 @@ lazy val `sbt-scommons-plugin` = (project in file("."))
addSbtPlugin("org.scoverage" % "sbt-coveralls" % "1.2.4"),

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

libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.6.0" % "test"
"org.scalatest" %% "scalatest" % "3.2.2" % "test",
"org.scalamock" %% "scalamock" % "4.4.0" % "test"
),

resolvers += "Sonatype Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots/",
Expand All @@ -76,12 +76,7 @@ lazy val `sbt-scommons-plugin` = (project in file("."))
sonatypeProfileName := "org.scommons",
publishMavenStyle := true,
publishArtifact in Test := false,
publishTo := {
if (isSnapshot.value)
Some("snapshots" at "https://oss.sonatype.org/content/repositories/snapshots")
else
Some("releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2")
},
publishTo := sonatypePublishToBundle.value,
pomExtra := {
<url>https://github.com/scommons/sbt-scommons-plugin</url>
<licenses>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ object CommonClientModule {
requireJsDomEnv in Test := false,
version in webpack := "4.29.0",
emitSourceMaps := false,
webpackEmitSourceMaps := false,

npmDependencies in Compile ++= Seq(
"react" -> "^16.8.0",
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/scommons/sbtplugin/project/CommonLibs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ trait CommonLibs {
//////////////////////////////////////////////////////////////////////////////
// js dependencies

lazy val scalajsDom = Def.setting("org.scala-js" %%% "scalajs-dom" % "0.9.2")
lazy val scalajsDom = Def.setting("org.scala-js" %%% "scalajs-dom" % "0.9.8")

lazy val playJsonJs = Def.setting("com.typesafe.play" %%% "play-json" % playJsonVer)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,9 @@ object CommonMobileModule {

// react-native DO NOT require DOM
requireJsDomEnv in Test := false,

version in webpack := "3.5.5",

version in webpack := "3.5.5", //TODO: migrate to 4.29.0
emitSourceMaps := false,
webpackEmitSourceMaps := false,

npmDependencies in Compile ++= Seq(
"react" -> "^16.8.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import sbt._

trait CommonTestLibs {

val scalaTestVersion = "3.0.5"
val scalaMockVersion = "3.6.0"
val scalaTestVersion = "3.2.2"
val scalaMockVersion = "4.4.0"
val dockerTestkitVersion = "0.9.6"

val akkaVersion: String = CommonLibs.akkaVersion

lazy val scalaTest = Def.setting("org.scalatest" %% "scalatest" % scalaTestVersion)
lazy val scalaMock = Def.setting("org.scalamock" %% "scalamock-scalatest-support" % scalaMockVersion)
lazy val scalaMock = Def.setting("org.scalamock" %% "scalamock" % scalaMockVersion)

lazy val mockito = Def.setting("org.mockito" % "mockito-all" % "1.9.5")

Expand All @@ -25,7 +25,7 @@ trait CommonTestLibs {
// Scala.js dependencies

lazy val scalaTestJs = Def.setting("org.scalatest" %%% "scalatest" % scalaTestVersion)
lazy val scalaMockJs = Def.setting("org.scalamock" %%% "scalamock-scalatest-support" % scalaMockVersion)
lazy val scalaMockJs = Def.setting("org.scalamock" %%% "scalamock" % scalaMockVersion)
}

object CommonTestLibs extends CommonTestLibs
1 change: 1 addition & 0 deletions src/sbt-test/sbt-scommons-plugin/simple/build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ lazy val client = (project in file("client"))
webpackConfigFile in Test := Some(baseDirectory.value / "test.webpack.config.js"),

emitSourceMaps := false,
webpackEmitSourceMaps := false,

npmDevDependencies in Compile ++= Seq(
"css-loader" -> "2.1.1",
Expand Down
4 changes: 3 additions & 1 deletion src/test/scala/scommons/sbtplugin/util/BaseUtilsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ import java.util.zip.{ZipEntry, ZipOutputStream}

import org.scalamock.scalatest.MockFactory
import org.scalatest._
import org.scalatest.flatspec.AnyFlatSpec
import org.scalatest.matchers.should.Matchers
import sbt._

abstract class BaseUtilsSpec extends FlatSpec
abstract class BaseUtilsSpec extends AnyFlatSpec
with Matchers
with BeforeAndAfterEach
with MockFactory {
Expand Down

0 comments on commit f443c8c

Please sign in to comment.