Skip to content

[BUG] npm audit fix updates a module when it is a major change. #1339

@kendraschwartz

Description

@kendraschwartz

What / Why

npm audit fix updates the @angular-devkit/build-angular module from 0.803.26 to 0.901.7.
It seems that the audit registry reports to npm that the update is not a major one.
The update is to fix https://www.npmjs.com/advisories/1500.

When

When I run npm audit fix.

Current Behavior

  • Audit fix updates the module.

Expected Behavior

  • Audit fix shouldn't update the module since it is a major change.

Here is a command to reproduce the bug:

curl -X POST "https://registry.npmjs.org/-/npm/v1/security/audits" --header 'Content-Type: application/json' --data '{
"name": "debug",
"version": "1.0.0",
"requires": {
"@angular-devkit/build-angular": "~0.803.26"
},
"dependencies": {
"@angular-devkit/build-angular": {
"version": "0.803.26",
"dev": true,
"requires": {
"webpack-dev-server": "3.9.0"
}
},
"webpack-dev-server": {
"version": "3.9.0",
"dev": true,
"requires": {
"yargs": "12.0.5"
}
},
"yargs": {
"version": "12.0.5",
"dev": true,
"requires": {
"yargs-parser": "^11.1.1"
}
},
"yargs-parser": {
"version": "11.1.1",
"dev": true
}
},
"install": [],
"remove": [],
"metadata": {
"npm_version": "6.13.4",
"node_version": "v13.5.0",
"platform": "linux"
}
}'

Metadata

Metadata

Assignees

No one assigned

    Labels

    Bugthing that needs fixing

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions