Skip to content

Commit 198ae7e

Browse files
committed
fix lint
1 parent 6323be3 commit 198ae7e

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

apps/sim/lib/execution/isolated-vm-worker.cjs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -379,7 +379,7 @@ async function executeCode(request, executionId) {
379379
// Host sent a `cancel` IPC which called `isolate.dispose()`. Any
380380
// in-flight compileScript/run then throws; detect that authoritatively
381381
// via the isolate flag rather than fuzzy-matching the error message.
382-
if (isolate && isolate.isDisposed) {
382+
if (isolate?.isDisposed) {
383383
return {
384384
result: null,
385385
stdout,
@@ -789,10 +789,9 @@ async function executeTask(request, executionId) {
789789
timings.brokerInstall = Date.now() - tPhase
790790
tPhase = Date.now()
791791

792-
const bootstrapScript = await isolate.compileScript(
793-
`(async () => { ${task.bootstrap} })()`,
794-
{ filename: `sandbox/${task.id}/bootstrap.js` }
795-
)
792+
const bootstrapScript = await isolate.compileScript(`(async () => { ${task.bootstrap} })()`, {
793+
filename: `sandbox/${task.id}/bootstrap.js`,
794+
})
796795
releaseables.push(bootstrapScript)
797796
await bootstrapScript.run(context, { timeout: timeoutMs, promise: true })
798797
timings.taskBootstrap = Date.now() - tPhase
@@ -917,15 +916,15 @@ async function executeTask(request, executionId) {
917916
// Cancellation: host sent `cancel` IPC which called `isolate.dispose()`.
918917
// Detect authoritatively via the isolate flag so we don't depend on
919918
// isolated-vm's internal error wording.
920-
if (isolate && isolate.isDisposed) {
919+
if (isolate?.isDisposed) {
921920
return {
922921
result: null,
923922
stdout,
924923
error: { message: 'Execution cancelled', name: 'AbortError' },
925924
timings,
926925
}
927926
}
928-
if (err.message && err.message.includes('Script execution timed out')) {
927+
if (err.message?.includes('Script execution timed out')) {
929928
return {
930929
result: null,
931930
stdout,

biome.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
"includes": [
77
"**",
88
"!**/.next",
9+
"!**/.next/**",
10+
"!**/next-env.d.ts",
911
"!**/out",
1012
"!**/dist",
1113
"!**/build",
@@ -27,7 +29,8 @@
2729
"!**/apps/docs/.source",
2830
"!**/venv",
2931
"!**/.venv",
30-
"!**/uploads"
32+
"!**/uploads",
33+
"!**/apps/sim/lib/execution/sandbox/bundles/*.cjs"
3134
]
3235
},
3336
"formatter": {

0 commit comments

Comments
 (0)