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

fix(serve): supplying help or version as an arg should throw #1694

Merged
merged 4 commits into from
Aug 7, 2020

Conversation

jamesgeorge007
Copy link
Member

@jamesgeorge007 jamesgeorge007 commented Jul 19, 2020

What kind of change does this PR introduce?
bugfix

Did you add tests for your changes?
yup

If relevant, did you update the documentation?
N/A

Summary

  • webpack-cli serve help should throw an error.
  • Added a test case to ensure that serve respects --no-color flag.

Does this PR introduce a breaking change?
Nope

Other information
N/A

@jamesgeorge007 jamesgeorge007 requested a review from a team as a code owner July 19, 2020 17:47
@jamesgeorge007 jamesgeorge007 force-pushed the hotfix/recognize-args branch 2 times, most recently from 98636a9 to e4058bd Compare July 20, 2020 10:37
snitin315
snitin315 previously approved these changes Jul 31, 2020
@jamesgeorge007 jamesgeorge007 changed the title fix: serve recognizes --color flag fix: serve recognizes help and version args Jul 31, 2020
snitin315
snitin315 previously approved these changes Jul 31, 2020
@anshumanv
Copy link
Member

It's really confusing and misleading. I think we should only support --help & --version.
Hence we won't have to support webpack serve help.
webpack serve --help is sufficient.

+1 only creates confusion, /cc @evilebottnawi

@alexander-akait
Copy link
Member

alexander-akait commented Aug 5, 2020

Good question, I don't have the strong opinion here, but git supports

git help fetch
git fetch --help

@anshumanv
Copy link
Member

anshumanv commented Aug 5, 2020

Good question, I don't have the strong opinion here, but git supports

In this case fetch is the arg for the help command => only 1 command, we are supporting serve help too which is actually misleading

@alexander-akait
Copy link
Member

Yes we should remove webpack serve help supporting

@anshumanv
Copy link
Member

@jamesgeorge007 can you update the PR to limit command count to 1?

@jamesgeorge007
Copy link
Member Author

Yes we should remove webpack serve help supporting

Couldn't agree more.

@jamesgeorge007 jamesgeorge007 force-pushed the hotfix/recognize-args branch 2 times, most recently from 98f7843 to 8f5292a Compare August 5, 2020 14:38
alexander-akait
alexander-akait previously approved these changes Aug 5, 2020
@jamesgeorge007 jamesgeorge007 changed the title fix: serve recognizes help and version args fix: supplying help or version as an arg should throw Aug 5, 2020
@jamesgeorge007 jamesgeorge007 changed the title fix: supplying help or version as an arg should throw fix(serve): supplying help or version as an arg should throw Aug 5, 2020
@snitin315 snitin315 merged commit 6eb7883 into webpack:next Aug 7, 2020
@jamesgeorge007 jamesgeorge007 deleted the hotfix/recognize-args branch August 7, 2020 05:20
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.

5 participants