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(webpack-cli): verbose and stats verbose flag fixed (rebase) #1461

Closed
wants to merge 7 commits into from
Closed

fix(webpack-cli): verbose and stats verbose flag fixed (rebase) #1461

wants to merge 7 commits into from

Conversation

aman29271
Copy link
Contributor

What kind of change does this PR introduce?
This is a bugfix request which closes #1443

Did you add tests for your changes?
yes
If relevant, did you update the documentation?
Not Needed
Summary

Does this PR introduce a breaking change?
No

Other information

@aman29271 aman29271 requested a review from a team as a code owner April 14, 2020 12:57
Copy link
Member

@snitin315 snitin315 left a comment

Choose a reason for hiding this comment

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

Can you fix the CI, please?

@aman29271
Copy link
Contributor Author

Oh, Ah. I forgot that. working on it...

@@ -5,7 +5,9 @@ const logger = require('../utils/logger');
*/
class StatsGroup extends GroupHelper {
static validOptions() {
return ['none', 'errors-only', 'minimal', 'normal', 'detailed', 'verbose', 'errors-warnings'];
let validArrayString = ['none', 'errors-only', 'minimal', 'normal', 'detailed', 'verbose', 'errors-warnings'];
let validArrayObject = [{ verbose: true }, { verbose: true, stats: 'verbose' }];
Copy link
Member

Choose a reason for hiding this comment

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

Why we need it here? We don't support objects in webpack-cli

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I used that for tests. It deals with when a user provide --stats verbose --verbose both flags together.

Copy link
Member

Choose a reason for hiding this comment

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

Put it in tests - you can sue mocking

}
function descriptionGenerator(example, shortDesc, acceptedValue = []) {
return `\n\n Example: ${example}\n\n ${acceptedValue.length > 0 ? acceptedString(acceptedValue) : ''}\n\n${shortDesc}`;
}
Copy link
Member

@alexander-akait alexander-akait Apr 15, 2020

Choose a reason for hiding this comment

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

It was fix, not a new feature, do not mix fixes and features, you need to do it in difference PRs

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Okay. On it...

@webpack-bot
Copy link

@aman29271 Thanks for your update.

I labeled the Pull Request so reviewers will review it again.

@evilebottnawi Please review the new changes.

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.

Bug: webpack-cli --verbose throws TypeError: Cannot set property 'stats' of undefined
4 participants