Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Prior to v10.5.0 there was possibility to directly redirect npm pack output to file and retrieve tarball file name for given package. Starting from 10.5.0 and above stdout is being polluted by prepare scripts output and command itself.
> library@1.0.0 prepare
> echo "Should not be visible"
library@1.0.0.tgz
Expected Behavior
npm pack should output to std only tarball file name as it was before otherwise its a breaking change.
Steps To Reproduce
- In any package add prepare script which writes to stdout
- Run
npm pack and redirect stdout to file e.g. npm package > package-name
- Inspect
package-name file content
- It should contain only package tarball name
Environment
- npm: v10.8.0
- Node.js: v20.13.1
- OS Name: macOS 14.4.1
- System Model Name: MacBook Pro
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Prior to v10.5.0 there was possibility to directly redirect
npm packoutput to file and retrieve tarball file name for given package. Starting from 10.5.0 and above stdout is being polluted by prepare scripts output and command itself.Expected Behavior
npm packshould output to std only tarball file name as it was before otherwise its a breaking change.Steps To Reproduce
npm packand redirect stdout to file e.g.npm package > package-namepackage-namefile contentEnvironment