node-power-user 2.0.0 → 2.0.1
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/dist/cli.js +1 -1
- package/dist/commands/outdated.js +16 -3
- package/dist/commands/version.js +2 -0
- package/dist/index.js +1 -0
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -62,7 +62,7 @@ Main.prototype.process = async function (options) {
|
|
|
62
62
|
|
|
63
63
|
// Execute the command
|
|
64
64
|
const Command = require(commandFile);
|
|
65
|
-
await Command(options);
|
|
65
|
+
return await Command(options);
|
|
66
66
|
} catch (e) {
|
|
67
67
|
console.error(`Error executing command "${command}": ${e.message}`);
|
|
68
68
|
|
|
@@ -124,13 +124,26 @@ module.exports = async function (options) {
|
|
|
124
124
|
logger.log(chalk.dim('Legend: ') + chalk.magenta('⚠ = major version (breaking changes)'));
|
|
125
125
|
}
|
|
126
126
|
|
|
127
|
-
// Get counts for menu (only show a tier if it
|
|
127
|
+
// Get counts for menu (only show a tier if it offers upgrades beyond the tier below)
|
|
128
128
|
const discrepancies = [...allPackages.values()].filter(pkg => pkg.hasDiscrepancy);
|
|
129
129
|
const patchCount = Object.keys(patchUpgrades).length;
|
|
130
130
|
const minorCount = Object.keys(minorUpgrades).length;
|
|
131
131
|
const majorCount = Object.keys(latestUpgrades).length;
|
|
132
|
-
|
|
133
|
-
|
|
132
|
+
|
|
133
|
+
// Check if minor offers any versions beyond what patch gives
|
|
134
|
+
const hasMinorBeyondPatch = Object.keys(minorUpgrades).some(dep =>
|
|
135
|
+
minorUpgrades[dep] !== (patchUpgrades[dep] || allDependencies[dep])
|
|
136
|
+
);
|
|
137
|
+
|
|
138
|
+
// Check if major/latest offers any versions beyond what minor gives
|
|
139
|
+
const hasMajorBeyondMinor = Object.keys(latestUpgrades).some(dep =>
|
|
140
|
+
latestUpgrades[dep] !== (minorUpgrades[dep] || allDependencies[dep])
|
|
141
|
+
);
|
|
142
|
+
|
|
143
|
+
// If noPrompt, return data without showing menu (used by tests)
|
|
144
|
+
if (options.noPrompt) {
|
|
145
|
+
return { allPackages };
|
|
146
|
+
}
|
|
134
147
|
|
|
135
148
|
// Check for shortcut flags (skip menu)
|
|
136
149
|
let action = null;
|
package/dist/commands/version.js
CHANGED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('./cli.js');
|