Skip to content

Remove sharp from SVG snapshot matching - #227

Merged
seveibar merged 3 commits into
mainfrom
fix/remove-sharp-dependency
Aug 7, 2026
Merged

Remove sharp from SVG snapshot matching#227
seveibar merged 3 commits into
mainfrom
fix/remove-sharp-dependency

Conversation

@seveibar

@seveibar seveibar commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the looks-same@9/bun-match-svg peer dependency chain with @tscircuit/image-utils
  • declare both @tscircuit/image-utils and @resvg/resvg-js as unpinned "*" peers, with resvg pinned only for local development
  • rasterize SVGs with resvg before comparing PNG pixels
  • write returned diff buffers explicitly and fix the existing PNG snapshot helper
  • remove legacy peer-install instructions

This prevents graphics-debug consumers, including @tscircuit/core, from auto-installing sharp@0.32.6.

Verification

  • bun test (65 pass)
  • bunx tsc --noEmit
  • bun run build
  • confirmed no sharp, looks-same, or bun-match-svg entries remain in package.json or bun.lock

@vercel

vercel Bot commented Aug 7, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
graphics-debug Ready Ready Preview Aug 7, 2026 9:48pm

Request Review

@seveibar
seveibar merged commit 942a4c7 into main Aug 7, 2026
4 checks passed
@seveibar
seveibar deleted the fix/remove-sharp-dependency branch August 7, 2026 21:49
@tscircuitbot

Copy link
Copy Markdown

Thank you for your contribution! 🎉

PR Rating: ⭐⭐⭐
Impact: Major

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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.

2 participants