|
9 | 9 | * Fixes failed package publishing |
10 | 10 | */ |
11 | 11 | import { join } from 'path'; |
12 | | -import { readFileSync, writeFileSync } from 'fs-extra'; |
13 | | -import inquirer from 'inquirer'; |
| 12 | +import { readFileSync, writeFileSync } from 'fs'; |
| 13 | +import { rawlist } from '@inquirer/prompts'; |
14 | 14 | import textTable from 'text-table'; |
15 | 15 | import stringWidth from 'string-width'; |
16 | 16 | import chalk from 'chalk'; |
17 | 17 |
|
18 | 18 | import { |
19 | 19 | loadWorkspacePackages, |
20 | 20 | resolveWorkspaceConfig, |
21 | | -} from '../utils/workspace'; |
22 | | -import { fetchPackageVersion } from '../utils/npm'; |
23 | | -import { logger } from '../utils/logger'; |
24 | | -import { publishPackage } from '../utils/npm'; |
25 | | -import { removeGitHeadField } from '../utils/npm'; |
| 21 | +} from '../utils/workspace.js'; |
| 22 | +import { fetchPackageVersion } from '../utils/npm.js'; |
| 23 | +import { logger } from '../utils/logger.js'; |
| 24 | +import { publishPackage } from '../utils/npm.js'; |
| 25 | +import { removeGitHeadField } from '../utils/npm.js'; |
26 | 26 |
|
27 | | -import type { PatchOptions, PackageWithRemoteInfo } from '../types'; |
| 27 | +import type { PatchOptions, PackageWithRemoteInfo } from '../types.js'; |
28 | 28 |
|
29 | 29 | /** |
30 | 30 | * Formats the release status table |
@@ -128,14 +128,10 @@ export async function patch(options: PatchOptions = {}): Promise<void> { |
128 | 128 | console.log(); |
129 | 129 |
|
130 | 130 | // Confirm patch operation |
131 | | - const { confirm } = await inquirer.prompt([ |
132 | | - { |
133 | | - name: 'confirm', |
134 | | - message: 'Continue to patch?', |
135 | | - type: 'list', |
136 | | - choices: ['No', 'Yes'], |
137 | | - }, |
138 | | - ]); |
| 131 | + const confirm = await rawlist({ |
| 132 | + message: 'Continue to patch?', |
| 133 | + choices: ['No', 'Yes'], |
| 134 | + }); |
139 | 135 |
|
140 | 136 | if (confirm !== 'Yes') { |
141 | 137 | logger.info('Patch cancelled.'); |
|
0 commit comments