(a: string, b: string)
| 19 | } from "./utils.js"; |
| 20 | |
| 21 | const compareVersions = (a: string, b: string) => { |
| 22 | const [aMajor, aMinor, aPatch] = a.split(".").map(Number); |
| 23 | const [bMajor, bMinor, bPatch] = b.split(".").map(Number); |
| 24 | if (aMajor !== bMajor) { |
| 25 | return aMajor - bMajor; |
| 26 | } |
| 27 | if (aMinor !== bMinor) { |
| 28 | return aMinor - bMinor; |
| 29 | } |
| 30 | return aPatch - bPatch; |
| 31 | }; |
| 32 | |
| 33 | const createTemporaryDirectory = async (name: string) => { |
| 34 | const cwd = process.cwd(); |