-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
order of scripts on yarn publish
#3992
Comments
I think it also makes more sense for |
Thanks for the report. This looks straightforward to fix, so may be you'd like to try sending a PR? Pinky promise that we'll do our best to support you if you get stuck 😉 |
I've just had a baby, so pinky promise that my time for quality PRs got slashed /shrug |
This is fixed in yarn v1.2.0 by #4553:
|
The other problem is that I'm getting different behavior between yarn and npm publish. When I use npm, the package.json is read after my prepublishOnly script. However, in yarn, it is not reread. This makes it impossible for me to affect the contents of package.json when packaging. My use case is to generate a README for the registry. Here's the offending line: yarn/src/cli/commands/publish.js Line 36 in fb6511c
Shall I file a separate issue to force the package.json to be reloaded? |
Do you want to request a feature or report a bug?
It depends but if strict compatibility with npm is a goal of yarn, this is a bug.
What is the current behavior?
npm publish
invokesprepare
andprepublishOnly
.yarn publish
invokesprepublishOnly
andprepare
.If the current behavior is a bug, please provide the steps to reproduce.
See https://github.com/andreineculau/package-json-scripts
What is the expected behavior?
yarn publish
invokesprepare
andprepublishOnly
.Please mention your node.js, yarn and operating system version.
npm/5.3.0 yarn/0.28.4
The text was updated successfully, but these errors were encountered: