Is there an existing issue for this?
Current Behavior
Running npm pack includes the previous result of npm pack by default.
Expected Behavior
The result of npm pack is excluded. This probably means all .tgz files should be excluded. Users can choose to exclude it, but many don’t know about it.
Steps To Reproduce
- Clone a repo that doesn’t use the
files fields in package.json and doesn’t use .npmignore to exclude .tgz files. For example:
git@github.com:postcss/postcss.git
cd postcss
- Packing produces the expected results:
- Packing again includes the previously built tarball
Environment
- npm: v20.5.1
- Node: 9.8.1
- OS: Pop!_OS 22.04
- platform: System76 Oryx Pro
Is there an existing issue for this?
Current Behavior
Running
npm packincludes the previous result ofnpm packby default.Expected Behavior
The result of
npm packis excluded. This probably means all.tgzfiles should be excluded. Users can choose to exclude it, but many don’t know about it.Steps To Reproduce
filesfields inpackage.jsonand doesn’t use.npmignoreto exclude.tgzfiles. For example:git@github.com:postcss/postcss.git cd postcssEnvironment