sindresorhus / gulp-mocha

Run Mocha tests
MIT License
375 stars 91 forks source link

Move mocha to peer dependency #182

Closed danthegoodman closed 6 years ago

danthegoodman commented 7 years ago

Now that mocha 4 is out, I'd like to start using it. Since this library is now such a thin wrapper around mocha and so that others may continue to use their preferred version of mocha and so that future versions of mocha can be used freely, I propose allowing mocha to be specified as a peer dependency.

I'm not sure whether this needs to constitute a major or minor api version change.

danthegoodman commented 6 years ago

I've done some testing with this locally and gulp-mocha passes all of its tests when tested against mocha ^2, ^3 and ^4. It looks like mocha ^1 fails because it spit out errors to stderr instead of stdout.

sindresorhus commented 6 years ago

I don't think a peerDependency is a good idea. Mocha might do breaking changes between releases. Better to just upgrade here whenever there's a new Mocha version.