improvement(turbo): align turborepo config with best practices (#3458)

* improvement(turbo): align turborepo config with best practices

* fix(turbo): address PR review feedback

* fix(turbo): add lint:check task for read-only lint+format CI checks

lint:check previously delegated to format:check which only checked
formatting. Now it runs biome check (no --write) which enforces both
lint rules and formatting without mutating files.

* upgrade turbo
This commit is contained in:
Waleed
2026-03-07 12:38:46 -08:00
committed by GitHub
parent 9c4abf7b9b
commit 1324987def
12 changed files with 84 additions and 40 deletions

View File

@@ -8,7 +8,11 @@
"build": "fumadocs-mdx && NODE_OPTIONS='--max-old-space-size=8192' next build",
"start": "next start",
"postinstall": "fumadocs-mdx",
"type-check": "tsc --noEmit"
"type-check": "tsc --noEmit",
"lint": "biome check --write --unsafe .",
"lint:check": "biome check .",
"format": "biome format --write .",
"format:check": "biome format ."
},
"dependencies": {
"@sim/db": "workspace:*",

View File

@@ -1419,9 +1419,6 @@ export function ToolCall({
)
const toolCall = liveToolCall || toolCallProp
// Guard: nothing to render without a toolCall
if (!toolCall) return null
const isExpandablePending =
toolCall?.state === 'pending' &&
(toolCall.name === 'make_api_request' || toolCall.name === 'set_global_workflow_variables')
@@ -1430,13 +1427,15 @@ export function ToolCall({
const [showRemoveAutoAllow, setShowRemoveAutoAllow] = useState(false)
// State for editable parameters
const params = (toolCall as any).parameters || (toolCall as any).input || toolCall.params || {}
const params = (toolCall as any)?.parameters || (toolCall as any)?.input || toolCall?.params || {}
const [editedParams, setEditedParams] = useState(params)
const paramsRef = useRef(params)
// Check if this integration tool is auto-allowed
const { removeAutoAllowedTool, setToolCallState } = useCopilotStore()
const isAutoAllowed = useCopilotStore((s) => s.isToolAutoAllowed(toolCall.name))
const isAutoAllowed = useCopilotStore((s) =>
toolCall ? s.isToolAutoAllowed(toolCall.name) : false
)
// Update edited params when toolCall params change (deep comparison to avoid resetting user edits on ref change)
useEffect(() => {
@@ -1446,6 +1445,18 @@ export function ToolCall({
}
}, [params])
// Sync expanded state when toolCall arrives from store after initial render
const prevToolCallRef = useRef(toolCall)
useEffect(() => {
if (!prevToolCallRef.current && toolCall && isExpandablePending) {
setExpanded(true)
}
prevToolCallRef.current = toolCall
}, [toolCall, isExpandablePending])
// Guard: nothing to render without a toolCall
if (!toolCall) return null
// Skip rendering some internal tools
if (
toolCall.name === 'checkoff_todo' ||

View File

@@ -1,4 +1,4 @@
import { useCallback, useMemo } from 'react'
import { useCallback } from 'react'
import { createLogger } from '@sim/logger'
import { useParams } from 'next/navigation'
import { Combobox, Label, Slider, Switch } from '@/components/emcn/components'
@@ -154,14 +154,10 @@ export function McpDynamicArgs({
)
case 'dropdown': {
const dropdownOptions = useMemo(
() =>
(paramSchema.enum || []).map((option: any) => ({
label: String(option),
value: String(option),
})),
[paramSchema.enum]
)
const dropdownOptions = (paramSchema.enum || []).map((option: any) => ({
label: String(option),
value: String(option),
}))
return (
<div key={`${paramName}-dropdown`}>

View File

@@ -20,6 +20,10 @@
"test:coverage": "vitest run --coverage",
"email:dev": "email dev --dir components/emails",
"type-check": "tsc --noEmit",
"lint": "biome check --write --unsafe .",
"lint:check": "biome check .",
"format": "biome format --write .",
"format:check": "biome format .",
"generate-docs": "bun run ../../scripts/generate-docs.ts"
},
"dependencies": {
@@ -188,6 +192,7 @@
"@types/ssh2": "^1.15.5",
"@vitejs/plugin-react": "^4.3.4",
"@vitest/coverage-v8": "^3.0.8",
"@tailwindcss/typography": "0.5.19",
"autoprefixer": "10.4.21",
"concurrently": "^9.1.0",
"critters": "0.0.25",

View File

@@ -1,18 +1,16 @@
{
"lockfileVersion": 1,
"configVersion": 0,
"workspaces": {
"": {
"name": "simstudio",
"devDependencies": {
"@biomejs/biome": "2.0.0-beta.5",
"@next/env": "16.1.6",
"@octokit/rest": "^21.0.0",
"@tailwindcss/typography": "0.5.19",
"drizzle-kit": "^0.31.4",
"glob": "13.0.0",
"husky": "9.1.7",
"lint-staged": "16.0.0",
"turbo": "2.8.13",
"turbo": "2.8.14",
},
},
"apps/docs": {
@@ -204,6 +202,7 @@
"devDependencies": {
"@sim/testing": "workspace:*",
"@sim/tsconfig": "workspace:*",
"@tailwindcss/typography": "0.5.19",
"@testing-library/jest-dom": "^6.6.3",
"@trigger.dev/build": "4.1.2",
"@types/fluent-ffmpeg": "2.1.28",
@@ -265,6 +264,7 @@
"devDependencies": {
"@sim/tsconfig": "workspace:*",
"@types/node": "^22.10.5",
"drizzle-kit": "^0.31.4",
"typescript": "^5.7.3",
},
},
@@ -3492,19 +3492,19 @@
"tunnel-agent": ["tunnel-agent@0.6.0", "", { "dependencies": { "safe-buffer": "^5.0.1" } }, "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w=="],
"turbo": ["turbo@2.8.13", "", { "optionalDependencies": { "turbo-darwin-64": "2.8.13", "turbo-darwin-arm64": "2.8.13", "turbo-linux-64": "2.8.13", "turbo-linux-arm64": "2.8.13", "turbo-windows-64": "2.8.13", "turbo-windows-arm64": "2.8.13" }, "bin": { "turbo": "bin/turbo" } }, "sha512-nyM99hwFB9/DHaFyKEqatdayGjsMNYsQ/XBNO6MITc7roncZetKb97MpHxWf3uiU+LB9c9HUlU3Jp2Ixei2k1A=="],
"turbo": ["turbo@2.8.14", "", { "optionalDependencies": { "turbo-darwin-64": "2.8.14", "turbo-darwin-arm64": "2.8.14", "turbo-linux-64": "2.8.14", "turbo-linux-arm64": "2.8.14", "turbo-windows-64": "2.8.14", "turbo-windows-arm64": "2.8.14" }, "bin": { "turbo": "bin/turbo" } }, "sha512-UCTxeMNYT1cKaHiIFdLCQ7ulI+jw5i5uOnJOrRXsgUD7G3+OjlUjwVd7JfeVt2McWSVGjYA3EVW/v1FSsJ5DtA=="],
"turbo-darwin-64": ["turbo-darwin-64@2.8.13", "", { "os": "darwin", "cpu": "x64" }, "sha512-PmOvodQNiOj77+Zwoqku70vwVjKzL34RTNxxoARjp5RU5FOj/CGiC6vcDQhNtFPUOWSAaogHF5qIka9TBhX4XA=="],
"turbo-darwin-64": ["turbo-darwin-64@2.8.14", "", { "os": "darwin", "cpu": "x64" }, "sha512-9sFi7n2lLfEsGWi5OEoA/eTtQU2BPKtzSYKqufMtDeRmqMT9vKjbv9gJCRkllSVE9BOXA0qXC3diyX8V8rKIKw=="],
"turbo-darwin-arm64": ["turbo-darwin-arm64@2.8.13", "", { "os": "darwin", "cpu": "arm64" }, "sha512-kI+anKcLIM4L8h+NsM7mtAUpElkCOxv5LgiQVQR8BASyDFfc8Efj5kCk3cqxuxOvIqx0sLfCX7atrHQ2kwuNJQ=="],
"turbo-darwin-arm64": ["turbo-darwin-arm64@2.8.14", "", { "os": "darwin", "cpu": "arm64" }, "sha512-aS4yJuy6A1PCLws+PJpZP0qCURG8Y5iVx13z/WAbKyeDTY6W6PiGgcEllSaeLGxyn++382ztN/EZH85n2zZ6VQ=="],
"turbo-linux-64": ["turbo-linux-64@2.8.13", "", { "os": "linux", "cpu": "x64" }, "sha512-j29KnQhHyzdzgCykBFeBqUPS4Wj7lWMnZ8CHqytlYDap4Jy70l4RNG46pOL9+lGu6DepK2s1rE86zQfo0IOdPw=="],
"turbo-linux-64": ["turbo-linux-64@2.8.14", "", { "os": "linux", "cpu": "x64" }, "sha512-XC6wPUDJkakjhNLaS0NrHDMiujRVjH+naEAwvKLArgqRaFkNxjmyNDRM4eu3soMMFmjym6NTxYaF74rvET+Orw=="],
"turbo-linux-arm64": ["turbo-linux-arm64@2.8.13", "", { "os": "linux", "cpu": "arm64" }, "sha512-OEl1YocXGZDRDh28doOUn49QwNe82kXljO1HXApjU0LapkDiGpfl3jkAlPKxEkGDSYWc8MH5Ll8S16Rf5tEBYg=="],
"turbo-linux-arm64": ["turbo-linux-arm64@2.8.14", "", { "os": "linux", "cpu": "arm64" }, "sha512-ChfE7isyVNjZrVSPDwcfqcHLG/FuIBbOFxnt1FM8vSuBGzHAs8AlTdwFNIxlEMJfZ8Ad9mdMxdmsCUPIWiQ6cg=="],
"turbo-windows-64": ["turbo-windows-64@2.8.13", "", { "os": "win32", "cpu": "x64" }, "sha512-717bVk1+Pn2Jody7OmWludhEirEe0okoj1NpRbSm5kVZz/yNN/jfjbxWC6ilimXMz7xoMT3IDfQFJsFR3PMANA=="],
"turbo-windows-64": ["turbo-windows-64@2.8.14", "", { "os": "win32", "cpu": "x64" }, "sha512-FTbIeQL1ycLFW2t9uQNMy+bRSzi3Xhwun/e7ZhFBdM+U0VZxxrtfYEBM9CHOejlfqomk6Jh7aRz0sJoqYn39Hg=="],
"turbo-windows-arm64": ["turbo-windows-arm64@2.8.13", "", { "os": "win32", "cpu": "arm64" }, "sha512-R819HShLIT0Wj6zWVnIsYvSNtRNj1q9VIyaUz0P24SMcLCbQZIm1sV09F4SDbg+KCCumqD2lcaR2UViQ8SnUJA=="],
"turbo-windows-arm64": ["turbo-windows-arm64@2.8.14", "", { "os": "win32", "cpu": "arm64" }, "sha512-KgZX12cTyhY030qS7ieT8zRkhZZE2VWJasDFVUSVVn17nR7IShpv68/7j5UqJNeRLIGF1XPK0phsP5V5yw3how=="],
"tweetnacl": ["tweetnacl@0.14.5", "", {}, "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA=="],

View File

@@ -14,13 +14,13 @@
"dev:sockets": "cd apps/sim && bun run dev:sockets",
"dev:full": "cd apps/sim && bun run dev:full",
"test": "turbo run test",
"format": "bunx biome format --write .",
"format:check": "bunx biome format .",
"lint": "bunx biome check --write --unsafe .",
"lint:check": "bunx biome check --unsafe .",
"format": "turbo run format",
"format:check": "turbo run format:check",
"lint": "turbo run lint",
"lint:check": "turbo run lint:check",
"lint:helm": "helm lint ./helm/sim --strict --values ./helm/sim/test/values-lint.yaml",
"lint:all": "bun run lint && bun run lint:helm",
"check": "bunx biome check --files-ignore-unknown=true",
"lint:all": "turbo run lint && bun run lint:helm",
"check": "turbo run format:check",
"prepare": "bun husky",
"type-check": "turbo run type-check",
"release": "bun run scripts/create-single-release.ts"
@@ -35,14 +35,11 @@
},
"devDependencies": {
"@biomejs/biome": "2.0.0-beta.5",
"@next/env": "16.1.6",
"@octokit/rest": "^21.0.0",
"@tailwindcss/typography": "0.5.19",
"drizzle-kit": "^0.31.4",
"glob": "13.0.0",
"husky": "9.1.7",
"lint-staged": "16.0.0",
"turbo": "2.8.13"
"turbo": "2.8.14"
},
"lint-staged": {
"*.{js,jsx,ts,tsx,json,css,scss}": [

View File

@@ -15,6 +15,10 @@
"scripts": {
"build": "tsc",
"type-check": "tsc --noEmit",
"lint": "biome check --write --unsafe .",
"lint:check": "biome check .",
"format": "biome format --write .",
"format:check": "biome format .",
"prepublishOnly": "bun run build"
},
"files": [

View File

@@ -22,7 +22,11 @@
"db:push": "bunx drizzle-kit push --config=./drizzle.config.ts",
"db:migrate": "bunx drizzle-kit migrate --config=./drizzle.config.ts",
"db:studio": "bunx drizzle-kit studio --config=./drizzle.config.ts",
"type-check": "tsc --noEmit"
"type-check": "tsc --noEmit",
"lint": "biome check --write --unsafe .",
"lint:check": "biome check .",
"format": "biome format --write .",
"format:check": "biome format ."
},
"dependencies": {
"drizzle-orm": "^0.44.5",
@@ -32,6 +36,7 @@
},
"devDependencies": {
"@sim/tsconfig": "workspace:*",
"drizzle-kit": "^0.31.4",
"@types/node": "^22.10.5",
"typescript": "^5.7.3"
}

View File

@@ -16,6 +16,10 @@
},
"scripts": {
"type-check": "tsc --noEmit",
"lint": "biome check --write --unsafe .",
"lint:check": "biome check .",
"format": "biome format --write .",
"format:check": "biome format .",
"test": "vitest run",
"test:watch": "vitest"
},

View File

@@ -39,7 +39,11 @@
}
},
"scripts": {
"type-check": "tsc --noEmit"
"type-check": "tsc --noEmit",
"lint": "biome check --write --unsafe .",
"lint:check": "biome check .",
"format": "biome format --write .",
"format:check": "biome format ."
},
"peerDependencies": {
"vitest": "^3.0.0"

View File

@@ -12,6 +12,10 @@
"scripts": {
"build": "tsc",
"type-check": "tsc --noEmit",
"lint": "biome check --write --unsafe .",
"lint:check": "biome check .",
"format": "biome format --write .",
"format:check": "biome format .",
"dev:watch": "tsc --watch",
"prepublishOnly": "bun run build",
"test": "vitest run",

View File

@@ -1,7 +1,11 @@
{
"$schema": "https://v2-8-10.turborepo.dev/schema.json",
"$schema": "https://v2-8-13.turborepo.dev/schema.json",
"envMode": "loose",
"tasks": {
"transit": {
"dependsOn": ["^transit"],
"outputs": []
},
"build": {
"dependsOn": ["^build"],
"inputs": ["$TURBO_DEFAULT$", ".env*"],
@@ -18,16 +22,22 @@
"dependsOn": ["^build"],
"outputs": []
},
"lint": {
"dependsOn": ["transit"],
"outputs": []
},
"format": {
"outputs": []
},
"format:check": {
"outputs": []
},
"lint": {
"lint:check": {
"dependsOn": ["transit"],
"outputs": []
},
"type-check": {
"dependsOn": ["transit"],
"outputs": []
}
}