diff --git a/README.md b/README.md index 8f7f3b0..f6f9d41 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ If vulnerabilities are found by `npm audit`, Action triggered by push, schedule |Parameter|Required|Default Value|Description| |:--:|:--:|:--:|:--| |audit_level|false|low|The value of `--audit-level` flag| -|production_flag|false|false|Runnning `npm audit` with `--production`| +|production_flag|false|false|Runnning `npm audit` with `--omit=dev`| |json_flag|false|false|Runnning `npm audit` with `--json`| |issue_assignees|false|N/A|Issue assignees (separated by commma)| |issue_labels|false|N/A|Issue labels (separated by commma)| diff --git a/action.yml b/action.yml index bdb2dfc..02bdfc4 100644 --- a/action.yml +++ b/action.yml @@ -7,7 +7,7 @@ inputs: default: low required: false production_flag: - description: 'Run npm audit with --production' + description: 'Run npm audit with --omit=dev' default: 'false' required: false json_flag: diff --git a/dist/index.js b/dist/index.js index 19cbbd5..b680803 100644 --- a/dist/index.js +++ b/dist/index.js @@ -25,7 +25,7 @@ class Audit { const isWindowsEnvironment = process.platform == "win32"; const cmd = (isWindowsEnvironment) ? 'npm.cmd' : 'npm'; if (productionFlag === 'true') { - auditOptions.push('--production'); + auditOptions.push('--omit=dev'); } if (jsonFlag === 'true') { auditOptions.push('--json'); diff --git a/src/audit.ts b/src/audit.ts index 80008a1..dc77611 100644 --- a/src/audit.ts +++ b/src/audit.ts @@ -19,7 +19,7 @@ export class Audit { const cmd: string = isWindowsEnvironment ? 'npm.cmd' : 'npm' if (productionFlag === 'true') { - auditOptions.push('--production') + auditOptions.push('--omit=dev') } if (jsonFlag === 'true') {