-
Notifications
You must be signed in to change notification settings - Fork 4k
Closed
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release
Description
Current Behavior:
If there are both prepare and prepublishOnly scripts, then npm publish runs them in a different order in v7 than it did in v6.
Expected Behavior:
v7 should run these in the same order as v6, or this difference should be documented somewhere.
Steps To Reproduce:
- In an empty directory, create a
package.jsoncontaining:
{
"name": "test",
"version": "0.0.0",
"scripts": {
"prepare": "echo prepare >> scripts.log",
"prepublishOnly": "echo prepublishOnly >> scripts.log"
}
}- Run
npm publish(aborting out of 2FA prompt, etc.) cat scripts.log
On npm@6.14.11, this file contains:
prepare
prepublishOnly
On npm@7.5.3, this file contains:
prepublishOnly
prepare
Is this an intended change or is it a bug? I didn't see anything in the 7.0.0 changelog about this, nor did I see any relevant differences between https://docs.npmjs.com/cli/v6/using-npm/scripts and https://docs.npmjs.com/cli/v7/using-npm/scripts.
Environment:
- OS: Ubuntu 20.04
- Node: 15.8.0
- npm: 7.5.3
tanhauhau and dummdidumm
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds review for next stepsneeds review for next stepsRelease 7.xwork is associated with a specific npm 7 releasework is associated with a specific npm 7 release