Current Behavior:
Negated patterns in the files array of package.json have no effect.
Expected Behavior:
Negated patterns should cause the matching files to be excluded from the published package.
Steps To Reproduce:
-
Add the following files array in package.json:
"files": [
"**/*.js",
"!foo.js"
],
-
Create a foo.js file.
-
Run npm publish --dry-run.
-
See how the output incorrectly contains foo.js.
Environment:
- OS: macOS 10.15.7
- Node: 15.0.1
- npm: 7.0.3
Current Behavior:
Negated patterns in the
filesarray ofpackage.jsonhave no effect.Expected Behavior:
Negated patterns should cause the matching files to be excluded from the published package.
Steps To Reproduce:
Add the following
filesarray inpackage.json:Create a
foo.jsfile.Run
npm publish --dry-run.See how the output incorrectly contains
foo.js.Environment: