Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor a bit #100

Merged
merged 13 commits into from
Jan 30, 2025
16 changes: 15 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Adds `Pointer::starts_with` and `Pointer::ends_with` for prefix and suffix matching.
- Adds new `ParseIndexError` variant to express the presence non-digit characters in the token.
- Adds `Token::is_next` for checking if a token represents the `-` character.
- Adds `ParseBufError`, returned as the `Err` variant of `PointerBuf::parse`, which includes the input `String` (from `Into::into`).
- Adds `InvalidEncoding` to represent the two possible encoding errors when decoding a token.
- Adds `diagnostic` mod, including:
- Adds `diagnotic::Diagnostic` trait to facilitate error reporting and
`miette` integration. All errors intended for usage with `assign::Assign` or
`resolve::Resolve` must implement this trait.
- Adds `"miette"` featureflag to enable `miette` integration for error reporting.

### Changed

Expand All @@ -24,11 +29,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- `Pointer::get` now accepts ranges and can produce `Pointer` segments as output (similar to
`slice::get`).
- `PointerBuf::parse` now returns `BufParseError` instead of `ParseError`.
- Adds field `position` to variants of `resolve::Error` and `assign::Error` to indicate the
token index of where the error occurred.
- Renames `ParseError::NoLeadingBackslash` to `ParseError::NoLeadingSlash`.

### Fixed

- Make validation of array indices conform to RFC 6901 in the presence of non-digit characters.

### Deprecated

- `assign::AssignError` renamed to `assign::Error`
- `resolve::ResolveError` renamed to `resolve::Error`
- `InvalidEncodingError` renamed to `EncodingError`

## [0.6.2] 2024-09-30

### Added
Expand Down
104 changes: 20 additions & 84 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ rust-version = "1.79.0"
version = "0.6.3"

[dependencies]
miette = { version = "7.2.0", optional = true, features = ["fancy"] }
miette = { version = "7.4.0", optional = true, features = ["fancy"] }
serde = { version = "1.0.203", optional = true, features = ["alloc"] }
serde_json = { version = "1.0.119", optional = true, features = ["alloc"] }
toml = { version = "0.8", optional = true }
Expand Down
Loading
Loading