Closed julianhille closed 2 years ago
The documentation does state that a parse of '3.4.5-alpha+1.2' would result in the property of fullversion beeing the same string. https://github.com/booxmedialtd/ws-action-parse-semver#fullversion
'3.4.5-alpha+1.2'
But the parser crunched down to:
parseSemver = require('semver/functions/parse'); semVerString = parseSemver('3.4.5-alpha+1.2'); const parsedSemver = parseSemver(semVerString); console.log('this should be the fullversion:', parsedSemver.version);
results in: this should be the fullversion: 3.4.5-alpha
this should be the fullversion: 3.4.5-alpha
which is obviously missing the +1.2 Looking at the full semver object we might wanted to use the raw property instead:
+1.2
raw
console.log(parseSemver('3.4.5-alpha+1.2')); SemVer { options: {}, loose: false, includePrerelease: false, raw: '3.4.5-alpha+1.2', major: 3, minor: 4, patch: 5, prerelease: [ 'alpha' ], build: [ '1', '2' ], version: '3.4.5-alpha' })
Fixed in #18
The documentation does state that a parse of
'3.4.5-alpha+1.2'
would result in the property of fullversion beeing the same string. https://github.com/booxmedialtd/ws-action-parse-semver#fullversionBut the parser crunched down to:
results in:
this should be the fullversion: 3.4.5-alpha
which is obviously missing the
+1.2
Looking at the full semver object we might wanted to use theraw
property instead: