mirror of
https://github.com/robertwayne/axum-htmx
synced 2025-12-16 20:55:17 +01:00
3.2 KiB
3.2 KiB
Changelog
v0.8.1
- Revert an accidental breaking change introducting a nightly-only feature.
v0.8.0
- Change
HxLocation,HxPushUrl,HxRedirect, andHxReplaceUrlto takeStringinstead ofUrifor better flexibility and ease-of-use. (@skwee357)HxCurrentUrlremains unchanged in order to align with axum.
- Changed how
LocationOptionsis handled internally with regard to non-exhaustiveness, allowing external crates to use the functional record update syntax.
v0.7.0
- Support axum v0.8. (@kakalos12)
v0.6.0
- Added support for Vary headers in responses via the
VaryHxRequest,VaryHxTarget,VaryHxTrigger, andVaryHxTriggerNameresponders. (@imbolc) - Header names/values are now typed as
HeaderNameandHeaderValueinstead of&str. (@imbolc) HxErrornow implements source onerror::Error. (@imbolc)- Added
AutoVaryLayermiddleware to automatically manageVaryheaders when using corresponding extractors. The middleware is behind theauto-varyfeature. See this section of the README for more details.. (@imbolc)
v0.5.0
There are some several breaking changes in this release. Big thanks to @ItsEthra for their work in several PRs!
- All responders now take an
HxEventinstead of aString | HxEvent. When theserdeflag is enabled, it will expose additional data fields. HxResponseTriggeris now a simple struct containing anTriggerModeand aVec<HxEvent>. There are several methods to make constructing these easier:HxResponseTrigger::normal,HxResponseTrigger::after_settle, andHxResponseTrigger::after_swap.- The
HxCurrentUrlextractor now returns anOption<axum::http::Uri>instead of aString. If the Uri cannot be parsed, it will returnNone. - All Uri-related responders now impl
TryFrom<&str>. HxError::Serializationhas been renamed toHxError::Json.- 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
axumout for theaxum-core,async-trait, andhttpcrates.
v0.4.0
- Added support for all htmx 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 for the implementation work! (#5)
v0.3.1
- Rebuild docs with features enabled so
HxRequestGuardLayeris visible on docs.rs.
v0.3.0
HxRequestGuardLayernow redirects on failures instead of returning a 403. By default, it will redirect to "/", but you can specify a different route to redirect to withHxRequestGuardLayer::new("/your-route-here").
v0.2.0
- Added
HxRequestGuardLayer, allowing you to protect an entire router from non-htmx requests.
v0.1.0
- Initial release.