(ref: string)
| 51 | // supplies the channel explicitly; this derivation runs only at finalize, on a |
| 52 | // real tag. |
| 53 | export function resolveChannel(ref: string): Channel { |
| 54 | if (isGA(ref)) return 'stable' |
| 55 | if (isBeta(ref)) return 'beta' |
| 56 | throw new Error( |
| 57 | `resolveChannel: "${ref}" is neither a GA (vX.Y.Z) nor a beta (vX.Y.Z-beta.N) tag` |
| 58 | ) |
| 59 | } |
| 60 | |
| 61 | // --- Pure core: range resolution ------------------------------------------ |
| 62 |
no test coverage detected