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

yarn add <package-name> should not run the prepublish hook #3197

Closed
kristenmills opened this issue Apr 19, 2017 · 3 comments
Closed

yarn add <package-name> should not run the prepublish hook #3197

kristenmills opened this issue Apr 19, 2017 · 3 comments

Comments

@kristenmills
Copy link

Do you want to request a feature or report a bug?
Report a bug.

What is the current behavior?
Currently when you run yarn add <package-name> the prepublish hook is also run. This is not expected behavior as npm install <package-name> does not run the prepublish hook.

If the current behavior is a bug, please provide the steps to reproduce.
yarn add <any package>

What is the expected behavior?
yarn add <package-name> should not run prepublish. (yarn install should continue to run prepublish)

Please mention your node.js, yarn and operating system version.
Node 7.5
Yarn 0.23.2
Mac OSX 10.12.2

@juanca
Copy link
Contributor

juanca commented Apr 20, 2017

npm install does run the publish hook. This is why there is prepublishOnly hook.

IMPORTANT: As of npm@5, prepublish will only be run for npm publish. This will make its behavior identical to prepublishOnly, so npm@6 or later may drop support for the use of prepublishOnly, and then maybe we can all forget this embarrassing thing ever happened.

@kristenmills
Copy link
Author

npm install with no args does. npm install <a package> does not.

@bestander
Copy link
Member

Should be implemented via yarnpkg/rfcs#70

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

No branches or pull requests

3 participants