From 3a05d86e3e9ff239dd5459c15d93e25a8042f6af Mon Sep 17 00:00:00 2001 From: mr-forust Date: Sun, 27 Sep 2026 10:24:18 +0200 Subject: [PATCH] ci: run svelte-check, which was already a dependency with no script svelte-check sits in devDependencies at ^4.7.3 and nothing in the repository ever invoked it, so the type errors it reports had no path to a human. Point a script at it and run it in the frontend job, and it is clean: 0 errors, 0 warnings. It shares the one `npm ci` with the test step. A second install would have doubled the slowest part of the job to learn exactly the same thing. The lockfile is untouched, because scripts are not part of what it pins. Co-Authored-By: Claude Opus 4.8 (1M context) --- .gitea/workflows/ci.yaml | 18 ++++++++++++++---- userbot/panel/frontend/package.json | 3 ++- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 8696bcd..f79b656 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -223,15 +223,25 @@ jobs: - name: Checkout repository uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4 - - name: Run the panel frontend test suite + # One `npm ci` for both checks below: it is by far the slowest part of + # this job, and a second one would learn nothing the first did not. + # + # `npm ci`, not `npm install`, for the same reason the Dockerfile uses it: + # the lockfile is what makes the tree that gets checked the tree that + # gets shipped. + - name: Type-check and test the panel frontend shell: bash run: | set -euo pipefail cd userbot/panel/frontend - # `npm ci`, not `npm install`, for the same reason the Dockerfile - # uses it: the lockfile is what makes the tree that gets tested the - # tree that gets shipped. npm ci + + # svelte-check has been a devDependency all along with no script + # pointing at it, so the type errors it reports had nowhere to + # surface. It is clean today, which is the only reason it can be a + # gate: it stops at whatever upstream introduces rather than + # reporting a backlog we inherited. + npm run check npm test validate: diff --git a/userbot/panel/frontend/package.json b/userbot/panel/frontend/package.json index 9c30d10..97a0d3a 100644 --- a/userbot/panel/frontend/package.json +++ b/userbot/panel/frontend/package.json @@ -6,7 +6,8 @@ "scripts": { "build": "vite build", "dev": "vite --host 0.0.0.0", - "test": "vitest run" + "test": "vitest run", + "check": "svelte-check --tsconfig ./tsconfig.json" }, "dependencies": { "lucide-svelte": "^0.468.0",