From d3480dc285c2f4c6253539ef6a2d5af04a52a0a2 Mon Sep 17 00:00:00 2001 From: Yunfei He Date: Fri, 29 May 2026 16:44:07 +0800 Subject: [PATCH] fix: align ready order and docs with lint-needs-build dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Review follow-ups on PR #25: - package.json `ready`: run build BEFORE check:lint, matching the CI graph where ci:lint dependsOn ci:build. Type-aware lint rules need the built @vue-tui/runtime types; with lint before build, `vp run ready` on a fresh checkout (dist removed) could misreport lint. Verified `CI=true vp run ready` on a clean checkout now passes with 0 lint warnings. - vite.config.ts + ci.yml comments: corrected the stale claim that "fmt and lint run immediately alongside build" — only fmt has no build dependency; lint now waits on build too. Dropped the outdated "~40s vs ~60s" figure. --- .github/workflows/ci.yml | 11 +++++------ package.json | 2 +- vite.config.ts | 13 +++++++------ 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 249ca01..7bd98e9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -43,11 +43,10 @@ jobs: # `ci` is the parallel verification graph defined in vite.config.ts # (run.tasks). The vp task runner fans out independent branches - # concurrently — fmt and lint start immediately, while check:type and the - # test suites wait on build (their consumers resolve @vue-tui/runtime from - # the built dist) — so the wall-clock critical path is build -> test:pty - # rather than the sum of every check. On a cache miss this finishes in - # ~40s vs ~60s run serially. `vp run --last-details` (or the run summary) - # shows which sub-task failed when one does. + # concurrently — fmt starts immediately, while lint, check:type, and the + # test suites wait on build (the type-aware lint rules and the tests + # resolve @vue-tui/runtime from the built dist) — so the wall-clock + # critical path is build -> test:pty rather than the sum of every check. + # `vp run --last-details` (or the run summary) shows which sub-task failed. - name: Verify (vp run ci) run: vp run ci diff --git a/package.json b/package.json index 1c70d2e..b4c3af4 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "check:type": "vp run -r check:type", "test": "vp run -r test", "build": "vp run -r build", - "ready": "vp run check:fmt && vp run check:lint && vp run build && vp run check:type && vp run test", + "ready": "vp run check:fmt && vp run build && vp run check:lint && vp run check:type && vp run test", "prepare": "vp config" }, "devDependencies": { diff --git a/vite.config.ts b/vite.config.ts index 3bf59db..1ac55b2 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -20,12 +20,13 @@ export default defineConfig({ run: { cache: false, // `ci` is the parallel verification graph used by .github/workflows/ci.yml. - // The task runner fans out independent branches concurrently; the wall-clock - // critical path is build -> test:pty. fmt and lint have no build dependency, - // so they run immediately alongside build. check:type and the test suites - // need the built dist (@vue-tui/runtime exposes no "types" export — its - // consumers resolve types and runtime from dist/*.d.mts), so they depend on - // build. The serial `ready` script in package.json stays for simple local use. + // The task runner fans out independent branches concurrently. Only fmt has + // no build dependency, so it starts immediately; lint, check:type, and the + // test suites all depend on build because they need the built dist + // (@vue-tui/runtime exposes no "types" export — consumers, and the + // type-aware lint rules, resolve its types and runtime from dist/*.d.mts). + // So the wall-clock critical path is build -> test:pty. The serial `ready` + // script in package.json mirrors this order (build before lint) for local use. tasks: { "ci:build": { command: "vp run build" }, "ci:fmt": { command: "vp run check:fmt" },