Skip to content

Commit a042f0b

Browse files
waleedlatif1Waleed Latif
andauthored
chore(deps): fix OTel version split, drop dead deps, declare emcn peers (#5994)
* chore(deps): fix OTel version split, drop dead deps, declare emcn peers - Pin @opentelemetry/{resources,sdk-metrics,sdk-trace-base,sdk-trace-node} to exact 2.7.1 so they match sdk-node's pins instead of floating to 2.8.0. The carets meant app code built spans with 2.8.0 and passed them into NodeSDK from 2.7.1, which only worked by duck-typing. - Declare the 13 packages @sim/emcn imports but never declared, as peers mirrored into devDeps. @radix-ui/react-dismissable-layer had no declaration anywhere in the repo and resolved only transitively. - Remove ffmpeg-static: its binary downloads via postinstall, but it is not in trustedDependencies and Docker installs with --ignore-scripts, so the accessSync branch never succeeded and both call sites always fell through to system ffmpeg. - Remove critters + experimental.optimizeCss: Next only loads critters from the Pages Router renderer, and apps/sim is App Router only. - Make simstudio-ts-sdk zero-dependency by dropping node-fetch for native fetch; engines >=18. - Remove unused @vercel/og and postgres from docs, dotenv/inquirer/listr2 from the CLI, and yaml from the root. - Move @aws-sdk/client-appconfig from the root to apps/sim, its only consumer. - Delete the apps/sim overrides block; Bun only honors top-level overrides. - Bump free-email-domains 1.2.25 -> 1.9.70 (4,779 -> 13,059 domains). - Validate object/array variables with JSON.parse instead of JSON5, matching what the executor actually parses. - Swap the changelog GitHub icon off lucide to GithubOutlineIcon, matching the navbar chip on the same page. - Unify @types/node on 24.2.1 and lucide-react on ^0.511.0; bump chalk to 5 and image-size to 2. * fix(deps): complete the OTel pin, restore SDK error detail, revert email list Follow-ups from an independent audit of the previous commit. - Pin @opentelemetry/sdk-node and the three otlp-http exporters to exact 0.217.0. Pinning only their four dependents was self-reversing: sdk-node 0.219.0 requires core 2.8.0 exactly, so the next update would have silently rebuilt the split this PR removes. - Declare @opentelemetry/core (2.7.1). It is imported by lib/copilot/request/go/propagation.ts but resolved only by hoisting, and it is the OTel package with the most version churn in the tree. - Pin @radix-ui/react-dismissable-layer to exact 1.1.13 in @sim/emcn. All five transitive parents pin it exactly; a caret would fork a second copy on 1.1.14, which is the duplicate-context bug the declaration prevents. - Surface error.cause in simstudio-ts-sdk. Native fetch reports network failures as a bare "fetch failed" and puts the reason on cause, so every DNS/TLS/refused error was reaching callers with no diagnostic content. - Revert free-email-domains to 1.2.25. Upstream now merges the free-domain list with two disposable-email blocklists, so 1.9.70 classifies real organization domains as free — UK charities, some companies and universities, and the JP/KR ISP domains APAC SMBs use for business mail. The demo form blocks submission on that check, so a false positive costs the booking entirely. Worth doing deliberately, not inside a deps change. - Lower packages/cli engines to >=18. chalk 5 and commander 11 both accept >=16 and the source uses no Node 20 API, so >=20 only produced EBADENGINE for Node 18 users. --------- Co-authored-by: Waleed Latif <waleed@simstudio.ai>
1 parent e4cedcb commit a042f0b

16 files changed

Lines changed: 270 additions & 526 deletions

File tree

apps/docs/package.json

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@
2020
"@sim/db": "workspace:*",
2121
"@sim/emcn": "workspace:*",
2222
"@sim/workflow-renderer": "workspace:*",
23-
"@vercel/og": "^0.6.5",
2423
"ai": "5.0.203",
2524
"class-variance-authority": "^0.7.1",
2625
"clsx": "^2.1.1",
@@ -32,7 +31,6 @@
3231
"lucide-react": "^0.511.0",
3332
"next": "16.2.11",
3433
"next-themes": "^0.4.6",
35-
"postgres": "^3.4.5",
3634
"react": "19.2.4",
3735
"react-dom": "19.2.4",
3836
"remark-breaks": "^4.0.0",
@@ -47,7 +45,7 @@
4745
"@sim/tsconfig": "workspace:*",
4846
"@tailwindcss/postcss": "^4.0.12",
4947
"@types/mdx": "^2.0.13",
50-
"@types/node": "^22.14.1",
48+
"@types/node": "24.2.1",
5149
"@types/react": "^19.1.2",
5250
"@types/react-dom": "^19.0.4",
5351
"@typescript/native-preview": "7.0.0-dev.20260707.2",

apps/sim/app/(landing)/changelog/components/changelog-actions/changelog-actions.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
'use client'
22

33
import { ChipLink } from '@sim/emcn'
4-
import { BookOpen, Github, Rss } from 'lucide-react'
4+
import { BookOpen, Rss } from 'lucide-react'
5+
import { GithubOutlineIcon } from '@/components/icons'
56

67
/**
78
* Changelog hero actions - the GitHub / Documentation / RSS pill links shown
@@ -18,7 +19,7 @@ export function ChangelogActions() {
1819
href='https://github.com/simstudioai/sim/releases'
1920
target='_blank'
2021
rel='noopener noreferrer'
21-
leftIcon={Github}
22+
leftIcon={GithubOutlineIcon}
2223
>
2324
View on GitHub
2425
</ChipLink>

apps/sim/lib/audio/extractor.ts

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
import { execSync } from 'node:child_process'
2-
import fsSync from 'node:fs'
32
import fs from 'node:fs/promises'
43
import os from 'node:os'
54
import path from 'node:path'
65
import { createLogger } from '@sim/logger'
7-
import ffmpegStatic from 'ffmpeg-static'
86
import ffmpeg from 'fluent-ffmpeg'
97
import type {
108
AudioExtractionOptions,
@@ -32,19 +30,6 @@ function ensureFfmpeg(): void {
3230

3331
ffmpegInitialized = true
3432

35-
// Try ffmpeg-static binary
36-
if (ffmpegStatic && typeof ffmpegStatic === 'string') {
37-
try {
38-
fsSync.accessSync(ffmpegStatic, fsSync.constants.X_OK)
39-
ffmpegPath = ffmpegStatic
40-
ffmpeg.setFfmpegPath(ffmpegPath)
41-
logger.info('[FFmpeg] Using ffmpeg-static:', ffmpegPath)
42-
return
43-
} catch {
44-
// Binary doesn't exist or not executable
45-
}
46-
}
47-
4833
// Try system ffmpeg (cross-platform)
4934
try {
5035
const cmd = process.platform === 'win32' ? 'where ffmpeg' : 'which ffmpeg'

apps/sim/lib/media/ffmpeg.ts

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,16 @@
11
import { execSync } from 'node:child_process'
2-
import fsSync from 'node:fs'
32
import fs from 'node:fs/promises'
43
import os from 'node:os'
54
import path from 'node:path'
65
import { createLogger } from '@sim/logger'
7-
import ffmpegStatic from 'ffmpeg-static'
86
import ffmpeg from 'fluent-ffmpeg'
97

108
const logger = createLogger('MediaFfmpeg')
119

1210
let ffmpegInitialized = false
1311
let ffmpegPath: string | null = null
1412

15-
/** Lazy FFmpeg binary resolution (ffmpeg-static, then system), mirroring lib/audio/extractor.ts. */
13+
/** Lazy system FFmpeg binary resolution, mirroring lib/audio/extractor.ts. */
1614
function ensureFfmpeg(): void {
1715
if (ffmpegInitialized) {
1816
if (!ffmpegPath) {
@@ -24,17 +22,6 @@ function ensureFfmpeg(): void {
2422
}
2523
ffmpegInitialized = true
2624

27-
if (ffmpegStatic && typeof ffmpegStatic === 'string') {
28-
try {
29-
fsSync.accessSync(ffmpegStatic, fsSync.constants.X_OK)
30-
ffmpegPath = ffmpegStatic
31-
ffmpeg.setFfmpegPath(ffmpegPath)
32-
return
33-
} catch {
34-
// fall through to system ffmpeg
35-
}
36-
}
37-
3825
try {
3926
const cmd = process.platform === 'win32' ? 'where ffmpeg' : 'which ffmpeg'
4027
ffmpegPath = execSync(cmd, { encoding: 'utf-8' }).trim().split('\n')[0]

apps/sim/next.config.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,6 @@ const nextConfig: NextConfig = {
124124
serverExternalPackages: [
125125
'@1password/sdk',
126126
'unpdf',
127-
'ffmpeg-static',
128127
'fluent-ffmpeg',
129128
'ws',
130129
'isolated-vm',
@@ -143,7 +142,6 @@ const nextConfig: NextConfig = {
143142
],
144143
},
145144
experimental: {
146-
optimizeCss: !isDev,
147145
turbopackFileSystemCacheForDev: false,
148146
/**
149147
* Turbopack's persistent build cache (beta) — opt-in via env so only the

apps/sim/package.json

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"@1password/sdk": "0.3.1",
3838
"@a2a-js/sdk": "1.0.0-alpha.0",
3939
"@anthropic-ai/sdk": "0.114.0",
40+
"@aws-sdk/client-appconfig": "3.1032.0",
4041
"@aws-sdk/client-appconfigdata": "3.1032.0",
4142
"@aws-sdk/client-athena": "3.1032.0",
4243
"@aws-sdk/client-bedrock-runtime": "3.1032.0",
@@ -78,14 +79,15 @@
7879
"@modelcontextprotocol/sdk": "1.29.0",
7980
"@monaco-editor/react": "4.7.0",
8081
"@opentelemetry/api": "^1.9.0",
81-
"@opentelemetry/exporter-logs-otlp-http": "^0.217.0",
82-
"@opentelemetry/exporter-metrics-otlp-http": "^0.217.0",
83-
"@opentelemetry/exporter-trace-otlp-http": "^0.217.0",
84-
"@opentelemetry/resources": "^2.7.0",
85-
"@opentelemetry/sdk-metrics": "^2.7.0",
86-
"@opentelemetry/sdk-node": "^0.217.0",
87-
"@opentelemetry/sdk-trace-base": "^2.7.0",
88-
"@opentelemetry/sdk-trace-node": "^2.7.0",
82+
"@opentelemetry/core": "2.7.1",
83+
"@opentelemetry/exporter-logs-otlp-http": "0.217.0",
84+
"@opentelemetry/exporter-metrics-otlp-http": "0.217.0",
85+
"@opentelemetry/exporter-trace-otlp-http": "0.217.0",
86+
"@opentelemetry/resources": "2.7.1",
87+
"@opentelemetry/sdk-metrics": "2.7.1",
88+
"@opentelemetry/sdk-node": "0.217.0",
89+
"@opentelemetry/sdk-trace-base": "2.7.1",
90+
"@opentelemetry/sdk-trace-node": "2.7.1",
8991
"@opentelemetry/semantic-conventions": "^1.32.0",
9092
"@radix-ui/react-avatar": "1.1.10",
9193
"@radix-ui/react-checkbox": "^1.1.3",
@@ -148,7 +150,6 @@
148150
"drizzle-orm": "^0.45.2",
149151
"echarts": "6.1.0",
150152
"es-toolkit": "1.45.1",
151-
"ffmpeg-static": "5.3.0",
152153
"fluent-ffmpeg": "2.1.3",
153154
"framer-motion": "^12.5.0",
154155
"free-email-domains": "1.2.25",
@@ -159,7 +160,7 @@
159160
"http-proxy-agent": "7.0.2",
160161
"https-proxy-agent": "7.0.6",
161162
"idb-keyval": "6.2.2",
162-
"image-size": "1.2.1",
163+
"image-size": "2.0.2",
163164
"imapflow": "1.2.4",
164165
"input-otp": "^1.4.2",
165166
"ioredis": "^5.6.0",
@@ -168,10 +169,9 @@
168169
"jose": "6.0.11",
169170
"js-tiktoken": "1.0.21",
170171
"js-yaml": "4.3.0",
171-
"json5": "2.2.3",
172172
"jszip": "3.10.1",
173173
"lru-cache": "11.3.6",
174-
"lucide-react": "^0.479.0",
174+
"lucide-react": "^0.511.0",
175175
"mammoth": "^1.9.0",
176176
"mermaid": "11.15.0",
177177
"micromatch": "4.0.8",
@@ -248,22 +248,12 @@
248248
"@vitejs/plugin-react": "^4.3.4",
249249
"@vitest/coverage-v8": "^4.1.0",
250250
"autoprefixer": "10.4.21",
251-
"critters": "0.0.25",
252251
"jsdom": "^26.0.0",
253252
"postcss": "^8",
254253
"react-email": "4.3.2",
255254
"tailwindcss": "^3.4.1",
256255
"typescript": "^7.0.2",
257256
"vite-tsconfig-paths": "^5.1.4",
258257
"vitest": "^4.1.0"
259-
},
260-
"overrides": {
261-
"next": "16.2.11",
262-
"@next/env": "16.2.11",
263-
"mermaid": "11.15.0",
264-
"react-floater": {
265-
"react": "$react",
266-
"react-dom": "$react-dom"
267-
}
268258
}
269259
}

apps/sim/stores/variables/store.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import { createLogger } from '@sim/logger'
22
import { getErrorMessage } from '@sim/utils/errors'
33
import { generateId } from '@sim/utils/id'
4-
import JSON5 from 'json5'
54
import { create } from 'zustand'
65
import { devtools } from 'zustand/middleware'
76
import { normalizeName } from '@/executor/constants'
@@ -32,7 +31,7 @@ function validateVariable(variable: Variable): string | undefined {
3231
return 'Not a valid object format'
3332
}
3433

35-
const parsed = JSON5.parse(valueToEvaluate)
34+
const parsed = JSON.parse(valueToEvaluate)
3635

3736
if (parsed === null || typeof parsed !== 'object' || Array.isArray(parsed)) {
3837
return 'Not a valid object'
@@ -45,7 +44,7 @@ function validateVariable(variable: Variable): string | undefined {
4544
}
4645
case 'array':
4746
try {
48-
const parsed = JSON5.parse(String(variable.value))
47+
const parsed = JSON.parse(String(variable.value))
4948
if (!Array.isArray(parsed)) {
5049
return 'Not a valid array'
5150
}

0 commit comments

Comments
 (0)