Previously SemanticVersion was a record struct whose ==/Equals/ GetHashCode were synthesized from all fields, so versions that differ only in build metadata were not equal. Range matching already used precedence (ignoring metadata), creating an inconsistency. Change the type to a plain readonly struct implementing IEquatable<SemanticVersion> and define ==/Equals/GetHashCode in terms of SemanticVersionComparer.Priority, so build metadata is ignored. The custom ToString already existed, so no display behaviour is lost. Add a failing-then-passing test.
30 lines
797 B
Markdown
30 lines
797 B
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
|
|
|
|
### Changed
|
|
|
|
- `SemanticVersion` `==`/`Equals`/`GetHashCode` now ignore build metadata, matching precedence comparison rules.
|
|
|
|
### 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
|