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 # `ci` is the parallel verification graph defined in vite.config.ts
# (run.tasks). The vp task runner fans out independent branches # (run.tasks). The vp task runner fans out independent branches
# concurrently — fmt and lint start immediately, while check:type and the # concurrently — fmt starts immediately, while lint, check:type, and the
# test suites wait on build (their consumers resolve @vue-tui/runtime from # test suites wait on build (the type-aware lint rules and the tests
# the built dist) — so the wall-clock critical path is build -> test:pty # resolve @vue-tui/runtime from the built dist) — so the wall-clock
# rather than the sum of every check. On a cache miss this finishes in # critical path is build -> test:pty rather than the sum of every check.
# ~40s vs ~60s run serially. `vp run --last-details` (or the run summary) # `vp run --last-details` (or the run summary) shows which sub-task failed.
# shows which sub-task failed when one does.
- name: Verify (vp run ci) - name: Verify (vp run ci)
run: vp run ci run: vp run ci
+1 -1
View File
@@ -10,7 +10,7 @@
"check:type": "vp run -r check:type", "check:type": "vp run -r check:type",
"test": "vp run -r test", "test": "vp run -r test",
"build": "vp run -r build", "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" "prepare": "vp config"
}, },
"devDependencies": { "devDependencies": {
+7 -6
View File
@@ -20,12 +20,13 @@ export default defineConfig({
run: { run: {
cache: false, cache: false,
// `ci` is the parallel verification graph used by .github/workflows/ci.yml. // `ci` is the parallel verification graph used by .github/workflows/ci.yml.
// The task runner fans out independent branches concurrently; the wall-clock // The task runner fans out independent branches concurrently. Only fmt has
// critical path is build -> test:pty. fmt and lint have no build dependency, // no build dependency, so it starts immediately; lint, check:type, and the
// so they run immediately alongside build. check:type and the test suites // test suites all depend on build because they need the built dist
// need the built dist (@vue-tui/runtime exposes no "types" export — its // (@vue-tui/runtime exposes no "types" export — consumers, and the
// consumers resolve types and runtime from dist/*.d.mts), so they depend on // type-aware lint rules, resolve its types and runtime from dist/*.d.mts).
// build. The serial `ready` script in package.json stays for simple local use. // 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: { tasks: {
"ci:build": { command: "vp run build" }, "ci:build": { command: "vp run build" },
"ci:fmt": { command: "vp run check:fmt" }, "ci:fmt": { command: "vp run check:fmt" },