| 77 | }; |
| 78 | |
| 79 | const selectVersion = async ( |
| 80 | label: string, |
| 81 | availableVersions: string[], |
| 82 | initialValue: string | undefined |
| 83 | ) => { |
| 84 | const version = await select({ |
| 85 | message: `Select a version to update ${label}:`, |
| 86 | options: availableVersions.map((v) => ({ value: v, label: `v${v}` })), |
| 87 | initialValue, |
| 88 | maxItems: 10, |
| 89 | }); |
| 90 | |
| 91 | if (isCancel(version)) { |
| 92 | cancel("Operation cancelled."); |
| 93 | process.exit(0); |
| 94 | } |
| 95 | |
| 96 | return version.toString(); |
| 97 | }; |
| 98 | |
| 99 | const getDiff = ( |
| 100 | from: { version: string; files: string[] }, |