Skip to content

fix: replace svgo-autocrop dep icon-kit - #1293

Merged
Alastair Fraser (alastair-simon) merged 5 commits into
mainfrom
fix/remove-svgo-autocrop
Jul 28, 2026
Merged

fix: replace svgo-autocrop dep icon-kit#1293
Alastair Fraser (alastair-simon) merged 5 commits into
mainfrom
fix/remove-svgo-autocrop

Conversation

@alastair-simon

@alastair-simon Alastair Fraser (alastair-simon) commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

What?

Replace the unmaintained svgo-autocrop dependency (and its transitive puppeteer + jimp) with a vendored copy under src/autocrop that rasterises via @resvg/resvg-js.

Why?

svgo-autocrop renders each icon in headless Chrome just to compute a crop box, so puppeteer downloaded a Chromium binary on nearly every install — slow and flaky in CI — and the package is no longer maintained. @resvg/resvg-js is a prebuilt Rust binary (no browser).

How?

  • Vendored svgo-autocrop's crop/translate logic, swapping only the renderer: Chrome screenshot → resvg render.
  • Dropped svgo-autocrop,
  • added @resvg/resvg-js + svg-pathdata;
  • removed the npx @puppeteer/browsers install chrome step from the update-icons workflow.
  • Restructured index.ts: phase 1 downloads concurrently (network-bound), phase 2 optimizes sequentially (CPU-bound, no open sockets).

Testing?

  • Verified locally and in CI/CD environment, confirmed it does not cause modifications to existing icons.
  • Verified byte-for-byte identical output across all 891 real input→output pairs from run.log.
  • lint:types and lint:eslint pass.

@vercel

vercel Bot commented Jul 27, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
meteor-docs Ready Ready Preview, Comment Jul 27, 2026 1:59pm
meteor-storybook Ready Ready Preview, Comment Jul 27, 2026 1:59pm

Request Review

@pkg-pr-new

pkg-pr-new Bot commented Jul 28, 2026

Copy link
Copy Markdown

Open in StackBlitz

@shopware-ag/meteor-admin-sdk

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-admin-sdk@1293

@shopware-ag/meteor-component-library

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-component-library@1293

@shopware-ag/create-meteor-extension

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/create-meteor-extension@1293

@shopware-ag/meteor-icon-kit

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-icon-kit@1293

@shopware-ag/meteor-prettier-config

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-prettier-config@1293

@shopware-ag/stylelint-plugin-meteor

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/stylelint-plugin-meteor@1293

@shopware-ag/meteor-tokens

npm i https://pkg.pr.new/shopware/meteor/@shopware-ag/meteor-tokens@1293

commit: 7d28130

@alastair-simon Alastair Fraser (alastair-simon) changed the title fix: replace svgo autocrop fix: replace svgo-autocrop dep icon-kit Jul 28, 2026
@alastair-simon
Alastair Fraser (alastair-simon) merged commit 21d8955 into main Jul 28, 2026
11 checks passed
@alastair-simon
Alastair Fraser (alastair-simon) deleted the fix/remove-svgo-autocrop branch July 28, 2026 13:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants