6 Commits

Author SHA1 Message Date
Yunfei He d3480dc285 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.
2026-05-29 16:54:13 +08:00
Yunfei He bdf06ddf1f fix(ci): bump Node to 22.18.0 for native TS config loading
Second CI run got past install but failed loading vite.config.ts: native TS
type-stripping (used by vite/oxlint to read .ts config) requires Node
^20.19.0 || >=22.18.0, and 22.13.0 is below that. 22.18.0 is the true floor —
it satisfies both pnpm (>=22.13) and TS config loading (>=22.18). Match
engines.node.
2026-05-29 16:54:13 +08:00
Yunfei He 1318f86888 fix(ci): bump Node to 22.13.0 (pnpm@11 minimum)
The first CI run failed at `vp install`: pnpm@11.1.2 requires Node >=22.13, but
the workflow pinned 22.12.0 (the old engines floor). Pin 22.13.0 — the real
lowest Node the toolchain supports — and correct engines.node to >=22.13.0 so
the declared engine matches what pnpm actually needs.
2026-05-29 16:54:13 +08:00
Yunfei He bdadea0d02 perf(ci): parallelize verification via a vp run.tasks graph
Replace ci.yml's five serial steps with a single `vp run ci` whose graph lives
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/*.d.mts). The wall-clock critical path becomes build -> test:pty instead
of the sum of every check.

Measured cold (no task cache, no prebuilt dist — the real CI condition): the
graph completes in ~41s vs ~60s serial, ~32% faster, with build correctly
fanned out before the type and test branches. `vp run --last-details` (and the
run summary) still pinpoints which sub-task failed.

Also set run.cache=false so neither local nor CI verification depends on any
task-cache replay. The serial `ready` script in package.json is kept for simple
local use.
2026-05-29 16:54:13 +08:00
Yunfei He 2f60278450 ci: add GitHub Actions workflow mirroring vp run ready
Single job on ubuntu-latest that runs the same checks as `vp run ready`, as
individual labeled steps so the run shows exactly which concern failed: format,
lint, build, type-check, test. Build precedes type-check and test because
@vue-tui/runtime has no "types" export — testing/runtime-tests resolve its
types and runtime from the built dist/*.d.mts, and same-job steps share the
filesystem so the dist persists.

Uses voidzero-dev/setup-vp@v1 (per the Vite+ CI docs), which installs Node, the
vp CLI, and runs vp install automatically (run-install defaults true), so no
separate install step. node-version pins the exact engines.node floor 22.12.0
so CI fails if code relies on a newer Node API; cache enables the pnpm store
cache (off by default). Triggers on pull_request, push to main, and manual
dispatch; concurrency cancels superseded PR runs but never a push-to-main run;
permissions are read-only.

Verified: actionlint reports no issues; both action refs confirmed via
git ls-remote.
2026-05-29 16:54:13 +08:00
Yunfei He 6c687bcf00 docs: redesign README with hero section and examples
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 15:05:27 +08:00