Skip to content

Commit

Permalink
Merge pull request #74 from http4s/merge-0.25-20230105
Browse files Browse the repository at this point in the history
Merge 0.25 -> main, use http4s-1.0.0-M38
  • Loading branch information
rossabaker authored Jan 5, 2023
2 parents 731e2d9 + 5d6ffde commit ed97898
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 51 deletions.
42 changes: 4 additions & 38 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,13 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
scala: [2.12.17, 2.13.10, 3.2.1]
scala: [2.13.10, 3.2.1]
java: [temurin@8, temurin@11, temurin@17]
project: [rootJS, rootJVM, rootNative]
exclude:
- scala: 2.12.17
- scala: 2.13.10
java: temurin@11
- scala: 2.12.17
java: temurin@17
- scala: 3.2.1
java: temurin@11
- scala: 3.2.1
- scala: 2.13.10
java: temurin@17
- project: rootJS
java: temurin@11
Expand Down Expand Up @@ -172,7 +168,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest]
scala: [2.13.10]
scala: [3.2.1]
java: [temurin@8]
runs-on: ${{ matrix.os }}
steps:
Expand Down Expand Up @@ -241,36 +237,6 @@ jobs:
~/Library/Caches/Coursier/v1
key: ${{ runner.os }}-sbt-cache-v2-${{ hashFiles('**/*.sbt') }}-${{ hashFiles('project/build.properties') }}

- name: Download target directories (2.12.17, rootJS)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootJS

- name: Inflate target directories (2.12.17, rootJS)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.12.17, rootJVM)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootJVM

- name: Inflate target directories (2.12.17, rootJVM)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.12.17, rootNative)
uses: actions/download-artifact@v2
with:
name: target-${{ matrix.os }}-${{ matrix.java }}-2.12.17-rootNative

- name: Inflate target directories (2.12.17, rootNative)
run: |
tar xf targets.tar
rm targets.tar
- name: Download target directories (2.13.10, rootJS)
uses: actions/download-artifact@v2
with:
Expand Down
6 changes: 6 additions & 0 deletions .scala-steward.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
updates.ignore = [
# Inherit from series/0.24
{ groupId = "org.http4s", artifactId = "sbt-http4s-org" },
{ groupId = "org.scala-lang", artifactId = "scala3-library" },
{ groupId = "org.scala-sbt", artifactId = "sbt" }
]
9 changes: 4 additions & 5 deletions build.sbt
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
ThisBuild / tlBaseVersion := "0.25"
ThisBuild / tlBaseVersion := "1.0"
ThisBuild / developers := List(
tlGitHubDev("rossabaker", "Ross A. Baker")
)

val Scala213 = "2.13.10"
ThisBuild / crossScalaVersions := Seq("2.12.17", Scala213, "3.2.1")
ThisBuild / scalaVersion := Scala213
ThisBuild / crossScalaVersions := Seq(Scala213, "3.2.1")

lazy val root = tlCrossRootProject.aggregate(scalatags)

val http4sVersion = "0.23.17"
val http4sVersion = "1.0.0-M38"
val scalatagsVersion = "0.12.0"
val munitVersion = "1.0.0-M6"
val munitVersion = "1.0.0-M7"
val munitCatsEffectVersion = "2.0.0-M3"

lazy val scalatags = crossProject(JVMPlatform, JSPlatform, NativePlatform)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,15 @@ import org.http4s.Charset.`UTF-8`
import org.http4s.headers.`Content-Type`

trait ScalatagsInstances {
implicit def scalatagsEncoder[F[_], C <: Frag[_, String]](implicit
implicit def scalatagsEncoder[C <: Frag[_, String]](implicit
charset: Charset = `UTF-8`
): EntityEncoder[F, C] =
): EntityEncoder.Pure[C] =
contentEncoder(MediaType.text.html)

private def contentEncoder[F[_], C <: Frag[_, String]](
private def contentEncoder[C <: Frag[_, String]](
mediaType: MediaType
)(implicit charset: Charset): EntityEncoder[F, C] =
EntityEncoder
.stringEncoder[F]
)(implicit charset: Charset): EntityEncoder.Pure[C] =
EntityEncoder.stringEncoder
.contramap[C](content => content.render)
.withContentType(`Content-Type`(mediaType, charset))

Expand All @@ -44,8 +43,7 @@ trait ScalatagsInstances {
private def doctypeContentEncoder[F[_]](
mediaType: MediaType
)(implicit charset: Charset): EntityEncoder[F, doctype] =
EntityEncoder
.stringEncoder[F]
EntityEncoder.stringEncoder
.contramap[doctype](content => content.render)
.withContentType(`Content-Type`(mediaType, charset))
}

0 comments on commit ed97898

Please sign in to comment.