Skip to content

yarn publish does not run prepack/postpack #5707

Closed
@jdx

Description

@jdx

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

Bug

What is the current behavior?

$ npm publish --tag next

> pkg@6.2.5-2 prepublishOnly .
> echo prepublishOnly

prepublishOnly

> pkg@6.2.5-2 prepack .
> echo prepack

prepack

> pkg@6.2.5-2 postpack .
> echo postpack

postpack
+ pkg@6.2.5-2
$ yarn publish --tag next
yarn publish v1.6.0
[1/4] Bumping version...
info Current version: 6.2.5-3
question New version:
info Proceeding with current version: 6.2.5-3
[2/4] Logging in...
[3/4] Publishing...
$ echo prepublishOnly
prepublishOnly
success Published.
[4/4] Revoking token...
info Not revoking login token, specified via config file.
✨  Done in 6.99s.

If the current behavior is a bug, please provide the steps to reproduce.

Set scripts.prepack in package.json, called during yarn pack but not yarn publish.

What is the expected behavior?

Should call the scripts like npm does.

Please mention your node.js, yarn and operating system version.

Node: 8.11.1
Yarn: 1.6.0
OS: MacOS High Sierra

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions