node-commit-msg icon indicating copy to clipboard operation
node-commit-msg copied to clipboard

Change Java to a peerDependency

Open mattlyons0 opened this issue 7 years ago • 0 comments

Java dep is currently an optional dependency which has the effect of allowing it to fail installing without failing the install of commit-msg.

The problem with this is the Java package doesn't need to be installed on most systems, the fallback logic works fine. But the Java package postinstall increases the entire project's install time dramatically. Currently the only way to ignore installing the Java package is to ignore all optional packages (from all packages and their dependencies) when running npm install: https://github.com/npm/npm/issues/14185

Because of this I think it would be best if Java was a peer dependency (which is effectively just a warning if it isn't installed as of npm 3). This way it can be opt in (as it generally doesn't seem to be needed in my experience on OSX and Linux).

mattlyons0 avatar Nov 29 '18 06:11 mattlyons0