Skip to content
Open
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 @@ -148,7 +148,7 @@ lazy val root = project
.configure(baseSettings)
.aggregate(logging, core, phases, ts, scalajs, `importer-portable`, `sbt-converter`, importer, cli)

lazy val scala212 = "2.12.20"
lazy val scala212 = "2.13.17"
lazy val scala3 = "3.3.4"

lazy val baseSettings: Project => Project =
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.scalablytyped.converter.internal

import java.lang.Integer.{rotateLeft => rotl}
import scala.IterableOnce

/** Marker trait for types that implement stable hashing in their hashCode method.
*
Expand Down Expand Up @@ -305,7 +306,7 @@ object StableHash {
finalizeHash(h, n)
}

private def orderedHash(xs: TraversableOnce[Any], seed: Int): Int =
private def orderedHash(xs: IterableOnceIterableOnce[Any], seed: Int): Int =
if (xs.isEmpty) {
finalizeHash(seed, 0)
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object ScalablyTypedConverterGenSourcePlugin extends AutoPlugin {
},
Keys.libraryDependencies ++= {
val conversion = stConversionOptions.value
conversion.flavourImpl.dependencies.map(dep => Utils.asModuleID(dep.concrete(conversion.versions))).to[Seq]
conversion.flavourImpl.dependencies.map(dep => Utils.asModuleID(dep.concrete(conversion.versions))).to(Seq)
},
stMinimize := Selection.None,
stMinimizeKeep := Nil,
Expand Down Expand Up @@ -94,7 +94,7 @@ object ScalablyTypedConverterGenSourcePlugin extends AutoPlugin {
os.Path(globalCacheDir),
) match {
case Right(files) =>
val seqFiles = files.to[Seq]
val seqFiles = files.to(Seq)
Json.persist(cachedInputs)(input)
Json.persist(cachedOutputs)(seqFiles)
seqFiles
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ object ScalablyTypedPluginBase extends AutoPlugin {
enableScalaJsDefined = stEnableScalaJsDefined.value.map(TsIdentLibrary.apply),
stdLibs = SortedSet.empty ++ stStdlib.value,
expandTypeMappings = stInternalExpandTypeMappings.value.map(TsIdentLibrary.apply),
ignored = stIgnore.value.to[Set].sorted,
ignored = stIgnore.value.to(Set).sorted,
versions = versions,
organization = organization,
enableReactTreeShaking = stReactEnableTreeShaking.value.map(name => ImportName(TsIdentLibrary(name))),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.scalablytyped.converter.internal
package scalajs

import scala.IterableOnce
object TreeTraverse {
def collect[T <: AnyRef](tree: Tree)(extract: PartialFunction[Tree, T]): IArray[T] =
collectIArray(IArray(tree))(extract)
Expand All @@ -21,7 +22,7 @@ object TreeTraverse {
def rec(a: Any): Unit =
a match {
case x: Tree if x ne tree => go(extract, buf)(x)
case xs: TraversableOnce[_] => xs.foreach(rec)
case xs: IterableOnceIterableOnce[_] => xs.foreach(rec)
case xs: IArray[_] => xs.foreach(rec)
case p: Product => p.productIterator.foreach(rec)
case _ => ()
Expand All @@ -36,7 +37,7 @@ object TreeTraverse {
def rec(a: Any): Unit =
a match {
case x: AnyRef if x ne tree => foreach(x)(run)
case xs: TraversableOnce[_] => xs.foreach(rec)
case xs: IterableOnceIterableOnce[_] => xs.foreach(rec)
case xs: IArray[_] => xs.foreach(rec)
case p: Product => p.productIterator.foreach(rec)
case _ => ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ object Versions {
implicit val decodes: Decoder[Scala] = Decoder[String].map(Scala.apply)
}

val Scala212 = Scala("2.12.20")
val Scala212 = Scala("2.13.17")
val Scala213 = Scala("2.13.16")
val Scala3 = Scala("3.3.6")

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package org.scalablytyped.converter.internal
package ts

import scala.IterableOnce
object TsTreeTraverse {
def collect[T <: AnyRef](tree: TsTree)(extract: PartialFunction[TsTree, T]): IArray[T] =
collectIArray(IArray(tree))(extract)
Expand All @@ -22,7 +23,7 @@ object TsTreeTraverse {
a match {
case x: TsTree if x ne tree =>
go(extract, buf)(x)
case xs: TraversableOnce[_] =>
case xs: IterableOnceIterableOnce[_] =>
val it = xs.toIterator
while (it.hasNext) {
rec(it.next())
Expand Down
Loading