Open bdkjones opened 3 years ago
Sort-of related (in that another JSON thing got broken): #2740
Any progress on this? It's a very large regression from 6.x
and I hate staying on an outdated version of npm.
Thanks for the report @bdkjones. I'm tracking down issues like this as we're working on a larger epic of how npm writes output to the terminal. This will likely come after that, but I agree that the additional information is very helpful.
Summary:
npm 7.x seriously nerfed the usefulness of the
--json
flag when paired with theinstall
command. (It may have done so with other commands as well; I've only testedinstall
.)I do realize that
--json
is marked experimental for all commands other thanls
andsearch
, but this is a MASSIVE regression in usefulness. I can understand changing the structure of the returned JSON, etc. while the feature is experimental, but nuking all of the details and returning only the bare minimum summary information must be an inadvertent change, right?This makes npm exceptionally difficult to integrate with build tools and scripts. I've rolled back from 7.x until this can be addressed. Thanks!
Current Behavior:
Using npm
7.5.3
run this command:npm install jquery --json
The output produced is:
Expected Behavior:
Here's what npm
< 7
spits out for the same command.Notice the detail in
added
—we can see what was done, not just how many things were done.Steps To Reproduce:
1) Just run
npm install [any package name] --json
on npm 7.x and compare the output to npm 6.x and below.Environment: