-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Labels
Description
Is there an existing issue for this?
- I have searched the existing issues
Current Behavior
Given this:
{
"files": [
"lib/(!test)"
]
}
and a tree like this:
- lib
- main.js
- foo.js
- utils
- foo-util.js
- test
- main_test.js
- foo_test.js
- utils
- foo-util_test.js
before the hefty refactor that happened around npm 9 (in npm-packlist), that glob would result in this:
- lib
- main.js
- foo.js
- utils
- foo-util.js
After the refactor, this is the resulting packed tree:
- lib
- main.js
meaning the glob was ignored really (since ${main}
is enforceably included).
it can be solved by changing the files array to this:
{
"files": [
"lib/",
"!lib/test/"
]
}
which im fine with, but it does mean you've introduced a breaking change which i can't see in the changelog (could be me being blind though).
can you clarify if this is a bug or intentional? and close this if it is the latter, with an explanation if you can
Expected Behavior
glob is respected
Steps To Reproduce
N/A
Environment
- npm: 9.2.0
- Node: 19.3.0
- OS: MacOS