Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
✅ Deploy Preview for viteplus-staging canceled.
|
fengmk2
commented
Mar 12, 2026
branchseer
approved these changes
Mar 12, 2026
…migration subprocess When `vp migrate` runs `vp fmt --migrate=prettier` as a subprocess, the subprocess's bin.ts was calling applyToolInitConfigToViteConfig which tries to create vite.config.ts, merge config, and format it with oxfmt. This fails because vite-plus isn't installed yet in the target project, so oxfmt can't load the config. The migrator already handles vite.config.ts creation and config merging via its own mergeViteConfigFiles + injectFmtDefaults, making the subprocess call redundant. Pass __VITE_PLUS_SKIP_INIT_CONFIG env var from the migrator to skip the redundant applyToolInitConfigToViteConfig in the subprocess.
…navailable During `vp migrate`, the subprocess `vp fmt --migrate=prettier` calls applyToolInitConfigToViteConfig which runs vpFmt to format vite.config.ts. This fails in E2E tests where vite-plus isn't installed yet, causing oxfmt to be unable to load the config. Instead of skipping applyToolInitConfigToViteConfig entirely (which changed config update counts and property ordering), make vpFmt best-effort: catch errors and warn instead of throwing. This preserves the existing behavior while preventing the crash. Removes the __VITE_PLUS_SKIP_INIT_CONFIG env var approach from the previous commit in favor of this simpler fix.
Instead of throwing on formatting failure, warn and continue. The caller in bin.ts already handles exceptions from resolveFmt gracefully.
Instead of throwing on formatting failure, warn and continue while preserving stdout/stderr output for diagnostics.
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

The
vpFmtfunction now gracefully handles cases wherevp fmtis not available or fails to execute. Instead of throwing an error when formatting fails, it now shows a warning message and continues execution. Additionally, the entire formatting operation is wrapped in a try-catch block to handle cases wherevp fmtis not yet installed (such as during migration processes), allowing the operation to proceed without formatting rather than failing completely.