You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rfcs/exec-command.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -179,7 +179,7 @@ Based on pnpm exec behavior (reference: `exec/plugin-commands-script-runners/src
179
179
### Key Differences from vpx
180
180
181
181
-`vp exec` prepends only `./node_modules/.bin` from the current directory — it does **not** walk up parent directories. Use `vpx` if you want monorepo root binaries.
182
-
-`vp exec` never falls back to global vp packages or remote download — commands resolve through `node_modules/.bin` + system PATH only.
182
+
-After the Vite+ CLI is selected, `vp exec` never falls back to globally installed executable packages or remote downloads — commands resolve through `node_modules/.bin` + system PATH only.
The global CLI always delegates `exec` to the local CLI — there is no fallback path or direct execution in the global CLI. This follows the same unconditional delegation pattern as other Category C commands.
209
+
The global CLI always delegates `exec` to the JavaScript CLI. Delegation resolves the project's local `vite-plus` first, then falls back to the globally installed `vite-plus` when no local CLI is available. When this fallback occurs inside a project, `vp` recommends migration if `vite-plus` is not declared as a dependency, or recommends installing dependencies if it is declared but unavailable. The Rust global CLI has no direct `exec` implementation.
210
210
211
211
### Local CLI
212
212
@@ -256,16 +256,16 @@ The following existing code is reused:
256
256
257
257
## Design Decisions
258
258
259
-
### 1. Unconditional Delegation (No Global CLI Fallback)
259
+
### 1. Local-First Delegation with Global CLI Fallback
260
260
261
-
**Decision**: The global CLI always delegates `exec` to the local CLI. There is no fallback path for projects without vite-plus as a dependency.
261
+
**Decision**: The global CLI delegates `exec` to the project-local `vite-plus` when available. Otherwise, it provides migration or installation guidance inside projects and continues with the globally installed `vite-plus` CLI.
262
262
263
263
**Rationale**:
264
264
265
265
- Simplifies the global CLI — no need for a direct-execution codepath
266
266
- Consistent with how all Category C commands are dispatched
267
-
- The local CLI has all the workspace awareness needed for `--recursive`, `--filter`, etc.
268
-
-Projects using `vp exec` are expected to have vite-plus installed
267
+
- The delegated CLI has all the workspace awareness needed for `--recursive`, `--filter`, etc.
268
+
-The warning directs projects to migrate or install their declared dependencies without making the global fallback unusable
269
269
270
270
### 2. No Directory Walk-Up (Unlike vpx)
271
271
@@ -278,14 +278,14 @@ The following existing code is reused:
278
278
- Walking up would blur the boundary between package-level and workspace-level binaries
279
279
- Use `vpx` if you want walk-up behavior
280
280
281
-
### 3. Workspace Features Only via Local CLI
281
+
### 3. Workspace Features Use the Delegated CLI
282
282
283
-
**Decision**: `--recursive`, `--workspace-root`, `--filter`, `--parallel`, `--reverse`, `--resume-from`, and `--report-summary`only work when vite-plus is a local dependency (local CLI handles them).
283
+
**Decision**: `--recursive`, `--workspace-root`, `--filter`, `--parallel`, `--reverse`, `--resume-from`, and `--report-summary`are handled by the resolved `vite-plus` CLI, whether project-local or the global fallback.
284
284
285
285
**Rationale**:
286
286
287
287
- These features require workspace awareness from vite-task infrastructure
288
-
- The global CLI fallback is for simple, single-directory exec
288
+
- The project-local and globally installed CLIs use the same workspace-aware implementation
289
289
- This is consistent with how `vp run` handles workspace features
0 commit comments