Skip to content
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

update scalajs-dom to 2.0.0 #377

Merged
merged 5 commits into from
Dec 15, 2021
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
235 changes: 164 additions & 71 deletions import-scalajs-definitions/src/test/resources/imported/japgolly.scala

Large diffs are not rendered by default.

23,562 changes: 11,974 additions & 11,588 deletions import-scalajs-definitions/src/test/resources/imported/org.scala

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -1148,6 +1148,14 @@ object slinky {
}
}

object dd {

object tag {

type RefType = org.scalajs.dom.html.Element
}
}

object defaultChecked {

object tag {
Expand Down Expand Up @@ -1252,6 +1260,14 @@ object slinky {
}
}

object dt {

object tag {

type RefType = org.scalajs.dom.html.Element
}
}

object em {

object tag {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ import org.scalatest.funsuite.AnyFunSuite

class ImporterTest213 extends ImporterTest {
override def version: Versions = Versions(Versions.Scala213, Versions.ScalaJs1)
override def mode: Mode = Mode.releaseOnly
override def mode: Mode = Mode.releaseOnly
}

class ImporterTest3 extends ImporterTest {
override def version: Versions = Versions(Versions.Scala3, Versions.ScalaJs1)
override def mode: Mode = Mode.normal
override def mode: Mode = Mode.normal
}

trait ImporterTest extends AnyFunSuite with ImporterHarness with ParallelTestExecution {
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
package org.scalablytyped.converter.internal.scalajs
package flavours

object ReportMissingScalaJsDomTranslations extends App {
val conversions = new ScalaJsDomNames(new QualifiedName.StdNames(Name.std)).All
val conversionTarget = conversions.map(_.to).toSet
val ScalaJsDom = QualifiedName("org.scalajs.dom")
val missing = ScalaJsClasses.ScalaJsTypes.collect {
case (qname, _)
if qname.startsWith(ScalaJsDom) &&
!conversionTarget(qname) &&
!qname.parts.contains(Name("raw")) &&
!qname.parts.contains(Name("experimental")) &&
!qname.parts.contains(Name("crypto")) &&
!qname.parts.contains(Name("svg")) &&
!qname.parts.contains(Name("html")) &&
!qname.parts.contains(Name("idb")) &&
!qname.parts(qname.parts.length - 2).unescaped.head.isUpper =>
qname
}

missing.toList.sortBy(_.parts).foreach(qname => println(qname.parts.map(_.unescaped).mkString(".")))
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
package org.scalablytyped.converter.internal.scalajs
package flavours

class ScalaJsDomNamesTest extends org.scalatest.funsuite.AnyFunSuite {
test("check that scalajs-dom names exist and matches expectations") {
val conversions = new ScalaJsDomNames(new QualifiedName.StdNames(Name.std)).All
conversions.foreach { conversion =>
ScalaJsClasses.ScalaJsTypes(conversion.to) match {
case cls: ClassTree =>
if (conversion.tparams.length != cls.tparams.length)
fail(s"Conversion $conversion should have had ${cls.tparams.length} tparams ")

case ta: TypeAliasTree =>
if (conversion.tparams.length != ta.tparams.length)
fail(s"Conversion $conversion should have had ${ta.tparams.length} tparams ")
}
}
}
}
2 changes: 1 addition & 1 deletion scalajs/src/main/resources/scalajs-definitions.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ case class Versions(scala: Versions.Scala, scalaJs: Versions.ScalaJs) {
else Some(Dep.ScalaFullVersion(scalaJs.scalaJsOrganization, "scalajs-compiler", scalaJs.scalaJsVersion))

val runtime = Dep.ScalaJs("com.olvind", "scalablytyped-runtime", "2.4.2")
val scalaJsDom = Dep.ScalaJs("org.scala-js", "scalajs-dom", "1.2.0").for3Use2_13(scala.is3)
val slinkyWeb = Dep.ScalaJs("me.shadaj", "slinky-web", "0.6.7").for3Use2_13(scala.is3)
val slinkyNative = Dep.ScalaJs("me.shadaj", "slinky-native", "0.6.7").for3Use2_13(scala.is3)
val scalaJsDom = Dep.ScalaJs("org.scala-js", "scalajs-dom", "2.0.0")
val slinkyWeb = Dep.ScalaJs("me.shadaj", "slinky-web", "0.6.8+1-b1dd3f4c").for3Use2_13(scala.is3)
val slinkyNative = Dep.ScalaJs("me.shadaj", "slinky-native", "0.6.8+1-b1dd3f4c").for3Use2_13(scala.is3)
val scalajsReact = Dep.ScalaJs("com.github.japgolly.scalajs-react", "core", "1.7.5").for3Use2_13(scala.is3)
}

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions tests/material-ui/check-slinky-3/m/material-ui/build.sbt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
organization := "org.scalablytyped"
name := "material-ui"
version := "0.0-unknown-eba08f"
version := "0.0-unknown-675b96"
scalaVersion := "3.1.0"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2",
"org.scalablytyped" %%% "react" % "0.0-unknown-87fd40",
"org.scalablytyped" %%% "std" % "0.0-unknown-2ac32a",
("me.shadaj" %%% "slinky-web" % "0.6.7").cross(CrossVersion.for3Use2_13))
"org.scalablytyped" %%% "react" % "0.0-unknown-1add21",
"org.scalablytyped" %%% "std" % "0.0-unknown-72e7c8",
("me.shadaj" %%% "slinky-web" % "0.6.8+1-b1dd3f4c").cross(CrossVersion.for3Use2_13))
publishArtifact in packageDoc := false
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future")
licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
6 changes: 3 additions & 3 deletions tests/material-ui/check-slinky-3/r/react/build.sbt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
organization := "org.scalablytyped"
name := "react"
version := "0.0-unknown-87fd40"
version := "0.0-unknown-1add21"
scalaVersion := "3.1.0"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2",
"org.scalablytyped" %%% "std" % "0.0-unknown-2ac32a",
("me.shadaj" %%% "slinky-web" % "0.6.7").cross(CrossVersion.for3Use2_13))
"org.scalablytyped" %%% "std" % "0.0-unknown-72e7c8",
("me.shadaj" %%% "slinky-web" % "0.6.8+1-b1dd3f4c").cross(CrossVersion.for3Use2_13))
publishArtifact in packageDoc := false
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future")
licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
4 changes: 2 additions & 2 deletions tests/material-ui/check-slinky-3/s/std/build.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
organization := "org.scalablytyped"
name := "std"
version := "0.0-unknown-2ac32a"
version := "0.0-unknown-72e7c8"
scalaVersion := "3.1.0"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2",
("me.shadaj" %%% "slinky-web" % "0.6.7").cross(CrossVersion.for3Use2_13))
("me.shadaj" %%% "slinky-web" % "0.6.8+1-b1dd3f4c").cross(CrossVersion.for3Use2_13))
publishArtifact in packageDoc := false
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future")
licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,49 @@ import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, J

