moscajs / mosca

MQTT broker as a module
mosca.io
3.2k stars 513 forks source link

Move optional deps to peer deps #755

Closed lightsofapollo closed 4 years ago

lightsofapollo commented 6 years ago

Mosca is awesome but it takes forever to install due to all the optional deps (many of which fail without very specific native dependencies). I think it would be a major improvement to move all the optional deps to peer dependencies so people can include only what they would need.

Happy to submit a PR.

mcollina commented 6 years ago

I'm not necessarily ok with this. Currently Mosca is not being updated to newer Node versions due to failing tests. Doing this would require dropping support for old version of NPM, as peerDependencies changed meaning (and that's why those are installed as optionalDependencies now).

jhalag commented 4 years ago

I actually ended up needing to use a (private) fork exactly for that purpose, stripping out all the unused dependencies. I have a hard time using a package for my clients when the install fails with many (scary looking) errors - even though they actually mean nothing.