Repository navigation
fix(auto-icons)!: replace default icon sizes when custom sizes are provided - #2644
Conversation
✅ Deploy Preview for creative-fairy-df92c4 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Comment |
@wxt-dev/analytics
@wxt-dev/auto-icons
@wxt-dev/browser
@wxt-dev/i18n
@wxt-dev/is-background
@wxt-dev/module-react
@wxt-dev/module-solid
@wxt-dev/module-svelte
@wxt-dev/module-vue
@wxt-dev/runner
@wxt-dev/storage
@wxt-dev/unocss
@wxt-dev/webextension-polyfill
wxt
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2644 +/- ##
==========================================
+ Coverage 79.52% 79.74% +0.21%
==========================================
Files 135 138 +3
Lines 4054 4098 +44
Branches 944 946 +2
==========================================
+ Hits 3224 3268 +44
+ Misses 734 733 -1
- Partials 96 97 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
Thanks for helping make WXT better! |
Important
Breaking change:
autoIcons.sizesnow replaces the default sizes instead of extending them.To preserve the previous output, change configurations such as
sizes: [96]tosizes: [128, 48, 32, 16, 96].Omitting
sizesor setting it toundefinedkeeps the default behavior. An empty array now generates no icons and produces an emptymanifest.iconsobject.Overview
Previously,
defuconcatenated custom sizes with the defaults, preventing users from specifying only the sizes they wanted.This change:
options.sizeswhen provided, falling back to the defaults otherwise.Manual Testing
Run the package tests:
bun run --filter @wxt-dev/auto-icons test runTo verify in a WXT extension with this module enabled and a valid base icon:
autoIcons.sizesto[96]and build. Verify that the module generates onlyicons/96.pngand thatmanifest.iconscontains only the96entry.[96, 96, 32]. Verify that each size is generated and listed only once.sizes. Verify that the default sizes[128, 48, 32, 16]are generated.[]. Verify that no icons are generated andmanifest.iconsis empty.Validation completed:
The full monorepo build and the manual extension-build steps above have not been run locally.
Related Issue
Follow-up to #2491, specifically the [discussion about replacing default sizes](#2491 (comment)).
The deduplication behavior introduced by #2493 is retained.