Skip to content

Commit

Permalink
Merge branch 'master' into update/sbt-tpolecat-0.5.0
Browse files Browse the repository at this point in the history
  • Loading branch information
oyvindberg authored Dec 22, 2023
2 parents c74d93d + c3c41f2 commit 8a7338a
Show file tree
Hide file tree
Showing 277 changed files with 563 additions and 527 deletions.
2 changes: 1 addition & 1 deletion build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ lazy val `sbt-converter` = project
.settings(
name := "sbt-converter",
addSbtPlugin("ch.epfl.scala" % "sbt-scalajs-bundler" % "0.21.1"),
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2"),
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.14.0"),
sbtPlugin := true,
// set up 'scripted; sbt plugin for testing sbt plugins
scriptedBufferLog := false,
Expand Down
9 changes: 9 additions & 0 deletions docs/devel/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,17 @@ Developing a compiler is complex. Testing it well is expensive, so we focus on g
For that reason we have a few levels of testing:

### Unit tests

Only really used for the parser, but utterly necessary to write one. All changes to the parser should come with a corresponding unit test.

Take a look at test in [parser](https://github.com/ScalablyTyped/Converter/tree/master/importer/src/test/scala/org/scalablytyped/converter/internal/ts/parser) for examples.

Run them with:

```shell
sbt importer/testOnly org.scalablytyped.converter.internal.ts.parser.*
```

### [ImporterTest](https://github.com/ScalablyTyped/Converter/blob/master/importer/src/test/scala/org/scalablytyped/converter/internal/importer/ImporterTest.scala)
Built in the same spirit as the scala compiler's `partest`, this takes smallish [pieces of typescript](https://github.com/ScalablyTyped/Converter/tree/master/importer/src/test/resources)
code and run it through the entire pipeline, including `scalac`. These are relatively cheap (~30 seconds for all tests
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -431,4 +431,16 @@ final class ImportExportParseTests extends AnyFunSuite with Matchers {
),
)
}

test("export all types") {
val content = """export type * from 'types'"""
shouldParseAs(content, TsParser.tsExport)(
TsExport(
NoComments,
typeOnly = true,
ExportType.Named,
TsExportee.Star(None, TsIdentModule.simple("types")),
),
)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3330,4 +3330,11 @@ export {};
),
)
}

test("ignore type args in typeof") {
shouldParseAs(
"""typeof genComponentStyleHook<ComponentName>""".stripMargin,
TsParser.tsType,
)(TsTypeQuery(TsQIdent(IArray(TsIdentSimple("genComponentStyleHook")))))
}
}
6 changes: 3 additions & 3 deletions project/Deps.scala
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,15 @@ import sbt.{stringToOrganization, ModuleID}
object Deps {
val parserCombinators = "org.scala-lang.modules" %% "scala-parser-combinators" % "1.1.2"
val ammoniteOps = "com.lihaoyi" %% "ammonite-ops" % "2.4.0"
val osLib = "com.lihaoyi" %% "os-lib" % "0.7.7"
val sourcecode = "com.lihaoyi" %% "sourcecode" % "0.3.0"
val osLib = "com.lihaoyi" %% "os-lib" % "0.9.1"
val sourcecode = "com.lihaoyi" %% "sourcecode" % "0.3.1"
val scalatest = "org.scalatest" %% "scalatest" % "3.2.17"
val fansi = "com.lihaoyi" %% "fansi" % "0.4.0"
val bloop = "ch.epfl.scala" %% "bloop-frontend" % "1.5.4"
val scalaXml = "org.scala-lang.modules" %% "scala-xml" % "2.2.0"
val scopt = "com.github.scopt" %% "scopt" % "4.1.0"
val awssdkS3 = "software.amazon.awssdk" % "s3" % "2.15.28"
val coursier = "io.get-coursier" %% "coursier" % "2.1.7"
val coursier = "io.get-coursier" %% "coursier" % "2.1.8"

val circe: Seq[ModuleID] =
Seq(
Expand Down
6 changes: 3 additions & 3 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.1")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.7")
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.1.5")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.8")
addSbtPlugin("org.typelevel" % "sbt-tpolecat" % "0.5.0")
addSbtPlugin("org.scalameta" % "sbt-scalafmt" % "2.5.2")
addSbtPlugin("com.eed3si9n" % "sbt-buildinfo" % "0.11.0")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.11")
addSbtPlugin("ch.epfl.scala" % "sbt-bloop" % "1.5.13")
addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.5.12")
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ package scalajs
import io.circe013.{Decoder, Encoder}

