Closed
Description
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 inpackage.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