chore(deps): drop the archived image-size dependency - #6485
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Adds Reviewed by Cursor Bugbot for commit e53b246. Configure here. |
Greptile SummaryThe PR removes the direct archived
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| apps/sim/lib/content/registry-factory.ts | Replaces the local OG-image metadata parser with the existing, deployment-packaged sharp dependency while preserving fallback behavior. |
| apps/sim/lib/content/og-image.test.ts | Adds Node-based invariant tests for local OG-image existence, dimensions, and crawler-supported formats. |
| apps/sim/package.json | Removes the archived direct image-size dependency. |
| bun.lock | Removes the direct image-size@2.0.2 resolution while preserving the transitive image-size@1.2.1 dependency required by pptxgenjs. |
Reviews (2): Last reviewed commit: "improvement(content): read OG dimensions..." | Re-trigger Greptile
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit e53b246. Configure here.
Summary
image-sizedependency, which is archived upstream and carries two unpatched high-severity DoS advisories (Dependabot feat(mistral-OCR): added mistral tool and block for parsing pdfs #217/feat(mistal-ocr): added file upload to mistal ocr tool in production #218 — GHSA-w3rx-r6r6-pgpr, GHSA-5p2g-fcmc-qvqq). Both list no patched version, so there is nothing to bump to.readOgImageDimensionsinlib/content/registry-factory.ts, which probes intrinsic dimensions of repo-committed OG covers underpublic/. It now usessharp— already a direct dependency, already used server-side, and a Next.js default server-external package — instead of a third-party parser.Net effect is a smaller tree: one dependency gone, ~10 lines changed, no new parsing code to own.
Verification
Diffed
sharpagainstimage-size@2.0.2over every file inapps/sim/public(208 images):sharpapplies 72/96 DPI scaling;image-sizereads the raw attribute) andfavicon.icois unsupported bysharp. None is anog:image, and neither SVG nor ICO is accepted by the social crawlers.All 40
ogImageentries across blog and library resolve to real files with readable dimensions — no post changes behavior.Notes
pptxgenjsstill pullsimage-size@1.2.1transitively, but it's a sandbox-bundle dep that never reaches those parsers, and no fixed version exists to move it to.sharp.metadata()parses headers only; it does not decode pixels.Type of Change
Testing
og-image.test.tsguards the content invariant: every localogImagemust exist, expose dimensions, and be a crawler-accepted format. 41 tests.bun run lint,bun run type-check, andbun run lint:checkclean.Checklist