fix: align ready order and docs with lint-needs-build dependency

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.
This commit is contained in:
Yunfei He
2026-05-29 16:44:07 +08:00
parent 06ede6fded
commit d3480dc285
3 changed files with 13 additions and 13 deletions
+5 -6
View File
@@ -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
+1 -1
View File
@@ -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": {
+7 -6
View File
@@ -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" },