object Versions {
val sbtVersion = "1.8.0"
val sbtVersion = "1.9.6"

// this accepts any nightly or milestone with the same binversion as a major release. good enough for now
private val Version = "(\\d+).(\\d+).(\\d+).*".r
Expand Down Expand Up @@ -49,7 +49,7 @@ object Versions {

val Scala212 = Scala("2.12.18")
val Scala213 = Scala("2.13.12")
val Scala3 = Scala("3.2.0")
val Scala3 = Scala("3.3.1")

case class ScalaJs(scalaJsVersion: String) {
val scalaJsBinVersion: String =
Expand Down
4 changes: 2 additions & 2 deletions tests/antd/check-3/a/antd/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "antd"
version := "4.3.1-83c28d"
scalaVersion := "3.2.0"
version := "4.3.1-87f21b"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
2 changes: 1 addition & 1 deletion tests/antd/check-3/a/antd/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/antd/check-3/r/rc-field-form/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "rc-field-form"
version := "1.4.4-202c2f"
scalaVersion := "3.2.0"
version := "1.4.4-4d815b"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
6 changes: 3 additions & 3 deletions tests/augment-module/check-3/l/lodash/build.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
organization := "org.scalablytyped"
name := "lodash"
version := "4.14-c9c5be"
scalaVersion := "3.2.0"
version := "4.14-b2de7b"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2",
"org.scalablytyped" %%% "std" % "0.0-unknown-7b3e8b")
"org.scalablytyped" %%% "std" % "0.0-unknown-8f9aec")
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 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/augment-module/check-3/l/lodash_dot_add/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "lodash_dot_add"
version := "3.7-f5f013"
scalaVersion := "3.2.0"
version := "3.7-f60800"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/augment-module/check-3/s/std/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "std"
version := "0.0-unknown-7b3e8b"
scalaVersion := "3.2.0"
version := "0.0-unknown-8f9aec"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/aws-sdk/check-3/a/aws-sdk/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "aws-sdk"
version := "2.247.1-5186f5"
scalaVersion := "3.2.0"
version := "2.247.1-b773ad"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
2 changes: 1 addition & 1 deletion tests/aws-sdk/check-3/a/aws-sdk/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/babylon/check-3/b/babylon/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "babylon"
version := "0.0-unknown-14539c"
scalaVersion := "3.2.0"
version := "0.0-unknown-3c97e1"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
2 changes: 1 addition & 1 deletion tests/babylon/check-3/b/babylon/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/babylon/check-3/n/node/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "node"
version := "0.0-unknown-4cf870"
scalaVersion := "3.2.0"
version := "0.0-unknown-a434be"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
2 changes: 1 addition & 1 deletion tests/babylon/check-3/n/node/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
6 changes: 3 additions & 3 deletions tests/bigint/check-3/b/bigint/build.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
organization := "org.scalablytyped"
name := "bigint"
version := "v5.5.3-2fb59d"
scalaVersion := "3.2.0"
version := "v5.5.3-521fda"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2",
"org.scalablytyped" %%% "std" % "0.0-unknown-2d9f14")
"org.scalablytyped" %%% "std" % "0.0-unknown-59e94f")
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"))
2 changes: 1 addition & 1 deletion tests/bigint/check-3/b/bigint/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/bigint/check-3/s/std/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "std"
version := "0.0-unknown-2d9f14"
scalaVersion := "3.2.0"
version := "0.0-unknown-59e94f"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
2 changes: 1 addition & 1 deletion tests/bigint/check-3/s/std/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
6 changes: 3 additions & 3 deletions tests/chart.js/check-3/c/chart_dot_js/build.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
organization := "org.scalablytyped"
name := "chart_dot_js"
version := "0.0-unknown-78f43e"
scalaVersion := "3.2.0"
version := "0.0-unknown-d53b41"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2",
"org.scalablytyped" %%% "std" % "0.0-unknown-c56b98")
"org.scalablytyped" %%% "std" % "0.0-unknown-6c7482")
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 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/chart.js/check-3/s/std/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "std"
version := "0.0-unknown-c56b98"
scalaVersion := "3.2.0"
version := "0.0-unknown-6c7482"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
2 changes: 1 addition & 1 deletion tests/chart.js/check-3/s/std/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
6 changes: 3 additions & 3 deletions tests/cldrjs/check-3/c/cldrjs/build.sbt
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
organization := "org.scalablytyped"
name := "cldrjs"
version := "0.4.4-6be784"
scalaVersion := "3.2.0"
version := "0.4.4-e291e6"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2",
"org.scalablytyped" %%% "std" % "0.0-unknown-43cef5")
"org.scalablytyped" %%% "std" % "0.0-unknown-474a0a")
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"))
2 changes: 1 addition & 1 deletion tests/cldrjs/check-3/c/cldrjs/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/cldrjs/check-3/s/std/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "std"
version := "0.0-unknown-43cef5"
scalaVersion := "3.2.0"
version := "0.0-unknown-474a0a"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
2 changes: 1 addition & 1 deletion tests/cldrjs/check-3/s/std/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
8 changes: 4 additions & 4 deletions tests/commander/check-3/c/commander/build.sbt
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
organization := "org.scalablytyped"
name := "commander"
version := "2.15.1-4a5052"
scalaVersion := "3.2.0"
version := "2.15.1-b8f268"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2",
"org.scalablytyped" %%% "node" % "0.0-unknown-654197",
"org.scalablytyped" %%% "std" % "0.0-unknown-065f9f")
"org.scalablytyped" %%% "node" % "0.0-unknown-c2c08f",
"org.scalablytyped" %%% "std" % "0.0-unknown-dec9a0")
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 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/commander/check-3/n/node/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "node"
version := "0.0-unknown-654197"
scalaVersion := "3.2.0"
version := "0.0-unknown-c2c08f"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
2 changes: 1 addition & 1 deletion tests/commander/check-3/n/node/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/commander/check-3/s/std/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "std"
version := "0.0-unknown-065f9f"
scalaVersion := "3.2.0"
version := "0.0-unknown-dec9a0"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
2 changes: 1 addition & 1 deletion tests/commander/check-3/s/std/project/build.properties
Original file line number Diff line number Diff line change
@@ -1 +1 @@
sbt.version=1.8.0
sbt.version=1.9.6
4 changes: 2 additions & 2 deletions tests/const-enum/check-3/c/const-enum/build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
organization := "org.scalablytyped"
name := "const-enum"
version := "0.0-unknown-ad93d4"
scalaVersion := "3.2.0"
version := "0.0-unknown-141fa0"
scalaVersion := "3.3.1"
enablePlugins(ScalaJSPlugin)
libraryDependencies ++= Seq(
"com.olvind" %%% "scalablytyped-runtime" % "2.4.2")
Expand Down
Loading

0 comments on commit 8a7338a

Please sign in to comment.