diff --git a/.claude/skills/bump-vite-task/SKILL.md b/.claude/skills/bump-vite-task/SKILL.md new file mode 100644 index 0000000000..3a83048286 --- /dev/null +++ b/.claude/skills/bump-vite-task/SKILL.md @@ -0,0 +1,86 @@ +--- +name: bump-vite-task +description: Bump vite-task git dependency to the latest main commit. Use when you need to update the vite-task crates (fspy, vite_glob, vite_path, vite_str, vite_task, vite_workspace) in vite-plus. +allowed-tools: Read, Grep, Glob, Edit, Bash, Agent, WebFetch +--- + +# Bump vite-task to Latest Main + +Update the vite-task git dependency in `Cargo.toml` to the latest commit on the vite-task main branch, fix any breaking changes, and create a PR. + +## Steps + +### 1. Get current and target commits + +- Read `Cargo.toml` and find the current `rev = "..."` for any vite-task git dependency (e.g., `vite_task`, `vite_path`, `fspy`, `vite_glob`, `vite_str`, `vite_workspace`). They all share the same revision. +- Get the latest commit hash on vite-task's main branch: + ```bash + git ls-remote https://github.com/voidzero-dev/vite-task.git refs/heads/main + ``` + +### 2. Update Cargo.toml + +- Replace **all** occurrences of the old commit hash with the new one in `Cargo.toml`. There are 6 crate entries that reference the same vite-task revision: `fspy`, `vite_glob`, `vite_path`, `vite_str`, `vite_task`, `vite_workspace`. + +### 3. Ensure upstream dependencies are cloned + +- `cargo check` requires the `./rolldown` and `./vite` directories to exist (many workspace path dependencies point to `./rolldown/crates/...`). +- Locally, clone them using the commit hashes from `packages/tools/.upstream-versions.json`. +- CI handles this automatically via the `.github/actions/clone` action. + +### 4. Verify compilation + +- Run `cargo check` to ensure the new vite-task compiles without errors. +- If there are compilation errors, these are **breaking changes** from vite-task. Fix them in the vite-plus codebase (the consuming side), not in vite-task. +- Common breaking changes include: renamed functions/methods, changed function signatures, new required fields in structs, removed public APIs. + +### 5. Run tests + +- Run `cargo test -p vite_command -p vite_error -p vite_install -p vite_js_runtime -p vite_migration -p vite_shared -p vite_static_config -p vite-plus-cli -p vite_global_cli` to run the vite-plus crate tests. +- Note: Some tests require network access (e.g., `vite_install::package_manager` tests, `vite_global_cli::commands::env` tests). These may fail in sandboxed environments. Verify they also fail on the main branch before dismissing them. +- Note: `cargo test -p vite_task` will NOT work because vite_task is a git dependency, not a workspace member. + +### 6. Update snap tests + +vite-task changes often affect CLI output, which means snap tests need updating. Common output changes: + +- **Status icons**: e.g., cache hit/miss indicators may change +- **New CLI options**: e.g., new flags added to `vp run` that show up in help output +- **Cache behavior messages**: e.g., new summary lines about cache status +- **Task output formatting**: e.g., step numbering, separator lines + +To update snap tests: + +1. Push your changes and let CI run the snap tests. +2. CI will show the diff in the E2E test logs if snap tests fail. +3. Extract the diff from CI logs and apply it locally. +4. Check all three platforms (Linux, Mac, Windows) since they may have slightly different snap test coverage. +5. Watch for trailing newline issues - ensure snap files end consistently. + +Snap test files are at `packages/cli/snap-tests/*/snap.txt` and `packages/cli/snap-tests-global/*/snap.txt`. + +### 7. Create the PR + +- Commit message: `chore: bump vite-task to ` +- PR title: `chore: bump vite-task to ` +- PR body: Link to vite-task CHANGELOG.md diff between old and new commits: + ``` + https://github.com/voidzero-dev/vite-task/compare/...#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed + ``` + +### 8. Verify CI + +Wait for CI and ensure the `done` check passes. Key checks to monitor: + +- **Lint**: Clippy and format checks +- **Test** (Linux, Mac, Windows): Rust unit tests +- **CLI E2E test** (Linux, Mac, Windows): Snap tests - most likely to fail on a vite-task bump +- **Run task**: Task runner integration tests +- **Cargo Deny**: License/advisory checks (may have pre-existing failures unrelated to bump) + +The only **required** status check for merging is `done`, which aggregates the other checks (excluding Cargo Deny). + +## Notes + +- Building the full CLI locally (`pnpm bootstrap-cli`) requires the rolldown Node.js package to be built first, which is complex. Prefer relying on CI for snap test generation. +- `Cargo.lock` is automatically updated by cargo when you change the revision in `Cargo.toml`. diff --git a/Cargo.lock b/Cargo.lock index be885d9aff..0423ff84a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1747,7 +1747,7 @@ dependencies = [ [[package]] name = "fspy" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "allocator-api2", "anyhow", @@ -1782,7 +1782,7 @@ dependencies = [ [[package]] name = "fspy_detours_sys" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "cc", "winapi", @@ -1791,7 +1791,7 @@ dependencies = [ [[package]] name = "fspy_preload_unix" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "anyhow", "bincode", @@ -1806,7 +1806,7 @@ dependencies = [ [[package]] name = "fspy_preload_windows" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "bincode", "constcat", @@ -1822,7 +1822,7 @@ dependencies = [ [[package]] name = "fspy_seccomp_unotify" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "bincode", "futures-util", @@ -1839,7 +1839,7 @@ dependencies = [ [[package]] name = "fspy_shared" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "allocator-api2", "bincode", @@ -1857,7 +1857,7 @@ dependencies = [ [[package]] name = "fspy_shared_unix" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "anyhow", "base64 0.22.1", @@ -4562,7 +4562,7 @@ dependencies = [ [[package]] name = "pty_terminal_test_client" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" [[package]] name = "quinn" @@ -7243,7 +7243,7 @@ dependencies = [ [[package]] name = "vite_glob" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "thiserror 2.0.18", "vite_path", @@ -7286,7 +7286,7 @@ dependencies = [ [[package]] name = "vite_graph_ser" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "petgraph 0.8.3", "serde", @@ -7368,7 +7368,7 @@ dependencies = [ [[package]] name = "vite_path" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "bincode", "diff-struct", @@ -7382,7 +7382,7 @@ dependencies = [ [[package]] name = "vite_select" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "anyhow", "crossterm", @@ -7408,7 +7408,7 @@ dependencies = [ [[package]] name = "vite_shell" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "bincode", "brush-parser 0.3.0 (git+https://github.com/reubeno/brush?rev=dcb760933b10ee0433d7b740a5709b06f5c67c6b)", @@ -7435,7 +7435,7 @@ dependencies = [ [[package]] name = "vite_str" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "bincode", "compact_str", @@ -7446,7 +7446,7 @@ dependencies = [ [[package]] name = "vite_task" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "anyhow", "async-trait", @@ -7481,7 +7481,7 @@ dependencies = [ [[package]] name = "vite_task_graph" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "anyhow", "async-trait", @@ -7503,7 +7503,7 @@ dependencies = [ [[package]] name = "vite_task_plan" version = "0.1.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "anyhow", "async-trait", @@ -7533,7 +7533,7 @@ version = "0.0.0" [[package]] name = "vite_workspace" version = "0.0.0" -source = "git+https://github.com/voidzero-dev/vite-task.git?rev=398a147fd1ed42a88585d3a9481f200c3e56a2f4#398a147fd1ed42a88585d3a9481f200c3e56a2f4" +source = "git+https://github.com/voidzero-dev/vite-task.git?rev=69cc6eba95a3b7f25f7d4d32c3f29b1386995907#69cc6eba95a3b7f25f7d4d32c3f29b1386995907" dependencies = [ "clap", "petgraph 0.8.3", diff --git a/Cargo.toml b/Cargo.toml index 99b9c6dddc..9afad954a3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -84,7 +84,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 = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" } +fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" } futures = "0.3.31" futures-util = "0.3.31" glob = "0.3.2" @@ -183,15 +183,15 @@ vfs = "0.12.1" 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 = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" } +vite_glob = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" } 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 = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" } -vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" } -vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" } -vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" } +vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" } +vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" } +vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" } +vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" } walkdir = "2.5.0" wax = "0.6.0" which = "8.0.0" diff --git a/packages/cli/snap-tests/build-vite-env/snap.txt b/packages/cli/snap-tests/build-vite-env/snap.txt index fbc74f986a..3f9d1c9a60 100644 --- a/packages/cli/snap-tests/build-vite-env/snap.txt +++ b/packages/cli/snap-tests/build-vite-env/snap.txt @@ -11,7 +11,7 @@ dist/assets/index-BnIqjoTZ.js kB │ gzip: kB > VITE_MY_VAR=1 vp run build # should hit cache -$ vp build ✓ cache hit, replaying +$ vp build ◉ cache hit, replaying vite v building client environment for production... transforming...✓ modules transformed. rendering chunks... @@ -25,7 +25,7 @@ dist/assets/index-BnIqjoTZ.js kB │ gzip: kB vp run: cache hit, ms saved. > VITE_MY_VAR=2 vp run build # env changed, should miss cache -$ vp build ✗ cache miss: envs changed, executing +$ vp build ○ cache miss: envs changed, executing vite v building client environment for production... transforming...✓ modules transformed. rendering chunks... @@ -35,3 +35,5 @@ dist/assets/index-BnIqjoTZ.js kB │ gzip: kB ✓ built in ms +--- +vp run: build-vite-env-test#build not cached because it modified its input. (Run `vp run --last-details` for full details) diff --git a/packages/cli/snap-tests/cache-clean/snap.txt b/packages/cli/snap-tests/cache-clean/snap.txt index e8df33b0a6..9075b45a06 100644 --- a/packages/cli/snap-tests/cache-clean/snap.txt +++ b/packages/cli/snap-tests/cache-clean/snap.txt @@ -2,13 +2,13 @@ $ vp fmt Finished in ms on 4 files using threads. +--- +vp run: hello not cached because it modified its input. (Run `vp run --last-details` for full details) > vp run hello # hit the cache -$ vp fmt ✓ cache hit, replaying +$ vp fmt Finished in ms on 4 files using threads. ---- -vp run: cache hit, ms saved. > vp cache clean # clean the cache > vp run hello # cache miss after clean diff --git a/packages/cli/snap-tests/cache-scripts-enabled/snap.txt b/packages/cli/snap-tests/cache-scripts-enabled/snap.txt index 88d9c8eeac..c5e54e69e1 100644 --- a/packages/cli/snap-tests/cache-scripts-enabled/snap.txt +++ b/packages/cli/snap-tests/cache-scripts-enabled/snap.txt @@ -4,7 +4,7 @@ hello from script > vp run hello # second run should be cache hit -$ node hello.mjs ✓ cache hit, replaying +$ node hello.mjs ◉ cache hit, replaying hello from script --- diff --git a/packages/cli/snap-tests/change-passthrough-env-config/snap.txt b/packages/cli/snap-tests/change-passthrough-env-config/snap.txt index f71884a511..d41bbd0203 100644 --- a/packages/cli/snap-tests/change-passthrough-env-config/snap.txt +++ b/packages/cli/snap-tests/change-passthrough-env-config/snap.txt @@ -4,7 +4,7 @@ $ node -p process.env.MY_ENV > MY_ENV=2 vp run hello # MY_ENV is pass-through. should hit the cache created in step 1 -$ node -p process.env.MY_ENV ✓ cache hit, replaying +$ node -p process.env.MY_ENV ◉ cache hit, replaying 1 --- @@ -12,6 +12,6 @@ vp run: cache hit, ms saved. > # add a new pass through env via VITE_TASK_PASS_THROUGH_ENVS > VITE_TASK_PASS_THROUGH_ENVS=MY_ENV,MY_ENV2 MY_ENV=2 vp run hello # cache should be invalidated because untrackedEnv config changed -$ node -p process.env.MY_ENV ✗ cache miss: untracked env config changed, executing +$ node -p process.env.MY_ENV ○ cache miss: untracked env config changed, executing 2 diff --git a/packages/cli/snap-tests/command-install-shortcut/snap.txt b/packages/cli/snap-tests/command-install-shortcut/snap.txt index 6d0ae1c90b..eafa58ce2a 100644 --- a/packages/cli/snap-tests/command-install-shortcut/snap.txt +++ b/packages/cli/snap-tests/command-install-shortcut/snap.txt @@ -9,17 +9,15 @@ dependencies: Done in ms using pnpm v +--- +vp run: command-install-shortcut#install not cached because it modified its input. (Run `vp run --last-details` for full details) > vp run install # install shortcut hit cache -$ vp install ✓ cache hit, replaying -Packages: + -+ -Progress: resolved , reused , downloaded , added , done - -dependencies: -+ tslib +$ vp install +Lockfile is up to date, resolution step is skipped +Already up to date Done in ms using pnpm v --- -vp run: cache hit, ms saved. +vp run: command-install-shortcut#install not cached because it modified its input. (Run `vp run --last-details` for full details) diff --git a/packages/cli/snap-tests/command-pack-monorepo/snap.txt b/packages/cli/snap-tests/command-pack-monorepo/snap.txt index 024da03ac2..d6599c29bf 100644 --- a/packages/cli/snap-tests/command-pack-monorepo/snap.txt +++ b/packages/cli/snap-tests/command-pack-monorepo/snap.txt @@ -2,23 +2,17 @@ > ls packages/hello/dist # should have the library index.cjs -> vp run hello#build 2>&1 | grep 'cache hit' # should hit cache -~/packages/hello$ vp pack ✓ cache hit, replaying -vp run: cache hit, ms saved. - +[1]> vp run hello#build 2>&1 | grep 'cache hit' # should hit cache > vp run array-config#build # should build the library supports array config > ls packages/array-config/dist # should have the library index.d.mts index.mjs -> vp run array-config#build 2>&1 | grep 'cache hit' # should hit cache -~/packages/array-config$ vp pack ✓ cache hit, replaying -vp run: cache hit, ms saved. - +[1]> vp run array-config#build 2>&1 | grep 'cache hit' # should hit cache > vp run default-config#build # should build the library supports default config > ls packages/default-config/dist # should have the library index.mjs > vp run default-config#build 2>&1 | grep 'cache hit' # should hit cache -~/packages/default-config$ vp pack ✓ cache hit, replaying +~/packages/default-config$ vp pack ◉ cache hit, replaying vp run: cache hit, ms saved. diff --git a/packages/cli/snap-tests/command-pack/snap.txt b/packages/cli/snap-tests/command-pack/snap.txt index 32f3e9d419..074a58b0f8 100644 --- a/packages/cli/snap-tests/command-pack/snap.txt +++ b/packages/cli/snap-tests/command-pack/snap.txt @@ -59,17 +59,20 @@ $ vp pack src/index.ts ℹ 1 files, total: kB ✔ Build complete in ms +--- +vp run: command-pack#pack not cached because it modified its input. (Run `vp run --last-details` for full details) > ls dist # should have the library index.mjs > vp run pack # should hit cache -$ vp pack src/index.ts ✓ cache hit, replaying +$ vp pack src/index.ts ℹ entry: src/index.ts ℹ Build start +ℹ Cleaning 1 files ℹ dist/index.mjs kB │ gzip: kB ℹ 1 files, total: kB ✔ Build complete in ms --- -vp run: cache hit, ms saved. +vp run: command-pack#pack not cached because it modified its input. (Run `vp run --last-details` for full details) diff --git a/packages/cli/snap-tests/command-vp-alias/snap.txt b/packages/cli/snap-tests/command-vp-alias/snap.txt index eab925309b..424eb25c87 100644 --- a/packages/cli/snap-tests/command-vp-alias/snap.txt +++ b/packages/cli/snap-tests/command-vp-alias/snap.txt @@ -42,5 +42,6 @@ Options: -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') diff --git a/packages/cli/snap-tests/ignore_dist/snap.txt b/packages/cli/snap-tests/ignore_dist/snap.txt index 4d432de1c6..de76b88fe6 100644 --- a/packages/cli/snap-tests/ignore_dist/snap.txt +++ b/packages/cli/snap-tests/ignore_dist/snap.txt @@ -6,7 +6,7 @@ Finished in ms on 1 file with rules using thread > mkdir dist > vp run lint # new dist folder should not invalidate cache -$ vp lint ✓ cache hit, replaying +$ vp lint ◉ cache hit, replaying Found 0 warnings and 0 errors. Finished in ms on 1 file with rules using threads. diff --git a/packages/cli/snap-tests/npm-install-with-options/snap.txt b/packages/cli/snap-tests/npm-install-with-options/snap.txt index 6f947b553f..ecc7269de4 100644 --- a/packages/cli/snap-tests/npm-install-with-options/snap.txt +++ b/packages/cli/snap-tests/npm-install-with-options/snap.txt @@ -23,13 +23,15 @@ Run "npm help install" for more info > vp run install # https://docs.npmjs.com/cli/v10/commands/npm-install $ vp install --production --silent +--- +vp run: npm-install-with-options#install not cached because it modified its input. (Run `vp run --last-details` for full details) > ls node_modules @oxlint tslib > vp run install # install again hit cache -$ vp install --production --silent ✓ cache hit, replaying +$ vp install --production --silent --- -vp run: cache hit, ms saved. +vp run: npm-install-with-options#install not cached because it modified its input. (Run `vp run --last-details` for full details) diff --git a/packages/cli/snap-tests/oxlint-typeaware/snap.txt b/packages/cli/snap-tests/oxlint-typeaware/snap.txt index 9a8c89376a..a97ebd307a 100644 --- a/packages/cli/snap-tests/oxlint-typeaware/snap.txt +++ b/packages/cli/snap-tests/oxlint-typeaware/snap.txt @@ -6,7 +6,7 @@ Finished in ms on 1 file with rules using thread > echo //comment >> types.ts > vp run lint # non-type-aware linting doesn't read types.ts -$ vp lint ./src ✓ cache hit, replaying +$ vp lint ./src ◉ cache hit, replaying Found 0 warnings and 0 errors. Finished in ms on 1 file with rules using threads. @@ -21,7 +21,7 @@ Finished in ms on 1 file with rules using thread > echo //comment >> types.ts > vp run lint-typeaware # type-aware linting reads types.ts -$ vp lint --type-aware ./src ✗ cache miss: 'types.ts' modified, executing +$ vp lint --type-aware ./src ○ cache miss: 'types.ts' modified, executing Found 0 warnings and 0 errors. Finished in ms on 1 file with rules using threads. diff --git a/packages/cli/snap-tests/plain-terminal-ui-nested/snap.txt b/packages/cli/snap-tests/plain-terminal-ui-nested/snap.txt index 034786c83e..ffa975a06b 100644 --- a/packages/cli/snap-tests/plain-terminal-ui-nested/snap.txt +++ b/packages/cli/snap-tests/plain-terminal-ui-nested/snap.txt @@ -12,11 +12,11 @@ vp run: 0/2 cache hit (0%). (Run `vp run --last-details` for full details) > echo 'console.log(123)' > a.ts > vp run hello # report cache status from the inner runner -$ vp lint ./src ✓ cache hit, replaying +$ vp lint ./src ◉ cache hit, replaying Found 0 warnings and 0 errors. Finished in ms on 1 file with rules using threads. -$ vp lint ✗ cache miss: 'a.ts' modified, executing +$ vp lint ○ cache miss: 'a.ts' modified, executing Found 0 warnings and 0 errors. Finished in ms on 3 files with rules using threads. diff --git a/packages/cli/snap-tests/plain-terminal-ui/snap.txt b/packages/cli/snap-tests/plain-terminal-ui/snap.txt index a31d4cf37d..931e6e0d1e 100644 --- a/packages/cli/snap-tests/plain-terminal-ui/snap.txt +++ b/packages/cli/snap-tests/plain-terminal-ui/snap.txt @@ -4,41 +4,41 @@ input_content 1 > FOO=1 vp run hello # hit cache -$ node hello.mjs ✓ cache hit, replaying +$ node hello.mjs ◉ cache hit, replaying input_content 1 --- vp run: cache hit, ms saved. > FOO=2 vp run hello # env changed -$ node hello.mjs ✗ cache miss: envs changed, executing +$ node hello.mjs ○ cache miss: envs changed, executing input_content 2 > FOO=2 BAR=1 vp run hello # env added -$ node hello.mjs ✗ cache miss: envs changed, executing +$ node hello.mjs ○ cache miss: envs changed, executing input_content 2 > vp run hello # env removed -$ node hello.mjs ✗ cache miss: envs changed, executing +$ node hello.mjs ○ cache miss: envs changed, executing input_content undefined > echo bar > input.txt > vp run hello # input changed -$ node hello.mjs ✗ cache miss: 'input.txt' modified, executing +$ node hello.mjs ○ cache miss: 'input.txt' modified, executing bar undefined > # set untrackedEnv via env var > VITE_TASK_PASS_THROUGH_ENVS=PTE vp run hello # untrackedEnv changed -$ node hello.mjs ✗ cache miss: untracked env config changed, executing +$ node hello.mjs ○ cache miss: untracked env config changed, executing bar undefined > # set cwd via env var (keep untrackedEnv from previous step) > VITE_TASK_PASS_THROUGH_ENVS=PTE VITE_TASK_CWD=subfolder vp run hello # cwd changed -~/subfolder$ node hello.mjs ✗ cache miss: working directory changed, executing +~/subfolder$ node hello.mjs ○ cache miss: working directory changed, executing hello from subfolder diff --git a/packages/cli/snap-tests/vp-run-expansion/snap.txt b/packages/cli/snap-tests/vp-run-expansion/snap.txt index cd3eb09a4f..8ef5c491ec 100644 --- a/packages/cli/snap-tests/vp-run-expansion/snap.txt +++ b/packages/cli/snap-tests/vp-run-expansion/snap.txt @@ -4,7 +4,7 @@ $ node -p '40+2' > vp run hello # should hit cache -$ node -p '40+2' ✓ cache hit, replaying +$ node -p '40+2' ◉ cache hit, replaying 42 --- diff --git a/packages/cli/snap-tests/yarn-install-with-options/snap.txt b/packages/cli/snap-tests/yarn-install-with-options/snap.txt index 49478b5de4..a53614f379 100644 --- a/packages/cli/snap-tests/yarn-install-with-options/snap.txt +++ b/packages/cli/snap-tests/yarn-install-with-options/snap.txt @@ -75,20 +75,16 @@ info No lockfile found. success Saved lockfile. Done in ms. +--- +vp run: yarn-install-with-options#install not cached because it modified its input. (Run `vp run --last-details` for full details) > ls node_modules tslib > vp run install # install again hit cache -$ vp install --prod ✓ cache hit, replaying +$ vp install --prod yarn install v -info No lockfile found. [1/4] Resolving packages... -[2/4] Fetching packages... -[3/4] Linking dependencies... -[4/4] Building fresh packages... -success Saved lockfile. +success Already up-to-date. Done in ms. ---- -vp run: cache hit, ms saved.