(name: string, cwd?: string | URL)
| 333 | } |
| 334 | |
| 335 | export async function getRPackageVersion(name: string, cwd?: string | URL): Promise<string | undefined> { |
| 336 | const result = await executeRCommand(`cat(if (requireNamespace('${name}', quietly = TRUE)) as.character(utils::packageVersion('${name}')) else '')`, cwd); |
| 337 | return result || undefined; |
| 338 | } |
| 339 | |
| 340 | export function compareVersions(v1: string, v2: string): number { |
| 341 | const parts1 = v1.split('.').map(Number); |
nothing calls this directly
no test coverage detected