Skip to content

Conversation

@darcyclarke
Copy link
Contributor

@darcyclarke darcyclarke commented Sep 20, 2022

@darcyclarke darcyclarke changed the title RFC: Add --query to npm audit RFC: Add --audit-query to npm audit Sep 20, 2022
Copy link
Contributor

@ljharb ljharb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So this is just a filter on whatever npm audit is doing? If so, sounds great - it would presumably be settable in .npmrc, so the default audit done on install could be changed?

@ruyadorno
Copy link
Contributor

@darcyclarke the PR title mentions the name of --audit-query (with a prefix) for the new config option while in the RFC itself it's noted multiple times as --query (with no cmd name prefix). I believe one of them was a mistake 😅 can you please confirm what is the intended config name?

@darcyclarke darcyclarke changed the title RFC: Add --audit-query to npm audit RFC: Add --query to npm audit Sep 20, 2022
@darcyclarke
Copy link
Contributor Author

@ruyadorno updated the title. I'm easy with the flag name tbh but am leaning toward the un-prefixed --query so that it can be easily mapped to other commands easily (ex. install / update etc.). Prefixing of flags ideally won't be as much of an issue when/if we ever land Command-specific Config

@darcyclarke
Copy link
Contributor Author

@ljharb essentially, yes. In previous RFC discussions I've used the term "Audit Filters" a lot but it's really just ensuring we can passing around a query selector to define the set of dependencies we want to actually execute the action against.

@ljharb
Copy link
Contributor

ljharb commented Sep 21, 2022

As a generic means to filter whatever audit action happens to be being run, this makes perfect sense.

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

Labels

Agenda will be discussed at the Open RFC call

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants