Skip to content

Support for npm@4's new prepublish behavior #1323

@Jessidhia

Description

@Jessidhia

npm@4 was released a few minutes ago, and it deprecates the prepublish verb, renaming it to prepare, and adding a prepublishOnly (which runs only on publish).

In yarn's case, the only changes should be also running prepare wherever prepublish ran and prepublishOnly on publish (if yarn can publish?). prepublish should still be run, but probably should get a deprecation warning.

npm@5 is expected to stop running prepublish entirely on npm install and npm pack (i.e. run only on npm publish), and then an npm@>=6 should deprecate prepublishOnly by renaming it to prepublish.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions