@mnci/cli 4.40.3 → 4.40.5
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 +8 -2
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -283,12 +283,18 @@ function classifyNpmAudit(report) {
|
|
|
283
283
|
});
|
|
284
284
|
return { blocking, total: all.length, notes };
|
|
285
285
|
}
|
|
286
|
+
function isNoOpChange(change) {
|
|
287
|
+
const { from, to } = change ?? {};
|
|
288
|
+
return from?.version !== void 0 && from.version === to?.version && from.name === to?.name;
|
|
289
|
+
}
|
|
286
290
|
function planIsEmpty(stdout) {
|
|
287
291
|
try {
|
|
288
292
|
const start = stdout.search(/^\{/m);
|
|
289
293
|
const plan = JSON.parse(start === -1 ? stdout : stdout.slice(start));
|
|
290
|
-
|
|
291
|
-
|
|
294
|
+
if (!Array.isArray(plan.add) || !Array.isArray(plan.change) || !Array.isArray(plan.remove)) {
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
return plan.add.length === 0 && plan.remove.length === 0 && plan.change.every((change) => isNoOpChange(change));
|
|
292
298
|
} catch {
|
|
293
299
|
return false;
|
|
294
300
|
}
|