-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
✨ Add support for --registry with audit command #7263
Conversation
|
Thanks for creating this PR. Personally I would love to have this feature merged ❤️ |
I would really like this PR to be merged too :D |
@@ -145,6 +146,7 @@ export async function run(config: Config, reporter: Reporter, flags: Object, arg | |||
const audit = new Audit(config, reporter, { | |||
groups: flags.groups || OWNED_DEPENDENCY_TYPES, | |||
level: flags.level || DEFAULT_LOG_LEVEL, | |||
registry: flags.registry, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why don't you add || YARN_REGISTRY
here instead of in the _fetchAudit
method?
Here it'll look more consistent, in my opinion.
This explicit command line option is fine, but why isn't the registry specified in |
@@ -238,7 +240,7 @@ export default class Audit { | |||
|
|||
async _fetchAudit(auditTree: AuditTree): Object { | |||
let responseJson; | |||
const registry = YARN_REGISTRY; | |||
const registry = this.options.registry || YARN_REGISTRY; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Even better, maybe add something like || String(this.config.getOption('registry')).replace(/\/+$/, '')
in the middle, so we also also consult the config file(s)? (Credit to PR #6484 for that!)
When this PR will be merged? |
would love to see this merged, thx for your effort guys! |
Hey Guys, Unfortunately we need this feature for our project. Could you pls merge this, if everything is good? |
Maybe this PR needs a push so that the Yarn Acceptance Tests pass? Seems like |
Any update on this? |
Summary
Hi 👋
First of all, thanks for your work!
I use yarn everyday and I love its workspaces feature 😄
This PR adds support for the
--registry
flag when runningaudit
command as described in #7012 .Test plan
I have added a test case where I check if the audit command is calling the registry specified with the high flag
--registry
.