Skip to content

chore: Minor CLI polish. - #784

Merged
cpojer merged 1 commit into
mainfrom
cli-updates
Mar 12, 2026
Merged

chore: Minor CLI polish.#784
cpojer merged 1 commit into
mainfrom
cli-updates

Conversation

@cpojer

Copy link
Copy Markdown
Member

Aligns the interactive vp command text with the new text we decided on yesterday + changes the formatting of errors coming from Vite Task:

CleanShot 2026-03-12 at 09 36 11@2x

@cpojer
cpojer requested review from fengmk2 and wan9chiMarch 12, 2026 00:44
@netlify

netlifyBot commented Mar 12, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-staging canceled.

NameLink
🔨 Latest commitd2b6ea1
🔍 Latest deploy loghttps://app.netlify.com/projects/viteplus-staging/deploys/69b20dfb3405e20008ce5abe

@cpojer
cpojer merged commit f13cb76 into mainMar 12, 2026
21 checks passed
@cpojerGraphite App

Copy link
Copy Markdown
MemberAuthor

Merge activity

@cpojer
cpojer deleted the cli-updates branch March 12, 2026 01:11
wan9chi added a commit to voidzero-dev/vite-task that referenced this pull request May 19, 2026
## Motivation
The error-chain formatting (`error: <msg>` + `* <source>` lines,
bold-red prefix) used to live in vite-plus at the napi boundary
(voidzero-dev/vite-plus#784). That meant any tweak to error output — or
any test that asserts on it — required building the whole vite-plus napi
binding and running through the JS CLI.
Moving the formatter into vite-task lets us iterate on and snapshot-test
the exact user-visible error output directly with `cargo test`, no
vite-plus build needed. vite-plus can then drop its napi-side formatter
since `Session::main` no longer surfaces errors across the boundary — it
prints them itself and returns only an exit status.
## Changes
- New `vite_task::print_error(&anyhow::Error)` — writes `error:
<top-level>` (bold red on TTY) plus `\n* <source>` for each link in the
chain, mirroring the format vite-plus#784 introduced.
- `Session::main` signature: `anyhow::Result<ExitStatus>` →
`ExitStatus`. It prints errors itself via `print_error` and returns
`FAILURE`; the caller just exits with the status.
- `vt` binary uses `print_error` for `Session::init` errors too, so any
error escaping the CLI uses the same format.
- e2e snapshots updated for the new format (`Error:` → `error:`,
anyhow's `Caused by:\n ...` block → `* ...` lines).
vite-plus is pinned to a vite-task revision and will be updated
separately to drop its napi-layer formatter.
https://claude.ai/code/session_012BLuM9bhiDFBfc8U1CMst8
---------
Co-authored-by: Claude <noreply@anthropic.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@cpojer@fengmk2