-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Closed
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Current Behavior:
npm update will make changes to package.json, even if --save=false or --no-save is present. This includes adding a newline to the end of package.json even if no other changes were present.
Expected Behavior:
If save is set to false, npm update should not modify package.json
Steps To Reproduce:
I see this same behavior with npm config set save false, npm update --no-save, and npm update --save=false.
$ echo -n {} | cat > package.json
$ cat package.json
{}%
$ npm config get save
false
$ npm update
up to date, audited 1 package in 151ms
found 0 vulnerabilities
$ cat package.json
{}
$
Environment:
- OS: MacOS 11.2.3 (M1)
- Node: 15.9.0
- npm: 7.5.3
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release