diff --git a/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/ConversionOptions.scala b/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/ConversionOptions.scala index 98721bc20f..05a3a2014f 100644 --- a/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/ConversionOptions.scala +++ b/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/ConversionOptions.scala @@ -2,7 +2,7 @@ package org.scalablytyped.converter package internal package importer -import io.circe.{Decoder, Encoder} +import io.circe013.{Decoder, Encoder} import org.scalablytyped.converter.internal.scalajs.{flavours, Name, Versions} import org.scalablytyped.converter.internal.ts.TsIdentLibrary @@ -42,7 +42,7 @@ case class ConversionOptions( } object ConversionOptions { - import io.circe.generic.auto._ + import io.circe013.generic.auto._ import jsonCodecs._ implicit val encodes: Encoder[ConversionOptions] = exportEncoder[ConversionOptions].instance diff --git a/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/ScalaJsBundlerDepFile.scala b/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/ScalaJsBundlerDepFile.scala index 259ffc92d9..56d9e81793 100644 --- a/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/ScalaJsBundlerDepFile.scala +++ b/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/ScalaJsBundlerDepFile.scala @@ -2,9 +2,9 @@ package org.scalablytyped.converter.internal package importer import org.scalablytyped.converter.internal.ts.TsIdentLibrary -import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} -import io.circe.{Decoder, Encoder} -import io.circe.syntax._ +import io.circe013.generic.semiauto.{deriveDecoder, deriveEncoder} +import io.circe013.{Decoder, Encoder} +import io.circe013.syntax._ object ScalaJsBundlerDepFile { diff --git a/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/documentation/Npmjs.scala b/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/documentation/Npmjs.scala index 370fb2a2f2..6130ff7df5 100644 --- a/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/documentation/Npmjs.scala +++ b/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/documentation/Npmjs.scala @@ -2,8 +2,8 @@ package org.scalablytyped.converter.internal package importer.documentation import com.olvind.logging.Logger -import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} -import io.circe.{Decoder, Encoder} +import io.circe013.generic.semiauto.{deriveDecoder, deriveEncoder} +import io.circe013.{Decoder, Encoder} import org.scalablytyped.converter.internal.importer.Source import scala.concurrent.Future diff --git a/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/jsonCodecs.scala b/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/jsonCodecs.scala index 566ecc9166..c93f261f38 100644 --- a/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/jsonCodecs.scala +++ b/importer-portable/src/main/scala/org/scalablytyped/converter/internal/importer/jsonCodecs.scala @@ -1,7 +1,7 @@ package org.scalablytyped.converter.internal package importer -import io.circe._ +import io.circe013._ import org.scalablytyped.converter.internal.ts._ import java.io.File @@ -34,7 +34,7 @@ object jsonCodecs { implicit val TsIdentLibraryKeyDec: KeyDecoder[TsIdentLibrary] = KeyDecoder[String].map(TsIdentLibrary.apply) implicit val TsIdentLibraryKeyEnc: KeyEncoder[TsIdentLibrary] = KeyEncoder[String].contramap[TsIdentLibrary](_.value) - import io.circe.generic.semiauto._ + import io.circe013.generic.semiauto._ implicit val CompilerOptionsEncoder: Encoder[CompilerOptions] = deriveEncoder[CompilerOptions] implicit val CompilerOptionsDecoder: Decoder[CompilerOptions] = deriveDecoder[CompilerOptions] diff --git a/importer/src/main/scala/org/scalablytyped/converter/internal/importer/Summary.scala b/importer/src/main/scala/org/scalablytyped/converter/internal/importer/Summary.scala index 513a231623..856930e086 100644 --- a/importer/src/main/scala/org/scalablytyped/converter/internal/importer/Summary.scala +++ b/importer/src/main/scala/org/scalablytyped/converter/internal/importer/Summary.scala @@ -2,9 +2,9 @@ package org.scalablytyped.converter.internal package importer import org.scalablytyped.converter.internal.ts.TsIdentLibrary -import io.circe.Decoder.Result -import io.circe.generic.semiauto.{deriveDecoder, deriveEncoder} -import io.circe.{Decoder, Encoder, HCursor} +import io.circe013.Decoder.Result +import io.circe013.generic.semiauto.{deriveDecoder, deriveEncoder} +import io.circe013.{Decoder, Encoder, HCursor} case class Summary( successes: Set[TsIdentLibrary], diff --git a/importer/src/test/scala/org/scalablytyped/converter/internal/importer/JsonTests.scala b/importer/src/test/scala/org/scalablytyped/converter/internal/importer/JsonTests.scala index 6abd66c6fc..fc46c74bcc 100644 --- a/importer/src/test/scala/org/scalablytyped/converter/internal/importer/JsonTests.scala +++ b/importer/src/test/scala/org/scalablytyped/converter/internal/importer/JsonTests.scala @@ -1,7 +1,6 @@ package org.scalablytyped.converter.internal.importer -import io.circe.parser._ -import org.scalablytyped.converter.internal.IArray +import org.scalablytyped.converter.internal.{IArray, Json} import org.scalablytyped.converter.internal.importer.jsonCodecs._ import org.scalablytyped.converter.internal.ts._ import org.scalatest.funsuite.AnyFunSuite @@ -56,7 +55,7 @@ class JsonTests extends AnyFunSuite { ), ), ) - assert(decode[TsConfig](content) === Right(expected)) + assert(Json[TsConfig](content) === Right(expected)) } test("notNeededPackages.json") { @@ -83,7 +82,7 @@ class JsonTests extends AnyFunSuite { ), ) - assert(decode[NotNeededPackages](content) === Right(expected)) + assert(Json[NotNeededPackages](content) === Right(expected)) } test("typings.json") { @@ -102,7 +101,7 @@ class JsonTests extends AnyFunSuite { true, ) - assert(decode[TypingsJson](content) === Right(expected)) + assert(Json[TypingsJson](content) === Right(expected)) } test("summary.json") { @@ -129,6 +128,6 @@ class JsonTests extends AnyFunSuite { Set(), ) - assert(decode[Summary](content) === Right(expected)) + assert(Json[Summary](content) === Right(expected)) } } diff --git a/importer/src/test/scala/org/scalablytyped/converter/internal/importer/ScalaJsBundlerDepTest.scala b/importer/src/test/scala/org/scalablytyped/converter/internal/importer/ScalaJsBundlerDepTest.scala index 18bc14038b..0e61873f5c 100644 --- a/importer/src/test/scala/org/scalablytyped/converter/internal/importer/ScalaJsBundlerDepTest.scala +++ b/importer/src/test/scala/org/scalablytyped/converter/internal/importer/ScalaJsBundlerDepTest.scala @@ -1,7 +1,7 @@ package org.scalablytyped.converter.internal.importer -import io.circe.parser._ -import io.circe.syntax._ +import io.circe013.syntax._ +import org.scalablytyped.converter.internal.Json import org.scalablytyped.converter.internal.importer.ScalaJsBundlerDepFile.NpmDependencies import org.scalatest.funsuite.AnyFunSuite @@ -19,10 +19,10 @@ class ScalaJsBundlerDepTest extends AnyFunSuite { val expected = NpmDependencies(deps, deps, Nil, Nil) test("parses existing") { - assert(decode[ScalaJsBundlerDepFile.NpmDependencies](content) === Right(expected)) + assert(Json[ScalaJsBundlerDepFile.NpmDependencies](content) === Right(expected)) } test("roundtrips") { - assert(decode[ScalaJsBundlerDepFile.NpmDependencies](expected.asJson.spaces4) === Right(expected)) + assert(Json[ScalaJsBundlerDepFile.NpmDependencies](expected.asJson.spaces4) === Right(expected)) } } diff --git a/project/Deps.scala b/project/Deps.scala index b05d3f9b0b..8043d889fa 100644 --- a/project/Deps.scala +++ b/project/Deps.scala @@ -13,10 +13,9 @@ object Deps { val awssdkS3 = "software.amazon.awssdk" % "s3" % "2.15.28" val java8Compat = "org.scala-lang.modules" %% "scala-java8-compat" % "0.9.1" - val circe: List[ModuleID] = { - List( - "io.circe" %% s"circe-generic" % "0.11.2", - "io.circe" %% s"circe-jackson29" % "0.11.2", + val circe: Seq[ModuleID] = + Seq( + "org.scalablytyped.circe013" %% "circe-generic" % "0.13.0-shaded-2", + "org.scalablytyped.circe013" %% "circe-jackson29" % "0.13.0-shaded-2" ) - } } diff --git a/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/ImportTypings.scala b/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/ImportTypings.scala index 6b167a7f05..0fd149e807 100644 --- a/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/ImportTypings.scala +++ b/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/ImportTypings.scala @@ -4,7 +4,7 @@ package internal import java.nio.file.Path import com.olvind.logging.Logger -import io.circe.{Decoder, Encoder} +import io.circe013.{Decoder, Encoder} import org.scalablytyped.converter.internal.importer._ import org.scalablytyped.converter.internal.importer.build.{Compiler, IvyLayout, PublishedSbtProject} import org.scalablytyped.converter.internal.importer.documentation.Npmjs @@ -29,7 +29,7 @@ object ImportTypings { } object Input { - import io.circe.generic.auto._ + import io.circe013.generic.auto._ import jsonCodecs._ implicit val InputEncoder: Encoder[Input] = exportEncoder[Input].instance @@ -48,7 +48,7 @@ object ImportTypings { } object Output { - import io.circe.generic.auto._ + import io.circe013.generic.auto._ import jsonCodecs._ implicit val OutputEncoder: Encoder[Output] = exportEncoder[Output].instance implicit val OutputDecoder: Decoder[Output] = exportDecoder[Output].instance diff --git a/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/ImportTypingsGenSources.scala b/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/ImportTypingsGenSources.scala index 3d5fb71bc3..96d6ef36b1 100644 --- a/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/ImportTypingsGenSources.scala +++ b/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/ImportTypingsGenSources.scala @@ -6,7 +6,7 @@ import java.nio.file.Path import com.olvind.logging import com.olvind.logging.{LogLevel, Logger} -import io.circe.{Decoder, Encoder} +import io.circe013.{Decoder, Encoder} import org.scalablytyped.converter.internal.importer.Source.TsLibSource import org.scalablytyped.converter.internal.importer._ import org.scalablytyped.converter.internal.maps._ @@ -30,7 +30,7 @@ object ImportTypingsGenSources { ) object Input { - import io.circe.generic.auto._ + import io.circe013.generic.auto._ import jsonCodecs._ implicit val ConfigEncoder: Encoder[Input] = exportEncoder[Input].instance diff --git a/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/RunCacheKey.scala b/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/RunCacheKey.scala index 6c73d67e96..bb9c4ab4f4 100644 --- a/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/RunCacheKey.scala +++ b/sbt-converter/src/main/scala/org/scalablytyped/converter/internal/RunCacheKey.scala @@ -1,7 +1,7 @@ package org.scalablytyped.converter.internal import com.olvind.logging.Formatter -import io.circe.syntax._ +import io.circe013.syntax._ case class RunCacheKey private (digest: Digest) { def path(cacheDir: os.Path): os.Path = cacheDir / "runs" / s"${digest.hexString}.json" diff --git a/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/Dep.scala b/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/Dep.scala index 9a4a5fc653..99953a3f5c 100644 --- a/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/Dep.scala +++ b/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/Dep.scala @@ -1,6 +1,6 @@ package org.scalablytyped.converter.internal.scalajs -import io.circe.{Decoder, Encoder} +import io.circe013.{Decoder, Encoder} import org.scalablytyped.converter.internal.stringUtils.quote import scala.xml.Elem @@ -75,6 +75,6 @@ object Dep { override def version: String = dep.version } - implicit val DepDecoder: Decoder[Dep] = io.circe.generic.semiauto.deriveDecoder[Dep] - implicit val DepEncoder: Encoder[Dep] = io.circe.generic.semiauto.deriveEncoder[Dep] + implicit val DepDecoder: Decoder[Dep] = io.circe013.generic.semiauto.deriveDecoder[Dep] + implicit val DepEncoder: Encoder[Dep] = io.circe013.generic.semiauto.deriveEncoder[Dep] } diff --git a/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/flavours/SlinkyTagsLoader.scala b/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/flavours/SlinkyTagsLoader.scala index 6f017ec18b..7655b0101f 100644 --- a/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/flavours/SlinkyTagsLoader.scala +++ b/scalajs/src/main/scala/org/scalablytyped/converter/internal/scalajs/flavours/SlinkyTagsLoader.scala @@ -2,7 +2,7 @@ package org.scalablytyped.converter.internal package scalajs package flavours -import io.circe.Decoder +import io.circe013.Decoder import org.scalablytyped.converter.internal.maps._ import org.scalablytyped.converter.internal.scalajs.QualifiedName.StdNames import org.scalablytyped.converter.internal.scalajs.flavours.SlinkyGenComponents.names.{ @@ -159,9 +159,9 @@ object SlinkyTagsLoader { /* extract what we need from the slinky json files */ type AttrsByTag = Map[TagName.Concrete, (Tag, Set[String])] object AttrsByTag { - implicit val TagDecoder: Decoder[Tag] = io.circe.generic.semiauto.deriveDecoder[Tag] - implicit val AttributeDecoder: Decoder[Attribute] = io.circe.generic.semiauto.deriveDecoder[Attribute] - implicit val TagsModelDecoder: Decoder[TagsModel] = io.circe.generic.semiauto.deriveDecoder[TagsModel] + implicit val TagDecoder: Decoder[Tag] = io.circe013.generic.semiauto.deriveDecoder[Tag] + implicit val AttributeDecoder: Decoder[Attribute] = io.circe013.generic.semiauto.deriveDecoder[Attribute] + implicit val TagsModelDecoder: Decoder[TagsModel] = io.circe013.generic.semiauto.deriveDecoder[TagsModel] private def massage(model: TagsModel): AttrsByTag = model.tags.map { tag => diff --git a/utils/src/main/scala/org/scalablytyped/converter/internal/Json.scala b/utils/src/main/scala/org/scalablytyped/converter/internal/Json.scala index 8d22cc0fec..b6ba28c2be 100644 --- a/utils/src/main/scala/org/scalablytyped/converter/internal/Json.scala +++ b/utils/src/main/scala/org/scalablytyped/converter/internal/Json.scala @@ -4,8 +4,8 @@ import java.io.File import java.nio.file.{Files, Path} import cats.data.ValidatedNel -import io.circe._ -import io.circe.syntax._ +import io.circe013._ +import io.circe013.syntax._ import scala.io.Source import scala.util.control.NonFatal @@ -18,7 +18,7 @@ object Json { object CustomJacksonParser extends Parser { import com.fasterxml.jackson.core.{JsonFactory, JsonParser} import com.fasterxml.jackson.databind.ObjectMapper - import io.circe.jackson.CirceJsonModule + import io.circe013.jackson.CirceJsonModule // val Features = Set[JsonReadFeature]( // JsonReadFeature.ALLOW_JAVA_COMMENTS,