-
Notifications
You must be signed in to change notification settings - Fork 21
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
Bump commander from v2 to v12 #137
Conversation
fregante
commented
Aug 4, 2024
•
edited
Loading
edited
- closes Dependencies cleanup targeting the next major version bump #89
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.
@willdurand second PR ready
|
||
program | ||
.command("start") | ||
.description("Start Firefox") |
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.
.option() must now follow .command()
.command("start") | ||
.description("Start Firefox") | ||
.action(function() { | ||
console.log(Object.keys(program)) |
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.
The test harness relied on program
being outputted to the user. Commander no longer applies the flags to program
and they no longer appear as --flags
anymore, so the test had to be updated.
I made two changes:
- the user no longer sees this noise, it's hidden behind a fx-runner-specific ENV
- instead of looking for random flags, it matches against the whole
parsedOptions
object. This ensures that the additional logic in this object can also be tested.