js-dxtools / webpack-validator

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

fix: Set default empty object for validate options #121

Closed newtmitch closed 7 years ago

newtmitch commented 7 years ago

Default option object to keep caller from having to pass empty object during function invocation when using CJS-based library import.

functionality impacts: none known

codecov-io commented 7 years ago

Current coverage is 100% (diff: 100%)

Merging #121 into master will not change coverage

@@           master   #121   diff @@
====================================
  Files          18     18          
  Lines         147    147          
  Methods         0      0          
  Messages        0      0          
  Branches        0      0          
====================================
  Hits          147    147          
  Misses          0      0          
  Partials        0      0          

Powered by Codecov. Last update 381a7c1...5028db1

newtmitch commented 7 years ago

Sorry, I forgot to create an issue for this before submitting the fix. I can supply a webpack config that doesn't work against 2.2.4, 2.2.5, and master branches. It works fine on 2.2.3. I'm using const validator = require('webpack-validator') instead of import which is why I think your tests weren't picking up the issue.

kentcdodds commented 7 years ago

Cool, thanks for the PR! This looks good to me. I'd like @bebraw and/or @jonathanewerner to review this as well.

newtmitch commented 7 years ago

Sure thing - glad to help!

kentcdodds commented 7 years ago

Looks like this will fix #122

kentcdodds commented 7 years ago

I'll go ahead and merge this. Apologies for breaking people.