Skip to content

Commit

Permalink
Merge pull request #30 from tpolecat/topic/upgrades
Browse files Browse the repository at this point in the history
Upgrade to latest http4s, natchez, scala.js, and scala native releases
  • Loading branch information
mpilquist authored Jan 4, 2023
2 parents 28c6a57 + 6299450 commit f7b0b30
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ThisBuild / tlBaseVersion := "0.5"

val http4sVersion = "0.23.16"
val natchezVersion = "0.3.0-M2"
val http4sVersion = "0.23.17"
val natchezVersion = "0.3.0-M3"
val scala212Version = "2.12.17"
val scala213Version = "2.13.10"
val scala3Version = "3.2.1"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ trait EntryPointOps[F[_]] { outer =>
Kleisli { req =>
val kernelHeaders = req.headers.headers
.collect {
case header if isKernelHeader(header.name) => header.name.toString -> header.value
case header if isKernelHeader(header.name) => header.name -> header.value
}
.toMap

Expand Down Expand Up @@ -139,4 +139,4 @@ trait ToEntryPointOps {

}

object entrypoint extends ToEntryPointOps
object entrypoint extends ToEntryPointOps
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@ package natchez.http4s.syntax
import natchez.Kernel
import org.http4s.Headers
import org.http4s.Header
import org.typelevel.ci.CIString

trait KernelOps {

def self: Kernel

def toHttp4sHeaders: Headers =
Headers(self.toHeaders.map { case (k, v) => Header.Raw(CIString(k), v) } .toSeq)
Headers(self.toHeaders.map { case (k, v) => Header.Raw(k, v) } .toSeq)

}

Expand All @@ -30,7 +29,7 @@ trait KernelCompanionOps {
def self: Kernel.type

def fromHttp4sHeaders(headers: Headers): Kernel =
Kernel(headers.headers.map { h => h.name.toString -> h.value } .toMap)
Kernel(headers.headers.map(h => h.name -> h.value).toMap)

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class NatchezMiddlewareSuite extends InMemorySuite {

val expectedHistory = {
val requestKernel = Kernel(
Map("X-Custom-Header" -> "external", "X-Correlation-Id" -> "id-123")
Map(CustomHeaderName -> "external", CorrelationIdName -> "id-123")
)

val clientRequestTags = List(
Expand Down
4 changes: 2 additions & 2 deletions project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" % "0.10.3")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.4.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.3")
addSbtPlugin("com.timushev.sbt" % "sbt-updates" % "0.6.4")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.11.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.7")
addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.12.0")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.9")
addSbtPlugin("org.portable-scala" % "sbt-scala-native-crossproject" % "1.2.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.6")

0 comments on commit f7b0b30

Please sign in to comment.