Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Separate CLI from package.json:main #18

Merged
merged 1 commit into from
May 13, 2017
Merged

Conversation

exogen
Copy link
Owner

@exogen exogen commented May 11, 2017

This PR offers protection against misbehaving dependencies as discovered in #17.

The issue is that some dependency, e.g. modify-babel-preset, might attempt to require() everything under node_modules as part of a module resolution strategy. This assumes that require() on any given module has no side effects (like running a script, for example, as postinstall-build does).

So this separates package.json:main (index.js) from package.json:bin, which now points to cli.js. Thus calling require('postinstall-build') will no longer do the same thing as running postinstall-build.

Fixes #17. /cc @b1r3k

@exogen exogen merged commit 4977b43 into master May 13, 2017
@exogen exogen deleted the separate-cli-from-main branch May 13, 2017 01:12
@exogen exogen mentioned this pull request May 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant