Do you want to request a feature or report a bug?
🐞
What is the current behavior?
If using yarn audit from a monorepo, if the root package.json does not have name and version fields, then the npm audit API will return an HTTP 500.
If the current behavior is a bug, please provide the steps to reproduce.
Make a monorepo with no name and version in the root package.json and run yarn audit
This is related to #6611 but where the monorepo root is missing the fields instead of individual packages. Since the monorepo root isn't really a publishable npm package, we shouldn't assume that it would have to have a name and version.
What is the expected behavior?
Since the npm API seems to require name and version, yarn should probably add something as a placeholder for the API call, even when it is missing from the monorepo package.json.
Please mention your node.js, yarn and operating system version.
1.12.3
Do you want to request a feature or report a bug?
🐞
What is the current behavior?
If using
yarn auditfrom a monorepo, if the rootpackage.jsondoes not havenameandversionfields, then the npm audit API will return an HTTP 500.If the current behavior is a bug, please provide the steps to reproduce.
Make a monorepo with no
nameandversionin the root package.json and runyarn auditThis is related to #6611 but where the monorepo root is missing the fields instead of individual packages. Since the monorepo root isn't really a publishable npm package, we shouldn't assume that it would have to have a name and version.
What is the expected behavior?
Since the npm API seems to require
nameandversion, yarn should probably add something as a placeholder for the API call, even when it is missing from the monorepo package.json.Please mention your node.js, yarn and operating system version.
1.12.3