chore(cli): better group handling#1204
Merged
rishabh3112 merged 10 commits intowebpack:nextfrom Feb 6, 2020
Merged
Conversation
ematipico
commented
Feb 5, 2020
ematipico
commented
Feb 5, 2020
ematipico
commented
Feb 5, 2020
|
Thank you for your pull request! The most important CI builds succeeded, we’ll review the pull request soon. |
ematipico
commented
Feb 5, 2020
rishabh3112
requested changes
Feb 5, 2020
Member
rishabh3112
left a comment
There was a problem hiding this comment.
Nice refactor!
Have left a review.
Co-Authored-By: Rishabh Chawla <rishabh31121999@gmail.com>
Co-Authored-By: Rishabh Chawla <rishabh31121999@gmail.com>
Co-Authored-By: Rishabh Chawla <rishabh31121999@gmail.com>
Co-Authored-By: Rishabh Chawla <rishabh31121999@gmail.com>
…webpack-cli into feature/better-group-handling # Conflicts: # lib/utils/GroupHelper.js
rishabh3112
previously approved these changes
Feb 5, 2020
jamesgeorge007
requested changes
Feb 5, 2020
Member
jamesgeorge007
left a comment
There was a problem hiding this comment.
Left a couple of comments.
|
@ematipico Thanks for your update. I labeled the Pull Request so reviewers will review it again. @jamesgeorge007 Please review the new changes. |
rishabh3112
approved these changes
Feb 6, 2020
Member
|
Thanks everyone! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What kind of change does this PR introduce?
A refactor of how configuration and arguments are handled and creating the final configuration to pass to webpack compiler
Did you add tests for your changes?
It's a refactor and all the existing tests are still passing
If relevant, did you update the documentation?
Yes, I added JSDoc to help the refactor
Summary
The problem of the current logic is that all the group helpers are randomly created and with a simple loop their logic is run. Which mean there's no order and we don't know which options comes first and which after.
For example, we have a group helper responsible to handle the configuration object (
ConfigHelper) and we have a group helper responsible of the output (OutputHelper).If
OutputHelperis run first andConfigHelpersecond, the information that we have inside the configuration will override the one inside the output, which is not the behaviour that the CLI should have.The arguments passed via CLI have to override the one that we have inside the configuration. So now the order is the following:
Does this PR introduce a breaking change?
Nope
Other information