[BUG] README.md/LICENSE files etc are included recursively and cannot be excluded #6341
Closed
2 tasks done
Labels
Bug
thing that needs fixing
Priority 2
secondary priority issue
Release 9.x
work is associated with a specific npm 9 release
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
Up until some time ago, only the root README.md, LICENSE etc were included.
Now these files are included recursively and there doesn't seem to exist a way to exclude them.
I tried adding
"!lib/**/README.md"
in thefiles
section in package.json but the issue persists.Expected Behavior
The user should be able to exclude any files from subfolders like before.
Steps To Reproduce
git clone https://github.com/stylelint/stylelint.git && cd stylelint && npm ci
npm pack --dry
588
and includes all README.md files from subfolders.Environment
If this change was intended, please at least allow people to exclude the non-ROOT files. Including hundreds of files increases the tarball size, time to extract, download time, disk health, etc.
It should be up to the package publishers to decide if they want to exclude these files, like it was up until some time ago. v8.19.4 that I tried has the previous behavior and doesn't include these files recursively. v9.0.0 and newer has the new behavior.
The text was updated successfully, but these errors were encountered: