Skip to content

Commit a0a437d

Browse files
authored
fix(deps): bump sharp to 0.35.3 and js-yaml to 4.3.0 for security advisories (#5848)
* fix(deps): bump sharp to 0.35.3 and js-yaml to 4.3.0 for security advisories * chore: fix import order in file-reader
1 parent fd0d08a commit a0a437d

3 files changed

Lines changed: 61 additions & 49 deletions

File tree

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import { type Span, trace } from '@opentelemetry/api'
22
import { createLogger } from '@sim/logger'
33
import { toError } from '@sim/utils/errors'
4+
import type { SharpConstructor } from 'sharp'
45
import {
56
CopilotVfsOutcome,
67
CopilotVfsReadOutcome,
@@ -106,7 +107,7 @@ async function prepareImageForVision(
106107
const mediaType = detectImageMime(buffer, claimedType)
107108
span.setAttribute(TraceAttr.CopilotVfsInputMediaTypeDetected, mediaType)
108109

109-
let sharpModule: typeof import('sharp')
110+
let sharpModule: SharpConstructor
110111
try {
111112
sharpModule = (await import('sharp')).default
112113
} catch (err) {

apps/sim/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@
164164
"isolated-vm": "6.0.2",
165165
"jose": "6.0.11",
166166
"js-tiktoken": "1.0.21",
167-
"js-yaml": "4.2.0",
167+
"js-yaml": "4.3.0",
168168
"json5": "2.2.3",
169169
"jszip": "3.10.1",
170170
"lru-cache": "11.3.6",
@@ -204,7 +204,7 @@
204204
"resend": "^4.1.2",
205205
"rss-parser": "3.13.0",
206206
"safe-regex2": "5.1.0",
207-
"sharp": "0.34.3",
207+
"sharp": "0.35.3",
208208
"socket.io-client": "4.8.1",
209209
"ssh2": "^1.17.0",
210210
"streamdown": "2.5.0",

0 commit comments

Comments
 (0)