From 9aee79c1cd4a575bb48e752af842ed03c6d8df34 Mon Sep 17 00:00:00 2001 From: Gregg Tavares Date: Sun, 14 Sep 2025 16:57:55 -0400 Subject: [PATCH] Fix install --dry-run --json to output JSON This broke in 10.4 https://github.com/npm/cli/commit/c209e989b405fa3e86df7015c22e6840e18313b8#r165769221 --- lib/utils/reify-output.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/utils/reify-output.js b/lib/utils/reify-output.js index f4a8442e9427f..739336460af02 100644 --- a/lib/utils/reify-output.js +++ b/lib/utils/reify-output.js @@ -45,7 +45,7 @@ const reifyOutput = (npm, arb) => { } if (diff) { - const showDiff = npm.config.get('dry-run') || npm.config.get('long') + const showDiff = (npm.config.get('dry-run') || npm.config.get('long')) && !npm.flatOptions.json const chalk = npm.chalk depth({