backend-manager 5.0.58 → 5.0.59
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli/commands/install.js +3 -22
package/package.json
CHANGED
|
@@ -5,7 +5,6 @@ const powertools = require('node-powertools');
|
|
|
5
5
|
const Npm = require('npm-api');
|
|
6
6
|
const jetpack = require('fs-jetpack');
|
|
7
7
|
const wonderfulVersion = require('wonderful-version');
|
|
8
|
-
const inquirer = require('inquirer');
|
|
9
8
|
|
|
10
9
|
class InstallCommand extends BaseCommand {
|
|
11
10
|
async execute(type) {
|
|
@@ -76,33 +75,15 @@ class InstallCommand extends BaseCommand {
|
|
|
76
75
|
return;
|
|
77
76
|
}
|
|
78
77
|
|
|
79
|
-
// Log
|
|
80
|
-
this.log(chalk.yellow('\
|
|
78
|
+
// Log and update each dependency
|
|
79
|
+
this.log(chalk.yellow('\nUpdating peer dependencies for backend-manager...'));
|
|
81
80
|
for (const dep of outdatedDeps) {
|
|
82
81
|
const majorWarning = dep.isMajor ? chalk.red(' (major update)') : '';
|
|
83
82
|
this.log(` ${chalk.bold(dep.name)}: ${dep.installed} → ${dep.required}${majorWarning}`);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
// Prompt user
|
|
87
|
-
const { shouldUpdate } = await inquirer.prompt([{
|
|
88
|
-
type: 'confirm',
|
|
89
|
-
name: 'shouldUpdate',
|
|
90
|
-
message: 'Update these dependencies now?',
|
|
91
|
-
default: true,
|
|
92
|
-
}]);
|
|
93
|
-
|
|
94
|
-
if (!shouldUpdate) {
|
|
95
|
-
this.log(chalk.yellow('\nSkipping dependency updates. The install may fail due to peer dependency conflicts.'));
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
// Update each dependency
|
|
100
|
-
for (const dep of outdatedDeps) {
|
|
101
|
-
this.log(chalk.cyan(`\nUpdating ${dep.name}...`));
|
|
102
83
|
await this.installPkg(dep.name, `@${dep.required}`);
|
|
103
84
|
}
|
|
104
85
|
|
|
105
|
-
this.log(chalk.green('
|
|
86
|
+
this.log(chalk.green('Peer dependencies updated successfully!\n'));
|
|
106
87
|
}
|
|
107
88
|
|
|
108
89
|
async getPackageInfo(packageName) {
|