nikku / karma-browserify

A fast Browserify integration for Karma that handles large projects with ease
MIT License
321 stars 50 forks source link

Remove watchify from peerDependencies #193

Closed robinjoseph08 closed 8 years ago

robinjoseph08 commented 8 years ago

Since watchify isn't required for all setups, making it a peerDependency prints an unavoidable error when npm installing (UNMET PEER DEPENDENCY watchify@>=3 <4), and it prevents me from running npm shrinkwrap --dev (because of the unmet peer dependency).

I think just mentioning it in the docs in the watchify config section and the error messages you already print out is enough to get people to install it if they need it.

bendrucker commented 8 years ago

Removing it from peerDependencies also eliminates the error if you have an unsupported watchify version. Removing it means "bring any major version you want" which could easily break.

Read https://github.com/npm/npm/issues/10836. I'm totally okay with the warning but breaking shrinkwrapping is no good. Ideally npm would support ignoring missing peers (as was originally requested) and not invalid ones (https://github.com/npm/npm/issues/10836#issuecomment-221500519).

Implementing a semver check at runtime is a viable solution here. I don't have time to do it today, wanna take a stab at a PR?

nikku commented 8 years ago

We are not going to implement this any time soon. Feel free to add a PR improving things.