Skip to content

postpack is not called after yarn pack #7924

@thoov

Description

@thoov

Bug description

postpack is not called after yarn pack has completed. Also the success message about creating the tarball during yarn pack no longer shows up. This only happens on node 12.16.*

What is the current behavior?

When executing the command yarn pack, yarn invokes the user defined script prepack before packing but does not invoke postpack.

What is the expected behavior?

When executing the command yarn pack, yarn should invoke the user defined script prepack before and postpack after the packaging.

Steps to Reproduce

  1. Create a blank project (yarn init)
  2. Add the following to package.json
"scripts": {
  "prepack": "echo \"Hello\"",
  "postpack": "echo \"World\""
}
  1. Run yarn pack

Expected Output:

yarn pack v1.22.0
$ echo "Hello"
Hello
$ echo "World"
World
success Wrote tarball to "/private/tmp/yarn-test/yarn-test-v1.0.0.tgz".
✨  Done in 0.06s.

Actual Output:

yarn pack v1.22.0
$ echo "Hello"
Hello

Environment

  • Node Version: 12.16.0 & 12.16.1
  • Yarn v1 Version: 1.22.0
  • OS and version: OSX 10.15.3

Metadata

Metadata

Assignees

No one assigned

    Labels

    fixed-in-modernThis issue has been fixed / implemented in Yarn 2+.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions