Skip to content

fix: stop intercepting vite as vp and synthesize vpr in task scripts - #1186

Merged
graphite-app[bot] merged 1 commit into
mainfrom
fix-issue-1176
Mar 30, 2026
Merged

fix: stop intercepting vite as vp and synthesize vpr in task scripts#1186
graphite-app[bot] merged 1 commit into
mainfrom
fix-issue-1176

Conversation

@fengmk2

@fengmk2fengmk2 commented Mar 28, 2026

Copy link
Copy Markdown
Member

Summary

  • Fix: VitePlusCommandHandler was intercepting both vp and vite program names in task scripts. This caused vp run dev to fail with "Invalid vite task command" when a package.json script used bare vite (e.g. "dev": "vite"), because vite is a separate tool, not a vp alias. Now only vp and vpr are intercepted; vite runs verbatim as an external process.
  • Feat: vpr commands in task scripts (e.g. "ready": "vpr hello && vpr dev") are now expanded to vp run and synthesized in-session, avoiding unnecessary process spawns.

Test plan

  • Added snap test command-run-script-vite-program covering:
    • bare vite, vite -h, vite --version all run verbatim
    • vpr hello synthesized in-session
    • chained vpr hello-vpr && vpr dev-version both synthesized
  • All 254 global snap tests pass
  • All 22 Rust unit tests pass
  • Verified on real reproduction project (vp run dev starts Vite dev server)

Closes#1176

@fengmk2Graphite App

fengmk2 commented Mar 28, 2026

Copy link
Copy Markdown
MemberAuthor

How to use the Graphite Merge Queue

Add the label auto-merge to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@fengmk2fengmk2 added the test: e2e Auto run e2e tests label Mar 28, 2026
@fengmk2
fengmk2force-pushed the vp-run-no-fallback branch from 3af4839 to 3048c0dCompareMarch 29, 2026 11:36
@fengmk2
fengmk2force-pushed the vp-run-no-fallback branch from 3048c0d to ad0a0c7CompareMarch 29, 2026 14:52
@fengmk2
fengmk2force-pushed the vp-run-no-fallback branch from 6c24f5a to 707c56aCompareMarch 30, 2026 02:39
@fengmk2
fengmk2 marked this pull request as ready for review March 30, 2026 02:43
@fengmk2
fengmk2 requested review from cpojer and wan9chiMarch 30, 2026 02:43
@fengmk2
fengmk2force-pushed the vp-run-no-fallback branch from 707c56a to 9a5c382CompareMarch 30, 2026 06:33
@fengmk2
fengmk2force-pushed the vp-run-no-fallback branch from 9a5c382 to e4862b2CompareMarch 30, 2026 06:49
@fengmk2
fengmk2force-pushed the fix-issue-1176 branch 2 times, most recently from 538ff45 to ffbfc0cCompareMarch 30, 2026 07:24
@fengmk2
fengmk2force-pushed the vp-run-no-fallback branch from e4862b2 to f898075CompareMarch 30, 2026 07:24
@fengmk2
fengmk2force-pushed the vp-run-no-fallback branch from f898075 to 0e5b9c2CompareMarch 30, 2026 07:40
Comment threadpackages/cli/binding/src/cli.rs Outdated
@graphite-app
graphite-appBot changed the base branch from vp-run-no-fallback to mainMarch 30, 2026 08:37
@netlify

netlifyBot commented Mar 30, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

NameLink
🔨 Latest commitcf7593e
🔍 Latest deploy loghttps://app.netlify.com/projects/viteplus-preview/deploys/69ca7793a5fc650008dc0058

@fengmk2fengmk2 changed the title fix: stop intercepting vite as a vp command in task scriptsfix: stop intercepting vite as vp and synthesize vpr in task scriptsMar 30, 2026
@graphite-app

graphite-appBot commented Mar 30, 2026

Copy link
Copy Markdown

Merge activity

…ripts (#1186)
## Summary
- **Fix**: `VitePlusCommandHandler` was intercepting both `vp` and `vite` program names in task scripts. This caused `vp run dev` to fail with "Invalid vite task command" when a package.json script used bare `vite` (e.g. `"dev": "vite"`), because `vite` is a separate tool, not a vp alias. Now only `vp` and `vpr` are intercepted; `vite` runs verbatim as an external process.
- **Feat**: `vpr` commands in task scripts (e.g. `"ready": "vpr hello && vpr dev"`) are now expanded to `vp run` and synthesized in-session, avoiding unnecessary process spawns.
## Test plan
- [x] Added snap test `command-run-script-vite-program` covering:
- bare `vite`, `vite -h`, `vite --version` all run verbatim
- `vpr hello` synthesized in-session
- chained `vpr hello-vpr && vpr dev-version` both synthesized
- [x] All 254 global snap tests pass
- [x] All 22 Rust unit tests pass
- [x] Verified on real reproduction project (`vp run dev` starts Vite dev server)
Closes#1176
@graphite-app
graphite-appBot merged commit cf7593e into mainMar 30, 2026
64 checks passed
@graphite-app
graphite-appBot deleted the fix-issue-1176 branch March 30, 2026 13:28
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2eAuto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pressing Ctrl+C after vp run dev, pnpm run dev, or npm run dev leaves the terminal in a broken state on Windows

2 participants

@fengmk2@wan9chi