-
-
Notifications
You must be signed in to change notification settings - Fork 275
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
packages/wxt/src/core/zip.ts
Outdated
function negateCheck() { | ||
return options?.exclude?.some( | ||
(option) => | ||
option.startsWith('!') && minimatch(relativePath, option.slice(1)), | ||
); | ||
} | ||
if (negateCheck()) { | ||
return true; | ||
} |
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.
function negateCheck() { | |
return options?.exclude?.some( | |
(option) => | |
option.startsWith('!') && minimatch(relativePath, option.slice(1)), | |
); | |
} | |
if (negateCheck()) { | |
return true; | |
} | |
const isNegated = options?.exclude?.some( | |
(option) => | |
option.startsWith('!') && minimatch(relativePath, option.slice(1)), | |
); | |
if (isNegated) return true; |
…o fix/zip-exclude-bang
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