trait HTMLElementTagNameMap extends StObject {

var a: org.scalajs.dom.raw.HTMLAnchorElement
var a: org.scalajs.dom.HTMLAnchorElement

var abbr: org.scalajs.dom.raw.HTMLElement
var abbr: org.scalajs.dom.HTMLElement

var address: org.scalajs.dom.raw.HTMLElement
var address: org.scalajs.dom.HTMLElement

var area: org.scalajs.dom.raw.HTMLAreaElement
var area: org.scalajs.dom.HTMLAreaElement

var article: org.scalajs.dom.raw.HTMLElement
var article: org.scalajs.dom.HTMLElement

var aside: org.scalajs.dom.raw.HTMLElement
var aside: org.scalajs.dom.HTMLElement

var audio: org.scalajs.dom.raw.HTMLAudioElement
var audio: org.scalajs.dom.HTMLAudioElement
}
object HTMLElementTagNameMap {

inline def apply(
a: org.scalajs.dom.raw.HTMLAnchorElement,
abbr: org.scalajs.dom.raw.HTMLElement,
address: org.scalajs.dom.raw.HTMLElement,
area: org.scalajs.dom.raw.HTMLAreaElement,
article: org.scalajs.dom.raw.HTMLElement,
aside: org.scalajs.dom.raw.HTMLElement,
audio: org.scalajs.dom.raw.HTMLAudioElement
a: org.scalajs.dom.HTMLAnchorElement,
abbr: org.scalajs.dom.HTMLElement,
address: org.scalajs.dom.HTMLElement,
area: org.scalajs.dom.HTMLAreaElement,
article: org.scalajs.dom.HTMLElement,
aside: org.scalajs.dom.HTMLElement,
audio: org.scalajs.dom.HTMLAudioElement
): HTMLElementTagNameMap = {
val __obj = js.Dynamic.literal(a = a.asInstanceOf[js.Any], abbr = abbr.asInstanceOf[js.Any], address = address.asInstanceOf[js.Any], area = area.asInstanceOf[js.Any], article = article.asInstanceOf[js.Any], aside = aside.asInstanceOf[js.Any], audio = audio.asInstanceOf[js.Any])
__obj.asInstanceOf[HTMLElementTagNameMap]
}

extension [Self <: HTMLElementTagNameMap](x: Self) {

inline def setA(value: org.scalajs.dom.raw.HTMLAnchorElement): Self = StObject.set(x, "a", value.asInstanceOf[js.Any])
inline def setA(value: org.scalajs.dom.HTMLAnchorElement): Self = StObject.set(x, "a", value.asInstanceOf[js.Any])

inline def setAbbr(value: org.scalajs.dom.raw.HTMLElement): Self = StObject.set(x, "abbr", value.asInstanceOf[js.Any])
inline def setAbbr(value: org.scalajs.dom.HTMLElement): Self = StObject.set(x, "abbr", value.asInstanceOf[js.Any])

inline def setAddress(value: org.scalajs.dom.raw.HTMLElement): Self = StObject.set(x, "address", value.asInstanceOf[js.Any])
inline def setAddress(value: org.scalajs.dom.HTMLElement): Self = StObject.set(x, "address", value.asInstanceOf[js.Any])

inline def setArea(value: org.scalajs.dom.raw.HTMLAreaElement): Self = StObject.set(x, "area", value.asInstanceOf[js.Any])
inline def setArea(value: org.scalajs.dom.HTMLAreaElement): Self = StObject.set(x, "area", value.asInstanceOf[js.Any])

inline def setArticle(value: org.scalajs.dom.raw.HTMLElement): Self = StObject.set(x, "article", value.asInstanceOf[js.Any])
inline def setArticle(value: org.scalajs.dom.HTMLElement): Self = StObject.set(x, "article", value.asInstanceOf[js.Any])

inline def setAside(value: org.scalajs.dom.raw.HTMLElement): Self = StObject.set(x, "aside", value.asInstanceOf[js.Any])
inline def setAside(value: org.scalajs.dom.HTMLElement): Self = StObject.set(x, "aside", value.asInstanceOf[js.Any])

inline def setAudio(value: org.scalajs.dom.raw.HTMLAudioElement): Self = StObject.set(x, "audio", value.asInstanceOf[js.Any])
inline def setAudio(value: org.scalajs.dom.HTMLAudioElement): Self = StObject.set(x, "audio", value.asInstanceOf[js.Any])
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,17 @@ import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, J

trait SVGElementTagNameMap extends StObject {

var circle: org.scalajs.dom.raw.SVGCircleElement
var circle: org.scalajs.dom.SVGCircleElement
}
object SVGElementTagNameMap {

inline def apply(circle: org.scalajs.dom.raw.SVGCircleElement): SVGElementTagNameMap = {
inline def apply(circle: org.scalajs.dom.SVGCircleElement): SVGElementTagNameMap = {
val __obj = js.Dynamic.literal(circle = circle.asInstanceOf[js.Any])
__obj.asInstanceOf[SVGElementTagNameMap]
}

extension [Self <: SVGElementTagNameMap](x: Self) {

inline def setCircle(value: org.scalajs.dom.raw.SVGCircleElement): Self = StObject.set(x, "circle", value.asInstanceOf[js.Any])
inline def setCircle(value: org.scalajs.dom.SVGCircleElement): Self = StObject.set(x, "circle", value.asInstanceOf[js.Any])
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import scala.scalajs.js
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}


type Element = org.scalajs.dom.raw.Node
type Element = org.scalajs.dom.Node

type HTMLAnchorElement = org.scalajs.dom.raw.Element
type HTMLAnchorElement = org.scalajs.dom.Element

type HTMLAreaElement = org.scalajs.dom.raw.Element
type HTMLAreaElement = org.scalajs.dom.Element

type HTMLAudioElement = org.scalajs.dom.raw.Element
type HTMLAudioElement = org.scalajs.dom.Element

type HTMLElement = org.scalajs.dom.raw.Element
type HTMLElement = org.scalajs.dom.Element

type Partial[T] = T

type SVGCircleElement = org.scalajs.dom.raw.Element
type SVGCircleElement = org.scalajs.dom.Element
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
organization := "org.scalablytyped"
name := "componentstest"
version := "0.0-unknown-4759b3"
version := "0.0-unknown-8afc51"
scalaVersion := "3.1.0"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2",
"org.scalablytyped" %%% "react" % "16.9.2-edd1c8",
"org.scalablytyped" %%% "std" % "0.0-unknown-c9277c",
("me.shadaj" %%% "slinky-web" % "0.6.7").cross(CrossVersion.for3Use2_13))
"org.scalablytyped" %%% "react" % "16.9.2-9b76f4",
"org.scalablytyped" %%% "std" % "0.0-unknown-7f8a22",
("me.shadaj" %%% "slinky-web" % "0.6.8+1-b1dd3f4c").cross(CrossVersion.for3Use2_13))
publishArtifact in packageDoc := false
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future")
licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package typingsSlinky.componentstest.components

import org.scalajs.dom.raw.HTMLDivElement
import org.scalajs.dom.HTMLDivElement
import slinky.web.SyntheticMouseEvent
import slinky.web.html.`*`.tag
import typingsSlinky.StBuildingComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package typingsSlinky.componentstest

import org.scalajs.dom.raw.HTMLDivElement
import org.scalajs.dom.HTMLDivElement
import slinky.core.ReactComponentClass
import slinky.web.SyntheticMouseEvent
import typingsSlinky.componentstest.anon.Equals
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
organization := "org.scalablytyped"
name := "react-bootstrap"
version := "0.32-8b4f52"
version := "0.32-971e1b"
scalaVersion := "3.1.0"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2",
"org.scalablytyped" %%% "react" % "16.9.2-edd1c8",
"org.scalablytyped" %%% "std" % "0.0-unknown-c9277c",
("me.shadaj" %%% "slinky-web" % "0.6.7").cross(CrossVersion.for3Use2_13))
"org.scalablytyped" %%% "react" % "16.9.2-9b76f4",
"org.scalablytyped" %%% "std" % "0.0-unknown-7f8a22",
("me.shadaj" %%% "slinky-web" % "0.6.8+1-b1dd3f4c").cross(CrossVersion.for3Use2_13))
publishArtifact in packageDoc := false
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future")
licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package typingsSlinky.reactBootstrap.components

