-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 9.xwork is associated with a specific npm 9 releasework is associated with a specific npm 9 release
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
Consider this command: npm install bootstrap --json
The output using npm 7.x, 8.x, or 9.x is this:
{
"added": 2,
"removed": 0,
"changed": 0,
"audited": 0,
"funding": 2
}
Expected Behavior
The output of that same command run with npm 6.x is this:
{
"added": [
{
"action": "add",
"name": "boostrap",
"version": "2.0.0",
"path": "/Users/bdkjones/Desktop/untitled folder/node_modules/boostrap"
}
],
"removed": [],
"updated": [],
"moved": [],
"failed": [],
"warnings": [],
"audit": {
"actions": [],
"advisories": {},
"muted": [],
"metadata": {
"vulnerabilities": {
"info": 0,
"low": 0,
"moderate": 0,
"high": 0,
"critical": 0
},
"dependencies": 1,
"devDependencies": 0,
"optionalDependencies": 0,
"totalDependencies": 1
}
},
"funding": "",
"elapsed": 618
}
THIS output is insanely more useful for integrating npm into other tooling and build systems. The truncated output from versions 7, 8, and 9 is not useful. This regression has existed for years now and it would be great if npm could finally address it. Competing package managers (yarn) don't have this issue.
Steps To Reproduce
- Run
npm install [somePackage] --jsonwith npm 6.x and compare the output to that of any later major release. - Note that the addition of
--verbose(or any other logging level) does not change the JSON output. (That would, optionally, be a nice feature.)
Environment
- npm: 9.7.1
- Node.js: 18.15.0
- OS Name: macOS
- System Model Name: MacBook Pro M2 Max
- npm config: N/A
samuel-clara
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingPriority 1high priority issuehigh priority issueRelease 9.xwork is associated with a specific npm 9 releasework is associated with a specific npm 9 release