( currentVersion: string, latest: string | null, )
| 3 | import { type UpdateTarget } from './types'; |
| 4 | |
| 5 | export function selectUpdateTarget( |
| 6 | currentVersion: string, |
| 7 | latest: string | null, |
| 8 | ): UpdateTarget | null { |
| 9 | if (latest === null) return null; |
| 10 | if (valid(currentVersion) === null || valid(latest) === null) return null; |
| 11 | if (!gt(latest, currentVersion)) return null; |
| 12 | return { version: latest }; |
| 13 | } |
no outgoing calls
no test coverage detected