You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Remove `rolldown-vite` npm package from catalog and minimumReleaseAgeExclude
- Update all rolldown-vite references in rfcs/cli-output-polish.md
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: rfcs/cli-output-polish.md
+16-16Lines changed: 16 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,7 +6,7 @@ Draft
6
6
7
7
## Executive Summary
8
8
9
-
Vite+ wraps several sub-tools (rolldown-vite, vitest, oxlint, oxfmt) and has native Rust commands (upgrade, env, vpx, package manager commands). Each sub-tool currently shows its own branding and uses inconsistent formatting for messages, prefixes, and status indicators. This RFC proposes unifying all CLI output under the "Vite+" brand identity with consistent message formatting, starting with rolldown-vite (whose source is cloned locally and directly modifiable) and extending to Rust commands and other sub-tools.
9
+
Vite+ wraps several sub-tools (vite, vitest, oxlint, oxfmt) and has native Rust commands (upgrade, env, vpx, package manager commands). Each sub-tool currently shows its own branding and uses inconsistent formatting for messages, prefixes, and status indicators. This RFC proposes unifying all CLI output under the "Vite+" brand identity with consistent message formatting, starting with vite (whose source is cloned locally and directly modifiable) and extending to Rust commands and other sub-tools.
10
10
11
11
## Motivation
12
12
@@ -56,9 +56,9 @@ Neither identifies the experience as "Vite+". Users who installed `vite-plus` se
56
56
| ------------------ | ----------------------- |
57
57
| Rust (global CLI) |`owo_colors`|
58
58
| JS (vite-plus CLI) |`node:util styleText()`|
59
-
|rolldown-vite |`picocolors`|
59
+
| vite |`picocolors`|
60
60
61
-
**5. The `[vite]` logger prefix in rolldown-vite**
61
+
**5. The `[vite]` logger prefix in vite**
62
62
63
63
The logger in `vite/packages/vite/src/node/logger.ts` defaults to `prefix = '[vite]'` for timestamped messages. This shows up during dev server operation as colored `[vite]` tags.
64
64
@@ -89,7 +89,7 @@ $ vpx
89
89
1. Establish a unified branding format where "VITE+" is the primary identity shown to users
90
90
2. Standardize message prefix formatting across all commands to a single convention
91
91
3. Standardize status indicator symbols to a single set
4. Apply branding changes to vite output (dev banner, build banner, logger prefix)
93
93
5. Define a repeatable approach: modify sub-tool source directly to achieve consistent output
94
94
95
95
## Non-Goals
@@ -108,7 +108,7 @@ Since vite-plus clones sub-tool source repositories (vite at `vite/`, rolldown a
108
108
109
109
Other sub-tools (vitest, oxlint, oxfmt) can follow the same pattern once their source is cloned or forked.
110
110
111
-
### Phase 1: Rebrand rolldown-vite Output
111
+
### Phase 1: Rebrand vite Output
112
112
113
113
#### 1.1 Dev server banner
114
114
@@ -145,13 +145,13 @@ Where `VITE_PLUS_VERSION` is the vite-plus package version, injected via:
145
145
- A new constant in `vite/packages/vite/src/node/constants.ts`, or
146
146
- Read from an environment variable set by the Rust CLI before spawning vite (e.g., `VITE_PLUS_VERSION`)
147
147
148
-
**Recommended approach:** Environment variable injection. The Rust NAPI binding in `packages/cli/binding/src/cli.rs` already merges environment variables when spawning sub-tools via `merge_resolved_envs()`. We add `VITE_PLUS_VERSION` to the env map, and read it in rolldown-vite:
148
+
**Recommended approach:** Environment variable injection. The Rust NAPI binding in `packages/cli/binding/src/cli.rs` already merges environment variables when spawning sub-tools via `merge_resolved_envs()`. We add `VITE_PLUS_VERSION` to the env map, and read it in vite:
This is clean: the rolldown-vite source change is minimal (reads an env var with fallback), and the version injection happens in the Rust layer that already owns this responsibility.
154
+
This is clean: the vite source change is minimal (reads an env var with fallback), and the version injection happens in the Rust layer that already owns this responsibility.
155
155
156
156
#### 1.2 Build banner
157
157
@@ -203,7 +203,7 @@ prefix = '[vite+]',
203
203
204
204
#### 1.4 Other user-visible strings to audit
205
205
206
-
A full audit of rolldown-vite source for user-visible "vite" strings:
206
+
A full audit of vite source for user-visible "vite" strings:
@@ -309,7 +309,7 @@ After `bundleVitest()` copies vitest files to `dist/`, a `brandVitest()` step pa
309
309
3.`/^vitest\/\d+\.\d+\.\d+$/` regex → `/^vp test\/[\d.]+$/` — so the help callback can still find the banner line
310
310
4.`$ vitest --help --expand-help` → `$ vp test --help --expand-help` — hardcoded help text
311
311
312
-
The Rust NAPI binding injects `VITE_PLUS_VERSION` env var (same mechanism used for rolldown-vite build/dev/preview commands), so `vp test -h` shows `vp test/<vite-plus-version>`.
312
+
The Rust NAPI binding injects `VITE_PLUS_VERSION` env var (same mechanism used for vite build/dev/preview commands), so `vp test -h` shows `vp test/<vite-plus-version>`.
313
313
314
314
#### 3.3 Remaining `vite` → `vp` branding in CLI output
315
315
@@ -365,7 +365,7 @@ Migrate JS-side code (`migration/bin.ts`, `create/bin.ts`) to use these shared f
365
365
366
366
### D1: Direct source modification over build-time transforms
**Rationale:** The user has the source cloned locally. Direct modification is transparent — anyone can `git diff vite/` to see exactly what changed. The set of branding changes is small and well-defined (3-5 files), making rebasing during upstream sync manageable. Build-time transforms (Rolldown plugins in `packages/core/build.ts`) are an alternative that avoids merge conflicts, but they are less visible and can break silently when upstream changes the strings being matched.
371
371
@@ -377,9 +377,9 @@ Migrate JS-side code (`migration/bin.ts`, `create/bin.ts`) to use these shared f
377
377
378
378
### D3: Inject version via environment variable
379
379
380
-
**Decision:** The Rust CLI sets `VITE_PLUS_VERSION` env var before spawning rolldown-vite. The modified rolldown-vite source reads it with a fallback.
380
+
**Decision:** The Rust CLI sets `VITE_PLUS_VERSION` env var before spawning vite. The modified vite source reads it with a fallback.
381
381
382
-
**Rationale:** This avoids hardcoding the version in rolldown-vite source (which would require updating on every release). The Rust CLI already manages environment variables for sub-tool spawning via `merge_resolved_envs()`. The env var approach is the minimal-touch change to rolldown-vite.
382
+
**Rationale:** This avoids hardcoding the version in vite source (which would require updating on every release). The Rust CLI already manages environment variables for sub-tool spawning via `merge_resolved_envs()`. The env var approach is the minimal-touch change to vite.
383
383
384
384
### D4: Lowercase prefixes (`info:` not `Info:`)
385
385
@@ -395,11 +395,11 @@ Migrate JS-side code (`migration/bin.ts`, `create/bin.ts`) to use these shared f
**Rationale:** Changing color libraries is high-risk, low-reward. The shared formatting module abstracts the library choice so the output convention is consistent regardless of the underlying library.
401
401
402
-
## Scope of rolldown-vite Changes
402
+
## Scope of vite Changes
403
403
404
404
### Strings to Change
405
405
@@ -425,7 +425,7 @@ These are internal identifiers, API references, or project name references:
425
425
426
426
## Implementation Plan
427
427
428
-
### Phase 1: rolldown-vite Rebranding
428
+
### Phase 1: vite Rebranding
429
429
430
430
1. Add `VITE_PLUS_VERSION` env var injection in `packages/cli/binding/src/cli.rs` for vite commands (build, dev, preview)
431
431
2. Modify `vite/packages/vite/src/node/cli.ts` — read env var, change banner text
@@ -493,7 +493,7 @@ Many existing snap tests will need updates due to prefix and branding changes:
493
493
### CI
494
494
495
495
- All existing `cargo test` and snap tests pass with updated expectations
496
-
- No regressions in rolldown-vite's own test suite
0 commit comments