Prerequisites
Steps to reproduce
Here are some examples of invalid semantic versioning version numbers that are not valid by semver.org suggested regex:
## Should work
[semver]'1'
[semver]'1.0.0'
[semver]'1.0.0-beta'
[semver]'1.0.0-beta1'
[semver]'1.0.0-beta.1'
## Should error but doesn't
[semver]'1.0.0-beta..1'
[semver]'1.0.0-beta...1'
## Should error and does
[semver]'1.0.0-beta!1'
This tells me [semver] isn't fully compliant with semantic versioning v2.0.0.
Additional search tags:
SemanticVersion, [SemanticVersion]
System.Management.Automation.SemanticVersion, [System.Management.Automation.SemanticVersion]
Expected behavior
Follow semver specification. Throw an error on non-valid version numbers. Like with [semver]'1.0.0-beta!1' which gives:
InvalidArgument: Cannot convert value "1.0.0-beta!1" to type "System.Management.Automation.SemanticVersion". Error: "The input string '' was not in a correct format."
Actual behavior
PS > [semver]'1.0.0-beta...1'
Major Minor Patch PreReleaseLabel BuildLabel
----- ----- ----- --------------- ----------
1 0 0 beta...1
PS >
Error details
No response
Environment data
- PowerShell v7.4.1 x64
- Windows 11 23H2 x64
Visuals
No response
Prerequisites
Steps to reproduce
Here are some examples of invalid semantic versioning version numbers that are not valid by semver.org suggested regex:
This tells me
[semver]isn't fully compliant with semantic versioning v2.0.0.Additional search tags:
SemanticVersion,[SemanticVersion]System.Management.Automation.SemanticVersion,[System.Management.Automation.SemanticVersion]Expected behavior
Follow semver specification. Throw an error on non-valid version numbers. Like with
[semver]'1.0.0-beta!1'which gives:InvalidArgument: Cannot convert value "1.0.0-beta!1" to type "System.Management.Automation.SemanticVersion". Error: "The input string '' was not in a correct format."Actual behavior
Error details
No response
Environment data
Visuals
No response