(target: string, preid: string, existingCounters: number[])
| 42 | |
| 43 | /** Compute the next prerelease version: `<target>-<preid>.<max existing counter + 1>` */ |
| 44 | export function nextPrereleaseVersion(target: string, preid: string, existingCounters: number[]): string { |
| 45 | const next = existingCounters.length > 0 ? Math.max(...existingCounters) + 1 : 0; |
| 46 | return `${target}-${preid}.${next}`; |
| 47 | } |
| 48 | |
| 49 | /** Fetch all published versions of a package from the registry */ |
| 50 | export async function fetchPublishedVersions(name: string, registry?: string): Promise<string[]> { |
no outgoing calls
no test coverage detected
searching dependent graphs…