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
fix(pack): replace "tsdown" with "vp pack" in error messages (#642)
Add brandTsdown() build-time patching to replace upstream "tsdown"
branding in the bundled error message when no input files are found.
Follows the same post-build branding pattern as brandVitest().
Copy file name to clipboardExpand all lines: rfcs/cli-output-polish.md
+19Lines changed: 19 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -325,6 +325,18 @@ These are straightforward string replacements in the source, verified by snap te
325
325
326
326
For oxlint and oxfmt, pre-spawn banners or build-time patching can follow the same pattern once their source/dist is bundled.
327
327
328
+
### Phase 3.5: Rebrand tsdown Output
329
+
330
+
tsdown is bundled via `@voidzero-dev/vite-plus-core`. Its build script (`packages/core/build.ts`) bundles tsdown's dist files via rolldown.
331
+
332
+
#### 3.5.1 Approach: Build-time patching of bundled build chunk
333
+
334
+
After `bundleTsdown()` rebuilds tsdown, a `brandTsdown()` step patches the build chunk (`dist/tsdown/build-*.js`) with string replacements:
335
+
336
+
1.`"tsdown <your-file>"` → `"vp pack <your-file>"` — error message when no input files found
337
+
338
+
Internal identifiers are left unchanged: debug namespaces (`tsdown:*`), plugin names (`tsdown:external`), config prefix (`tsdown.config`), temp dirs (`tsdown-pack-`).
339
+
328
340
### Phase 4: JS-Side Output Consistency
329
341
330
342
The JS code in `packages/cli/src/utils/terminal.ts` already has `accent()`, `headline()`, `muted()`, `success()`, `error()` functions. Extend it with prefix functions matching the Rust convention:
@@ -435,6 +447,12 @@ These are internal identifiers, API references, or project name references:
**Process:** Run `pnpm -F vite-plus snap-test` after each phase, review `git diff` on `snap.txt` files, and verify the new formatting matches expectations.
0 commit comments