import org.scalajs.dom.raw.Event
import org.scalajs.dom.raw.EventTarget
import org.scalajs.dom.Event
import org.scalajs.dom.EventTarget
import slinky.core.SyntheticEvent
import slinky.web.SyntheticAnimationEvent
import slinky.web.SyntheticClipboardEvent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
organization := "org.scalablytyped"
name := "react-contextmenu"
version := "2.13.0-3a6ebb"
version := "2.13.0-6c1f75"
scalaVersion := "3.1.0"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2",
"org.scalablytyped" %%% "react" % "16.9.2-edd1c8",
"org.scalablytyped" %%% "std" % "0.0-unknown-c9277c",
("me.shadaj" %%% "slinky-web" % "0.6.7").cross(CrossVersion.for3Use2_13))
"org.scalablytyped" %%% "react" % "16.9.2-9b76f4",
"org.scalablytyped" %%% "std" % "0.0-unknown-7f8a22",
("me.shadaj" %%% "slinky-web" % "0.6.8+1-b1dd3f4c").cross(CrossVersion.for3Use2_13))
publishArtifact in packageDoc := false
scalacOptions ++= List("-encoding", "utf-8", "-feature", "-language:implicitConversions", "-language:higherKinds", "-language:existentials", "-no-indent", "-source:future")
licenses += ("MIT", url("http://opensource.org/licenses/MIT"))
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package typingsSlinky.reactContextmenu

