Skip to content

WIP: initial attempt to update to scala 3.0.0-M3 #438

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
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
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ lazy val root = project.in(file(".")).
name := "Scala.js DOM"

crossScalaVersions in ThisBuild := {
if (scalaJSVersion.startsWith("1.")) Seq("2.12.10", "2.11.12", "2.13.1")
if (scalaJSVersion.startsWith("1.")) Seq("2.12.10", "2.11.12", "2.13.1", "3.0.0-M3")
else Seq("2.12.10", "2.11.12", "2.10.7", "2.13.1")
}
scalaVersion in ThisBuild := crossScalaVersions.value.head
Expand Down
2 changes: 1 addition & 1 deletion project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.2.8
sbt.version=1.4.6
4 changes: 3 additions & 1 deletion project/build.sbt
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
val scalaJSVersion =
Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.0.0")
Option(System.getenv("SCALAJS_VERSION")).getOrElse("1.3.1")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % scalaJSVersion)

addSbtPlugin("com.lihaoyi" % "scalatex-sbt-plugin" % "0.3.11")

addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.0.0")

addSbtPlugin("ch.epfl.lamp" % "sbt-dotty" % "0.5.1")
4 changes: 2 additions & 2 deletions src/main/scala/org/scalajs/dom/crypto/Crypto.scala
Original file line number Diff line number Diff line change
Expand Up @@ -930,10 +930,10 @@ object KeyFormat {
trait RSAPublicKey extends js.Object {

/* modulus, as a base64 URL encoded String */
@js.native
// @js.native
def n: String = js.native

/* exponent, as a base64 URL encoded String */
@js.native
// @js.native
def e: String = js.native
}
3 changes: 2 additions & 1 deletion src/main/scala/org/scalajs/dom/ext/Extensions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,8 @@ object Ajax {
implicit def byteBuffer2ajax(data: ByteBuffer): InputData = {
if (data.hasTypedArray()) {
// get relevant part of the underlying typed array
data.typedArray().subarray(data.position, data.limit)
val typedArray = data.typedArray()
typedArray.subarray(data.position, data.limit)
} else {
// fall back to copying the data
val tempBuffer = ByteBuffer.allocateDirect(data.remaining)
Expand Down
10 changes: 5 additions & 5 deletions src/main/scala/org/scalajs/dom/ext/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,17 @@ package object ext {
def cast[T] = x.asInstanceOf[T]
}

implicit def pimpAnimatedNumber(x: svg.AnimatedNumber) = x.baseVal
implicit def pimpAnimatedNumber(x: svg.AnimatedNumber): Double = x.baseVal //: runtime.Double

implicit def pimpRichAnimatedNumber(x: svg.AnimatedNumber) =
implicit def pimpRichAnimatedNumber(x: svg.AnimatedNumber): runtime.RichDouble =
x.baseVal: runtime.RichDouble

implicit def pimpAnimatedLength(x: svg.AnimatedLength) = x.baseVal.value
implicit def pimpAnimatedLength(x: svg.AnimatedLength): Double = x.baseVal.value

implicit def pimpRichAnimatedLength(x: svg.AnimatedLength) =
implicit def pimpRichAnimatedLength(x: svg.AnimatedLength): runtime.RichDouble =
x.baseVal.value: runtime.RichDouble

implicit def color2String(c: Color) = c.toString
implicit def color2String(c: Color): String = c.toString
implicit class pimpedContext(val ctx: CanvasRenderingContext2D) {
def prepCircle(x: Double, y: Double, r: Double) = {
ctx.beginPath()
Expand Down