axum 0.6 and friends 🎉 (#1570)

* changelog

* bump versions

* reorder changelogs a bit

* Apply suggestions from code review

Co-authored-by: Jonas Platte <[email protected]>

* Expand fallback inheritance

* Reword tsr

* Mention `parse-body-based-on-content-type` example

Co-authored-by: Jonas Platte <[email protected]>
This commit is contained in:
David Pedersen
2022-11-25 12:29:58 +00:00
committed by GitHub
co-authored by Jonas Platte
parent 0b26411f39
commit 1b6780cf6c
10 changed files with 541 additions and 21 deletions
+41
View File
@@ -9,6 +9,45 @@ and this project adheres to [Semantic Versioning].
- None.
# 0.4.0 (25. November, 2022)
- **added:** Add `RouterExt::route_with_tsr` for adding routes with an
additional "trailing slash redirect" route ([#1119])
- **added:** Support chaining handlers with `HandlerCallWithExtractors::or` ([#1170])
- **added:** Add Protocol Buffer extractor and response ([#1239])
- **added:** Add `Either*` types for combining extractors and responses into a
single type ([#1263])
- **added:** `WithRejection` extractor for customizing other extractors' rejections ([#1262])
- **added:** Add sync constructors to `CookieJar`, `PrivateCookieJar`, and
`SignedCookieJar` so they're easier to use in custom middleware
- **changed:** For methods that accept some `S: Service`, the bounds have been
relaxed so the return type can be any type that implements `IntoResponse` rather than being a
literal `Response`
- **change:** axum-extra's MSRV is now 1.60 ([#1239])
- **breaking:** `Form` has a new rejection type ([#1496])
- **breaking:** `Query` has a new rejection type ([#1496])
- **breaking:** `Resource::nest` and `Resource::nest_collection` have been
removed. You can instead convert the `Resource` into a `Router` and
add additional routes as necessary ([#1086])
- **breaking:** `SignedCookieJar` and `PrivateCookieJar` now extracts the keys
from the router's state, rather than extensions
- **breaking:** `Resource` has a new `S` type param which represents the state ([#1155])
- **breaking:** `RouterExt::route_with_tsr` now only accepts `MethodRouter`s ([#1155])
- **added:** `RouterExt::route_service_with_tsr` for routing to any `Service` ([#1155])
[#1086]: https://github.com/tokio-rs/axum/pull/1086
[#1119]: https://github.com/tokio-rs/axum/pull/1119
[#1155]: https://github.com/tokio-rs/axum/pull/1155
[#1170]: https://github.com/tokio-rs/axum/pull/1170
[#1214]: https://github.com/tokio-rs/axum/pull/1214
[#1239]: https://github.com/tokio-rs/axum/pull/1239
[#1262]: https://github.com/tokio-rs/axum/pull/1262
[#1263]: https://github.com/tokio-rs/axum/pull/1263
[#1496]: https://github.com/tokio-rs/axum/pull/1496
<details>
<summary>0.4.0 Pre-Releases</summary>
# 0.4.0-rc.3 (19. November, 2022)
- **breaking:** Depend axum 0.6.0-rc.5 and axum-macros 0.3.0-rc.3
@@ -53,6 +92,8 @@ and this project adheres to [Semantic Versioning].
[#1262]: https://github.com/tokio-rs/axum/pull/1262
[#1263]: https://github.com/tokio-rs/axum/pull/1263
</details>
# 0.3.7 (09. August, 2022)
- **fixed:** Depend on axum 0.5.15 which contains a fix for an accidental breaking change.
+4 -4
View File
@@ -9,7 +9,7 @@ license = "MIT"
name = "axum-extra"
readme = "README.md"
repository = "https://github.com/tokio-rs/axum"
version = "0.4.0-rc.3"
version = "0.4.0"
[features]
default = []
@@ -35,7 +35,7 @@ spa = ["tower-http/fs"]
typed-routing = ["dep:axum-macros", "dep:serde", "dep:percent-encoding"]
[dependencies]
axum = { path = "../axum", version = "=0.6.0-rc.5", default-features = false }
axum = { path = "../axum", version = "0.6.0", default-features = false }
bytes = "1.1.0"
futures-util = { version = "0.3", default-features = false, features = ["alloc"] }
http = "0.2"
@@ -48,7 +48,7 @@ tower-layer = "0.3"
tower-service = "0.3"
# optional dependencies
axum-macros = { path = "../axum-macros", version = "=0.3.0-rc.3", optional = true }
axum-macros = { path = "../axum-macros", version = "0.3.0", optional = true }
cookie = { package = "cookie", version = "0.16", features = ["percent-encode"], optional = true }
percent-encoding = { version = "2.1", optional = true }
prost = { version = "0.11", optional = true }
@@ -59,7 +59,7 @@ tokio-stream = { version = "0.1.9", optional = true }
tokio-util = { version = "0.7", optional = true }
[dev-dependencies]
axum = { path = "../axum", version = "=0.6.0-rc.5", features = ["headers"] }
axum = { path = "../axum", version = "0.6.0", features = ["headers"] }
futures = "0.3"
hyper = "0.14"
reqwest = { version = "0.11", default-features = false, features = ["json", "stream", "multipart"] }