import org.scalajs.dom.raw.HTMLElement
import org.scalajs.dom.HTMLElement
import org.scalablytyped.runtime.StObject
import scala.scalajs.js
import scala.scalajs.js.annotation.{JSGlobalScope, JSGlobal, JSImport, JSName, JSBracketAccess}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package typingsSlinky.reactContextmenu.components

import org.scalajs.dom.raw.HTMLElement
import org.scalajs.dom.HTMLElement
import slinky.web.SyntheticMouseEvent
import slinky.web.html.`*`.tag
import typingsSlinky.StBuildingComponent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package typingsSlinky.reactContextmenu.components

import org.scalajs.dom.raw.HTMLDivElement
import org.scalajs.dom.raw.HTMLElement
import org.scalajs.dom.HTMLDivElement
import org.scalajs.dom.HTMLElement
import slinky.web.SyntheticMouseEvent
import slinky.web.SyntheticTouchEvent
import slinky.web.html.`*`.tag
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package typingsSlinky.reactContextmenu.components

import org.scalajs.dom.raw.HTMLDivElement
import org.scalajs.dom.raw.HTMLElement
import org.scalajs.dom.HTMLDivElement
import org.scalajs.dom.HTMLElement
import slinky.core.facade.ReactElement
import slinky.web.SyntheticMouseEvent
import slinky.web.SyntheticTouchEvent
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package typingsSlinky.reactContextmenu

import org.scalajs.dom.raw.HTMLDivElement
import org.scalajs.dom.raw.HTMLElement
import org.scalajs.dom.HTMLDivElement
import org.scalajs.dom.HTMLElement
import slinky.core.ReactComponentClass
import slinky.core.facade.ReactElement
import slinky.web.SyntheticMouseEvent
Expand Down
Loading