7.8 KiB
7.8 KiB
Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
[0.7.1] 2025-02-16
Changed
- Removes accidentally enabled default features
"miette"and"toml"
[0.7.0] 2025-02-13
Added
- Adds method
into_bufforBox<Pointer>andimpl From<PathBuf> for Box<Pointer>. - Adds unsafe associated methods
Pointer::new_uncheckedandPointerBuf::new_uncheckedfor external zero-cost construction. - Adds
Pointer::starts_withandPointer::ends_withfor prefix and suffix matching. - Adds new
ParseIndexErrorvariant to express the presence non-digit characters in the token. - Adds
Token::is_nextfor checking if a token represents the-character. - Adds
InvalidEncodingto represent the two possible encoding errors when decoding a token. - Adds
diagnotic::Diagnostictrait to facilitate error reporting andmietteintegration. All errors intended for usage withassign::Assignorresolve::Resolvemust implement this trait. - Adds
diagnostic::Report<T>to capture the input forPointerBuf::parseand to facilitatemietteintegration for all errors. - Adds
"miette"feature flag to enablemietteintegration for error reporting.
Changed
Pointer::getnow accepts ranges and can producePointersegments as output (similar toslice::get).- Bumps minimum Rust version to 1.79.
PointerBuf::parsenow returnsRichParseError, an alias toReport<ParseError>which contains the allocated string as well as the error. UseReport::originalfor matches or `Report::- Renames
ParseError::NoLeadingBackslashtoParseError::NoLeadingSlash(sorry for the churn, I spaced hard - @chanced). - Adds field
positionto variants ofresolve::Errorandassign::Errorto indicate the token index of where the error occurred. - Renames
ParseError::is_no_leading_backslashtoParseError::is_no_leading_slash. - Renames
assign::AssignErrortoassign::Error - Renames
resolve::ResolveErrortoresolve::Error - Renames
InvalidEncodingErrortoEncodingError
Fixed
- Make validation of array indices conform to RFC 6901 in the presence of non-digit characters.
Deprecated
ParseError::is_no_leading_backslashrenamed toParseError::is_no_leading_slash.assign::AssignErrorrenamed toassign::Errorresolve::ResolveErrorrenamed toresolve::ErrorInvalidEncodingErrorrenamed toEncodingError
[0.6.2] 2024-09-30
Added
- Adds methods
lenandis_emptytoPointer
[0.6.1] 2024-09-26
Added
- Adds fluid methods
with_trailing_token,with_leading_token,concattoPointer.
[0.6.0] - 2024-08-06
Fixed
Token::to_indexnow fails if the token contains leading zeros, as mandated by the RFC.
Changed
ParseIndexErroris now an enum to reflect the new failure mode when parsing indices.
[0.5.1]
Changed
- README tweak.
[0.5.0]
This is a breaking release including:
Added
- New slice type
Pointerthat enables zero-copy usage patterns - New const constructor
const fn Pointer::from_staticfor compile-time allocatedPointers - Zero-allocation
Pointer::rootsingleton pointer - Quickcheck-based testing
- New methods:
Pointer::split_front,Pointer::split_back,Pointer::parent,Pointer::strip_suffix - Implemented
DisplayandDebugforParseError - Adds
Pointer::split_atwhich utilizes character offsets to split a pointer at a separator - Adds specific error types
ParseError,ResolveError,AssignError
Changed
- JSON Pointers with leading
"#"are no longer accepted. Previously, the erroneous leading hashtag was allowed during parsing but discarded. Assign,Resolve,ResolveMut,Deleteall now use associated typesValueandError, allowing for more impls other than JSON- Debug implementation now preserves type information (e.g. prints
PathBuf("/foo/bar")instead of"/foo/bar") -Displayremains the same - Original
Pointertype renamed toPointerBuf - Error types now use character
offsetindexing instead of owned copies ofPointerandToken. Pointer::rootis nowPointerBuf::newPointer::newis nowPointerBuf::from_tokens(and takes anIntoIteratorargument - arrays still work)Pointer::unionis nowPointerBuf::intersectionTokentype has been simplified and is now by default a borrowed type (useToken::to_ownedorToken::into_ownedto make it owned)Assign::assignnow returnsResult<Option<Assign::Value>, AssignError>, whereOption<Assign::Value>is the replaced value
Fixed
- Fixes #28:
Pointer::unionis misleadingly named
Removed
- Removes
Assignment - Removes
MaybePointer - Removes
Error - Removes
impl Deref<Target=&str>fromPointer - Removes optional dependencies of
url,fluent-urianduniresidas well as theTryFromimplementations for their respective types - Removed
Token::as_keyandToken::as_str- useToken::decoded().as_ref()to achieve the same effect - Several redundant or error-prone trait implementations were removed from
Token
[0.4.7] 2024-03-18
- Fixes issue with
pop_fronton a token with an empty string leaving the pointer in an invalid state. #25 by @wngr - Fixes issue with
pop_backon a token with an empty string. #26 by @asmello
[0.4.6] 2024-03-24
- Fixes
Pointer::lastpanicking for empty/root pointers #23 by @wngr
[0.4.5] 2024-02-23
Fixed
- Fixes issue with
Pointer::push_backthat does not allow for empty strings to be appended as tokens. #21 fixed by @wngr
[0.4.3] 2023-08-20
Added
- Adds
parsemethod toPointerwhich calls the currently existingFromStrimpl
[0.4.2] 2023-06-23
Added
- implements
IntoIteratorfor&Pointer
[0.4.1] 2023-06-21
Added
- implements
Borrow<[u8]>andAsRef<[u8]>forPointer
[0.4.0] 2023-05-31
Added
- Adds
CHANGELOG.mdwhich will be better upkept moving forward. - Adds
MaybePointerto assist with deserialization which should not fail fast.
Changed
Pointer::newnow accepts a generic list, so&["example"]can be replaced by["example"]. For untyped, empty slices (i.e.Pointer::new(&[])), usePointer::default().stdis now enabled by default.
Removed
- Removes optional
MalformedPointerErrorfromPointer.
[0.3.6] 2023-05-23
Changed
- Adds quotes around
Pointerdebug output (#11)
Fixed
- Adds missing
impl std::error::ErrorforError,NotFoundError,MalformedError - Fixes build for
stdfeature flag
[0.3.4] 2023-05-11
Added
- Adds feature flag
fluent-uriforFrom<fluent_uri::Uri<_>impl (#3)
[0.2.0] 2023-02-24
Changed
stdis now optional- Adds feature flags
"uniresid","url"to enable implementingFrom<Uri>,From<Url>(respectively).
Removed
- Removes
Cargo.lock - Makes
uniresidandurioptional
[0.1.0] - 2022-06-12
Fixed
- Fixes root pointer representation
""rather than the erroneous"/" - Fixes an issue where encoded tokens were not being resolved properly