-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[pack] does not handle negations in package.json files property #7888
Comments
To add to the severity of this issue, I had a Hopefully I didn't have any sensitive information (like |
Same case happened to me, but luckily I was publishing to private registry Cheers |
The glob pattern negate flag in package.json#files is not supported in yarn, it is not written anywhere. Apparently it's an implementation choice through looking at utils/filter.js and cli/pack.js in yarn sourcecode. I think it might be best to mention this in the docs. yarnpkg/yarn#7888 team-innovation/vue-sfc-rollup#40 fuxingloh/yarn@62b7282
Any updates on this issue? I've faced the same situation that pixelastic wrote. |
Closing as fixed in v2 |
Bug description
Command
What is the current behavior?
Yarn
pack
also includes negated patterns when creating a package.The
files
property in package.json allows to define what to include in our package when packing / publishing.When using negation like
!foo.js
, yarn still will includefoo.js
into the package.What is the expected behavior?
Yarn
pack
should handle negated globs correctly, like npm handles it.Steps to Reproduce
Will contain
include.me
,exclude.me
andpackage.json
Whereas
npm pack --dry-run --verbose
will not include theexclude.me
file:Environment
12.14.1
1.22.x
The text was updated successfully, but these errors were encountered: