(location: string | undefined)
| 207 | * `/releases/latest` → `…/releases/tag/v0.9.9`. Pure so it's unit-tested. |
| 208 | */ |
| 209 | export function parseLatestTagFromLocation(location: string | undefined): string | null { |
| 210 | if (!location) return null; |
| 211 | const m = /\/releases\/tag\/([^/?#]+)/.exec(location); |
| 212 | return m ? decodeURIComponent(m[1]!) : null; |
| 213 | } |
| 214 | |
| 215 | // --------------------------------------------------------------------------- |
| 216 | // Latest-version resolution (network) |
no test coverage detected