Skip to content

fix(deps): bump sharp to 0.35.3 and js-yaml to 4.3.0 for security advisories#5848

Merged
waleedlatif1 merged 2 commits into
stagingfrom
fix/dependabot-sharp-jsyaml
Jul 22, 2026
Merged

fix(deps): bump sharp to 0.35.3 and js-yaml to 4.3.0 for security advisories#5848
waleedlatif1 merged 2 commits into
stagingfrom
fix/dependabot-sharp-jsyaml

Conversation

@waleedlatif1

Copy link
Copy Markdown
Collaborator

Resolves both open Dependabot alerts (apps/sim/package.json):

sharp 0.35 ships new ESM-first typings where the module namespace is no longer callable — updated the lazy-load in lib/copilot/vfs/file-reader.ts to type the constructor as SharpConstructor (type-only import, keeps the runtime lazy-load intact).

Verified: tsc --noEmit clean; vitest for lib/copilot/vfs/file-reader.test.ts (exercises real sharp), lib/file-parsers/yaml-parser.test.ts, and lib/chunkers — 262 tests pass.

Supersedes Dependabot PR #5844 (sharp-only).

@waleedlatif1
waleedlatif1 requested a review from a team as a code owner July 22, 2026 17:15
@vercel

vercel Bot commented Jul 22, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Jul 22, 2026 5:20pm

Request Review

@cursor

cursor Bot commented Jul 22, 2026

Copy link
Copy Markdown

PR Summary

Low Risk
Dependency patch upgrades with a small type-only sharp change; image pipeline logic is unchanged and was covered by existing tests.

Overview
Addresses Dependabot security alerts by upgrading js-yaml 4.2.04.3.0 (merge-key CPU exhaustion) and sharp 0.34.30.35.3 (libvips CVEs via updated native binaries). Lockfile changes follow the apps/sim dependency pins.

sharp 0.35 uses ESM-first typings where the default export is no longer typed as a callable module namespace. Copilot VFS image prep in file-reader.ts now types the lazy-loaded default as SharpConstructor (type-only import); runtime behavior is unchanged ((await import('sharp')).default).

Reviewed by Cursor Bugbot for commit 560b66d. Configure here.

@greptile-apps

greptile-apps Bot commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

This PR updates two Sim dependencies to security-patched releases. The main changes are:

  • Upgrade js-yaml from 4.2.0 to 4.3.0.
  • Upgrade Sharp from 0.34.3 to 0.35.3 with new libvips binaries.
  • Update the lazy Sharp loader’s constructor type.
  • Refresh the Bun lockfile dependency graph.

Confidence Score: 4/5

The Sharp type export should be confirmed against a fresh install before merging.

  • The runtime lazy-load behavior is unchanged.
  • The direct dependency versions resolve to the intended patched releases.
  • A missing named type export would block TypeScript and application builds.

apps/sim/lib/copilot/vfs/file-reader.ts

Important Files Changed

Filename Overview
apps/sim/lib/copilot/vfs/file-reader.ts Adds a named Sharp constructor type while preserving the existing lazy runtime import.
apps/sim/package.json Pins the direct Sharp and js-yaml dependencies to patched versions.
bun.lock Refreshes Sharp platform binaries, js-yaml resolution, and related deduplication entries.

Reviews (1): Last reviewed commit: "chore: fix import order in file-reader" | Re-trigger Greptile

Comment thread apps/sim/lib/copilot/vfs/file-reader.ts
@waleedlatif1
waleedlatif1 merged commit a0a437d into staging Jul 22, 2026
18 checks passed
@waleedlatif1
waleedlatif1 deleted the fix/dependabot-sharp-jsyaml branch July 22, 2026 17:26
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