Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1"]
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1", "1.11.0"]
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
strategy:
fail-fast: false
matrix:
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1"]
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1", "1.11.0"]
steps:
- uses: actions/checkout@v2
with:
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
strategy:
fail-fast: false
matrix:
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1"]
scalaJsVersion: ["1.9.0", "1.10.0", "1.10.1", "1.11.0"]
steps:
- uses: actions/checkout@v2
with:
Expand Down
4 changes: 2 additions & 2 deletions build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ import scala.util.Properties.isWin

def scalaJsCliVersion = "1.1.1-sc5"
def scala213 = "2.13.8"
def latestScalaJsVersion = "1.10.1"
def scalaJsVersions = Seq("1.9.0", "1.10.0", latestScalaJsVersion)
def latestScalaJsVersion = "1.11.0"
def scalaJsVersions = Seq("1.9.0", "1.10.0", "1.10.1", latestScalaJsVersion)

object cli extends Cross[Cli](scalaJsVersions: _*)

Expand Down
10 changes: 5 additions & 5 deletions cli/src/org/scalajs/cli/Scalajsld.scala
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object Scalajsld {
sourceMap: Boolean = false,
relativizeSourceMap: Option[URI] = None,
checkIR: Boolean = false,
stdLib: Option[File] = None,
stdLib: Seq[File] = Nil,
jsHeader: String = "",
logLevel: Level = Level.Info
)
Expand Down Expand Up @@ -164,12 +164,12 @@ object Scalajsld {
.action { (x, c) => c.copy(relativizeSourceMap = Some(x.toURI)) }
.text("Relativize source map with respect to given path (meaningful with -s)")
opt[Unit]("noStdlib")
.action { (_, c) => c.copy(stdLib = None) }
.action { (_, c) => c.copy(stdLib = Nil) }
.text("Don't automatically include Scala.js standard library")
opt[File]("stdlib")
opt[String]("stdlib")
.valueName("<scala.js stdlib jar>")
.hidden()
.action { (x, c) => c.copy(stdLib = Some(x)) }
.action { (x, c) => c.copy(stdLib = x.split(File.pathSeparator).map(new File(_)).toSeq) }
.text("Location of Scala.js standard libarary. This is set by the " +
"runner script and automatically prepended to the classpath. " +
"Use -n to not include it.")
Expand Down Expand Up @@ -208,7 +208,7 @@ object Scalajsld {
}

for (options <- parser.parse(args, Options())) {
val classpath = (options.stdLib.toList ++ options.cp).map(_.toPath())
val classpath = (options.stdLib ++ options.cp).map(_.toPath())
val moduleInitializers = options.moduleInitializers

val semantics =
Expand Down
8 changes: 5 additions & 3 deletions tests/test/src/org/scalajs/cli/tests/Tests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,24 @@ class Tests extends munit.FunSuite {
|""".stripMargin
)

val scalaJsLibraryCp = os.proc("cs", "fetch", "--classpath", "-E", "org.scala-lang:scala-library", s"org.scala-js::scalajs-library:$scalaJsVersion").call(cwd = dir).out.trim()

os.makeDir.all(dir / "bin")
os.proc(
"cs",
"launch",
"scalac:2.13.6",
"--",
"-classpath",
os.proc("cs", "fetch", "--intransitive", s"org.scala-js::scalajs-library:$scalaJsVersion").call(cwd = dir).out.trim(),
scalaJsLibraryCp,
s"-Xplugin:${os.proc("cs", "fetch", "--intransitive", s"org.scala-js:scalajs-compiler_2.13.6:$scalaJsVersion").call(cwd = dir).out.trim()}",
"-d", "bin", "foo.scala"
).call(cwd = dir, stdin = os.Inherit, stdout = os.Inherit)

val res = os.proc(
launcher,
"--stdlib",
os.proc("cs", "fetch", "--intransitive", s"org.scala-js::scalajs-library:$scalaJsVersion").call(cwd = dir).out.trim(),
scalaJsLibraryCp,
"-s", "-o", "test.js", "-mm", "Foo.main", "bin"
).call(cwd = dir, stderr = os.Pipe)
val expectedInOutput = "Warning: using a single file as output (--output) is deprecated since Scala.js 1.3.0. Use --outputDir instead."
Expand All @@ -60,7 +62,7 @@ class Tests extends munit.FunSuite {
os.proc(
launcher,
"--stdlib",
os.proc("cs", "fetch", "--intransitive", s"org.scala-js::scalajs-library:$scalaJsVersion").call(cwd = dir).out.trim(),
scalaJsLibraryCp,
"-s",
"--outputDir",
"test-output",
Expand Down