Closed
Description
Is there an existing issue for this?
- I have searched the existing issues
This issue exists in the latest npm version
- I am using the latest npm
Current Behavior
When publishing a package with a package.json including:
"files": [
"/build/*"
],
In NPM 8 all subdirectories and their files would be included. In NPM 9 it seems this has changed to not include subdirectories.
Expected Behavior
I think this new behaviour is actually correct, I would expect "/build/**"
or "/build/**/*"
to be used for including subdirectories - but from reading through breaking changes I couldn't find any references for this change - it might be nice to have some kind of deprecation or changed behaviour mentioned if using a single asterisk notation.
Steps To Reproduce
- Set up a package to publish from a build folder with subdirectories and include the following in package.json
"files": [
"/build/*"
],
- Run 'npm package --dry-run'
- Note that with NPM 9 subdirectories aren't included and with NPM 8 they are.
Environment
- npm:9.4.2
- Node.js:v16.13.2
- OS Name: n/a
- System Model Name: n/a
- npm config: n/a