From 1add28725345c83e7a89a561a398c93166fc2e82 Mon Sep 17 00:00:00 2001 From: Pierre Ricadat Date: Sat, 7 Aug 2021 16:13:58 +0900 Subject: [PATCH] Upgrade http4s (#1001) * Upgrade http4s * Simplify --- .../http4s/src/main/scala/caliban/Http4sAdapter.scala | 8 ++++---- build.sbt | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/adapters/http4s/src/main/scala/caliban/Http4sAdapter.scala b/adapters/http4s/src/main/scala/caliban/Http4sAdapter.scala index 2b76217a4..5a22f9f0e 100644 --- a/adapters/http4s/src/main/scala/caliban/Http4sAdapter.scala +++ b/adapters/http4s/src/main/scala/caliban/Http4sAdapter.scala @@ -12,7 +12,7 @@ import cats.effect.kernel.Async import cats.effect.std.{ Dispatcher, Queue => CatsQueue } import cats.~> import fs2.{ Pipe, Stream } -import fs2.text.utf8Decode +import fs2.text.utf8 import fs2.io.file.Files import io.circe.Decoder.Result import io.circe.{ DecodingFailure, Json } @@ -139,7 +139,7 @@ object Http4sAdapter { random.nextUUID.flatMap { uuid => val path = rootUploadPath.resolve(uuid.toString) p.body - .through(Files[RIO[R, *]].writeAll(path)) + .through(Files[RIO[R, *]].writeAll(fs2.io.file.Path.fromNioPath(path))) .compile .drain .as((n, path.toFile -> p)) @@ -192,7 +192,7 @@ object Http4sAdapter { val optOperations = m.parts.find(_.name.contains("operations")).traverse { _.body - .through(utf8Decode) + .through(utf8.decode) .compile .foldMonoid .flatMap(body => Task.fromEither(parseGraphQLRequest(body))) @@ -202,7 +202,7 @@ object Http4sAdapter { val optMap = m.parts.find(_.name.contains("map")).traverse { _.body - .through(utf8Decode) + .through(utf8.decode) .compile .foldMonoid .flatMap { body => diff --git a/build.sbt b/build.sbt index 295f845fb..ba8351634 100644 --- a/build.sbt +++ b/build.sbt @@ -10,7 +10,7 @@ val akkaVersion = "2.6.15" val catsEffect2Version = "2.5.3" val catsEffect3Version = "3.2.2" val circeVersion = "0.14.1" -val http4sVersion = "0.23.0" +val http4sVersion = "0.23.1" val laminextVersion = "0.13.10" val magnoliaVersion = "0.17.0" val mercatorVersion = "0.2.1"