Skip to content

fix(auto-icons)!: replace default icon sizes when custom sizes are provided - #2644

Merged
aklinker1 merged 3 commits into
wxt-dev:mainfrom
zryyyy:main
Oct 4, 2026
Merged

aklinker1 merged 3 commits into
wxt-dev:mainfrom
zryyyy:main

Conversation

@zryyyy

@zryyyy zryyyy commented Oct 3, 2026

Copy link
Copy Markdown
Contributor

Important

Breaking change: autoIcons.sizes now replaces the default sizes instead of extending them.

To preserve the previous output, change configurations such as sizes: [96] to sizes: [128, 48, 32, 16, 96].

Omitting sizes or setting it to undefined keeps the default behavior. An empty array now generates no icons and produces an empty manifest.icons object.

Overview

Previously, defu concatenated custom sizes with the defaults, preventing users from specifying only the sizes they wanted.

This change:

  • Uses the original options.sizes when provided, falling back to the defaults otherwise.
  • Preserves deduplication and uses the same resolved sizes across the manifest, icon generation, and public-path hooks.
  • Updates the JSDoc and README with the new behavior and migration instructions.
  • Updates existing tests and adds seven parameterized cases covering default fallback, replacement, deduplication, and empty arrays.

Manual Testing

Run the package tests:

bun run --filter @wxt-dev/auto-icons test run

To verify in a WXT extension with this module enabled and a valid base icon:

  1. Set autoIcons.sizes to [96] and build. Verify that the module generates only icons/96.png and that manifest.icons contains only the 96 entry.
  2. Set it to [96, 96, 32]. Verify that each size is generated and listed only once.
  3. Omit sizes. Verify that the default sizes [128, 48, 32, 16] are generated.
  4. Set it to []. Verify that no icons are generated and manifest.icons is empty.

Validation completed:

  • All 27 tests in the auto-icons test file passed in an isolated environment with minimal WXT module-loading stubs.
  • Basic Prettier formatting checks passed for the three changed files.

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.

@zryyyy
zryyyy requested a review from Timeraa as a code owner October 3, 2026 05:24
@netlify

netlify Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for creative-fairy-df92c4 ready!

Name Link
🔨 Latest commit c821df5
🔍 Latest deploy log https://app.netlify.com/projects/creative-fairy-df92c4/deploys/6ac1d249dd15d3000815ebdf
😎 Deploy Preview https://deploy-preview-2644--creative-fairy-df92c4.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

To edit notification comments on pull requests, go to your Netlify project configuration.

@coderabbitai

coderabbitai Bot commented Oct 3, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 9cd2404f-d64f-4bc6-8d6e-b0e02083dfaf

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added the pkg/auto-icons Includes changes to the `packages/auto-icons` directory label Oct 3, 2026
@pkg-pr-new

pkg-pr-new Bot commented Oct 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

@wxt-dev/analytics

npm i https://pkg.pr.new/@wxt-dev/analytics@2644

@wxt-dev/auto-icons

npm i https://pkg.pr.new/@wxt-dev/auto-icons@2644

@wxt-dev/browser

npm i https://pkg.pr.new/@wxt-dev/browser@2644

@wxt-dev/i18n

npm i https://pkg.pr.new/@wxt-dev/i18n@2644

@wxt-dev/is-background

npm i https://pkg.pr.new/@wxt-dev/is-background@2644

@wxt-dev/module-react

npm i https://pkg.pr.new/@wxt-dev/module-react@2644

@wxt-dev/module-solid

npm i https://pkg.pr.new/@wxt-dev/module-solid@2644

@wxt-dev/module-svelte

npm i https://pkg.pr.new/@wxt-dev/module-svelte@2644

@wxt-dev/module-vue

npm i https://pkg.pr.new/@wxt-dev/module-vue@2644

@wxt-dev/runner

npm i https://pkg.pr.new/@wxt-dev/runner@2644

@wxt-dev/storage

npm i https://pkg.pr.new/@wxt-dev/storage@2644

@wxt-dev/unocss

npm i https://pkg.pr.new/@wxt-dev/unocss@2644

@wxt-dev/webextension-polyfill

npm i https://pkg.pr.new/@wxt-dev/webextension-polyfill@2644

wxt

npm i https://pkg.pr.new/wxt@2644

commit: c821df5

@codecov

codecov Bot commented Oct 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.74%. Comparing base (804235e) to head (c821df5).
⚠️ Report is 5 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@aklinker1
aklinker1 merged commit fc259d4 into wxt-dev:main Oct 4, 2026
19 checks passed
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

Thanks for helping make WXT better!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg/auto-icons Includes changes to the `packages/auto-icons` directory

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants