Announcing Scala.js 0.5.5
Sep 18, 2014.
We are excited to announce the release of Scala.js 0.5.5!
This release contains various minor bug fixes and enhancements. It is the last anticipated release in the 0.5.x series and prepares the upcoming 0.6.x series by deprecating various obsolete features (see below for details).
To upgrade, simply change the version number in
project/plugins.sbt, as usual.
Scala.js 0.5.5 is backward binary compatible with older versions of the 0.5.x branch. However, it is not forward binary compatible. This means:
- You don’t need to re-publish libraries
- You must upgrade to Scala.js 0.5.5 if any library you depend on uses Scala.js 0.5.5
If you choose to re-publish a library, make sure to bump its version.
Please report any issues on GitHub.
Upgrading from 0.5.3 and below
If you use uTest, you need to upgrade it to version 0.2.3 or later. This is due to a binary incompatible change in the sbt plugin in Scala.js 0.5.4.
Changes in the 0.5.5 release
Deprecations & Renamings
Implicit conversion between
Implicit conversion between
js.Array has been deprecated in favor of
JSConverters. Instead of relying on implicit conversion, use
js.Array to scala.Array
scala.Array to js.Array
Note that these conversions apply equally to other Scala collections like
List. Conversion between
js.Dictionary and Scala’s
Map is supported as well.
packageJS has been deprecated in favor of
Its providing tasks (
packageExportedProductsJS) have been deprecated without replacement. If such a mechanism is required,
ScalaJSPackager should be used directly.
sbt Task Renamings
Several sbt tasks have been renamed to avoid conflicts with other sbt plugins (see #1050). The tasks are still available under their old name in 0.5.5 in order to not break builds, but the aliases will be removed in 0.6.0. Inside the console, only the new name is available.
We have taken great care to only rename keys which are very unlikely to be used by a Scala.js build. Just in case, a list of the renamings is given below. Note that the sbt plugin will undergo a major reworking in 0.6.0 to make it an
AutoPlugin. We therefore recommend to not update your build yet if you do not need to.
|Old Name||New Name|
The following improvements have been made in 0.5.5.
- Source mapping support in Rhino (enabled by default) (#727)
- Full source mapping support in Node.js (not only in testing). Requires installing
- The Node.js runner honors the system environment’s
Tiny JVM (only) library containing Scala.js export annotations (#1006). Use with:
libraryDependencies += "org.scala-lang.modules.scalajs" %% "scalajs-stubs" % "0.5.5" resolvers += scala.scalajs.sbtplugin.ScalaJSPluginInternal.scalaJSReleasesResolver // or without Scala.js on the classpath resolvers += Resolver.url("scala-js-releases", url("http://dl.bintray.com/content/scala-js/scala-js-releases"))( Resolver.ivyStylePatterns)
- Improved accuracy and parallelization for incremental optimizer
- Allow to export protected members (
@JSExportAllstill only exports public members).
The following bugs have been fixed since 0.5.4:
- #985 JSExport doesn’t overload js.Any and Any correctly
- #987 Splitting an empty string should return an array with 1 element, not an empty array
- #997 Honor in-regex flags in java.util.regex
- #1011 IR printer doesn’t print -0.0 correctly
- #1020 Correct stack frame resolution of anonymous functions in Chrome/v8