From 015a4b919a73279d1415466b6879e79cd8364ce7 Mon Sep 17 00:00:00 2001 From: Or Rosenblatt Date: Sat, 26 Oct 2024 02:29:03 -0400 Subject: [PATCH] feat: use "exclude" and "ignore" CLI options when running `yarn npm audit` command --- src/main/ts/lockfile/v2.ts | 8 +++++++- src/main/ts/stages.ts | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/main/ts/lockfile/v2.ts b/src/main/ts/lockfile/v2.ts index 1a9e9af..f03cb02 100644 --- a/src/main/ts/lockfile/v2.ts +++ b/src/main/ts/lockfile/v2.ts @@ -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], diff --git a/src/main/ts/stages.ts b/src/main/ts/stages.ts index b0d9a63..7aac475 100644 --- a/src/main/ts/stages.ts +++ b/src/main/ts/stages.ts @@ -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',