Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Fixed
- #1207: Zero-byte files are now supported in IPM modules
- #1209: Fix IPM installer failing on certain environments with (partially) installed older IPM versions
- #1212: Fix improper parsing of module versions with dashes in the pre-release string

## [0.10.8] - 2026-07-08

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ ClassMethod FromString(
set pComparator.Minor = $piece(pExpr,".",2)
set tEnd = $piece(pExpr,".",3,*)
set pComparator.Patch = $piece($piece(tEnd,"-"),"+") // Before -prerelease and/or +build
set pComparator.Prerelease = $piece($piece(tEnd,"-",2),"+") // After - and possibly before +build
set pComparator.Prerelease = $piece($piece(tEnd,"-",2,*),"+") // After - and possibly before +build
set pComparator.Build = $piece(tEnd,"+",2)

set tSC = pComparator.%ValidateObject()
Expand Down
12 changes: 12 additions & 0 deletions tests/unit_tests/Test/PM/Unit/SemVer/Expressions.cls
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,18 @@ Method TestPrerelease()
do ..AssertNotSatisfied("1.0.0-1.m1","1.0.0")
do ..AssertNotSatisfied("=1.0.0-1.m1","1.0.0")

// Prerelease identifiers containing hyphens must not be truncated at the second hyphen
do ..AssertSatisfied("1.0.0-alpha-1","1.0.0-alpha-1")
do ..AssertSatisfied("=1.0.0-alpha-1","1.0.0-alpha-1")
do ..AssertNotSatisfied("=1.0.0-alpha-1","1.0.0-alpha-2")
do ..AssertNotSatisfied("=1.0.0-alpha-1","1.0.0-alpha")
do ..AssertNotSatisfied("=1.0.0-alpha-1","1.0.0")
// Multiple hyphens and dot-separated segments with hyphens
do ..AssertSatisfied("=1.0.0-alpha-beta-gamma","1.0.0-alpha-beta-gamma")
do ..AssertNotSatisfied("=1.0.0-alpha-beta-gamma","1.0.0-alpha-beta")
do ..AssertSatisfied("=1.0.0-rc.1-final","1.0.0-rc.1-final")
do ..AssertNotSatisfied("=1.0.0-rc.1-final","1.0.0-rc.1")

// Issue #557: snapshots/prereleases shouldn't be considered as a lower version number
// Even though 1.5.0-beta.1 is technically within the 1.x range, it's a prerelease and should not be considered satisfiable.
// Similarly 1.1.5-beta.1 does not satisify 1.1.x. See https://github.com/npm/node-semver?tab=readme-ov-file#prerelease-tags
Expand Down
Loading