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

chore: handle unknown args and improve test suite for info #1676

Merged
merged 3 commits into from
Jul 13, 2020

Conversation

jamesgeorge007
Copy link
Member

@jamesgeorge007 jamesgeorge007 commented Jul 9, 2020

What kind of change does this PR introduce?
enhancement

Did you add tests for your changes?
Yes

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

Summary

  • The existing strategy for handling unknown args with webpack-cli info didn't work as expected. Fixed it!
  • A new helper method runInfo() to be consumed across test suites.
$ webpack-cli info --unknown

Unknown argument: --unknown

  System:
    OS: macOS 10.15.5
    CPU: (8) x64 Intel(R) Core(TM) i5-8279U CPU @ 2.40GHz
    Memory: 131.43 MB / 8.00 GB
  Binaries:
    Node: 13.11.0 - /usr/local/bin/node
    Yarn: 1.22.4 - /usr/local/bin/yarn
    npm: 6.14.6 - /usr/local/bin/npm
  Browsers:
    Brave Browser: 83.1.10.97
    Safari: 13.1.1
  Packages:
    webpack: ^4.43.0 => 4.43.0
  Global Packages:
    webpack-cli: 4.0.0-beta.8

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 9, 2020 12:40
@jamesgeorge007 jamesgeorge007 requested review from alexander-akait and removed request for alexander-akait July 9, 2020 12:42
@jamesgeorge007 jamesgeorge007 marked this pull request as draft July 9, 2020 12:48
@jamesgeorge007 jamesgeorge007 changed the title fix: handle unknown args with info subcommand chore: improve test suite for info Jul 9, 2020
@jamesgeorge007 jamesgeorge007 changed the title chore: improve test suite for info tests: improve test suite for info Jul 9, 2020
@jamesgeorge007 jamesgeorge007 marked this pull request as ready for review July 9, 2020 13:38
@jamesgeorge007 jamesgeorge007 changed the title tests: improve test suite for info chore: handle unknown args and improve test suite for info Jul 9, 2020
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.

Looks good

/cc @webpack/cli-team

@jamesgeorge007 jamesgeorge007 merged commit ba17e2d into webpack:next Jul 13, 2020
@jamesgeorge007 jamesgeorge007 deleted the handle-unknown-args branch July 13, 2020 13:50
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.

None yet

4 participants