You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use an inverse glob in package.json files array, directories that should be included are not traversed since v9 release. This is also an issue in v10.
Expected Behavior
Directories that match inverse glob should be traversed, so that test directories etc. can be excluded from distributions.
npm adheres more strictly to the glob spec now, and this meant that we stopped interpreting a normal glob as a "globstar". That was treated as a regression and partially fixed this in npm/npm-packlist#147.
You can fix this today by making your glob more correct i.e. dist/**/!(__test__).
We may look into trying to fix this for the inverse syntax but it's probably safest if you update your files entry.
Is there an existing issue for this?
This issue exists in the latest npm version
Current Behavior
If you use an inverse glob in package.json
files
array, directories that should be included are not traversed since v9 release. This is also an issue in v10.Expected Behavior
Directories that match inverse glob should be traversed, so that test directories etc. can be excluded from distributions.
Steps To Reproduce
https://github.com/argomez/npm-files-glob has a simple setup which you can run
npm pack
in the different versions to compare behavior.Package setup
v8.19.4
v8 respects the inverse glob and includes
dist/util/util.js
v9.9.0
v9 does not traverse
dist/util
directoryEnvironment
The text was updated successfully, but these errors were encountered: