-
Notifications
You must be signed in to change notification settings - Fork 51
Open
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds an initial reviewneeds an initial review
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
The npm CLI documentation says that prepack "Runs BEFORE a tarball is packed (on "npm pack", "npm publish", and when installing a git dependencies)," yet in dir.js L39-L41, it's made clear that pacote expects the CLI to call it, rather than pacote itself.
Expected Behavior
Unless I am misunderstanding the control flow here, npm calls pacote before ever having access to the git repo's files, and doesn't receive control flow back until after the tarball has already been generated (and installed?). If that's the case, the calling of prepack when downloading a git repository needs to be done by pacote, rather than expecting the CLI to call it.
Notes:
- There is a corresponding issue in npm/cli([BUG]
prepareandprepackscripts are not handled as documented when installing a git dependency cli#1865) which tracks this issue, but has been closed due to repairation of half of the issue (dependency installation before prepare script).
Steps To Reproduce
See this comment in npm/cli for a simple reproduction process.
Environment
- npm: 9.3.1, also tested on 9.4.1
- Node: v18.14.0, also tested on v19.6.0
- OS: Ubuntu 22.04.1 LTS
- platform: HP Laptop 15-dy2xxx
jakebailey and remcohaszing
Metadata
Metadata
Assignees
Labels
Bugthing that needs fixingthing that needs fixingNeeds Triageneeds an initial reviewneeds an initial review