You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Couldn't find a way to audit two or more group at once.
The --groups option only get the first group if one space is used to separate them
The --groups option gets lost if a comma is used to separate
The help indicates space to separate the groups
--groups <group_name> [<group_name> ...]
Although the description shows commas: Only audit dependencies from listed groups. Default: devDependencies, dependencies, optionalDependencies (default: devDependencies,dependencies,optionalDependencies)
I agree this is a bug in both the documentation and the CLI help, none of which is clear or state the correct usage.
CLI help line is confusing in itself, hinting three different usages in a single line, none of which works:
--groups <group_name> [<group_name> ...] Only audit dependencies from listed groups. Default: devDependencies, dependencies, optionalDependencies (default: devDependencies,dependencies,optionalDependencies)
And the worst thing is that the option is so prone to the case when you might silently audit nothing at all, or just a part of what you intended to, and not even know about it.
Bug description
Couldn't find a way to audit two or more group at once.
--groups
option only get the first group if one space is used to separate them--groups
option gets lost if a comma is used to separateThe help indicates space to separate the groups
Although the description shows commas: Only audit dependencies from listed groups. Default: devDependencies, dependencies, optionalDependencies (default: devDependencies,dependencies,optionalDependencies)
Command
What is the current behavior?
Not possible to use
--groups
to audit more than one groupWhat is the expected behavior?
Audit dependencies from listed groups through the option
--groups
Steps to Reproduce
yarn audit --groups dependencies optionalDependencies
Outputs:
yarn audit --groups dependencies yarn audit v1.22.5 0 vulnerabilities found - Packages audited: 325 ✨ Done in 2.62s.
yarn audit --groups dependencies optionalDependencies yarn audit v1.22.5 0 vulnerabilities found - Packages audited: 325 ✨ Done in 1.39s.
yarn audit --groups dependencies,optionalDependencies yarn audit v1.22.5 0 vulnerabilities found - Packages audited: 0 ✨ Done in 2.38s.
yarn audit --groups dependencies, optionalDependencies yarn audit v1.22.5 0 vulnerabilities found - Packages audited: 0 ✨ Done in 1.72s.
Environment
12.18.4
1.22.5
The text was updated successfully, but these errors were encountered: