js-dxtools / webpack-validator

Validates your webpack config with Joi
MIT License
295 stars 29 forks source link

fix: support webpack multi-compiler #119

Closed sadafie closed 8 years ago

sadafie commented 8 years ago

when provided with an array of configurations, iterate array and validate each configuration individually

fixes #117

kentcdodds commented 8 years ago

This is great! LGTM! Thanks!

codecov-io commented 8 years ago

Current coverage is 100% (diff: 100%)

Merging #119 into master will not change coverage

@@           master   #119   diff @@
====================================
  Files          18     18          
  Lines         137    147    +10   
  Methods         0      0          
  Messages        0      0          
  Branches        0      0          
====================================
+ Hits          137    147    +10   
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last update fcd4f53...7af4d31

sadafie commented 8 years ago

Curious what the process/timeline is to get an updated version of the pkg. Would like to use this on my current project!

kentcdodds commented 8 years ago

Thanks for your patience @sadafie! Hopefully @jonathanewerner or @bebraw can give this a second review soon. If they don't get to it in a few hours, then I'll go ahead and merge it (at which time it will be automatically released).

sadafie commented 8 years ago

Great, take your time with it! It took me a while to submit this PR anyways. I was just curious if I should hold off on using webpack-validator in my project if the overall process takes longer, which it doesn't sound like it does. thanks!

bebraw commented 8 years ago

LGTM.

bebraw commented 8 years ago

Looks like this broke the API contract.

In 2.2.3 const validate = require('webpack-validator'); returns a function. 2.2.4 returns an object. That breaks a lot of code. 😢

kentcdodds commented 8 years ago

uh oh :-/ Yeah, we should fix that asap

sadafie commented 8 years ago

hmm, not super clear how that happened. is this because of the multi-exports? also, there should be a test case for this too!

kentcdodds commented 8 years ago

This has been fixed. Thanks again for your contribution @sadafie :)

sadafie commented 8 years ago

Thanks for the patch @bebraw! Sorry again about the regression.

bebraw commented 8 years ago

No worries. A integration test that installs the package and then validates something simple would have caught it (good another PR ;) ).

kentcdodds commented 8 years ago

We should look into dont-break

bebraw commented 8 years ago

That looks like a nice way to handle it.

Another option is to write a little bash script that clones the repo and then runs something against it though dont-break is probably the way to go given webpack-validator has actual usage in the wild.