@4pm/cli 1.12.1-b → 1.12.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +8 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -32526,8 +32526,15 @@ function compareSemver(a, b2) {
|
|
|
32526
32526
|
}
|
|
32527
32527
|
return 0;
|
|
32528
32528
|
}
|
|
32529
|
+
function canonVersion(v2) {
|
|
32530
|
+
const s3 = v2.trim().replace(/^v/i, "").toLowerCase();
|
|
32531
|
+
const m2 = /^(\d+\.\d+\.\d+)(.*)$/.exec(s3);
|
|
32532
|
+
if (!m2) return s3;
|
|
32533
|
+
const suffix = m2[2].replace(/^[-+]/, "");
|
|
32534
|
+
return suffix ? `${m2[1]}-${suffix}` : m2[1];
|
|
32535
|
+
}
|
|
32529
32536
|
function shouldUpdateTo(current2, latest) {
|
|
32530
|
-
return current2 !== latest && compareSemver(current2, latest) <= 0;
|
|
32537
|
+
return canonVersion(current2) !== canonVersion(latest) && compareSemver(current2, latest) <= 0;
|
|
32531
32538
|
}
|
|
32532
32539
|
function runningInstallRoot() {
|
|
32533
32540
|
return dirname2(dirname2(fileURLToPath2(import.meta.url)));
|