Add a "test" script (vp test --passWithNoTests) to @vue-tui/cli and a
ci:test:cli branch (dependsOn ci:build) to the run.tasks graph. No CLI tests
exist yet, but wiring the branch now means future CLI tests are covered
automatically rather than silently skipped. #26 (item 3).
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.
Replace the ci:test:misc filter-glob branch with explicit package#script
branches — ci:test:runtime, ci:test:testing, ci:test:integration,
ci:test:pty — matching the package#script form already used for the
runtime-tests suites. Clearer and consistent: each branch names exactly one
suite, no filter syntax. (vp run takes a single package#script per task, so
each normal package gets its own branch.)
Verified `CI=true vp run ci` on a fresh checkout: runtime (309) + testing (7)
+ integration (756) + pty (110), PTY once, exit 0.
The previous fix (b77f42e, reverted in f0cc614) added a test:integration
script to runtime and testing just so `vp run -r test:integration` would match
them — polluting every package's contract to satisfy the CI graph.
Restore the clean contract: normal packages (runtime, testing, cli) have only
a plain `test`; only runtime-tests splits into test:integration + test:pty.
The ci graph adapts instead of the packages:
ci:test:misc -> vp run --filter "@vue-tui/*" --filter "!@vue-tui/runtime-tests" test
ci:test:integration -> vp run @vue-tui/runtime-tests#test:integration
ci:test:pty -> vp run @vue-tui/runtime-tests#test:pty
misc runs every normal package's own `test` (the glob auto-covers future
packages); runtime-tests' two suites are separate parallel branches, keeping
the slow PTY suite off the critical path. Verified `CI=true vp run ci` on a
fresh checkout: runtime (309) + testing (7) + integration (756) + pty (110),
PTY runs exactly once, exit 0.
Third CI run failed: `vp lint --deny-warnings` reported 4 no-implied-eval
warnings on PTY fixtures (setTimeout(exit, ...)). The type-aware rule needs
@vue-tui/runtime's built types to prove the callback is a function; on a fresh
checkout dist doesn't exist yet, so it misfires. Locally it was hidden because
dist was always present.
Add dependsOn: ["ci:build"] to ci:lint. build is already on the critical path
(build -> test:pty), so overall wall-clock is unchanged. Verified by removing
all dist and running vp run ci: exit 0, 0 lint warnings, all tests pass.
vp run check:lint reported 7 warnings, all false positives for a terminal UI
library:
- no-control-regex (×6): parsing keyboard escape sequences and stripping ANSI
inherently requires regexes matching control chars (ESC, BEL). Disable the
rule library-wide in vite.config.ts — it flags every such pattern and we
already use \x1b/\u escapes (its own suggested form). Also drop the now-
redundant (and misplaced — it sat one line above the regex) inline disable in
sanitize-ansi.test.ts.
- no-misused-spread (×1) at parse-keypress.ts:500: `[...s]` on a terminal
escape sequence (ASCII control chars + digits, never user text), so the
emoji-splitting concern doesn't apply. Suppressed in place with a comment
explaining why, keeping the rule active elsewhere.
check:lint now reports 0 warnings, 0 errors.
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.
Set lint.options.typeCheck=false so vp lint/check no longer runs the
tsgolint full type-check (typeAware stays on, keeping type-aware lint rules).
Type-checking is now owned by check:type, which runs the real tsc and honors
each tsconfig's project semantics — unlike tsgolint, which ignored tsconfig
exclude/nested configs.
Wire check:type into ready after build (it needs the built dist for
cross-package type resolution): fmt, lint, build, check:type, check:fixtures,
test.
Verified: with typeCheck off, vp lint no longer reports a TS2322 type error
(but keeps its type-aware warnings); check:type catches it via tsc.
Workspace setup with pnpm, Vite+, and shared TypeScript config.
Includes @vue-tui/utils and AGENTS.md project conventions.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>