Skip to content

Commit c9c8f0a

Browse files
authored
Merge pull request #26 from gzm0/rc1
Upgrade to Scala.js 1.0.0-RC1
2 parents 590820f + a2b942c commit c9c8f0a

File tree

4 files changed

+14
-13
lines changed

4 files changed

+14
-13
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
sudo: false
22
language: scala
33
scala:
4-
- 2.10.7
54
- 2.11.12
6-
- 2.12.8
5+
- 2.12.10
6+
- 2.13.1
77
jdk:
88
- openjdk8
99
env:

build.sbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ inThisBuild(Seq(
22
version := "1.0.0-SNAPSHOT",
33
organization := "org.scala-js",
44

5-
crossScalaVersions := Seq("2.12.8", "2.10.7", "2.11.12"),
5+
crossScalaVersions := Seq("2.12.10", "2.11.12", "2.13.1"),
66
scalaVersion := crossScalaVersions.value.head,
77
scalacOptions ++= Seq("-deprecation", "-feature", "-Xfatal-warnings"),
88

jsdom-nodejs-env/src/main/scala/org/scalajs/jsenv/jsdomnodejs/JSDOMNodeJSEnv.scala

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ class JSDOMNodeJSEnv(config: JSDOMNodeJSEnv.Config) extends JSEnv {
3030

3131
val name: String = "Node.js with JSDOM"
3232

33-
def start(input: Input, runConfig: RunConfig): JSRun = {
33+
def start(input: Seq[Input], runConfig: RunConfig): JSRun = {
3434
JSDOMNodeJSEnv.validator.validate(runConfig)
3535
val scripts = validateInput(input)
3636
try {
@@ -41,7 +41,7 @@ class JSDOMNodeJSEnv(config: JSDOMNodeJSEnv.Config) extends JSEnv {
4141
}
4242
}
4343

44-
def startWithCom(input: Input, runConfig: RunConfig,
44+
def startWithCom(input: Seq[Input], runConfig: RunConfig,
4545
onMessage: String => Unit): JSComRun = {
4646
JSDOMNodeJSEnv.validator.validate(runConfig)
4747
val scripts = validateInput(input)
@@ -50,13 +50,14 @@ class JSDOMNodeJSEnv(config: JSDOMNodeJSEnv.Config) extends JSEnv {
5050
}
5151
}
5252

53-
private def validateInput(input: Input): List[Path] = {
54-
input match {
55-
case Input.ScriptsToLoad(scripts) =>
56-
scripts
53+
private def validateInput(input: Seq[Input]): List[Path] = {
54+
input.map {
55+
case Input.Script(script) =>
56+
script
57+
5758
case _ =>
5859
throw new UnsupportedInputException(input)
59-
}
60+
}.toList
6061
}
6162

6263
private def internalStart(files: List[Path], runConfig: RunConfig): JSRun = {
@@ -73,7 +74,7 @@ class JSDOMNodeJSEnv(config: JSDOMNodeJSEnv.Config) extends JSEnv {
7374
private def codeWithJSDOMContext(scripts: List[Path]): List[Path] = {
7475
val scriptsURIs = scripts.map(JSDOMNodeJSEnv.materialize(_))
7576
val scriptsURIsAsJSStrings =
76-
scriptsURIs.map(uri => '"' + escapeJS(uri.toASCIIString) + '"')
77+
scriptsURIs.map(uri => "\"" + escapeJS(uri.toASCIIString) + "\"")
7778
val jsDOMCode = {
7879
s"""
7980
|(function () {

project/plugins.sbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0-M8")
1+
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.0.0-RC1")
22

3-
libraryDependencies += "org.scala-js" %% "scalajs-env-nodejs" % "1.0.0-M8"
3+
libraryDependencies += "org.scala-js" %% "scalajs-env-nodejs" % "1.0.0-RC1"
44

55
unmanagedSourceDirectories in Compile +=
66
baseDirectory.value.getParentFile / "jsdom-nodejs-env/src/main/scala"

0 commit comments

Comments
 (0)