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 pack doesn’t run prepack #4177

Closed
alfonsomunozpomer opened this issue Aug 15, 2017 · 5 comments
Closed

yarn pack doesn’t run prepack #4177

alfonsomunozpomer opened this issue Aug 15, 2017 · 5 comments
Projects

Comments

@alfonsomunozpomer
Copy link

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

What is the current behavior?
yarn pack creates a tarball without running prepack.

If the current behavior is a bug, please provide the steps to reproduce.
Creae a package with a prepack script. When you run yarn pack the script is not executed.

What is the expected behavior?
The script should be run before the tarball is created by yarn pack.

Please mention your node.js, yarn and operating system version.
Node v8.2.1
yarn v0.27.5
macOS Sierra 10.12.6

@joaolucasl
Copy link
Contributor

I'll take this one! PR coming soon :)

@iwllyu
Copy link

iwllyu commented Aug 17, 2017

if it helps my npm v3.10.10 also does not run prepack on npm pack

@BYK
Copy link
Member

BYK commented Aug 18, 2017

if it helps my npm v3.10.10 also does not run prepack on npm pack

May be this is intentional then?

Here it says this needs to be run: https://docs.npmjs.com/misc/scripts

@BYK
Copy link
Member

BYK commented Aug 18, 2017

Thanks a lot for the swift action @joaolucasl!

BYK pushed a commit that referenced this issue Aug 18, 2017
**Summary**
Yarn wouldn't run the `prepack` and `postpack` scripts, as it is expected when `pack` is ran (#4177).
This PR adds those missing calls and updates tests accordingly.

**Test plan**
Added tests.
@BYK BYK added this to Done in Yarn 1.0 Aug 18, 2017
@kaylie-alexa
Copy link
Member

Cloing this via #4193

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

No branches or pull requests

5 participants