- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 214
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 skipped entrypoints from Firefox sources zip #1238
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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! However, as it is now, this will not work. See comments below.
Actually, after looking at That way, you can just call If we put it in the |
@nishu-murmu Edit: I decided to make these changes it's own PR into WXT, so once #1244 is merged, we can update this branch like so: // zip.ts
if (wxt.config.zip.zipSources) {
+ const entrypoints = await findEntrypoints();
+ const skippedEntrypoints = entrypoints.filter(entry => entry.skipped);
+ const excludeSources = [...wxt.config.zip.excludeSources, ...skippedEntrypoints.map(entry => relative(wxt.config.zip.sourcesRoot, entry.inputPath))]
await wxt.hooks.callHook('zip:sources:start', wxt);
// ...
await zipDir(wxt.config.zip.sourcesRoot, sourcesZipPath, {
include: wxt.config.zip.includeSources,
- exclude: wxt.config.zip.excludeSources,
+ exclude: excludeSources, That should be all the changes this branch need. |
I've refactored the code. |
@nishu-murmu Could you add an e2e test for this in See this test for reference: wxt/packages/wxt/e2e/tests/zip.test.ts Lines 151 to 182 in 0d796b6
You can run the test via: cd packages/wxt
pnpm test zip.test.ts Then I'll approve this and we can get it released! |
Cause in the zip.ts file
then This is causing: Let me see what I can do. |
@nishu-murmu I would recomend just updating the test to expect the hook to be called twice. That should be fine |
Yeah, I got it. |
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.
🎉
@wxt-dev/auto-icons
@wxt-dev/module-react
@wxt-dev/i18n
@wxt-dev/module-solid
@wxt-dev/module-vue
@wxt-dev/module-svelte
@wxt-dev/storage
@wxt-dev/unocss
wxt
commit: |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1238 +/- ##
==========================================
- Coverage 81.03% 80.83% -0.21%
==========================================
Files 128 128
Lines 6123 6136 +13
Branches 1038 1041 +3
==========================================
- Hits 4962 4960 -2
- Misses 1146 1161 +15
Partials 15 15 ☔ View full report in Codecov by Sentry. |
@aklinker1 I've applied the logic as you mentioned, passing a boolean parameter to the
findEntrypoints
function.Additionally while filtering
options.exclude
I had to use relative path, cause it wasn't working inminimatch
method.I've tested this on Windows.
This fixes #574