-
-
Notifications
You must be signed in to change notification settings - Fork 278
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
fix: exclude files in .zip except those with a bang ! #1517
base: main
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Do I need to add some test cases for these fix? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! We need to add some tests around these changes:
https://github.com/wxt-dev/wxt/blob/main/packages/wxt/e2e/tests/zip.test.ts
…o fix/zip-exclude-bang
packages/wxt-demo/wxt.config.ts
Outdated
exclude: [ | ||
'**/*.json', // Exclude all .json files | ||
'!manifest.json', // Include manifest.json | ||
], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hold on, I'm looking at this code now, and based on the old logic:
options?.include?.some((pattern) => minimatch(relativePath, pattern)) || !options?.exclude?.some((pattern) => minimatch(relativePath, pattern))
Couldn't you have just added mainfest.json
to include
, since include
has priority over exclude
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, but original issue was to include this negate feature in exclude parameter. Maybe you can explain this to @skube.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I'm not understanding something, but I don't see an include
option under the zip property.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh yeah, there isn't.
@aklinker1 that options.includes you're mentioning is taking includeSources
that is different option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a test case.
Overview
This is issue reproduction repo: https://github.com/skube/min-repro-wxt
Here is the discussion about creating this PR and more context.
#1510 (comment)
This PR closes #1510