Skip to content

fix: declare sharp for image optimization - #3524

Merged
sawka merged 1 commit into
mainfrom
cosmos/sharp-dep
Sep 25, 2026
Merged

sawka merged 1 commit into
mainfrom
cosmos/sharp-dep

Conversation

@sawka

@sawka sawka commented Sep 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Declare sharp as a development dependency so vite-plugin-image-optimizer can load its optional peer during renderer builds.
  • Lock the native packages for supported platforms.

Verification

  • npm run build:dev exited 0 and successfully optimized all four logo images (about 63% total savings).
  • Sharp loaded and encoded a PNG on Linux x64.
  • task check:ts still fails on existing preview-mock type errors, unrelated to this dependency change.

@coderabbitai

coderabbitai Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 99d8402a-b196-4d7a-917f-7cd6cce377af

📥 Commits

Reviewing files that changed from the base of the PR and between d9dbbbf and bc4154b.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • package.json

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


Walkthrough

The package manifest adds sharp version ^0.34.5 as a development dependency.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Merge Risk: ⚪ Minimal · up to bc415

No merge blocker was identified for this development-dependency change; the reviewed manifest and lockfile are consistent.

Architecture Summary

Architecture risk: 🔵 Low · up to bc415

The change affects 1 system.

Changed systems: package.json

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — package.json (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in package.json: Added sharp (^0.34.5) as a development dependency.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly states that the change declares sharp for image optimization. It is concise and directly related to the main change.
Description check ✅ Passed The description explains why sharp was added, identifies the native package locking, and reports verification results. It is directly related to the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying waveterm with  Cloudflare Pages  Cloudflare Pages

Latest commit: bc4154b
Status: ✅  Deploy successful!
Preview URL: https://b7154de4.waveterm.pages.dev
Branch Preview URL: https://cosmos-sharp-dep.waveterm.pages.dev

View logs

@sawka
sawka merged commit cf19309 into main Sep 25, 2026
5 checks passed
@sawka
sawka deleted the cosmos/sharp-dep branch September 25, 2026 05:08
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.

1 participant