| @@ -75,11 +75,17 @@ const parseStableTag = (tag: string): StableVersion | undefined => { · 74 unmodified lines |
| 75 | 75 | const [, major, minor, patch, prerelease] = match; |
| 76 | 76 | if (!major || !minor || !patch) return undefined; |
| 77 | 77 | |
| 78 | + const prereleaseIdentifiers = prerelease ? prerelease.split(".") : []; |
| 79 | + // Nightly tags also start with `v` and carry a `nightly.*` prerelease |
| 80 | + // identifier. They must not be considered stable candidates when resolving |
| 81 | + // the previous stable tag. |
| 82 | + if (prereleaseIdentifiers[0] === "nightly") return undefined; |
| 83 | + |
| 78 | 84 | return { |
| 79 | 85 | major: Number(major), |
| 80 | 86 | minor: Number(minor), |
| 81 | 87 | patch: Number(patch), |
| 82 | | − prerelease: prerelease ? prerelease.split(".") : [], |
| 88 | + prerelease: prereleaseIdentifiers, |
| 83 | 89 | }; |
| 84 | 90 | }; |
| 85 | 91 | |
| @@ -92,7 +98,9 @@ const compareNightlyVersions = (left: NightlyVersion, right: NightlyVersion): nu · 6 unmodified lines |
| 92 | 98 | }; |
| 93 | 99 | |
| 94 | 100 | const parseNightlyTag = (tag: string): NightlyVersion | undefined => { |
| 95 | | − const match = /^nightly-v(\d+)\.(\d+)\.(\d+)-nightly\.(\d{8})\.(\d+)$/.exec(tag); |
| 101 | + // Accept both the current `v<semver>` format and the legacy `nightly-v<semver>` |
| 102 | + // format so release note diffs keep working across the tag-format transition. |
| 103 | + const match = /^(?:nightly-)?v(\d+)\.(\d+)\.(\d+)-nightly\.(\d{8})\.(\d+)$/.exec(tag); |
| 96 | 104 | if (!match) return undefined; |
| 97 | 105 | |
| 98 | 106 | const [, major, minor, patch, date, runNumber] = match; |