Skip to content

npm update --save in [email protected] does not respect exact versions #4329

@matthewmayer

Description

@matthewmayer

npm update --save in [email protected] works differently to npm update in npm@6 when specifying an exact version

For example if you run npm install --save-exact [email protected]

Then your package.json will look like this:

"cron": "1.8.0"

if you then run on npm@6
npm update

nothing is changed

but if you then run on [email protected]

npm update --save

package.json is updated to

"cron": "^1.8.0"

and then if you run npm update --save again package.json is updated to

"cron": "^1.8.2"

This is doubly confusing as my pinned version is lost AND I get a different behavior if I run npm update twice

Originally posted by @matthewmayer in #2704 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Priority 1high priority issueRelease 8.xwork is associated with a specific npm 8 release

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions