Skip to content

Commit

Permalink
feat: use "exclude" and "ignore" CLI options when running `yarn npm a…
Browse files Browse the repository at this point in the history
…udit` command
  • Loading branch information
OrRosenblatt authored and antongolub committed Oct 26, 2024
1 parent 2aaa104 commit 015a4b9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/main/ts/lockfile/v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,13 @@ export const audit = (
},
},
}
const _flags = formatFlags(mapFlags(flags, mapping), 'groups', 'verbose')
const _flags = formatFlags(
mapFlags(flags, mapping),
'exclude',
'ignore',
'groups',
'verbose',
)
const report = invoke(
bins.yarn,
['npm', 'audit', '--all', '--json', '--recursive', ..._flags],
Expand Down
2 changes: 2 additions & 0 deletions src/main/ts/stages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,9 @@ export const npmAuditFix: TCallback = ({ temp, flags, bins }) => {
{ ...defaultFlags, ...flags },
'audit-level',
'dry-run',
'exclude',
'force',
'ignore',
'loglevel',
'legacy-peer-deps',
'only',
Expand Down

0 comments on commit 015a4b9

Please sign in to comment.