Skip to content

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

Merged
fengmk2 merged 1 commit intomainfrom
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 intomainfrom
vp-run-without-vite-plus-deps

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Feb 6, 2026

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 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch from bb1129f to db31aaf Compare February 6, 2026 11:15
@fengmk2 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch 2 times, most recently from e7684f8 to 35d02fb Compare February 6, 2026 11:37
@fengmk2 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch from 35d02fb to fd8ca6f Compare February 6, 2026 11:49
@fengmk2 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch from fd8ca6f to af16771 Compare February 6, 2026 12:12
@fengmk2 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch 3 times, most recently from ed80484 to b356849 Compare February 7, 2026 06:25
@fengmk2 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch from b356849 to 8d32710 Compare February 7, 2026 07:42
@fengmk2 fengmk2 marked this pull request as ready for review February 7, 2026 07:46
@fengmk2 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch from 8d32710 to 3eade84 Compare February 7, 2026 08:24
@fengmk2 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch from 3eade84 to 57b8c2a Compare February 7, 2026 09:27
@fengmk2 fengmk2 force-pushed the self-upgrade branch 2 times, most recently from 2bfd7d9 to 324d4ed Compare February 7, 2026 09:29
@fengmk2 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch 2 times, most recently from fe7925e to 3a04378 Compare February 7, 2026 09:31
@fengmk2 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch 2 times, most recently from 4bc40f8 to 8e1e691 Compare February 7, 2026 10:21
@fengmk2 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch from 8e1e691 to 3656c22 Compare February 7, 2026 10:24
@fengmk2 fengmk2 added the test: e2e Auto run e2e tests label Feb 7, 2026
@fengmk2 fengmk2 changed the base branch from self-upgrade to graphite-base/549 February 7, 2026 10:42
@fengmk2 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch from 3656c22 to 133cdeb Compare February 7, 2026 10:43
@graphite-app graphite-app Bot changed the base branch from graphite-base/549 to main February 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 fengmk2 force-pushed the vp-run-without-vite-plus-deps branch from 133cdeb to 367f25e Compare February 7, 2026 10:44
@fengmk2 fengmk2 merged commit 8a22e14 into main Feb 7, 2026
32 of 33 checks passed
Copy link
Copy Markdown
Member Author

fengmk2 commented Feb 7, 2026

Merge activity

@fengmk2 fengmk2 deleted the vp-run-without-vite-plus-deps branch February 7, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants