Update CHANGELOG.md

This commit is contained in:
Rob Wagner 2024-06-24 18:07:29 -04:00
parent 1c4fa34f58
commit 0134afd384
No known key found for this signature in database
GPG key ID: 53CCB4497B15CF61

View file

@ -2,57 +2,39 @@
## v0.6.0
- Added support for Vary headers in responses via the `VaryHxRequest`, `VaryHxTarget`, `VaryHxTrigger`, and `VaryHxTriggerName` responders. [@imbolc](https://github.com/imbolc)
- Header names/values are now typed as `HeaderName` and `HeaderValue` instead of
`&str`. [@imbolc](https://github.com/imbolc)
- `HxError` now implements source on `error::Error`. [@imbolc](https://github.com/imbolc)
- Added support for Vary headers in responses via the `VaryHxRequest`, `VaryHxTarget`, `VaryHxTrigger`, and `VaryHxTriggerName` responders. _([@imbolc](https://github.com/imbolc))_
- Header names/values are now typed as `HeaderName` and `HeaderValue` instead of `&str`. _([@imbolc](https://github.com/imbolc))_
- `HxError` now implements source on `error::Error`. _([@imbolc](https://github.com/imbolc))_
- Added `Vary` responders and a middleware to automatically manage `Vary` headers when using corresponding extractors. [See this section of the README for more details.](https://github.com/robertwayne/axum-htmx?tab=readme-ov-file#vary-responders). _([@imbolc](https://github.com/imbolc))_
## v0.5.0
There are some several breaking changes in this release. Big thanks to
[@ItsEthra](https://github.com/ItsEthra) for their work in several PRs!
There are some several breaking changes in this release. Big thanks to [@ItsEthra](https://github.com/ItsEthra) for their work in several PRs!
- All responders now take an `HxEvent` instead of a `String | HxEvent`. When the
`serde` flag is enabled, it will expose additional data fields.
- `HxResponseTrigger` is now a simple struct containing an `TriggerMode` and a
`Vec<HxEvent>`. There are several methods to make constructing these easier:
`HxResponseTrigger::normal`,
`HxResponseTrigger::after_settle`, and
`HxResponseTrigger::after_swap`.
- The `HxCurrentUrl` extractor now returns an `Option<axum::http::Uri>` instead
of a `String`. If the Uri cannot be parsed, it will return `None`.
- All responders now take an `HxEvent` instead of a `String | HxEvent`. When the `serde` flag is enabled, it will expose additional data fields.
- `HxResponseTrigger` is now a simple struct containing an `TriggerMode` and a `Vec<HxEvent>`. There are several methods to make constructing these easier: `HxResponseTrigger::normal`, `HxResponseTrigger::after_settle`, and `HxResponseTrigger::after_swap`.
- The `HxCurrentUrl` extractor now returns an `Option<axum::http::Uri>` instead of a `String`. If the Uri cannot be parsed, it will return `None`.
- All Uri-related responders now impl `TryFrom<&str>`.
- `HxError::Serialization` has been renamed to `HxError::Json`.
- The `HxResponseTrigger*` header will not be added to the response if the event
list is empty.
- The `HxResponseTrigger*` header will not be added to the response if the event list is empty.
- Added feature flag badges and made additional updates to the docs.rs pages.
- Reduced dependency count / compile time by swapping `axum` out for the
`axum-core`, `async-trait`, and `http` crates.
- Reduced dependency count / compile time by swapping `axum` out for the `axum-core`, `async-trait`, and `http` crates.
## v0.4.0
- Added support for all [htmx response
headers](https://htmx.org/reference/#response_headers) via a type implementing
`IntoResponseParts`. These "responders" allow you to simply and safely apply the
HX-* headers to any of your responses. Thanks to
[@pfz4](https://github.com/pfz4) for the implementation work!
([#5](https://github.com/robertwayne/axum-htmx/pull/5))
- Added support for all [htmx response headers](https://htmx.org/reference/#response_headers) via a type implementing `IntoResponseParts`. These "responders" allow you to simply and safely apply the HX-* headers to any of your responses. Thanks to [@pfz4](https://github.com/pfz4) for the implementation work! ([#5](https://github.com/robertwayne/axum-htmx/pull/5))
## v0.3.1
- Rebuild docs with features enabled so `HxRequestGuardLayer` is visible on
docs.rs.
- Rebuild docs with features enabled so `HxRequestGuardLayer` is visible on docs.rs.
## v0.3.0
- `HxRequestGuardLayer` now redirects on failures instead of returning a 403. By
default, it will redirect to "/", but you can specify a different route to
redirect to with `HxRequestGuardLayer::new("/your-route-here")`.
- `HxRequestGuardLayer` now redirects on failures instead of returning a 403\. By default, it will redirect to "/", but you can specify a different route to redirect to with `HxRequestGuardLayer::new("/your-route-here")`.
## v0.2.0
- Added `HxRequestGuardLayer`, allowing you to protect an entire router from
non-htmx requests.
- Added `HxRequestGuardLayer`, allowing you to protect an entire router from non-htmx requests.
## v0.1.0