fix: green the frontend check (pin published wasm-asset, fix type errors)

Pin windmill-parser-wasm-asset to the published 1.728.1 (was a file: link to a gitignored, CI-unbuilt pkg-asset). Exclude test files from svelte-check (the parity test reads a backend fixture via node:fs, which the browser app tsconfig has no @types/node for; vitest still runs them). Fix pre-existing branch type errors: drop the unsupported 2nd getScriptByPath arg, cast script.schema to Schema for inferArgs, coerce has_preprocessor to a definite boolean, and wrap the cancelJob handler so it isn't possibly-undefined.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-06-18 07:17:27 +00:00
parent 6883d3cc59
commit 9bbed3685d
6 changed files with 31 additions and 27 deletions
+4 -7
View File
@@ -78,7 +78,7 @@
"vscode-languageclient": "~9.0.1",
"vscode-uri": "~3.1.0",
"vscode-ws-jsonrpc": "~3.5.0",
"windmill-parser-wasm-asset": "file:../backend/parsers/windmill-parser-wasm/pkg-asset",
"windmill-parser-wasm-asset": "^1.728.1",
"windmill-parser-wasm-csharp": "1.510.1",
"windmill-parser-wasm-go": "1.510.1",
"windmill-parser-wasm-java": "1.510.1",
@@ -166,10 +166,6 @@
"svelte": "^5.0.0"
}
},
"../backend/parsers/windmill-parser-wasm/pkg-asset": {
"name": "windmill-parser-wasm-asset",
"version": "1.714.0"
},
"node_modules/@alloc/quick-lru": {
"version": "5.2.0",
"resolved": "https://registry.npmjs.org/@alloc/quick-lru/-/quick-lru-5.2.0.tgz",
@@ -13620,8 +13616,9 @@
}
},
"node_modules/windmill-parser-wasm-asset": {
"resolved": "../backend/parsers/windmill-parser-wasm/pkg-asset",
"link": true
"version": "1.728.1",
"resolved": "https://registry.npmjs.org/windmill-parser-wasm-asset/-/windmill-parser-wasm-asset-1.728.1.tgz",
"integrity": "sha512-73cyU6XM3gYEjFBx3qOKnv+VV1t70eAr6OiT+x0QobjFVNmqZFEdA7ayMYYVCnnix8OZxcsTNEF1hT61w1XiKw=="
},
"node_modules/windmill-parser-wasm-csharp": {
"version": "1.510.1",
+1 -1
View File
@@ -153,7 +153,7 @@
"vscode-languageclient": "~9.0.1",
"vscode-uri": "~3.1.0",
"vscode-ws-jsonrpc": "~3.5.0",
"windmill-parser-wasm-asset": "file:../backend/parsers/windmill-parser-wasm/pkg-asset",
"windmill-parser-wasm-asset": "1.728.1",
"windmill-parser-wasm-csharp": "1.510.1",
"windmill-parser-wasm-go": "1.510.1",
"windmill-parser-wasm-java": "1.510.1",
@@ -2082,7 +2082,7 @@
</SplitPanesWrapper>
{#snippet cancelTestButton(size: 'sm' | 'md', btnClasses: string)}
<Button on:click={jobLoader?.cancelJob} unifiedSize={size} {btnClasses}>
<Button on:click={() => jobLoader?.cancelJob()} unifiedSize={size} {btnClasses}>
<WindmillIcon
white={true}
class="mr-2 text-white"
@@ -22,6 +22,7 @@
import { tick } from 'svelte'
import { inferArgs } from '$lib/infer'
import { emptySchema, sendUserToast } from '$lib/utils'
import type { Schema } from '$lib/common'
import type { AssetGraphSelection, PipelineMode } from './types'
import PipelineScriptView from './PipelineScriptView.svelte'
import { parsePipelineAnnotations, type PipelineAnnotations } from './parsePipelineAnnotations'
@@ -359,10 +360,10 @@
// it locally; saving calls ScriptService.createScript to deploy it.
let scriptRes = resource(
[() => workspace, () => selection, () => draftScript],
async ([ws, sel, draft], _prev, { signal }) => {
async ([ws, sel, draft]) => {
if (draft) return undefined
if (!sel || sel.kind !== 'runnable' || sel.runnable_kind !== 'script') return undefined
return await ScriptService.getScriptByPath({ workspace: ws, path: sel.path }, signal as any)
return await ScriptService.getScriptByPath({ workspace: ws, path: sel.path })
}
)
@@ -424,8 +425,7 @@
// already be loading the next script — fall back to the
// pristine copy captured at registration.
const latest = scriptRes.current
const orig =
latest && latest.path === captured.path ? latest : origAtRegister
const orig = latest && latest.path === captured.path ? latest : origAtRegister
if (!orig || orig.path !== captured.path) return
if ((captured.content ?? '') === (orig.content ?? '')) return
}
@@ -438,9 +438,7 @@
onDraftPersist?.(captured.path, {
content: captured.content ?? '',
writes,
script: isDraftRun
? undefined
: (structuredClone($state.snapshot(captured)) as Script)
script: isDraftRun ? undefined : (structuredClone($state.snapshot(captured)) as Script)
})
}
})
@@ -556,9 +554,9 @@
try {
script.schema = script.schema ?? emptySchema()
try {
const result = await inferArgs(script.language, script.content, script.schema)
const result = await inferArgs(script.language, script.content, script.schema as Schema)
;(script as any).auto_kind = result?.auto_kind || undefined
script.has_preprocessor = result?.has_preprocessor || undefined
script.has_preprocessor = result?.has_preprocessor ?? false
} catch {
sendUserToast(`Could not parse code, are you sure it is valid?`, true)
}
@@ -1202,15 +1200,18 @@
<AlertTriangle class="text-amber-500 dark:text-amber-400" />
</div>
<div class="ml-4 flex-1">
<h3 class="text-lg font-medium text-primary">This script changed since you opened it</h3>
<h3 class="text-lg font-medium text-primary"
>This script changed since you opened it</h3
>
<div class="mt-2 text-sm text-secondary flex flex-col gap-2">
<p>
<span class="font-mono text-xs">{script?.path ?? ''}</span> was deployed by someone else
(or another tab) while you were editing, so saving on top of your version would fork its
lineage.
<span class="font-mono text-xs">{script?.path ?? ''}</span> was deployed by someone
else (or another tab) while you were editing, so saving on top of your version would
fork its lineage.
</p>
<p>
<span class="font-medium">Keep my version</span> deploys your changes on top of the latest.
<span class="font-medium">Keep my version</span> deploys your changes on top of
the latest.
<span class="font-medium">View latest</span> loads the newly-deployed version, discarding
your unsaved edits.
</p>
@@ -1218,7 +1219,12 @@
</div>
</div>
<div class="flex items-center gap-2 flex-row-reverse mt-4">
<Button disabled={resolvingConflict} onclick={overwriteWithMine} variant="accent" size="sm">
<Button
disabled={resolvingConflict}
onclick={overwriteWithMine}
variant="accent"
size="sm"
>
{#if resolvingConflict}
<Loader2 class="animate-spin" />
{/if}
@@ -80,6 +80,7 @@
import { resource } from 'runed'
import { Pane, Splitpanes } from 'svelte-splitpanes'
import { emptySchema, sendUserToast } from '$lib/utils'
import type { Schema } from '$lib/common'
import { beforeNavigate, goto } from '$app/navigation'
import { fade } from 'svelte/transition'
import { twMerge } from 'tailwind-merge'
@@ -794,9 +795,9 @@
const script = structuredClone($state.snapshot(draft.script) as Script)
script.schema = script.schema ?? emptySchema()
try {
const result = await inferArgs(script.language, script.content, script.schema)
const result = await inferArgs(script.language, script.content, script.schema as Schema)
;(script as any).auto_kind = result?.auto_kind || undefined
script.has_preprocessor = result?.has_preprocessor || undefined
script.has_preprocessor = result?.has_preprocessor ?? false
} catch {
// Inference failures don't block deploys (the same fallback the
// per-pane save uses). The createScript call is the real
+1 -1
View File
@@ -22,6 +22,6 @@
"types": ["vite/client"]
},
"include": ["src/**/*.js", "src/**/*.ts", "src/**/*.d.ts", "src/**/*.svelte"],
"exclude": ["src/lib/monaco_workers/*.js"],
"exclude": ["src/lib/monaco_workers/*.js", "src/**/*.test.ts", "src/**/*.spec.ts"],
"extends": "./.svelte-kit/tsconfig.json"
}