13 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 b8ad628a6e ci(lint): treat lint warnings as failures via --deny-warnings
check:lint previously exited 0 even with warnings, so warnings accumulated
unnoticed (7 had piled up before being cleared). Add --deny-warnings so any
warning fails check:lint — locally, in `vp run ready`, and in CI alike.

Verified: clean tree still exits 0; a deliberately reintroduced warning makes
check:lint exit 1.
2026-05-29 16:54:13 +08:00
Yunfei He 4335cbbc64 refactor(scripts): fold check:fixtures into check:type
A single top-level `vp run check:type` should fan out (-r) and fully type-check
every package, fixtures included — no separate top-level check:fixtures step.
runtime-tests' check:type now runs its main tsc then its fixtures tsc
(check:fixtures stays as a runnable sub-script). Drop the root check:fixtures
entry and its standalone step in ready.
2026-05-29 16:54:13 +08:00
Yunfei He 40d89bdf47 refactor: move type-checking from vp lint to tsc-based check:type
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.
2026-05-29 16:54:13 +08:00
Yunfei He 1d6c47ca88 feat(scripts): add check:type running real tsc per package
Each package gets check:type = `tsc --noEmit` (under its own tsconfig); root
check:type = `vp run -r check:type` fans out across the workspace. Unlike vp's
tsgolint-based type-aware path, this is the standard TypeScript compiler, so it
honors each tsconfig's real project semantics.

Additive only here — vp lint still carries typeCheck; the switch-over and ready
rewiring land in the next commit. Note: testing and runtime-tests resolve
@vue-tui/runtime types from its built dist, so check:type requires a prior
build.
2026-05-29 16:54:13 +08:00
Yunfei He 6ca8990270 refactor(scripts): restructure workspace scripts into check:* / test:* families
Replace the opaque `vp check` bundling and the ad-hoc `ready` chain (which
shelled out via `cd ... && pnpm ...`) with explicit, composable named scripts.

Root delegates; category splits live in the package that owns them:

  root: check:fmt / check:lint / check:fixtures / test / build / ready
  runtime-tests: test = test:integration + test:pty; check:fixtures

`ready` now composes the named scripts in dependency order (fmt, lint, build,
fixtures, test) — build runs before check:fixtures and test:pty, which need
the built dist. Drop the broken root `dev` (referenced a non-existent website
package) and the redundant per-package `check` scripts (fmt/lint already run
workspace-wide from root). Renames: pty-test -> test:pty, typecheck:fixtures
-> check:fixtures.
2026-05-29 16:54:13 +08:00
Yunfei He ddb45a4869 chore: add granular check:fmt / check:lint scripts at root
`vp check` bundles format, lint, and typecheck, which hides which concern
failed and offers no way to run a single slice. Add explicit per-concern
entry points at the workspace root:

  check       -> vp check            (umbrella, unchanged behavior)
  check:fmt   -> vp fmt --check      (format only)
  check:lint  -> vp lint             (lint + typecheck)

No separate check:type: with typeAware/typeCheck enabled in the root config,
vp lint already runs the tsc typecheck, so check:lint covers it.
2026-05-29 16:54:13 +08:00
Yunfei He 3ef28ca3a1 test(runtime-tests): pin JSX children typing under the automatic runtime
The WithChildren shim is only exercised under jsx:"react-jsx", which lives
solely in integration/pty/fixtures/tsconfig.json. Nothing in `ready` ran tsc
against that config (vp check uses jsx:"preserve" and excludes the fixtures;
pty-test only transpiles them), so a regression in the shim — children
silently rejected, or declared props silently widened away — would pass
verification unnoticed.

Add a type-only regression fixture (not a runnable PTY program; not a
*.test.tsx, so vitest never collects it) that pins both directions of the
contract: children are accepted on Box/Text/Static/Transform, and declared
props stay validated via @ts-expect-error (invalid value, wrong type, unknown
prop, and missing required props on Transform/Static).

Wire `tsc -p integration/pty/fixtures/tsconfig.json --noEmit` into `ready` via
a typecheck:fixtures script, run after build (so @vue-tui/runtime resolves
against fresh dist types) and before pty-test, so the react-jsx path is
actually enforced rather than only manually checkable.
2026-05-28 23:13:03 +08:00
Yunfei He 72cf46987c chore: optimize package.json descriptions for npm discoverability
Improve descriptions across all packages to include key differentiators
(Yoga flexbox, AI agent, React Ink lineage) and rename workspace root
from vue-tui to vue-tui-monorepo to avoid confusion with the taken npm name.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-27 14:39:24 +08:00
Yunfei He 28d18bedda chore: add PTY test vitest config and ready integration
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 22:11:21 +08:00
Yunfei He def33588e3 chore: monorepo scaffold and shared config
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>
2026-05-24 18:13:22 +08:00