Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

devDependency status is ignored in yarn audit #7307

Closed
ar1em opened this issue May 28, 2019 · 1 comment
Closed

devDependency status is ignored in yarn audit #7307

ar1em opened this issue May 28, 2019 · 1 comment

Comments

@ar1em
Copy link

ar1em commented May 28, 2019

Do you want to request a feature or report a bug?
Bug

What is the current behavior?
yarn audit --json doesn’t calculate devDependencies. As a result “dev” objects are always false for any dependency.

If the current behavior is a bug, please provide the steps to reproduce.

  1. create package.json with vulnerable dependencies. For example:
    { "name": "yarn-audit-bug", "version": "0.1.0", "description": "Yarn audit bug", "devDependencies": { "lodash": "1.2.0" }, "dependencies": { "hawk": "2.0.0" }, "engines": { "yarn": ">= 1.0.0" } }
  2. Install dependencies yarn install
  3. Execute yarn audit --json
    result: https://gist.github.com/ar1em/94a71b68492162020af24c166cf0d9c4
  4. "devDependencies" object in "auditSummary" equals 0 and “dev” objects in lodash advisories equals false

What is the expected behavior?
"devDependencies" object must be equal to 1 and “dev” object for lodash advisories must be true. npm audit --json works correctly in this case.
result: https://gist.github.com/ar1em/1d008dc1c6cdae8bd30e85965bd91e81

Please mention your node.js, yarn and operating system version.
node version v10.15.3
yarn version v1.16.0
Mac OS X version v10.14.4

yarn audit --verbose
https://gist.github.com/ar1em/29b00d6bed7d45890b4e420cc3af439c

@ar1em
Copy link
Author

ar1em commented May 28, 2019

Duplicate #6970

@ar1em ar1em closed this as completed May 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant