(
packagesToUpdate: string[],
packageMaps: { [x: string]: { type: string; version: string } },
updatedDependencies: { [x: string]: any }
)
| 116 | } |
| 117 | |
| 118 | async function hasUserConfirmed( |
| 119 | packagesToUpdate: string[], |
| 120 | packageMaps: { [x: string]: { type: string; version: string } }, |
| 121 | updatedDependencies: { [x: string]: any } |
| 122 | ): Promise<boolean> { |
| 123 | // Inform the user of the dependencies that can be updated |
| 124 | console.log("\nNewer versions found for the following packages:"); |
| 125 | console.table( |
| 126 | packagesToUpdate.map((i) => ({ |
| 127 | name: i, |
| 128 | old: packageMaps[i]?.version, |
| 129 | new: updatedDependencies[i], |
| 130 | })) |
| 131 | ); |
| 132 | |
| 133 | // Ask the user if they want to update the dependencies |
| 134 | const { confirm } = await inquirer.prompt({ |
| 135 | type: "confirm", |
| 136 | name: "confirm", |
| 137 | message: "Do you want to update these packages in package.json and re-install dependencies?", |
| 138 | }); |
| 139 | |
| 140 | return confirm; |
| 141 | } |
no test coverage detected
searching dependent graphs…