Skip to content

Commit

Permalink
Update scalajs-dom to 2.0.0 (#2234)
Browse files Browse the repository at this point in the history
* Update scalajs-dom to 2.0.0

* fix compilation

Co-authored-by: Alexandre Archambault <alexandre.archambault@gmail.com>
  • Loading branch information
scala-steward and alexarchambault committed Nov 23, 2021
1 parent 4e53be0 commit f4c15ee
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package coursier.core

import scala.scalajs.js
import js.Dynamic.{global => g}
import org.scalajs.dom.raw.NodeList
import org.scalajs.dom.raw.{Node, NodeList}

import coursier.util.{SaxHandler, Xml}

Expand Down Expand Up @@ -44,7 +44,7 @@ package object compatibility {
val ELEMENT_NODE = 1 // org.scalajs.dom.raw.Node.ELEMENT_NODE
val TEXT_NODE = 3 // org.scalajs.dom.raw.Node.TEXT_NODE

def fromNode(node: org.scalajs.dom.raw.Node): Xml.Node = {
def fromNode(node: Node): Xml.Node = {

val node0 = node.asInstanceOf[js.Dynamic]

Expand All @@ -53,7 +53,7 @@ package object compatibility {
option[String](node0.nodeName)
.getOrElse("")
def children =
option[NodeList](node0.childNodes)
option[NodeList[Node]](node0.childNodes)
.map(l => List.tabulate(l.length)(l.item).map(fromNode))
.getOrElse(Nil)

Expand Down Expand Up @@ -117,7 +117,7 @@ package object compatibility {
// From node, rootNodes.head is sometimes just a comment instead of the main root node
// (tested with org.ow2.asm:asm-commons in CentralTests)
rootNode <- rootNodes.asInstanceOf[js.Array[js.Dynamic]]
.flatMap(option[org.scalajs.dom.raw.Node])
.flatMap(option[Node])
.dropWhile(_.nodeType != ELEMENT_NODE)
.headOption
} yield rootNode
Expand Down
2 changes: 1 addition & 1 deletion project/deps.sc
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ object Deps {
ivy"org.codehaus.plexus:plexus-container-default:2.1.0" // plexus-archiver needs its loggers
def proguard = ivy"com.guardsquare:proguard-base:7.1.1"
def scalaAsync = ivy"org.scala-lang.modules::scala-async:0.10.0"
def scalaJsDom = ivy"org.scala-js::scalajs-dom::1.2.0"
def scalaJsDom = ivy"org.scala-js::scalajs-dom::2.0.0"
def scalaJsJquery = ivy"be.doeraene::scalajs-jquery::1.0.0"
def scalaJsReact = ivy"com.github.japgolly.scalajs-react::core::1.7.7"
def scalaNativeTools03 = ivy"org.scala-native::tools:0.3.9"
Expand Down

0 comments on commit f4c15ee

Please sign in to comment.