node-power-user 2.1.5 → 2.1.6

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.
@@ -103,7 +103,7 @@ module.exports = async function (options) {
103
103
  latestVersion,
104
104
  type: getDependencyType(projectJson, dep),
105
105
  hasDiscrepancy,
106
- hasMajorUpdate: latestVersion && minorVersion !== latestVersion,
106
+ hasMajorUpdate: latestVersion && latestVersion.split('.')[0] !== packageVersion.split('.')[0],
107
107
  });
108
108
  }
109
109
  }
@@ -186,9 +186,11 @@ module.exports = async function (options) {
186
186
  );
187
187
 
188
188
  // Check if major/latest offers any versions beyond what minor gives
189
- const hasMajorBeyondMinor = Object.keys(latestUpgrades).some(dep =>
190
- latestUpgrades[dep] !== (minorUpgrades[dep] || allDependencies[dep])
191
- );
189
+ const hasMajorBeyondMinor = Object.keys(latestUpgrades).some(dep => {
190
+ const latestMajor = version.clean(latestUpgrades[dep]).split('.')[0];
191
+ const currentMajor = version.clean(allDependencies[dep]).split('.')[0];
192
+ return latestMajor !== currentMajor;
193
+ });
192
194
 
193
195
  // If noPrompt, return data without showing menu (used by tests)
194
196
  if (options.noPrompt) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-power-user",
3
- "version": "2.1.5",
3
+ "version": "2.1.6",
4
4
  "description": "Easy tools for every Node.js developer!",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {