diff --git a/lexver.js b/lexver.js index d296850..c35e5a1 100644 --- a/lexver.js +++ b/lexver.js @@ -126,7 +126,9 @@ Lexver.parseVersion = function (fullVersion, _opts) { } // 1, 0 => 1, 0, 0, 0 - if (!_opts?._asPrefix) { + // Pad to 4 even for prefix parses when input has a release suffix — + // keeps parsePrefix(v) a true string-prefix of parseVersion(v). + if (!_opts?._asPrefix || rels.length) { for (; digits.length < 4; ) { digits.push('0'); } diff --git a/package-lock.json b/package-lock.json index 9f5667b..92529e1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "build-classifier", - "version": "1.0.2", + "version": "1.0.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "build-classifier", - "version": "1.0.2", + "version": "1.0.3", "license": "SEE LICENSE IN LICENSE" } } diff --git a/package.json b/package.json index 8744cb2..4f21266 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "build-classifier", - "version": "1.0.2", + "version": "1.0.3", "description": "Determine Host Target Triplet (Arch, Libc, OS, Vendor) from a filenames / download URL and uname / User-Agent strings.", "main": "index.js", "scripts": {