Skip to content

feat(cli): fall back to package manager for vp run without vite-plus dependency - #549

Merged
fengmk2 merged 1 commit into
mainfrom
vp-run-without-vite-plus-deps
Feb 7, 2026
Merged

feat(cli): fall back to package manager for vp run without vite-plus dependency#549
fengmk2 merged 1 commit into
mainfrom
vp-run-without-vite-plus-deps

Conversation

@fengmk2

Copy link
Copy Markdown
Member

When vp run <script> is executed in a project without vite-plus in
dependencies or devDependencies, fall back to <pm> run <script> directly
from the Rust layer instead of entering the JS delegation flow. This avoids
unnecessary overhead of downloading Node.js runtime and prompting users to
install vite-plus.

  • Add has_vite_plus_dependency() utility that walks up from cwd to find
    the nearest package.json and checks for vite-plus
  • Add run_script_command() / resolve_run_script_command() on
    PackageManager for executing <pm> run <args>
  • Add run_or_delegate module that checks dependency before routing
  • Add unit tests for dependency detection and command resolution
  • Add snap test verifying fallback behavior with pnpm

@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch from bb1129f to db31aafCompareFebruary 6, 2026 11:15
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch 2 times, most recently from e7684f8 to 35d02fbCompareFebruary 6, 2026 11:37
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch from 35d02fb to fd8ca6fCompareFebruary 6, 2026 11:49
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch from fd8ca6f to af16771CompareFebruary 6, 2026 12:12
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch 3 times, most recently from ed80484 to b356849CompareFebruary 7, 2026 06:25
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch from b356849 to 8d32710CompareFebruary 7, 2026 07:42
@fengmk2
fengmk2 marked this pull request as ready for review February 7, 2026 07:46
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch from 8d32710 to 3eade84CompareFebruary 7, 2026 08:24
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch from 3eade84 to 57b8c2aCompareFebruary 7, 2026 09:27
@fengmk2
fengmk2force-pushed the self-upgrade branch 2 times, most recently from 2bfd7d9 to 324d4edCompareFebruary 7, 2026 09:29
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch 2 times, most recently from fe7925e to 3a04378CompareFebruary 7, 2026 09:31
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch 2 times, most recently from 4bc40f8 to 8e1e691CompareFebruary 7, 2026 10:21
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch from 8e1e691 to 3656c22CompareFebruary 7, 2026 10:24
@fengmk2fengmk2 added the test: e2e Auto run e2e tests label Feb 7, 2026
@fengmk2
fengmk2 changed the base branch from self-upgrade to graphite-base/549February 7, 2026 10:42
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch from 3656c22 to 133cdebCompareFebruary 7, 2026 10:43
@graphite-app
graphite-appBot changed the base branch from graphite-base/549 to mainFebruary 7, 2026 10:44
…s dependency
When `vp run <script>` is executed in a project without `vite-plus` in
dependencies or devDependencies, fall back to `<pm> run <script>` directly
from the Rust layer instead of entering the JS delegation flow. This avoids
unnecessary overhead of downloading Node.js runtime and prompting users to
install vite-plus.
- Add `has_vite_plus_dependency()` utility that walks up from cwd to find
the nearest package.json and checks for vite-plus
- Add `run_script_command()` / `resolve_run_script_command()` on
PackageManager for executing `<pm> run <args>`
- Add `run_or_delegate` module that checks dependency before routing
- Add unit tests for dependency detection and command resolution
- Add snap test verifying fallback behavior with pnpm
@fengmk2
fengmk2force-pushed the vp-run-without-vite-plus-deps branch from 133cdeb to 367f25eCompareFebruary 7, 2026 10:44
@fengmk2
fengmk2 merged commit 8a22e14 into mainFeb 7, 2026
32 of 33 checks passed
@fengmk2Graphite App

Copy link
Copy Markdown
MemberAuthor

Merge activity

@fengmk2
fengmk2 deleted the vp-run-without-vite-plus-deps branch February 7, 2026 11:05
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.

2 participants

@fengmk2@Brooooooklyn