npm / semver
semver
What changed in semver 7, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-17.
1 breaking1 new APIs and options7 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initsemver 79 changes
Breaking changes 1
Numeric segments after x-ranges are now rejected.
New APIs and options 1
Adds the truncate function.
Fixes and other changes 7
Includes prereleases in the lower bound of tilde ranges when includePrerelease is enabled.
Aligns caret range lower bounds when includePrerelease is enabled.
Fixes incrementing dotted prerelease identifiers.
Build metadata is stripped before comparator trimming.
Prerelease bounds are handled in subset calculations.
The CLI warns when defaulting to --inc=patch.
The CLI now passes options to semver.valid() for loose version validation.