semver/CHANGELOG.md
Louis Seubert ae2163188f fix: avoid infinite recursion when formatting ranges as short npm
TryFormat for the "ns" format returned false for any set that can
not be expressed as a caret/tilde range. The public ToString
routes through DefaultInterpolatedStringHandler, whose buffer-full
fallback re-enters ToString, causing an infinite loop / stack overflow.

For "ns", fall back to the full comparator ("n") form when the
compact form cannot represent the set, so the call always succeeds
for a representable range. A genuine buffer overflow still returns
false as before.

Add failing-then-passing tests.
2026-07-11 23:01:59 +02:00

683 B

Changelog

All notable changes to this project will be documented in this file.

This project adheres to Semantic Versioning.

1.0.0 - 2026-05-21

Added

  • This is the initial release of the library.

Unreleased

Added

Changed

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