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: implement new configtest command #2303

Merged
merged 13 commits into from Jan 6, 2021
Merged

Conversation

snitin315
Copy link
Member

What kind of change does this PR introduce?
feature

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

Syntax - webpack configtest <path-to-config>

Does this PR introduce a breaking change?
No

Other information
Fixes #803

@snitin315
Copy link
Member Author

snitin315 commented Jan 4, 2021

Should we support validating multiple configs simultaneously like webpack configtest <first-config> <second-config>? or throw error can't validate multiple configs simultaneously. please provide one config at a time. and exit.

Need to discuss /cc @webpack/cli-team

@snitin315
Copy link
Member Author

I think it might be not possible for multiple configs as the process will exit as soon as an error config is found.

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.

Also please add this package to webpack-cli package.json (in peerDependenciesMeta) too

packages/configtest/src/index.ts Outdated Show resolved Hide resolved
packages/configtest/src/index.ts Outdated Show resolved Hide resolved
packages/configtest/src/index.ts Outdated Show resolved Hide resolved
alexander-akait
alexander-akait previously approved these changes Jan 5, 2021
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 job

@alexander-akait
Copy link
Member

Feel free to covert it to completed PR from Draft, I think we can merge it

@snitin315 snitin315 marked this pull request as ready for review January 5, 2021 12:55
@snitin315 snitin315 requested a review from a team as a code owner January 5, 2021 12:55
@snitin315
Copy link
Member Author

Let's see how CI run goes.

@snitin315
Copy link
Member Author

Ah, need some tweaks for webpack-4

@codecov
Copy link

codecov bot commented Jan 5, 2021

Codecov Report

Merging #2303 (1ceb0cb) into master (4ea0cb4) will increase coverage by 19.11%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #2303       +/-   ##
===========================================
+ Coverage   67.81%   86.93%   +19.11%     
===========================================
  Files          63       15       -48     
  Lines        2486      995     -1491     
  Branches      572      284      -288     
===========================================
- Hits         1686      865      -821     
+ Misses        800      130      -670     
Impacted Files Coverage Δ
packages/webpack-cli/lib/webpack-cli.js 89.69% <ø> (+0.10%) ⬆️
packages/webpack-cli/lib/index.js 87.50% <0.00%> (-12.50%) ⬇️
packages/generators/src/loader-generator.ts
packages/generators/src/types/index.ts
packages/migrate/src/index.ts
packages/generators/src/utils/index.ts
packages/generators/src/utils/helpers.ts
packages/generators/src/utils/plugins.ts
packages/generators/src/utils/tooltip.ts
packages/utils/src/global-packages-path.ts
... and 41 more

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 4ea0cb4...1ceb0cb. Read the comment docs.

@snitin315 snitin315 marked this pull request as ready for review January 5, 2021 14:51
@alexander-akait
Copy link
Member

/cc @webpack/cli-team need review

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.

Need small improve

Copy link
Member

@rishabh3112 rishabh3112 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, left few suggestions.

OPTIONS.md Outdated Show resolved Hide resolved
packages/configtest/src/index.ts Outdated Show resolved Hide resolved
packages/webpack-cli/README.md Outdated Show resolved Hide resolved
packages/configtest/package.json Outdated Show resolved Hide resolved
packages/configtest/src/index.ts Outdated Show resolved Hide resolved
@webpack-bot
Copy link

@snitin315 Thanks for your update.

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

@alexander-akait 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.

Feature(config-test): Evaluating the webpack configs.
5 participants