Skip to content

Conversation

@CalebCourier
Copy link

Summary of changes:
This PR enables using the existing --production flag when running npm audit. Using this flag will ignore dev dependencies when assigning the requires constant that is passed to audit.generate.

Reason for changes:
Currently there is no way to ignore dev dependencies when running an audit. Being able to do so is desirable when an audit is part of a CI process.

@CalebCourier CalebCourier requested a review from a team as a code owner June 18, 2019 14:45
@isaacs isaacs added the semver:minor new backwards-compatible feature label Jun 26, 2019
@isaacs
Copy link
Contributor

isaacs commented Jun 26, 2019

Will be in the next release. Thanks!

isaacs pushed a commit that referenced this pull request Jun 28, 2019
Note: SemVer minor -- @isaacs

Close: #202
isaacs pushed a commit that referenced this pull request Jun 29, 2019
Note: SemVer minor -- @isaacs

Close: #202
@isaacs isaacs closed this in a4475de Jul 3, 2019
@ArcanisCz
Copy link

Awesome! was waiting for this

@igolskyi
Copy link

How add it to .npmrc?
My .npmrc looks like this:

engine-strict=true
fund=false

# also I want to set: audit only for --production but here only boolean value
audit=true

@ljharb
Copy link
Contributor

ljharb commented May 20, 2021

@igolskyi you can’t set it in npmrc without affecting every other command, it can only be set when invoking npm audit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

semver:minor new backwards-compatible feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants