(latest: string, current: string)
| 40 | } |
| 41 | |
| 42 | export function isNewerStableVersion(latest: string, current: string): boolean { |
| 43 | const latestVersion = parseStableVersion(latest) |
| 44 | const currentVersion = parseComparableCurrentVersion(current) |
| 45 | if (!latestVersion || !currentVersion) return false |
| 46 | |
| 47 | if (latestVersion.major !== currentVersion.major) return latestVersion.major > currentVersion.major |
| 48 | if (latestVersion.minor !== currentVersion.minor) return latestVersion.minor > currentVersion.minor |
| 49 | if (latestVersion.patch !== currentVersion.patch) return latestVersion.patch > currentVersion.patch |
| 50 | return currentVersion.prerelease |
| 51 | } |
no test coverage detected