From c7f4cd582ff95f2208bee8ede782b86820401a40 Mon Sep 17 00:00:00 2001 From: ethernet Date: Fri, 17 Jul 2026 14:17:22 -0400 Subject: [PATCH] perf(desktop): remove redundant build from check script MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The check script ran: typecheck && test && test:desktop:all && build test:desktop:all calls ensurePackagedApp() → npm run pack, which itself runs npm run build (vite + electron-main + preload + stage-native-deps) before electron-builder --dir. The trailing npm run build was rebuilding the exact same dist/ output a second time. electron-builder --dir reads dist/ as input and doesn't mutate it, so nothing between the two builds invalidates the first one. On the CI linux runner this saves the vite+bundle build (~5s) on every js-tests run. The postbuild assert-dist-built.mjs still runs as part of pack's build step. --- apps/desktop/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/desktop/package.json b/apps/desktop/package.json index a54b7182ee1a..b6fc344cd80e 100644 --- a/apps/desktop/package.json +++ b/apps/desktop/package.json @@ -50,7 +50,7 @@ "test:desktop:platforms": "vitest run --project electron", "test": "vitest run", "preview": "node scripts/assert-root-install.mjs && vite preview --host 127.0.0.1 --port 4174", - "check": "npm run typecheck && npm run test && npm run test:desktop:all && npm run build", + "check": "npm run typecheck && npm run test && npm run test:desktop:all", "test:e2e": "playwright test e2e/", "test:e2e:visual": "WLR_BACKENDS=headless WLR_NO_HARDWARE_CURSORS=1 cage -- npx playwright test e2e/ --reporter=list", "test:e2e:update-snapshots": "WLR_BACKENDS=headless WLR_NO_HARDWARE_CURSORS=1 cage -- npx playwright test e2e/ --reporter=list --update-snapshots"