Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
fc9a37d
feat(cli): global -C flag and workspace-root target elicitation for a…
fengmk2 Jul 3, 2026
02bcc81
refactor(cli): dedupe interactivity gate and vite config probing, nor…
fengmk2 Jul 3, 2026
0a94de1
refactor: memoized terminal checks behind a clippy rule, document -C …
fengmk2 Jul 3, 2026
406d2a7
rfc: global -C flag for working-directory switching
fengmk2 Jul 3, 2026
ba34cce
fix(snap): sort vite_shared exports, show raw error output in root fi…
fengmk2 Jul 3, 2026
49b9b43
docs(monorepo): document the workspace-root app-command experience
fengmk2 Jul 3, 2026
11a7684
test(snap): add -C to the vp --help snapshot
fengmk2 Jul 4, 2026
cf23d5c
test(snap): reset dist between pack forms to avoid platform-dependent…
fengmk2 Jul 4, 2026
d7dae58
test(snapshot): PTY coverage for app-root resolution
fengmk2 Jul 5, 2026
cbc4b95
feat(cli): interactive package picker for bare app commands at the wo…
fengmk2 Jul 5, 2026
d026c9b
test(snapshot): migrate cwd-flag and app-root snap tests to the PTY h…
fengmk2 Jul 5, 2026
b145aaf
fix(cli): document -C in the local CLI help
fengmk2 Jul 5, 2026
aacf6b0
fix(cli): pack runnable ranking requires a pack block or the tsdown d…
fengmk2 Jul 5, 2026
93a15b7
rfc: cite upstream defaults behind the runnable heuristic
fengmk2 Jul 5, 2026
28b48fe
test(snapshot): vp pack auto-select via tsdown default entry
fengmk2 Jul 5, 2026
0ace334
test(snapshot): single-package repos bypass elicitation
fengmk2 Jul 5, 2026
812fb3c
refactor(cli): apply cleanup review to app-target elicitation
fengmk2 Jul 5, 2026
1158d73
test(snapshot): re-record for byte-size redaction
fengmk2 Jul 5, 2026
27d96a5
fix(cli): address Codex review round 1
fengmk2 Jul 5, 2026
99d1f53
fix(cli): address Codex review round 2
fengmk2 Jul 5, 2026
e30cc28
fix(cli): address Codex review round 3
fengmk2 Jul 5, 2026
f147d3c
fix(cli): address Codex review round 4
fengmk2 Jul 5, 2026
6617c54
fix(cli): address Codex review round 5
fengmk2 Jul 5, 2026
20c9d63
fix(cli): address Codex review round 6
fengmk2 Jul 5, 2026
9542ae9
test(snapshot): pin the member defaultPackage regression on a real wo…
fengmk2 Jul 5, 2026
052df7a
fix(cli): address Codex review round 7
fengmk2 Jul 5, 2026
da77383
fix(cli): restore parse_leading_chdir test import lost in a restack
fengmk2 Jul 5, 2026
e66242b
fix(cli): address Codex review round 9
fengmk2 Jul 5, 2026
3383bdb
fix(cli): treat pack --root as an explicit target
fengmk2 Jul 6, 2026
64ff309
fix(cli): gate picker milestones behind VP_EMIT_MILESTONES
fengmk2 Jul 6, 2026
e4e0206
fix(cli): make chdir the single -C validation point in bin.ts
fengmk2 Jul 6, 2026
f2db2ee
refactor(cli): apply cleanup review across the -C and elicitation code
fengmk2 Jul 6, 2026
8dec264
fix(cli): keep normalize_args doc off apply_chdir
fengmk2 Jul 6, 2026
f80fed5
fix(cli): a runnable workspace root runs in place, TTY or not
fengmk2 Jul 6, 2026
24446a2
test(snapshot): pin the non-TTY runnable-root rule on tsdown output only
fengmk2 Jul 6, 2026
95cfbc7
test(snapshot): re-record runnable-root headers for the comment change
fengmk2 Jul 6, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .clippy.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ disallowed-methods = [
{ path = "str::replace", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_replace` instead." },
{ path = "str::replacen", reason = "To avoid memory allocation, use `cow_utils::CowUtils::cow_replacen` instead." },
{ path = "std::env::current_dir", reason = "To get an `AbsolutePathBuf`, Use `vite_path::current_dir` instead." },
{ path = "std::io::IsTerminal::is_terminal", reason = "Use `vite_powershell::is_stdin_terminal` for stdin, or `vite_shared::is_stdout_terminal` / `vite_shared::is_stderr_terminal`, which memoize the lookup." },
Comment thread
fengmk2 marked this conversation as resolved.
Comment thread
fengmk2 marked this conversation as resolved.
]

disallowed-types = [
Expand Down
61 changes: 32 additions & 29 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 10 additions & 9 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ dunce = "1.0.5"
fast-glob = "1.0.0"
flate2 = { version = "=1.1.9", features = ["zlib-rs"] }
form_urlencoded = "1.2.1"
fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "6cfa6e47a1a5fdadd215e1556766cc753603a539" }
fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "a301aff2705ab7c663cc847dcc7c42f178f1fb68" }
futures = "0.3.31"
futures-util = "0.3.31"
glob = "0.3.2"
Expand Down Expand Up @@ -251,8 +251,8 @@ pretty_assertions = "1.4.1"
phf = "0.13.0"
prettyplease = "0.2.32"
proc-macro2 = "1"
pty_terminal_test = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "6cfa6e47a1a5fdadd215e1556766cc753603a539" }
pty_terminal_test_client = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "6cfa6e47a1a5fdadd215e1556766cc753603a539" }
pty_terminal_test = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "a301aff2705ab7c663cc847dcc7c42f178f1fb68" }
pty_terminal_test_client = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "a301aff2705ab7c663cc847dcc7c42f178f1fb68" }
quote = "1"
rayon = "1.10.0"
regex = "1.11.1"
Expand All @@ -276,7 +276,7 @@ sha2 = "0.10.9"
shell-escape = "0.1.5"
simdutf8 = "0.1.5"
smallvec = { version = "1.15.1", features = ["union"] }
snapshot_test = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "6cfa6e47a1a5fdadd215e1556766cc753603a539" }
snapshot_test = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "a301aff2705ab7c663cc847dcc7c42f178f1fb68" }
string_cache = "0.9.0"
sugar_path = { version = "2.0.1", features = ["cached_current_dir"] }
supports-color = "3"
Expand Down Expand Up @@ -313,11 +313,12 @@ vite_pm_cli = { path = "crates/vite_pm_cli" }
vite_setup = { path = "crates/vite_setup" }
vite_shared = { path = "crates/vite_shared" }
vite_static_config = { path = "crates/vite_static_config" }
vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "6cfa6e47a1a5fdadd215e1556766cc753603a539" }
vite_powershell = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "6cfa6e47a1a5fdadd215e1556766cc753603a539" }
vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "6cfa6e47a1a5fdadd215e1556766cc753603a539" }
vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "6cfa6e47a1a5fdadd215e1556766cc753603a539" }
vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "6cfa6e47a1a5fdadd215e1556766cc753603a539" }
vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "a301aff2705ab7c663cc847dcc7c42f178f1fb68" }
vite_powershell = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "a301aff2705ab7c663cc847dcc7c42f178f1fb68" }
vite_select = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "a301aff2705ab7c663cc847dcc7c42f178f1fb68" }
vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "a301aff2705ab7c663cc847dcc7c42f178f1fb68" }
vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "a301aff2705ab7c663cc847dcc7c42f178f1fb68" }
vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "a301aff2705ab7c663cc847dcc7c42f178f1fb68" }
walkdir = "2.5.0"
wax = "0.6.0"
which = "8.0.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!doctype html>
<html>
<body>
<h1>web</h1>
</body>
</html>
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "name": "web", "private": true }
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "name": "app-root-auto-select", "private": true, "workspaces": ["apps/*", "packages/*"] }
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "name": "ui", "private": true, "type": "module", "main": "src/index.ts" }
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export function hello(name: string): string {
return `hello ${name}`;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[[case]]
name = "auto_select"
vp = ["local", "global"]
comment = """
With exactly one likely-runnable package, a bare app command in an interactive
terminal auto-selects it, prints the Selected/Tip teaching lines, and runs
there (rfcs/cwd-flag.md). This TTY-only branch was untestable in the old
harness.
"""
steps = [["vp", "build"]]
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# auto_select

With exactly one likely-runnable package, a bare app command in an interactive
terminal auto-selects it, prints the Selected/Tip teaching lines, and runs
there (rfcs/cwd-flag.md). This TTY-only branch was untestable in the old
harness.

## `vp build`

```
VITE+ - The Unified Toolchain for the Web

Selected package: web (apps/web)
Tip: run this directly with `vp -C apps/web build`
vite <version> building client environment for production...
✓ 2 modules transformed.
computing gzip size...
dist/index.html <size> kB │ gzip: <size> kB

✓ built in <duration>
```
Loading
Loading