From 59719db0be50e32e2340785b3b1564356303970e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 26 Apr 2019 10:10:16 +0200 Subject: [PATCH 1/5] Upgrade to scalafmt 0.6.8. --- project/build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/build.sbt b/project/build.sbt index f3ebfa698..ecedccf03 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -5,4 +5,4 @@ addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.2.1") -addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.5.1") +addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.6.8") From 398f0aac6cb3e7dfc5db2c9a3601849b4aa918d6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 26 Apr 2019 10:26:36 +0200 Subject: [PATCH 2/5] Upgrade to scalatex 0.3.9. --- build.sbt | 5 +++-- project/build.sbt | 2 +- readme/Index.scalatex | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/build.sbt b/build.sbt index 131d8badd..32435c7ee 100644 --- a/build.sbt +++ b/build.sbt @@ -105,13 +105,14 @@ pomExtra := ( pomIncludeRepository := { _ => false } lazy val readme = ScalatexReadme( - folder = "readme", + projectId = "readme", + wd = file(""), url = "https://github.com/scala-js/scala-js-dom/tree/master", source = "Index", - targetFolder = "target/site", autoResources = Seq("example-opt.js") ).settings( scalaVersion := "2.11.12", + scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"), (resources in Compile) += (fullOptJS in (example, Compile)).value.data ) diff --git a/project/build.sbt b/project/build.sbt index ecedccf03..345e6afae 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -3,6 +3,6 @@ val scalaJSVersion = addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) -addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.2.1") +addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.3.9") addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.6.8") diff --git a/readme/Index.scalatex b/readme/Index.scalatex index 67f68aa10..b0bb9c509 100644 --- a/readme/Index.scalatex +++ b/readme/Index.scalatex @@ -17,7 +17,7 @@ div( div(width:="50%", float.left)( hl.ref( - cwd/'example/'src/'main/'scala/'example/"Example.scala", + pwd/'example/'src/'main/'scala/'example/"Example.scala", Seq(s"object $example", "main") ) ), From a412b9c4692b789d368788a0e70e1d3d27b9920f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 26 Apr 2019 10:43:00 +0200 Subject: [PATCH 3/5] Upgrade the Scalatex readme to Scala 2.12.8. And optimize the Travis matrix so that we do not redo the readme build for every version of Scala. --- .travis.yml | 6 +++++- build.sbt | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index fdaf17a80..daf7e49de 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,7 +3,6 @@ language: scala script: - sbt ++$TRAVIS_SCALA_VERSION package doc example/compile - sbt scalafmtTest - - sbt ++2.11.12 readme/run scala: - 2.10.7 - 2.11.12 @@ -18,6 +17,11 @@ matrix: exclude: - scala: 2.10.7 env: SCALAJS_VERSION=1.0.0-M7 + include: + - scala: 2.12.8 + env: SCALAJS_VERSION=0.6.27 + script: + - sbt readme/run cache: directories: diff --git a/build.sbt b/build.sbt index 32435c7ee..e651740d0 100644 --- a/build.sbt +++ b/build.sbt @@ -111,7 +111,7 @@ lazy val readme = ScalatexReadme( source = "Index", autoResources = Seq("example-opt.js") ).settings( - scalaVersion := "2.11.12", + scalaVersion := "2.12.8", scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"), (resources in Compile) += (fullOptJS in (example, Compile)).value.data ) From 5b1db89ad6965ac8fb2d9499f77076e172e8f92e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 26 Apr 2019 11:16:23 +0200 Subject: [PATCH 4/5] Upgrade to sbt 1.2.8, Scalatex 0.3.11 and scalafmt 2.0.0. The upgrades of the two compiler plugins unfortunately had to be done in lockstep with the upgrade to sbt 1.x. --- .scalafmt.conf | 4 +++- .travis.yml | 2 +- project/build.properties | 2 +- project/build.sbt | 4 ++-- src/main/scala/org/scalajs/dom/experimental/intl/Intl.scala | 2 ++ 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index d0c719d6c..b3f01dadf 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,4 +1,6 @@ +version = 2.0.0-RC5 project.git = true style = Scala.js project.includeFilters = ["src/main/scala/org/scalajs/.*\\.scala"] -bestEffortInDeeplyNestedCode = true +maxColumn = 79 +docstrings = JavaDoc diff --git a/.travis.yml b/.travis.yml index daf7e49de..1e4a0608c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ sudo: false language: scala script: - sbt ++$TRAVIS_SCALA_VERSION package doc example/compile - - sbt scalafmtTest + - sbt scalafmtCheck scala: - 2.10.7 - 2.11.12 diff --git a/project/build.properties b/project/build.properties index 133a8f197..c0bab0494 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=0.13.17 +sbt.version=1.2.8 diff --git a/project/build.sbt b/project/build.sbt index 345e6afae..a8e63782e 100644 --- a/project/build.sbt +++ b/project/build.sbt @@ -3,6 +3,6 @@ val scalaJSVersion = addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion) -addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.3.9") +addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.3.11") -addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "0.6.8") +addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.0.0") diff --git a/src/main/scala/org/scalajs/dom/experimental/intl/Intl.scala b/src/main/scala/org/scalajs/dom/experimental/intl/Intl.scala index 98b14a28b..99d13fd69 100644 --- a/src/main/scala/org/scalajs/dom/experimental/intl/Intl.scala +++ b/src/main/scala/org/scalajs/dom/experimental/intl/Intl.scala @@ -195,6 +195,7 @@ object DateTimeFormatOptions { second: js.UndefOr[String] = js.undefined, timeZoneName: js.UndefOr[String] = js.undefined ): DateTimeFormatOptions = { + // format: off js.Dynamic .literal( localeMatcher = localeMatcher, @@ -212,6 +213,7 @@ object DateTimeFormatOptions { timeZoneName = timeZoneName ) .asInstanceOf[DateTimeFormatOptions] + // format: on } } From a041ad679879219dce101488622129ef62f87653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 26 Apr 2019 11:23:04 +0200 Subject: [PATCH 5/5] Actually run salafmtCheck for every Scala version. --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 1e4a0608c..5101714e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,7 @@ sudo: false language: scala script: - sbt ++$TRAVIS_SCALA_VERSION package doc example/compile - - sbt scalafmtCheck + - sbt ++$TRAVIS_SCALA_VERSION scalafmtCheck scala: - 2.10.7 - 2.11.12