Skip to content
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

feat: show possible values for option in help output #2819

Merged
merged 6 commits into from
Jul 7, 2021

Conversation

snitin315
Copy link
Member

What kind of change does this PR introduce?
feature

Did you add tests for your changes?
Yes updated snaps
If relevant, did you update the documentation?
No
Summary
show possible values for option in help output

Screenshot 2021-07-05 at 5 20 47 PM

Does this PR introduce a breaking change?
No

Other information
No

@snitin315 snitin315 requested a review from a team as a code owner July 5, 2021 11:51
(flag) => option.long === `--${flag.name}`,
);

if (flag && flag.configs[0].values) {
Copy link
Member

Choose a reason for hiding this comment

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

I think we can have more them, i.e. config[1]/config[2], I think better use map here and collect them

Copy link
Member Author

Choose a reason for hiding this comment

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

Will update 👍

Copy link
Member

@alexander-akait alexander-akait left a comment

Choose a reason for hiding this comment

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

Good idea, one note

@codecov
Copy link

codecov bot commented Jul 5, 2021

Codecov Report

Merging #2819 (f599493) into master (1e0a68c) will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2819      +/-   ##
==========================================
+ Coverage   93.96%   94.05%   +0.08%     
==========================================
  Files          32       32              
  Lines        1706     1715       +9     
  Branches      492      495       +3     
==========================================
+ Hits         1603     1613      +10     
+ Misses        103      102       -1     
Impacted Files Coverage Δ
packages/webpack-cli/lib/webpack-cli.js 96.77% <100.00%> (+0.03%) ⬆️
packages/generators/src/addon-generator.ts 91.93% <0.00%> (+1.61%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 45d1fea...f599493. Read the comment docs.

@alexander-akait
Copy link
Member

Feel free to merge

@snitin315
Copy link
Member Author

Need one more review. /cc @webpack/cli-team

@snitin315 snitin315 merged commit 828e5c9 into master Jul 7, 2021
@snitin315 snitin315 deleted the output-possible-values branch July 7, 2021 21:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants