( currentVersion: string, maxVersion: string, )
| 73 | * Check if a version is below a maximum requirement |
| 74 | */ |
| 75 | export function satisfiesMaxVersion( |
| 76 | currentVersion: string, |
| 77 | maxVersion: string, |
| 78 | ): boolean { |
| 79 | const current = parseVersion(currentVersion) |
| 80 | const max = parseVersion(maxVersion) |
| 81 | |
| 82 | if (!current || !max) return true |
| 83 | |
| 84 | return compareVersions(current, max) <= 0 |
| 85 | } |
| 86 | |
| 87 | /** |
| 88 | * Check if a version satisfies both min and max requirements |
no test coverage detected