All checks were successful
default / dotnet-default-workflow (push) Successful in 56s
System.Text.Json requires custom converters to override ReadAsPropertyName/WriteAsPropertyName in order to serialize types used as dictionary keys. Add those overrides to both converters so SemanticVersion and SemanticVersionRange can round trip as Dictionary<TKey,TValue> keys. Add failing-then-passing tests for both key types.
37 lines
1.2 KiB
Markdown
37 lines
1.2 KiB
Markdown
# Changelog
|
|
|
|
All notable changes to this project will be documented in this file.
|
|
|
|
This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
|
|
## [1.0.0] - 2026-05-21
|
|
|
|
### Added
|
|
|
|
- This is the initial release of the library.
|
|
|
|
## [Unreleased]
|
|
|
|
### Added
|
|
|
|
- `SemanticVersion` and `SemanticVersionRange` can now be used as `System.Text.Json`
|
|
dictionary keys. The custom converters override `ReadAsPropertyName`/`WriteAsPropertyName`
|
|
so `Dictionary<TKey, TValue>` round-trips correctly.
|
|
|
|
### Changed
|
|
|
|
- `SemanticVersion` `==`/`Equals`/`GetHashCode` now ignore build metadata, matching precedence comparison rules.
|
|
- `SemanticVersionRange` equality (`==`, `Equals`, `GetHashCode`) is now structural and based
|
|
on the constraint sets, so ranges that parse to the same comparators compare as equal
|
|
(previously it was reference-sensitive on the backing array).
|
|
|
|
### Fixed
|
|
|
|
- Reject invalid SemVer identifiers when parsing versions.
|
|
- Range exact and non-equal comparators ignore build metadata when matching versions.
|
|
- Avoid infinite recursion when formatting ranges in the short npm (`ns`) form.
|
|
|
|
### Removed
|
|
|
|
[1.0.0]: https://code.geekeey.de/geekeey/semver/releases/tag/1.0.0
|
|
[Unreleased]: https://code.geekeey.de/geekeey/semver/compare/1.0.0...HEAD
|