-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixing: #604 #695
Fixing: #604 #695
Conversation
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.
Looks good @SatyamMattoo! I appreciate the unit tests.
Before I test this locally I've left a few small comments and questions you might want to take a look at.
Thanks!
|
||
type Args = { |
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 did you decide to remove all this from start.ts
and add it to cli.ts
?
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.
I was thinking it might be better to include all the types and functions related to argument parsing in the same file. If you see any issues with this approach, we can alternatively export them from the start.ts
file to the cli.ts
file.
Please let me know your thoughts.
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.
hmm. I'm not sure. I can almost see it, but I think the breakdown of what goes where feels a bit muddy.
In other packages we use cli.ts
as the entrypoint, which we don't do here.
I'll have a think about it and get back to you
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.
Sure sir, I've committed rest of the changes. I will be happy to make any additional change.
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.
Thank you @SatyamMattoo
I've been busy here today so I'll have to get back to you next week. Hopefully we can wrap it up quickly from here!
Hey @SatyamMattoo, here's what we'll do here:
I do agree that it's a bit nicer to isolate the yargs stuff in one place. This approach keeps the cli stuff clean and discoverable, but de-prioritises its importance a little. This helps avoid the confusion with how other packages deal with |
Hey @josephjclark I have made the changes accordingly, you can review them at your convenience and let me know if there are any more changes needed. Best regards. |
@SatyamMattoo Thank you for this, it looks great. I'll merge it in and prepare it for release this week. For future reference, please try to avoid commit messages like |
Short Description
Disables logging of env variables and populates the args according to their priority.
Related issue
Fixes #604
Implementation Details
Added a to function to populate the
args
in a differentcli.ts
file. Default values are not provided to theyargs
but are added when the function returns the values. This also ensures the env variables are not logged onpnpm start --help
.QA Notes
I have added tests related to this function in
cli.test.ts
file. More tests can be added if needed.Checklist before requesting a review