tarmolov / git-hooks-js

A tool to manage and run project git hooks
167 stars 30 forks source link

Avoid use of nested bin for yarn compatibility #32

Closed rgoldfinger closed 7 years ago

rgoldfinger commented 7 years ago

Yarn has different semantics for handling nested bins (i.e. it doesn't handle them). See https://github.com/yarnpkg/yarn/issues/760. This makes this package compatible with yarn by avoiding the use of the bin.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 95.146% when pulling b65f1bc76c320856d901cbbf080ec1d4b4eda03c on rgoldfinger:yarn-compatibility into 069d80a9399ebe531563e2234cc83d1abb1b8ef4 on tarmolov:master.

tarmolov commented 7 years ago

It seems that it's a yarn bug and the pr https://github.com/yarnpkg/yarn/pull/1210 should fix it. It's better to wait a little.

rgoldfinger commented 7 years ago

From my reading, hoisting binaries has questionable semantics that the yarn authors are not eager to support, and that PR seems to be going nowhere. Since it's easy enough to avoid relying on this feature of npm, I'm hoping that you'll be open to avoiding it and making this package compatible with yarn.

Thank you, by the way, for the great package. We rely on it heavily and are holding off on yarn because we don't want to lose it.

rjmunro commented 7 years ago

IMHO, unless there is reason for the user to call the node_modules/.bin/git-hooks script directly from time to time, it seems wrong to include it in the bin section of package.json.

tarmolov commented 7 years ago

Just published 1.1.7