@releasekit/notes 0.29.1 → 0.30.1
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/{chunk-QHSLAQIS.js → chunk-3FFQJOP4.js} +14 -1
- package/dist/cli.js +1 -1
- package/dist/index.js +1 -1
- package/package.json +1 -1
|
@@ -2306,6 +2306,15 @@ function findCompoundTagSepPos(tag) {
|
|
|
2306
2306
|
}
|
|
2307
2307
|
return -1;
|
|
2308
2308
|
}
|
|
2309
|
+
function isVersionStartAt(tag, i) {
|
|
2310
|
+
const c = tag.charCodeAt(i);
|
|
2311
|
+
if (c >= 48 && c <= 57) return true;
|
|
2312
|
+
if (tag[i] === "v") {
|
|
2313
|
+
const n = tag.charCodeAt(i + 1);
|
|
2314
|
+
return n >= 48 && n <= 57;
|
|
2315
|
+
}
|
|
2316
|
+
return false;
|
|
2317
|
+
}
|
|
2309
2318
|
function generateCompareUrl(repoUrl, from, to, packageName) {
|
|
2310
2319
|
const isPackageSpecific = from.includes("@") && packageName && from.includes(packageName);
|
|
2311
2320
|
let fromVersion;
|
|
@@ -2315,8 +2324,12 @@ function generateCompareUrl(repoUrl, from, to, packageName) {
|
|
|
2315
2324
|
toVersion = `${packageName}@${to.startsWith("v") ? "" : "v"}${to}`;
|
|
2316
2325
|
} else {
|
|
2317
2326
|
const toClean = to.replace(/^v/, "");
|
|
2327
|
+
const atPos = from.lastIndexOf("@");
|
|
2318
2328
|
const dashVPos = from.lastIndexOf("-v");
|
|
2319
|
-
if (
|
|
2329
|
+
if (atPos > 0 && isVersionStartAt(from, atPos + 1)) {
|
|
2330
|
+
fromVersion = from;
|
|
2331
|
+
toVersion = `${from.slice(0, atPos + 1)}${from[atPos + 1] === "v" ? "v" : ""}${toClean}`;
|
|
2332
|
+
} else if (dashVPos > 0 && from.charCodeAt(dashVPos + 2) >= 48 && from.charCodeAt(dashVPos + 2) <= 57) {
|
|
2320
2333
|
fromVersion = from;
|
|
2321
2334
|
toVersion = `${from.slice(0, dashVPos + 1)}v${toClean}`;
|
|
2322
2335
|
} else {
|
package/dist/cli.js
CHANGED
package/dist/index.js
CHANGED
package/package.json
CHANGED