Skip to content

fix(pack): replace "tsdown" with "vp pack" in error messages#642

Merged
fengmk2 merged 2 commits intomainfrom
vp-pack-fix
Feb 27, 2026
Merged

fix(pack): replace "tsdown" with "vp pack" in error messages#642
fengmk2 merged 2 commits intomainfrom
vp-pack-fix

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Feb 26, 2026

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().

@fengmk2 fengmk2 self-assigned this Feb 26, 2026
Copy link
Copy Markdown
Member Author

fengmk2 commented Feb 26, 2026

@fengmk2 fengmk2 marked this pull request as ready for review February 26, 2026 14:18
Copy link
Copy Markdown
Member

@cpojer cpojer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wowza this is shaky.

Can we not instead do something like setting an env var if tsdown is run in a Vite+ context (or any other way of passing config to tsdown), and change the printing in tsdown based on whether the env var is set?

@fengmk2
Copy link
Copy Markdown
Member Author

fengmk2 commented Feb 27, 2026

Wowza this is shaky.

Can we not instead do something like setting an env var if tsdown is run in a Vite+ context (or any other way of passing config to tsdown), and change the printing in tsdown based on whether the env var is set?

Yes, it currently seems that any upstream code changes will cause string replacement failures. However, the good news is that the dependency auto-upgrading GitHub Action will handle the failure logic via Claude Code, which will attempt to automatically update these replacement logics. https://github.com/voidzero-dev/vite-plus/blob/main/.github/workflows/upgrade-deps.yml

I will create a follow-up issue after the Alpha release, especially after we have open-sourced it, to propose a CLI brand word replacement solution to upstream projects like Vite, tsdown, oxc, etc.

Copy link
Copy Markdown
Member Author

fengmk2 commented Feb 27, 2026

Merge activity

  • Feb 27, 2:39 AM UTC: Graphite rebased this pull request as part of a merge.
  • Feb 27, 5:26 AM UTC: @fengmk2 merged this pull request with Graphite.

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().
Stack trace file paths and line numbers change across builds, making
snap tests unstable. Strip "    at ..." lines in replaceUnstableOutput.
@fengmk2 fengmk2 merged commit 5df3a55 into main Feb 27, 2026
32 checks passed
@fengmk2 fengmk2 deleted the vp-pack-fix branch February 27, 2026 05:26
Sign up for free to 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.

3 participants