From 5523b04ba0c9c99e144fc1cc3aa908e819fd0aa9 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 31 Mar 2026 09:57:59 +0000 Subject: [PATCH 1/7] chore: add changelog review step to bump-vite-task skill Add step 7 to review vite-task CHANGELOG.md changes and update user-facing docs when needed during a vite-task bump. https://claude.ai/code/session_01CG3eDoiYk8sNttduGRdoDj --- .claude/skills/bump-vite-task/SKILL.md | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/.claude/skills/bump-vite-task/SKILL.md b/.claude/skills/bump-vite-task/SKILL.md index 3a83048286..652f2cd309 100644 --- a/.claude/skills/bump-vite-task/SKILL.md +++ b/.claude/skills/bump-vite-task/SKILL.md @@ -59,7 +59,22 @@ To update snap tests: Snap test files are at `packages/cli/snap-tests/*/snap.txt` and `packages/cli/snap-tests-global/*/snap.txt`. -### 7. Create the PR +### 7. Review changelog and update docs + +- Fetch the vite-task `CHANGELOG.md` diff between old and new commits to see what changed: + ``` + https://raw.githubusercontent.com/voidzero-dev/vite-task//CHANGELOG.md + ``` +- Review each changelog entry and determine if it affects user-facing behavior: new CLI options, changed defaults, new config fields, removed features, etc. +- If user-facing changes are found, update the relevant docs in `docs/` (e.g., `docs/guide/`, `docs/config/`). +- Common doc updates include: + - **New CLI flags/options**: Update the relevant config doc (e.g., `docs/config/run.md`, `docs/config/build.md`) + - **New features or commands**: Add or update the relevant guide page (e.g., `docs/guide/cache.md`) + - **Changed defaults or behavior**: Update any docs that describe the old behavior + - **Removed/deprecated options**: Remove or mark as deprecated in the relevant docs +- If no user-facing changes are found, skip this step. + +### 8. Create the PR - Commit message: `chore: bump vite-task to ` - PR title: `chore: bump vite-task to ` @@ -68,7 +83,7 @@ Snap test files are at `packages/cli/snap-tests/*/snap.txt` and `packages/cli/sn https://github.com/voidzero-dev/vite-task/compare/...#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed ``` -### 8. Verify CI +### 9. Verify CI Wait for CI and ensure the `done` check passes. Key checks to monitor: From 85795182751cee9a64ea0271cbf81dd38f259532 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 31 Mar 2026 09:59:15 +0000 Subject: [PATCH 2/7] chore: mention checking vite-task PRs for complex changelog entries https://claude.ai/code/session_01CG3eDoiYk8sNttduGRdoDj --- .claude/skills/bump-vite-task/SKILL.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.claude/skills/bump-vite-task/SKILL.md b/.claude/skills/bump-vite-task/SKILL.md index 652f2cd309..5acf53a743 100644 --- a/.claude/skills/bump-vite-task/SKILL.md +++ b/.claude/skills/bump-vite-task/SKILL.md @@ -66,6 +66,7 @@ Snap test files are at `packages/cli/snap-tests/*/snap.txt` and `packages/cli/sn https://raw.githubusercontent.com/voidzero-dev/vite-task//CHANGELOG.md ``` - Review each changelog entry and determine if it affects user-facing behavior: new CLI options, changed defaults, new config fields, removed features, etc. +- The changelog contains links to the corresponding vite-task PRs. For complex changes, check the PR description and code diff (especially any docs changes in the PR) to understand the full scope of the change. - If user-facing changes are found, update the relevant docs in `docs/` (e.g., `docs/guide/`, `docs/config/`). - Common doc updates include: - **New CLI flags/options**: Update the relevant config doc (e.g., `docs/config/run.md`, `docs/config/build.md`) From ebc1d9d10e65a506f56574c8d40cc0aca569b601 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 31 Mar 2026 10:08:43 +0000 Subject: [PATCH 3/7] chore: bump vite-task to 1ef4e2f6 https://github.com/voidzero-dev/vite-task/compare/26c18922e8f3de1cf8a18597e5640f1c85662e45...1ef4e2f6bd783472ffdaa1cae874d142e2f56322#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed https://claude.ai/code/session_01CG3eDoiYk8sNttduGRdoDj --- Cargo.lock | 96 ++++++++++++--- Cargo.toml | 12 +- docs/config/run.md | 22 +++- docs/guide/run.md | 28 +++++ packages/cli/src/run-config.ts | 208 ++++++++++++++++----------------- 5 files changed, 230 insertions(+), 136 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 65f6dd67a7..738eba4aa1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -558,6 +558,15 @@ dependencies = [ "generic-array", ] +[[package]] +name = "block2" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5" +dependencies = [ + "objc2", +] + [[package]] name = "blocking" version = "1.6.2" @@ -1230,6 +1239,17 @@ version = "0.0.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52560adf09603e58c9a7ee1fe1dcb95a16927b17c127f0ac02d6e768a0e25bc1" +[[package]] +name = "ctrlc" +version = "3.5.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162" +dependencies = [ + "dispatch2", + "nix 0.31.2", + "windows-sys 0.61.2", +] + [[package]] name = "darling" version = "0.20.11" @@ -1438,6 +1458,18 @@ dependencies = [ "winapi", ] +[[package]] +name = "dispatch2" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" +dependencies = [ + "bitflags 2.11.0", + "block2", + "libc", + "objc2", +] + [[package]] name = "displaydoc" version = "0.2.5" @@ -1762,7 +1794,7 @@ dependencies = [ [[package]] name = "fspy" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "allocator-api2", "anyhow", @@ -1798,7 +1830,7 @@ dependencies = [ [[package]] name = "fspy_detours_sys" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "cc", "winapi", @@ -1807,7 +1839,7 @@ dependencies = [ [[package]] name = "fspy_preload_unix" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "anyhow", "bincode", @@ -1822,7 +1854,7 @@ dependencies = [ [[package]] name = "fspy_preload_windows" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "bincode", "constcat", @@ -1838,7 +1870,7 @@ dependencies = [ [[package]] name = "fspy_seccomp_unotify" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "bincode", "futures-util", @@ -1855,7 +1887,7 @@ dependencies = [ [[package]] name = "fspy_shared" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "allocator-api2", "bincode", @@ -1873,7 +1905,7 @@ dependencies = [ [[package]] name = "fspy_shared_unix" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "anyhow", "base64 0.22.1", @@ -3248,6 +3280,18 @@ dependencies = [ "memoffset 0.9.1", ] +[[package]] +name = "nix" +version = "0.31.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5d6d0705320c1e6ba1d912b5e37cf18071b6c2e9b7fa8215a1e8a7651966f5d3" +dependencies = [ + "bitflags 2.11.0", + "cfg-if", + "cfg_aliases", + "libc", +] + [[package]] name = "node-semver" version = "2.2.0" @@ -3431,6 +3475,15 @@ dependencies = [ "libc", ] +[[package]] +name = "objc2" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3a12a8ed07aefc768292f076dc3ac8c48f3781c8f2d5851dd3d98950e8c5a89f" +dependencies = [ + "objc2-encode", +] + [[package]] name = "objc2-core-foundation" version = "0.3.2" @@ -3450,6 +3503,12 @@ dependencies = [ "objc2-core-foundation", ] +[[package]] +name = "objc2-encode" +version = "4.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33" + [[package]] name = "once_cell" version = "1.21.4" @@ -4622,7 +4681,7 @@ dependencies = [ [[package]] name = "pty_terminal_test_client" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" [[package]] name = "quote" @@ -7260,7 +7319,7 @@ dependencies = [ [[package]] name = "vite_glob" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "thiserror 2.0.18", "vite_path", @@ -7304,7 +7363,7 @@ dependencies = [ [[package]] name = "vite_graph_ser" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "petgraph 0.8.3", "serde", @@ -7387,7 +7446,7 @@ dependencies = [ [[package]] name = "vite_path" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "bincode", "diff-struct", @@ -7401,7 +7460,7 @@ dependencies = [ [[package]] name = "vite_select" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "anyhow", "crossterm", @@ -7430,7 +7489,7 @@ dependencies = [ [[package]] name = "vite_shell" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "bincode", "brush-parser 0.3.0 (git+https://github.com/reubeno/brush?rev=dcb760933b10ee0433d7b740a5709b06f5c67c6b)", @@ -7457,7 +7516,7 @@ dependencies = [ [[package]] name = "vite_str" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "bincode", "compact_str", @@ -7468,13 +7527,14 @@ dependencies = [ [[package]] name = "vite_task" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "anyhow", "async-trait", "bincode", "bstr", "clap", + "ctrlc", "derive_more", "fspy", "futures-util", @@ -7506,7 +7566,7 @@ dependencies = [ [[package]] name = "vite_task_graph" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "anyhow", "async-trait", @@ -7528,7 +7588,7 @@ dependencies = [ [[package]] name = "vite_task_plan" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "anyhow", "async-trait", @@ -7558,7 +7618,7 @@ version = "0.0.0" [[package]] name = "vite_workspace" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=26c18922e8f3de1cf8a18597e5640f1c85662e45#26c18922e8f3de1cf8a18597e5640f1c85662e45" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=1ef4e2f6bd783472ffdaa1cae874d142e2f56322#1ef4e2f6bd783472ffdaa1cae874d142e2f56322" dependencies = [ "clap", "petgraph 0.8.3", diff --git a/Cargo.toml b/Cargo.toml index a88bb9ab2d..2d71b26139 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -85,7 +85,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 = "26c18922e8f3de1cf8a18597e5640f1c85662e45" } +fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1ef4e2f6bd783472ffdaa1cae874d142e2f56322" } futures = "0.3.31" futures-util = "0.3.31" glob = "0.3.2" @@ -186,15 +186,15 @@ vfs = "0.13.0" vite_command = { path = "crates/vite_command" } vite_error = { path = "crates/vite_error" } vite_js_runtime = { path = "crates/vite_js_runtime" } -vite_glob = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "26c18922e8f3de1cf8a18597e5640f1c85662e45" } +vite_glob = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1ef4e2f6bd783472ffdaa1cae874d142e2f56322" } vite_install = { path = "crates/vite_install" } vite_migration = { path = "crates/vite_migration" } 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 = "26c18922e8f3de1cf8a18597e5640f1c85662e45" } -vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "26c18922e8f3de1cf8a18597e5640f1c85662e45" } -vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "26c18922e8f3de1cf8a18597e5640f1c85662e45" } -vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "26c18922e8f3de1cf8a18597e5640f1c85662e45" } +vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1ef4e2f6bd783472ffdaa1cae874d142e2f56322" } +vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1ef4e2f6bd783472ffdaa1cae874d142e2f56322" } +vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1ef4e2f6bd783472ffdaa1cae874d142e2f56322" } +vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1ef4e2f6bd783472ffdaa1cae874d142e2f56322" } walkdir = "2.5.0" wax = "0.6.0" which = "8.0.0" diff --git a/docs/config/run.md b/docs/config/run.md index bf900092f0..93f6e09f68 100644 --- a/docs/config/run.md +++ b/docs/config/run.md @@ -171,7 +171,7 @@ A set of common environment variables are automatically passed through to all ta ### `input` -- **Type:** `Array` +- **Type:** `Array` - **Default:** `[{ auto: true }]` (auto-inferred) Vite Task automatically detects which files are used by a command (see [Automatic File Tracking](/guide/cache#automatic-file-tracking)). The `input` option can be used to explicitly include or exclude certain files. @@ -199,6 +199,24 @@ tasks: { } ``` +**Resolve patterns relative to the workspace root** using the object form: + +```ts +tasks: { + build: { + command: 'vp build', + input: [ + { auto: true }, + { pattern: 'shared-config/**', base: 'workspace' }, + ], + }, +} +``` + +The `base` field controls how the glob pattern is resolved: +- `"package"` (default): relative to the package directory +- `"workspace"`: relative to the workspace root + **Disable file tracking** entirely and cache only on command/env changes: ```ts @@ -211,7 +229,7 @@ tasks: { ``` ::: tip -Glob patterns are resolved relative to the package directory, not the task's `cwd`. +String glob patterns are resolved relative to the package directory by default. Use the object form with `base: "workspace"` to resolve relative to the workspace root. ::: ### `cwd` diff --git a/docs/guide/run.md b/docs/guide/run.md index 4407770cb0..6d3942a150 100644 --- a/docs/guide/run.md +++ b/docs/guide/run.md @@ -287,6 +287,34 @@ Use `--last-details` to show the summary from the last run without running tasks vp run --last-details ``` +## Concurrency + +By default, up to 4 tasks run at the same time. Use `--concurrency-limit` to change this: + +```bash +# Run up to 8 tasks at once +vp run -r --concurrency-limit 8 build + +# Run tasks one at a time +vp run -r --concurrency-limit 1 build +``` + +The limit can also be set via the `VP_RUN_CONCURRENCY_LIMIT` environment variable. The `--concurrency-limit` flag takes priority over the environment variable. + +### Parallel Mode + +Use `--parallel` to ignore task dependencies and run all tasks at once with unlimited concurrency: + +```bash +vp run -r --parallel lint +``` + +This is useful when tasks are independent and you want maximum throughput. You can combine `--parallel` with `--concurrency-limit` to run tasks without dependency ordering but still cap the number of concurrent tasks: + +```bash +vp run -r --parallel --concurrency-limit 4 lint +``` + ## Additional Arguments Arguments after the task name are passed through to the task command: diff --git a/packages/cli/src/run-config.ts b/packages/cli/src/run-config.ts index 69e4a66134..9c7852a91d 100644 --- a/packages/cli/src/run-config.ts +++ b/packages/cli/src/run-config.ts @@ -1,117 +1,105 @@ // This file is auto-generated by `cargo test`. Do not edit manually. -export type AutoInput = { - /** - * Automatically track which files the task reads - */ - auto: boolean; -}; +export type AutoInput = { +/** + * Automatically track which files the task reads + */ +auto: boolean, }; -export type GlobWithBase = { - /** - * The glob pattern (positive or negative starting with `!`) - */ - pattern: string; - /** - * The base directory for resolving the pattern - */ - base: InputBase; -}; +export type GlobWithBase = { +/** + * The glob pattern (positive or negative starting with `!`) + */ +pattern: string, +/** + * The base directory for resolving the pattern + */ +base: InputBase, }; -export type InputBase = 'package' | 'workspace'; +export type InputBase = "package" | "workspace"; -export type Task = { - /** - * The command to run for the task. - */ - command: string; - /** - * The working directory for the task, relative to the package root (not workspace root). - */ - cwd?: string; - /** - * Dependencies of this task. Use `package-name#task-name` to refer to tasks in other packages. - */ - dependsOn?: Array; -} & ( - | { - /** - * Whether to cache the task - */ - cache?: true; - /** - * Environment variable names to be fingerprinted and passed to the task. - */ - env?: Array; - /** - * Environment variable names to be passed to the task without fingerprinting. - */ - untrackedEnv?: Array; - /** - * Files to include in the cache fingerprint. - * - * - Omitted: automatically tracks which files the task reads - * - `[]` (empty): disables file tracking entirely - * - Glob patterns (e.g. `"src/**"`) select specific files, relative to the package directory - * - `{pattern: "...", base: "workspace" | "package"}` specifies a glob with an explicit base directory - * - `{auto: true}` enables automatic file tracking - * - Negative patterns (e.g. `"!dist/**"`) exclude matched files - */ - input?: Array; - } - | { - /** - * Whether to cache the task - */ - cache: false; - } -); +export type Task = { +/** + * The command to run for the task. + */ +command: string, +/** + * The working directory for the task, relative to the package root (not workspace root). + */ +cwd?: string, +/** + * Dependencies of this task. Use `package-name#task-name` to refer to tasks in other packages. + */ +dependsOn?: Array, } & ({ +/** + * Whether to cache the task + */ +cache?: true, +/** + * Environment variable names to be fingerprinted and passed to the task. + */ +env?: Array, +/** + * Environment variable names to be passed to the task without fingerprinting. + */ +untrackedEnv?: Array, +/** + * Files to include in the cache fingerprint. + * + * - Omitted: automatically tracks which files the task reads + * - `[]` (empty): disables file tracking entirely + * - Glob patterns (e.g. `"src/**"`) select specific files, relative to the package directory + * - `{pattern: "...", base: "workspace" | "package"}` specifies a glob with an explicit base directory + * - `{auto: true}` enables automatic file tracking + * - Negative patterns (e.g. `"!dist/**"`) exclude matched files + */ +input?: Array, } | { +/** + * Whether to cache the task + */ +cache: false, }); -export type UserGlobalCacheConfig = - | boolean - | { - /** - * Enable caching for package.json scripts not defined in the `tasks` map. - * - * When `false`, package.json scripts will not be cached. - * When `true`, package.json scripts will be cached with default settings. - * - * Default: `false` - */ - scripts?: boolean; - /** - * Global cache kill switch for task entries. - * - * When `false`, overrides all tasks to disable caching, even tasks with `cache: true`. - * When `true`, respects each task's individual `cache` setting - * (each task's `cache` defaults to `true` if omitted). - * - * Default: `true` - */ - tasks?: boolean; - }; +export type UserGlobalCacheConfig = boolean | { +/** + * Enable caching for package.json scripts not defined in the `tasks` map. + * + * When `false`, package.json scripts will not be cached. + * When `true`, package.json scripts will be cached with default settings. + * + * Default: `false` + */ +scripts?: boolean, +/** + * Global cache kill switch for task entries. + * + * When `false`, overrides all tasks to disable caching, even tasks with `cache: true`. + * When `true`, respects each task's individual `cache` setting + * (each task's `cache` defaults to `true` if omitted). + * + * Default: `true` + */ +tasks?: boolean, }; -export type RunConfig = { - /** - * Root-level cache configuration. - * - * This option can only be set in the workspace root's config file. - * Setting it in a package's config will result in an error. - */ - cache?: UserGlobalCacheConfig; - /** - * Task definitions - */ - tasks?: { [key in string]?: Task }; - /** - * Whether to automatically run `preX`/`postX` package.json scripts as - * lifecycle hooks when script `X` is executed. - * - * When `true` (the default), running script `test` will automatically - * run `pretest` before and `posttest` after, if they exist. - * - * This option can only be set in the workspace root's config file. - * Setting it in a package's config will result in an error. - */ - enablePrePostScripts?: boolean; -}; +export type RunConfig = { +/** + * Root-level cache configuration. + * + * This option can only be set in the workspace root's config file. + * Setting it in a package's config will result in an error. + */ +cache?: UserGlobalCacheConfig, +/** + * Task definitions + */ +tasks?: { [key in string]?: Task }, +/** + * Whether to automatically run `preX`/`postX` package.json scripts as + * lifecycle hooks when script `X` is executed. + * + * When `true` (the default), running script `test` will automatically + * run `pretest` before and `posttest` after, if they exist. + * + * This option can only be set in the workspace root's config file. + * Setting it in a package's config will result in an error. + */ +enablePrePostScripts?: boolean, }; \ No newline at end of file From ccc5dfeb297059d5ddfc684438a935ab0bacf1cc Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 31 Mar 2026 10:16:11 +0000 Subject: [PATCH 4/7] fix: correct input base docs and parallel example - base is a required field, not defaulting to "package" - use dev instead of lint in --parallel examples https://claude.ai/code/session_01CG3eDoiYk8sNttduGRdoDj --- docs/config/run.md | 4 ++-- docs/guide/run.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/config/run.md b/docs/config/run.md index 93f6e09f68..eeec7c700e 100644 --- a/docs/config/run.md +++ b/docs/config/run.md @@ -213,8 +213,8 @@ tasks: { } ``` -The `base` field controls how the glob pattern is resolved: -- `"package"` (default): relative to the package directory +The `base` field is required and controls how the glob pattern is resolved: +- `"package"`: relative to the package directory - `"workspace"`: relative to the workspace root **Disable file tracking** entirely and cache only on command/env changes: diff --git a/docs/guide/run.md b/docs/guide/run.md index 6d3942a150..6000708977 100644 --- a/docs/guide/run.md +++ b/docs/guide/run.md @@ -306,13 +306,13 @@ The limit can also be set via the `VP_RUN_CONCURRENCY_LIMIT` environment variabl Use `--parallel` to ignore task dependencies and run all tasks at once with unlimited concurrency: ```bash -vp run -r --parallel lint +vp run -r --parallel dev ``` This is useful when tasks are independent and you want maximum throughput. You can combine `--parallel` with `--concurrency-limit` to run tasks without dependency ordering but still cap the number of concurrent tasks: ```bash -vp run -r --parallel --concurrency-limit 4 lint +vp run -r --parallel --concurrency-limit 4 dev ``` ## Additional Arguments From e482d22b7e54056cd612cb54fcdc82e9f6e478b2 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 31 Mar 2026 10:26:29 +0000 Subject: [PATCH 5/7] chore: exclude generated run-config.ts from formatting This file is auto-generated by vite-task and validated by a cargo test. Formatting it causes CI failures since the generated output doesn't match the formatter's style. https://claude.ai/code/session_01CG3eDoiYk8sNttduGRdoDj --- vite.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/vite.config.ts b/vite.config.ts index 913492fa9a..801f2febee 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -77,6 +77,7 @@ export default defineConfig({ 'packages/test/**.d.ts', 'packages/test/**.mjs', 'packages/test/browser/', + 'packages/cli/src/run-config.ts', 'vite', 'rolldown', ], From 1b6e249510a8c47f6d3c445e7d697021dd1e6aca Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 31 Mar 2026 10:47:49 +0000 Subject: [PATCH 6/7] fix: update command-vp-alias snap for new --concurrency-limit and --parallel flags The vite-task bump adds --concurrency-limit and --parallel to vp run, which changes the clap-generated help text alignment. https://claude.ai/code/session_01CG3eDoiYk8sNttduGRdoDj --- .../cli/snap-tests/command-vp-alias/snap.txt | 24 ++++++++++--------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/packages/cli/snap-tests/command-vp-alias/snap.txt b/packages/cli/snap-tests/command-vp-alias/snap.txt index 5082487baa..a04e1d7b98 100644 --- a/packages/cli/snap-tests/command-vp-alias/snap.txt +++ b/packages/cli/snap-tests/command-vp-alias/snap.txt @@ -36,14 +36,16 @@ Arguments: Running `vp run` without a task name shows an interactive task selector. Options: - -r, --recursive Select all packages in the workspace - -t, --transitive Select the current package and its transitive dependencies - -w, --workspace-root Select the workspace root package - -F, --filter Match packages by name, directory, or glob pattern - --ignore-depends-on Do not run dependencies specified in `dependsOn` fields - -v, --verbose Show full detailed summary after execution - --cache Force caching on for all tasks and scripts - --no-cache Force caching off for all tasks and scripts - --log How task output is displayed [default: interleaved] [possible values: interleaved, labeled, grouped] - --last-details Display the detailed summary of the last run - -h, --help Print help (see more with '--help') + -r, --recursive Select all packages in the workspace + -t, --transitive Select the current package and its transitive dependencies + -w, --workspace-root Select the workspace root package + -F, --filter Match packages by name, directory, or glob pattern + --ignore-depends-on Do not run dependencies specified in `dependsOn` fields + -v, --verbose Show full detailed summary after execution + --cache Force caching on for all tasks and scripts + --no-cache Force caching off for all tasks and scripts + --log How task output is displayed [default: interleaved] [possible values: interleaved, labeled, grouped] + --concurrency-limit Maximum number of tasks to run concurrently. Defaults to 4 + --parallel Run tasks without dependency ordering. Sets concurrency to unlimited unless `--concurrency-limit` is also specified + --last-details Display the detailed summary of the last run + -h, --help Print help (see more with '--help') From d84fe3372a1de25c8b2e88e15c4950f27bca3b52 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 31 Mar 2026 10:48:23 +0000 Subject: [PATCH 7/7] fix: use correct two-line clap help format in command-vp-alias snap Clap switches to two-line format (flag + indented description) when option names are wide enough. The --concurrency-limit flag triggers this. https://claude.ai/code/session_01CG3eDoiYk8sNttduGRdoDj --- .../cli/snap-tests/command-vp-alias/snap.txt | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/packages/cli/snap-tests/command-vp-alias/snap.txt b/packages/cli/snap-tests/command-vp-alias/snap.txt index a04e1d7b98..f36a787462 100644 --- a/packages/cli/snap-tests/command-vp-alias/snap.txt +++ b/packages/cli/snap-tests/command-vp-alias/snap.txt @@ -36,16 +36,29 @@ Arguments: Running `vp run` without a task name shows an interactive task selector. Options: - -r, --recursive Select all packages in the workspace - -t, --transitive Select the current package and its transitive dependencies - -w, --workspace-root Select the workspace root package - -F, --filter Match packages by name, directory, or glob pattern - --ignore-depends-on Do not run dependencies specified in `dependsOn` fields - -v, --verbose Show full detailed summary after execution - --cache Force caching on for all tasks and scripts - --no-cache Force caching off for all tasks and scripts - --log How task output is displayed [default: interleaved] [possible values: interleaved, labeled, grouped] - --concurrency-limit Maximum number of tasks to run concurrently. Defaults to 4 - --parallel Run tasks without dependency ordering. Sets concurrency to unlimited unless `--concurrency-limit` is also specified - --last-details Display the detailed summary of the last run - -h, --help Print help (see more with '--help') + -r, --recursive + Select all packages in the workspace + -t, --transitive + Select the current package and its transitive dependencies + -w, --workspace-root + Select the workspace root package + -F, --filter + Match packages by name, directory, or glob pattern + --ignore-depends-on + Do not run dependencies specified in `dependsOn` fields + -v, --verbose + Show full detailed summary after execution + --cache + Force caching on for all tasks and scripts + --no-cache + Force caching off for all tasks and scripts + --log + How task output is displayed [default: interleaved] [possible values: interleaved, labeled, grouped] + --concurrency-limit + Maximum number of tasks to run concurrently. Defaults to 4 + --parallel + Run tasks without dependency ordering. Sets concurrency to unlimited unless `--concurrency-limit` is also specified + --last-details + Display the detailed summary of the last run + -h, --help + Print help (see more with '--help')