From 439d18231e8ef1c6fe36b5992503941261e9e561 Mon Sep 17 00:00:00 2001 From: branchseer Date: Thu, 16 Apr 2026 21:58:34 +0800 Subject: [PATCH 1/7] refactor(tests): use libtest-mimic for e2e and plan snapshot test harnesses Replace ad-hoc argument parsing with libtest-mimic to get proper cargo test integration (--filter, --list, --exact, formatted output). Co-Authored-By: Claude Opus 4.6 (1M context) --- Cargo.lock | 50 +++++++++++++- Cargo.toml | 1 + crates/vite_task_bin/Cargo.toml | 1 + .../vite_task_bin/tests/e2e_snapshots/main.rs | 65 +++++++----------- crates/vite_task_plan/Cargo.toml | 1 + .../tests/plan_snapshots/main.rs | 67 +++++++++---------- 6 files changed, 106 insertions(+), 79 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 344e310e..311e3639 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -57,7 +57,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "43d5b281e737544384e969a5ccad3f1cdd24b48086a0fc1b2a5262a26b8f4f4a" dependencies = [ "anstyle", - "anstyle-parse", + "anstyle-parse 0.2.7", + "anstyle-query", + "anstyle-wincon", + "colorchoice", + "is_terminal_polyfill", + "utf8parse", +] + +[[package]] +name = "anstream" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d" +dependencies = [ + "anstyle", + "anstyle-parse 1.0.0", "anstyle-query", "anstyle-wincon", "colorchoice", @@ -80,6 +95,15 @@ dependencies = [ "utf8parse", ] +[[package]] +name = "anstyle-parse" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "52ce7f38b242319f7cabaa6813055467063ecdc9d355bbb4ce0c68908cd8130e" +dependencies = [ + "utf8parse", +] + [[package]] name = "anstyle-query" version = "1.1.5" @@ -446,7 +470,7 @@ version = "4.5.57" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7b12c8b680195a62a8364d16b8447b01b6c2c8f9aaf68bee653be34d4245e238" dependencies = [ - "anstream", + "anstream 0.6.21", "anstyle", "clap_lex", "strsim", @@ -1015,7 +1039,7 @@ version = "0.11.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "13c863f0904021b108aa8b2f55046443e6b1ebde8fd4a15c399893aae4fa069f" dependencies = [ - "anstream", + "anstream 0.6.21", "anstyle", "env_filter", "log", @@ -1037,6 +1061,12 @@ dependencies = [ "windows-sys 0.61.2", ] +[[package]] +name = "escape8259" +version = "0.5.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5692dd7b5a1978a5aeb0ce83b7655c58ca8efdcb79d21036ea249da95afec2c6" + [[package]] name = "euclid" version = "0.22.13" @@ -1797,6 +1827,18 @@ dependencies = [ "vcpkg", ] +[[package]] +name = "libtest-mimic" +version = "0.8.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "14e6ba06f0ade6e504aff834d7c34298e5155c6baca353cc6a4aaff2f9fd7f33" +dependencies = [ + "anstream 1.0.0", + "anstyle", + "clap", + "escape8259", +] + [[package]] name = "libyml" version = "0.0.5" @@ -4003,6 +4045,7 @@ dependencies = [ "insta", "jsonc-parser", "libc", + "libtest-mimic", "notify", "pty_terminal", "pty_terminal_test", @@ -4056,6 +4099,7 @@ dependencies = [ "cow-utils", "futures-util", "insta", + "libtest-mimic", "petgraph", "rustc-hash", "serde", diff --git a/Cargo.toml b/Cargo.toml index 5e43a621..8b23875b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -83,6 +83,7 @@ futures-util = "0.3.31" insta = "1.44.3" jsonc-parser = { version = "0.29.0", features = ["serde"] } libc = "0.2.172" +libtest-mimic = "0.8.2" memmap2 = "0.9.7" monostate = "1.0.2" native_str = { path = "crates/native_str" } diff --git a/crates/vite_task_bin/Cargo.toml b/crates/vite_task_bin/Cargo.toml index 18e45ee5..1a6a026a 100644 --- a/crates/vite_task_bin/Cargo.toml +++ b/crates/vite_task_bin/Cargo.toml @@ -33,6 +33,7 @@ which = { workspace = true } [dev-dependencies] cow-utils = { workspace = true } cp_r = { workspace = true } +libtest-mimic = { workspace = true } insta = { workspace = true, features = ["glob", "json", "redactions", "filters", "ron"] } pty_terminal = { workspace = true } pty_terminal_test = { workspace = true } diff --git a/crates/vite_task_bin/tests/e2e_snapshots/main.rs b/crates/vite_task_bin/tests/e2e_snapshots/main.rs index 6830791b..c8d8c1a4 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/main.rs +++ b/crates/vite_task_bin/tests/e2e_snapshots/main.rs @@ -193,22 +193,9 @@ struct SnapshotsFile { } #[expect(clippy::disallowed_types, reason = "Path required by insta::glob! callback signature")] -fn run_case(tmpdir: &AbsolutePath, fixture_path: &std::path::Path, filter: Option<&str>) { +fn run_case(tmpdir: &AbsolutePath, fixture_path: &std::path::Path) { let fixture_name = fixture_path.file_name().unwrap().to_str().unwrap(); - if fixture_name.starts_with('.') { - return; // skip hidden files like .DS_Store - } - // Skip if filter doesn't match - if let Some(f) = filter - && !fixture_name.contains(f) - { - return; - } - #[expect(clippy::print_stdout, reason = "test progress output for e2e test runner")] - { - println!("{fixture_name}"); - } // Configure insta to write snapshots to fixture directory let mut settings = insta::Settings::clone_current(); settings.set_snapshot_path(fixture_path.join("snapshots")); @@ -443,40 +430,40 @@ fn run_case_inner(tmpdir: &AbsolutePath, fixture_path: &std::path::Path, fixture } } +#[expect(clippy::disallowed_types, reason = "Path required for CARGO_MANIFEST_DIR path traversal")] fn main() { - let filter = std::env::args().nth(1); - let tmp_dir = tempfile::tempdir().unwrap(); let tmp_dir_path = AbsolutePathBuf::new(tmp_dir.path().canonicalize().unwrap()).unwrap(); - #[expect( - clippy::disallowed_types, - reason = "Path required for CARGO_MANIFEST_DIR path traversal" - )] - let fixtures_dir = { - let manifest_dir = - std::path::PathBuf::from(std::env::var_os("CARGO_MANIFEST_DIR").unwrap()); - - // Copy .node-version to the tmp dir so version manager shims can resolve the correct - // Node.js binary when running task commands. - let repo_root = manifest_dir.parent().unwrap().parent().unwrap(); - std::fs::copy(repo_root.join(".node-version"), tmp_dir.path().join(".node-version")) - .unwrap(); - - manifest_dir.join("tests/e2e_snapshots/fixtures") - }; + let manifest_dir = std::path::PathBuf::from(std::env::var_os("CARGO_MANIFEST_DIR").unwrap()); + + // Copy .node-version to the tmp dir so version manager shims can resolve the correct + // Node.js binary when running task commands. + let repo_root = manifest_dir.parent().unwrap().parent().unwrap(); + std::fs::copy(repo_root.join(".node-version"), tmp_dir.path().join(".node-version")).unwrap(); + + let fixtures_dir = manifest_dir.join("tests/e2e_snapshots/fixtures"); let mut fixture_paths = std::fs::read_dir(fixtures_dir) .unwrap() .map(|entry| entry.unwrap().path()) + .filter(|p| p.file_name().and_then(|n| n.to_str()).is_some_and(|n| !n.starts_with('.'))) .collect::>(); fixture_paths.sort(); - for case_path in &fixture_paths { - run_case(&tmp_dir_path, case_path, filter.as_deref()); - } - #[expect(clippy::print_stdout, reason = "test summary")] - { - println!("All cases passed."); - } + let args = libtest_mimic::Arguments::from_args(); + + let tests: Vec = fixture_paths + .into_iter() + .map(|fixture_path| { + let name = fixture_path.file_name().unwrap().to_str().unwrap().to_owned(); + let tmp_dir_path = tmp_dir_path.clone(); + libtest_mimic::Trial::test(name, move || { + run_case(&tmp_dir_path, &fixture_path); + Ok(()) + }) + }) + .collect(); + + libtest_mimic::run(&args, tests).exit(); } diff --git a/crates/vite_task_plan/Cargo.toml b/crates/vite_task_plan/Cargo.toml index f3a0e0ec..ebd27a2e 100644 --- a/crates/vite_task_plan/Cargo.toml +++ b/crates/vite_task_plan/Cargo.toml @@ -34,6 +34,7 @@ which = { workspace = true } [dev-dependencies] clap = { workspace = true, features = ["derive"] } copy_dir = { workspace = true } +libtest-mimic = { workspace = true } cow-utils = { workspace = true } insta = { workspace = true, features = ["glob", "json", "redactions", "filters", "ron"] } serde_json = { workspace = true } diff --git a/crates/vite_task_plan/tests/plan_snapshots/main.rs b/crates/vite_task_plan/tests/plan_snapshots/main.rs index 2fafc67a..6def5251 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/main.rs +++ b/crates/vite_task_plan/tests/plan_snapshots/main.rs @@ -112,32 +112,15 @@ impl CompactPlan { } #[expect(clippy::disallowed_types, reason = "Path required by insta::glob! callback signature")] -fn run_case( - runtime: &Runtime, - tmpdir: &AbsolutePath, - fixture_path: &std::path::Path, - filter: Option<&str>, -) { +fn run_case(runtime: &Runtime, tmpdir: &AbsolutePath, fixture_path: &std::path::Path) { let fixture_name = fixture_path.file_name().unwrap().to_str().unwrap(); - if fixture_name.starts_with('.') { - return; // skip hidden files like .DS_Store - } - // Skip if filter doesn't match - if let Some(f) = filter - && !fixture_name.contains(f) - { - return; - } - #[expect(clippy::print_stdout, reason = "test progress output for plan snapshot test runner")] - { - println!("{fixture_name}"); - } // Configure insta to write snapshots to fixture directory let mut settings = insta::Settings::clone_current(); settings.set_snapshot_path(fixture_path.join("snapshots")); settings.set_prepend_module_to_snapshot(false); settings.remove_snapshot_suffix(); + settings.set_input_file(fixture_path); settings.bind(|| run_case_inner(runtime, tmpdir, fixture_path, fixture_name)); } @@ -301,29 +284,39 @@ fn run_case_inner( }); } -#[expect(clippy::disallowed_types, reason = "Path required by insta::glob! macro callback")] -#[expect( - clippy::disallowed_methods, - reason = "current_dir needed because insta::glob! requires std PathBuf" -)] +#[expect(clippy::disallowed_types, reason = "Path required for CARGO_MANIFEST_DIR path traversal")] fn main() { // SAFETY: Called before any threads are spawned; insta reads this lazily on first assertion. unsafe { std::env::set_var("INSTA_REQUIRE_FULL_MATCH", "1") }; - let filter = std::env::args().nth(1); - - let tokio_runtime = Runtime::new().unwrap(); + let tokio_runtime = Arc::new(Runtime::new().unwrap()); let tmp_dir = tempfile::tempdir().unwrap(); let tmp_dir_path = AbsolutePathBuf::new(tmp_dir.path().canonicalize().unwrap()).unwrap(); - let tests_dir = std::env::current_dir().unwrap().join("tests"); - - insta::glob!(tests_dir, "plan_snapshots/fixtures/*", |case_path| { - run_case(&tokio_runtime, &tmp_dir_path, case_path, filter.as_deref()); - }); - - #[expect(clippy::print_stdout, reason = "test summary")] - { - println!("All cases passed."); - } + let fixtures_dir = std::path::PathBuf::from(std::env::var_os("CARGO_MANIFEST_DIR").unwrap()) + .join("tests/plan_snapshots/fixtures"); + + let mut fixture_paths = std::fs::read_dir(fixtures_dir) + .unwrap() + .map(|entry| entry.unwrap().path()) + .filter(|p| p.file_name().and_then(|n| n.to_str()).is_some_and(|n| !n.starts_with('.'))) + .collect::>(); + fixture_paths.sort(); + + let args = libtest_mimic::Arguments::from_args(); + + let tests: Vec = fixture_paths + .into_iter() + .map(|fixture_path| { + let name = fixture_path.file_name().unwrap().to_str().unwrap().to_owned(); + let tmp_dir_path = tmp_dir_path.clone(); + let runtime = Arc::clone(&tokio_runtime); + libtest_mimic::Trial::test(name, move || { + run_case(&runtime, &tmp_dir_path, &fixture_path); + Ok(()) + }) + }) + .collect(); + + libtest_mimic::run(&args, tests).exit(); } From e9e313216c272135ce09ec26b8429018b9637e8a Mon Sep 17 00:00:00 2001 From: branchseer Date: Thu, 16 Apr 2026 22:53:23 +0800 Subject: [PATCH 2/7] refactor(tests): replace insta with custom snapshot_test crate - Create `crates/snapshot_test` with `check_snapshot` and `check_json_snapshot` that return `Result<(), String>` with unified diffs, integrating cleanly with libtest-mimic's `Failed` type. - Drop `insta` dependency and all its transitive deps. - Plan JSON snapshots use `.jsonc` extension with `// vp run ...` comment headers; e2e snapshots keep `.snap`. - Strip insta YAML headers from all existing snapshot files. - Exclude snapshot directories from oxfmt to prevent trailing comma insertion in `.jsonc` files. - Support `UPDATE_SNAPSHOTS=1` to accept new output in-place. Co-Authored-By: Claude Opus 4.6 (1M context) --- .oxfmtrc.json | 6 +- Cargo.lock | 167 ++---------------- Cargo.toml | 3 +- crates/snapshot_test/Cargo.toml | 20 +++ crates/snapshot_test/src/lib.rs | 103 +++++++++++ crates/vite_task_bin/Cargo.toml | 2 +- .../snapshots/associate existing cache.snap | 4 - .../snapshots/builtin different cwd.snap | 4 - .../snapshots/task with cache disabled.snap | 4 - .../snapshots/task with cache enabled.snap | 4 - .../snapshots/cache miss command change.snap | 4 - .../snapshots/cwd changed.snap | 4 - .../snapshots/env added.snap | 4 - .../snapshots/env removed.snap | 4 - .../snapshots/env value changed.snap | 4 - .../snapshots/glob input changes.snap | 4 - .../snapshots/inferred input changes.snap | 4 - .../snapshots/input config changed.snap | 4 - .../snapshots/untracked env added.snap | 4 - .../snapshots/untracked env removed.snap | 4 - .../snapshots/cache clean.snap | 4 - ...with interactive selector and --cache.snap | 5 - .../read file with colon in name.snap | 4 - ...failure kills concurrent cached tasks.snap | 4 - .../failure kills concurrent tasks.snap | 4 - ...ure kills daemonized concurrent tasks.snap | 4 - .../independent tasks run concurrently.snap | 4 - .../snapshots/ctrl-c prevents caching.snap | 4 - .../ctrl-c prevents future tasks.snap | 4 - ...l-c terminates running tasks (cached).snap | 4 - .../ctrl-c terminates running tasks.snap | 4 - .../snapshots/cycle dependency error.snap | 4 - ...ommand with && stops at first failure.snap | 4 - ...endency failure fast-fails dependents.snap | 6 - ...e task failure returns task exit code.snap | 4 - ...sk failure fast-fails remaining tasks.snap | 4 - ...e unmatched filters warn individually.snap | 4 - ...tial match warns for unmatched filter.snap | 4 - .../unmatched directory filter warns.snap | 4 - ...atched exclusion filter does not warn.snap | 4 - .../unmatched glob filter warns.snap | 4 - ...plit filter warns for unmatched token.snap | 4 - .../root glob - matches src files.snap | 4 - ...ckage path unmatched by relative glob.snap | 4 - .../root glob - unmatched directory.snap | 4 - ...wd - glob relative to package not cwd.snap | 4 - ...bpackage glob - matches own src files.snap | 4 - ... root path unmatched by relative glob.snap | 4 - ...b - unmatched directory in subpackage.snap | 4 - ...wd - glob relative to package not cwd.snap | 4 - .../multiple tasks, cache hit, replayed.snap | 4 - ...ple tasks, cache miss, grouped output.snap | 4 - ...iple tasks, cache off, grouped output.snap | 4 - .../single task, cache hit, replayed.snap | 4 - ...ngle task, cache miss, grouped output.snap | 4 - ...ingle task, cache off, grouped output.snap | 4 - .../snapshots/stdin is always null.snap | 4 - .../individual cache for extra args.snap | 4 - .../snapshots/individual cache for env.snap | 4 - ...nly - hit on non-inferred file change.snap | 4 - ...o only - miss on inferred file change.snap | 4 - ...ative - hit on excluded inferred file.snap | 4 - ... - miss on non-excluded inferred file.snap | 4 - ...mpty input - hit despite file changes.snap | 4 - .../empty input - miss on command change.snap | 4 - ...pite file changes and folder deletion.snap | 4 - ...input - hit on file outside directory.snap | 4 - ...iss on direct and nested file changes.snap | 4 - ... not set when auto inference disabled.snap | 4 - ...env - set when auto inference enabled.snap | 4 - ... auto negative - hit on excluded file.snap | 4 - ...negative - miss on explicit glob file.snap | 4 - ...auto negative - miss on inferred file.snap | 4 - ...lobs - hit on read but unmatched file.snap | 4 - ... globs only - cache hit on second run.snap | 4 - ...s only - hit on unmatched file change.snap | 4 - ...bs only - miss on matched file change.snap | 4 - ...negative globs - hit on excluded file.snap | 4 - ...ive globs - miss on non-excluded file.snap | 4 - .../cache hit then miss on file change.snap | 4 - ...hit on excluded sibling inferred file.snap | 4 - ...on non-excluded sibling inferred file.snap | 4 - ...e glob - hit on unmatched file change.snap | 4 - ...ve glob - miss on sibling file change.snap | 4 - ...gative - hit on excluded sibling file.snap | 4 - ...e - miss on non-excluded sibling file.snap | 4 - ...ative - hit on excluded inferred file.snap | 4 - ... - miss on non-excluded inferred file.snap | 4 - ...ead-write shows not cached in summary.snap | 4 - .../single O_RDWR open is not cached.snap | 6 - ...d-write task shows not cached message.snap | 6 - ...write task shows path in full summary.snap | 6 - .../snapshots/cache off inherits stdin.snap | 4 - .../snapshots/cache on gets null stdin.snap | 4 - .../multiple tasks, cache hit, replayed.snap | 4 - ...ltiple tasks, cache miss, piped stdio.snap | 4 - ...tiple tasks, cache off, inherit stdio.snap | 4 - .../single task, cache hit, replayed.snap | 4 - .../single task, cache miss, piped stdio.snap | 4 - ...ingle task, cache off, inherits stdio.snap | 4 - .../multiple tasks, cache hit, replayed.snap | 4 - ...ltiple tasks, cache miss, piped stdio.snap | 4 - ...ultiple tasks, cache off, piped stdio.snap | 4 - .../single task, cache hit, replayed.snap | 4 - .../single task, cache miss, piped stdio.snap | 4 - .../single task, cache off, piped stdio.snap | 4 - .../snapshots/stdin is always null.snap | 4 - ...alformed observed path does not panic.snap | 4 - ...lag runs dependent tasks concurrently.snap | 4 - .../snapshots/pass args to task.snap | 4 - .../snapshots/shared caching input.snap | 4 - ...nated task returns non-zero exit code.snap | 4 - ...er multi task run shows saved summary.snap | 4 - ...details after run shows saved summary.snap | 6 - ...ails with no previous run shows error.snap | 4 - ... all cache miss shows compact summary.snap | 4 - ...multi task verbose shows full summary.snap | 4 - ...se with cache hits shows full summary.snap | 4 - ...with cache hits shows compact summary.snap | 4 - ... task cache hit shows compact summary.snap | 6 - ...ngle task cache miss shows no summary.snap | 6 - ...ingle task verbose shows full summary.snap | 6 - .../list tasks from package dir.snap | 6 - .../list tasks from workspace root.snap | 4 - .../task-list/snapshots/vt run in script.snap | 4 - .../snapshots/no trailing newline.snap | 4 - .../interactive long command truncated.snap | 6 - .../snapshots/interactive ctrl-c cancels.snap | 7 +- ...ve enter with no results does nothing.snap | 6 - .../interactive escape clears query.snap | 6 - .../interactive scroll long list.snap | 6 - ...interactive search other package task.snap | 6 - ...earch preserves rating within package.snap | 6 - .../interactive search then select.snap | 6 - ...active search with hash skips reorder.snap | 6 - ...interactive select from other package.snap | 6 - .../interactive select task from lib.snap | 6 - .../snapshots/interactive select task.snap | 6 - .../interactive select with typo.snap | 6 - .../non-interactive did you mean.snap | 4 - .../non-interactive list tasks from lib.snap | 6 - .../snapshots/non-interactive list tasks.snap | 4 - .../non-interactive no suggestions.snap | 4 - ...non-interactive recursive typo errors.snap | 4 - .../recursive without task errors.snap | 6 - .../snapshots/transitive typo errors.snap | 6 - ...ypo in task script fails without list.snap | 4 - .../verbose with typo enters selector.snap | 6 - .../verbose without task errors.snap | 6 - ...d runs dependencies before dependents.snap | 4 - ... build from app runs all dependencies.snap | 6 - ...d from lib runs only its dependencies.snap | 6 - .../cache hit after file modification.snap | 4 - ...oot prunes root from nested expansion.snap | 4 - ...rsive build skips root self-reference.snap | 4 - .../vite_task_bin/tests/e2e_snapshots/main.rs | 43 ++--- crates/vite_task_plan/Cargo.toml | 2 +- ... - tool synthetic task in user task.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...ery - --cache and --no-cache conflict.snap | 11 -- ...s not override per-task cache false.jsonc} | 11 +- ...ry - --cache enables script caching.jsonc} | 11 +- ...hing even when cache.tasks is false.jsonc} | 11 +- ...per-task cache true enables caching.jsonc} | 11 +- ... - --no-cache disables task caching.jsonc} | 10 +- ...cache overrides per-task cache true.jsonc} | 11 +- ...ot cached when cache.tasks is false.jsonc} | 11 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...ery - echo and lint with extra args.jsonc} | 11 +- ...ery - lint and echo with extra args.jsonc} | 11 +- ...query - normal task with extra args.jsonc} | 11 +- ...ynthetic task in user task with cwd.jsonc} | 10 +- ...query - synthetic task in user task.jsonc} | 11 +- ...c task with extra args in user task.jsonc} | 11 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...uery - script not cached by default.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../snapshots/task graph load error.snap | 7 +- ...ry - another task cached by default.jsonc} | 10 +- ...uery - script not cached by default.jsonc} | 10 +- ...p => query - task cached by default.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...ap => query - cache clean in script.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...still disabled by cache.tasks false.jsonc} | 10 +- ...d.snap => query - script not cached.jsonc} | 10 +- ...ot cached when cache.tasks is false.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...cript cached when global cache true.jsonc} | 10 +- ... task cached when global cache true.jsonc} | 10 +- ...ot cached despite global cache true.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...should put synthetic task under cwd.jsonc} | 10 +- ...should not affect expanded task cwd.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../query - cycle dependency error.snap | 11 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...mbiguous package name with transitive.snap | 12 +- .../query - ambiguous package name.snap | 11 +- ...ery - filter matches both duplicates.jsonc | 5 + ...uery - filter matches both duplicates.snap | 15 -- .../{task graph.snap => task graph.jsonc} | 6 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...xtra args only reach requested task.jsonc} | 11 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...ked filters respect dependency order.jsonc | 7 + ...cked filters respect dependency order.snap | 19 -- ...query - exclude nonexistent package.jsonc} | 11 +- .../query - exclude only filter.jsonc | 10 ++ .../query - exclude only filter.snap | 20 --- ...ry - filter both deps and dependents.jsonc | 12 ++ ...ery - filter both deps and dependents.snap | 22 --- ...ter by braced path with dependencies.jsonc | 12 ++ ...lter by braced path with dependencies.snap | 22 --- ...ilter by braced path with dependents.jsonc | 13 ++ ...filter by braced path with dependents.snap | 23 --- .../query - filter by braced path.jsonc | 4 + .../query - filter by braced path.snap | 14 -- ...ilter by directory glob double star.jsonc} | 12 +- ... filter by directory glob double star.snap | 25 --- ...ery - filter by directory glob star.jsonc} | 12 +- ...r by directory ignores trailing dots.jsonc | 4 + ...er by directory ignores trailing dots.snap | 14 -- .../query - filter by directory.jsonc | 4 + .../query - filter by directory.snap | 14 -- .../query - filter by exact name.jsonc | 4 + .../query - filter by exact name.snap | 14 -- ...kage.snap => query - filter by glob.jsonc} | 12 +- ...r by name and directory intersection.jsonc | 4 + ...er by name and directory intersection.snap | 14 -- ...ilter dependencies only exclude self.jsonc | 8 + ...filter dependencies only exclude self.snap | 18 -- ... filter dependents only exclude self.jsonc | 8 + ...- filter dependents only exclude self.snap | 18 -- ...ter deps skips packages without task.jsonc | 10 ++ ...lter deps skips packages without task.snap | 20 --- ...t ignores trailing dots from package.jsonc | 4 + ...ot ignores trailing dots from package.snap | 15 -- ... filter dotdot ignores trailing dots.jsonc | 4 + ...- filter dotdot ignores trailing dots.snap | 15 -- .../query - filter include and exclude.jsonc | 10 ++ .../query - filter include and exclude.snap | 22 --- ...lter space-separated in single value.jsonc | 5 + ...ilter space-separated in single value.snap | 15 -- .../query - filter with dependencies.jsonc | 12 ++ .../query - filter with dependencies.snap | 22 --- .../query - filter with dependents.jsonc | 13 ++ .../query - filter with dependents.snap | 23 --- .../query - mixed traversal filters.jsonc | 10 ++ .../query - mixed traversal filters.snap | 22 --- ...ry - multiple exclusion-only filters.jsonc | 6 + ...ery - multiple exclusion-only filters.snap | 18 -- .../query - multiple filters union.jsonc | 5 + .../query - multiple filters union.snap | 17 -- ... nested vt run with filter in script.jsonc | 11 ++ ...- nested vt run with filter in script.snap | 21 --- .../snapshots/query - recursive flag.jsonc | 15 ++ ...ansitive flag from package subfolder.jsonc | 12 ++ ...ransitive flag from package subfolder.snap | 22 --- .../snapshots/query - transitive flag.jsonc | 12 ++ .../snapshots/query - transitive flag.snap | 22 --- ... - transitive with package specifier.jsonc | 12 ++ ...y - transitive with package specifier.snap | 21 --- .../query - workspace root flag.jsonc | 4 + .../query - workspace root flag.snap | 13 -- .../query - workspace root with filter.jsonc | 5 + .../query - workspace root with filter.snap | 16 -- ...uery - workspace root with recursive.jsonc | 10 ++ ...query - workspace root with recursive.snap | 20 --- ...ery - workspace root with transitive.jsonc | 7 + ...uery - workspace root with transitive.snap | 17 -- .../{task graph.snap => task graph.jsonc} | 6 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../{task graph.snap => task graph.jsonc} | 6 +- ... --cache enables inner task caching.jsonc} | 10 +- ...o-cache disables inner task caching.jsonc} | 10 +- ...without flags inherits parent cache.jsonc} | 10 +- ...pagates to nested run without flags.jsonc} | 11 +- ...s not propagate into nested --cache.jsonc} | 11 +- ...pagates to nested run without flags.jsonc} | 11 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../snapshots/query - nested vt run.jsonc | 11 ++ .../snapshots/query - nested vt run.snap | 19 -- .../{task graph.snap => task graph.jsonc} | 6 +- ... - build in self-referential package.jsonc | 4 + ...y - build in self-referential package.snap | 13 -- ...y - recursive build across workspace.jsonc | 4 + ...ry - recursive build across workspace.snap | 13 -- .../{task graph.snap => task graph.jsonc} | 6 +- .../query - baseline recursive build.jsonc | 11 ++ .../query - baseline recursive build.snap | 20 --- ... query - cli flag overrides env var.jsonc} | 13 +- ...ncurrency-limit with explicit value.jsonc} | 13 +- ...=> query - env var sets concurrency.jsonc} | 11 +- ...ted with explicit concurrency-limit.jsonc} | 10 +- .../query - parallel discards edges.jsonc | 7 + .../query - parallel discards edges.snap | 17 -- ...parallel only affects current level.jsonc} | 11 +- ...y - parallel with concurrency-limit.jsonc} | 14 +- ... parallel without concurrency-limit.jsonc} | 12 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...n pnpm-workspace.yaml to be optional.jsonc | 4 + ...in pnpm-workspace.yaml to be optional.snap | 12 -- .../{task graph.snap => task graph.jsonc} | 6 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../snapshots/task graph load error.snap | 7 +- ...st runs without hooks when disabled.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- ... scriptInHook is called from a hook.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...g test does not expand pretest hook.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...ery - build runs with pre hook only.jsonc} | 10 +- ...ry - extra args not passed to hooks.jsonc} | 11 +- ...pretest but not when called as hook.jsonc} | 10 +- ...- test runs with pre and post hooks.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...y - shell fallback for pipe command.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...oes not affect expanded query tasks.jsonc} | 10 +- ...not affect expanded synthetic cache.jsonc} | 10 +- ... cache.scripts defaults to no cache.jsonc} | 10 +- ...untrackedEnv inherited by synthetic.jsonc} | 10 +- ...ache false disables synthetic cache.jsonc} | 10 +- ... cache true enables synthetic cache.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- ... => query - synthetic-in-subpackage.jsonc} | 10 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...r entry lacks task dependency has it.jsonc | 4 + ...er entry lacks task dependency has it.snap | 14 -- ...r intermediate lacks task is skipped.jsonc | 7 + ...er intermediate lacks task is skipped.snap | 17 -- ...uild skips intermediate without task.jsonc | 7 + ...build skips intermediate without task.snap | 17 -- ...transitive from package without task.jsonc | 4 + ... transitive from package without task.snap | 14 -- ... with package specifier lacking task.jsonc | 4 + ...e with package specifier lacking task.snap | 13 -- .../{task graph.snap => task graph.jsonc} | 6 +- .../query - vpr expands to vt run.jsonc | 11 ++ .../query - vpr expands to vt run.snap | 19 -- .../{task graph.snap => task graph.jsonc} | 6 +- ...anges cwd so skip rule does not fire.jsonc | 11 ++ ...hanges cwd so skip rule does not fire.snap | 19 -- .../{task graph.snap => task graph.jsonc} | 6 +- ...ery - depends on through passthrough.jsonc | 8 + ...uery - depends on through passthrough.snap | 17 -- .../{task graph.snap => task graph.jsonc} | 6 +- ...- multi command skips recursive part.jsonc | 5 + ... - multi command skips recursive part.snap | 14 -- .../{task graph.snap => task graph.jsonc} | 6 +- .../query - mutual recursion error.snap | 12 +- .../{task graph.snap => task graph.jsonc} | 6 +- .../{task graph.snap => task graph.jsonc} | 6 +- ...build from root expands without self.jsonc | 14 ++ ... build from root expands without self.snap | 22 --- ... with extra arg expands without self.jsonc | 14 ++ ...t with extra arg expands without self.snap | 23 --- .../query - recursive build skips self.jsonc | 8 + .../query - recursive build skips self.snap | 17 -- ...sive build with extra arg skips self.jsonc | 8 + ...rsive build with extra arg skips self.snap | 18 -- .../{task graph.snap => task graph.jsonc} | 6 +- .../tests/plan_snapshots/main.rs | 92 +++++----- 370 files changed, 723 insertions(+), 2656 deletions(-) create mode 100644 crates/snapshot_test/Cargo.toml create mode 100644 crates/snapshot_test/src/lib.rs rename crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/{query - tool synthetic task in user task.snap => query - tool synthetic task in user task.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/{task graph.snap => task graph.jsonc} (90%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/{query - --cache does not override per-task cache false.snap => query - --cache does not override per-task cache false.jsonc} (85%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/{query - --cache enables script caching.snap => query - --cache enables script caching.jsonc} (91%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/{query - --cache enables task caching even when cache.tasks is false.snap => query - --cache enables task caching even when cache.tasks is false.jsonc} (91%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/{query - --cache on task with per-task cache true enables caching.snap => query - --cache on task with per-task cache true enables caching.jsonc} (91%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/{query - baseline - tasks not cached when cache.tasks is false.snap => query - --no-cache disables task caching.jsonc} (86%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/{query - --no-cache overrides per-task cache true.snap => query - --no-cache overrides per-task cache true.jsonc} (85%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/{query - --no-cache disables task caching.snap => query - baseline - tasks not cached when cache.tasks is false.jsonc} (85%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/{task graph.snap => task graph.jsonc} (95%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/{query - echo and lint with extra args.snap => query - echo and lint with extra args.jsonc} (93%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/{query - lint and echo with extra args.snap => query - lint and echo with extra args.jsonc} (93%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/{query - normal task with extra args.snap => query - normal task with extra args.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/{query - synthetic task in user task.snap => query - synthetic task in user task with cwd.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/{query - synthetic task in user task with cwd.snap => query - synthetic task in user task.jsonc} (91%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/{query - synthetic task with extra args in user task.snap => query - synthetic task with extra args in user task.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/{task graph.snap => task graph.jsonc} (94%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/{query - script not cached by default.snap => query - script not cached by default.jsonc} (86%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/{task graph.snap => task graph.jsonc} (90%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-enabled/snapshots/{task graph.snap => task graph.jsonc} (89%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/{query - another task cached by default.snap => query - another task cached by default.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/{query - script not cached by default.snap => query - script not cached by default.jsonc} (86%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/{query - task cached by default.snap => query - task cached by default.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/{task graph.snap => task graph.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-sharing/snapshots/{task graph.snap => task graph.jsonc} (93%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/{query - cache clean in script.snap => query - cache clean in script.jsonc} (86%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/{task graph.snap => task graph.jsonc} (82%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/{query - per-task cache true still disabled by cache.tasks false.snap => query - per-task cache true still disabled by cache.tasks false.jsonc} (86%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/{query - script not cached.snap => query - script not cached.jsonc} (86%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/{query - task not cached when cache.tasks is false.snap => query - task not cached when cache.tasks is false.jsonc} (86%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/{task graph.snap => task graph.jsonc} (93%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/{query - script cached when global cache true.snap => query - script cached when global cache true.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/{query - task cached when global cache true.snap => query - task cached when global cache true.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/{query - task with cache false not cached despite global cache true.snap => query - task with cache false not cached despite global cache true.jsonc} (86%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/{task graph.snap => task graph.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/{query - cd before vt lint should put synthetic task under cwd.snap => query - cd before vt lint should put synthetic task under cwd.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/{query - cd before vt run should not affect expanded task cwd.snap => query - cd before vt run should not affect expanded task cwd.jsonc} (95%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/{task graph.snap => task graph.jsonc} (93%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/comprehensive-task-graph/snapshots/{task graph.snap => task graph.jsonc} (99%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/conflict-test/snapshots/{task graph.snap => task graph.jsonc} (93%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency/snapshots/{task graph.snap => task graph.jsonc} (90%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/dependency-both-topo-and-explicit/snapshots/{task graph.snap => task graph.jsonc} (89%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - filter matches both duplicates.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - filter matches both duplicates.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/{task graph.snap => task graph.jsonc} (90%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/empty-package-test/snapshots/{task graph.snap => task graph.jsonc} (97%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/explicit-deps-workspace/snapshots/{task graph.snap => task graph.jsonc} (98%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/{query - extra args only reach requested task.snap => query - extra args only reach requested task.jsonc} (95%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/{task graph.snap => task graph.jsonc} (89%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - cherry picked filters respect dependency order.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - cherry picked filters respect dependency order.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/{query - recursive flag.snap => query - exclude nonexistent package.jsonc} (53%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude only filter.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude only filter.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter both deps and dependents.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter both deps and dependents.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependencies.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependencies.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependents.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependents.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/{query - filter by glob.snap => query - filter by directory glob double star.jsonc} (51%) delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob double star.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/{query - filter by directory glob star.snap => query - filter by directory glob star.jsonc} (50%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory ignores trailing dots.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory ignores trailing dots.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by exact name.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by exact name.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/{query - exclude nonexistent package.snap => query - filter by glob.jsonc} (50%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by name and directory intersection.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by name and directory intersection.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependencies only exclude self.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependencies only exclude self.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependents only exclude self.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependents only exclude self.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter deps skips packages without task.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter deps skips packages without task.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dot ignores trailing dots from package.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dot ignores trailing dots from package.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dotdot ignores trailing dots.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dotdot ignores trailing dots.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter include and exclude.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter include and exclude.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter space-separated in single value.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter space-separated in single value.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependencies.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependencies.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependents.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependents.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - mixed traversal filters.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - mixed traversal filters.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple exclusion-only filters.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple exclusion-only filters.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple filters union.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple filters union.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - nested vt run with filter in script.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - nested vt run with filter in script.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - recursive flag.jsonc create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag from package subfolder.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag from package subfolder.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive with package specifier.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive with package specifier.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root flag.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root flag.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with filter.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with filter.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with recursive.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with recursive.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with transitive.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with transitive.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/{task graph.snap => task graph.jsonc} (98%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/input-trailing-slash/snapshots/{task graph.snap => task graph.jsonc} (82%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/input-workspace-base/snapshots/{task graph.snap => task graph.jsonc} (84%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/{query - nested --cache enables inner task caching.snap => query - nested --cache enables inner task caching.jsonc} (95%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/{query - nested --no-cache disables inner task caching.snap => query - nested --no-cache disables inner task caching.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/{query - nested run without flags inherits parent cache.snap => query - nested run without flags inherits parent cache.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/{query - outer --cache propagates to nested run without flags.snap => query - outer --cache propagates to nested run without flags.jsonc} (95%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/{query - outer --no-cache does not propagate into nested --cache.snap => query - outer --no-cache does not propagate into nested --cache.jsonc} (95%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/{query - outer --no-cache propagates to nested run without flags.snap => query - outer --no-cache propagates to nested run without flags.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/{task graph.snap => task graph.jsonc} (94%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/query - nested vt run.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/query - nested vt run.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/{task graph.snap => task graph.jsonc} (90%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - build in self-referential package.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - build in self-referential package.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - recursive build across workspace.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - recursive build across workspace.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/{task graph.snap => task graph.jsonc} (82%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - baseline recursive build.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - baseline recursive build.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/{query - cli flag overrides env var.snap => query - cli flag overrides env var.jsonc} (93%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/{query - concurrency-limit with explicit value.snap => query - concurrency-limit with explicit value.jsonc} (93%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/{query - env var sets concurrency.snap => query - env var sets concurrency.jsonc} (94%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/{query - nested with explicit concurrency-limit.snap => query - nested with explicit concurrency-limit.jsonc} (96%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel discards edges.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel discards edges.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/{query - parallel only affects current level.snap => query - parallel only affects current level.jsonc} (51%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/{query - parallel with concurrency-limit.snap => query - parallel with concurrency-limit.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/{query - parallel without concurrency-limit.snap => query - parallel without concurrency-limit.jsonc} (93%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/{task graph.snap => task graph.jsonc} (95%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/query - allow `packages` in pnpm-workspace.yaml to be optional.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/query - allow `packages` in pnpm-workspace.yaml to be optional.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/{task graph.snap => task graph.jsonc} (80%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/recursive-topological-workspace/snapshots/{task graph.snap => task graph.jsonc} (97%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/{query - test runs without hooks when disabled.snap => query - test runs without hooks when disabled.jsonc} (83%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/{task graph.snap => task graph.jsonc} (93%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/{query - prescriptInHook runs when scriptInHook is called from a hook.snap => query - prescriptInHook runs when scriptInHook is called from a hook.jsonc} (95%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/{task graph.snap => task graph.jsonc} (94%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/{query - task config test does not expand pretest hook.snap => query - task config test does not expand pretest hook.jsonc} (83%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/{task graph.snap => task graph.jsonc} (89%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/{query - build runs with pre hook only.snap => query - build runs with pre hook only.jsonc} (90%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/{query - extra args not passed to hooks.snap => query - extra args not passed to hooks.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/{query - pretest directly expands prepretest but not when called as hook.snap => query - pretest directly expands prepretest but not when called as hook.jsonc} (90%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/{query - test runs with pre and post hooks.snap => query - test runs with pre and post hooks.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/{task graph.snap => task graph.jsonc} (96%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/{query - shell fallback for pipe command.snap => query - shell fallback for pipe command.jsonc} (92%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/{task graph.snap => task graph.jsonc} (82%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/{query - parent cache false does not affect expanded query tasks.snap => query - parent cache false does not affect expanded query tasks.jsonc} (95%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/{query - script cache false does not affect expanded synthetic cache.snap => query - script cache false does not affect expanded synthetic cache.jsonc} (95%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/{query - script without cache.scripts defaults to no cache.snap => query - script without cache.scripts defaults to no cache.jsonc} (86%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/{query - task untrackedEnv inherited by synthetic.snap => query - task untrackedEnv inherited by synthetic.jsonc} (91%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/{query - task with cache false disables synthetic cache.snap => query - task with cache false disables synthetic cache.jsonc} (86%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/{query - task with cache true enables synthetic cache.snap => query - task with cache true enables synthetic cache.jsonc} (91%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/{task graph.snap => task graph.jsonc} (96%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/{query - synthetic-in-subpackage.snap => query - synthetic-in-subpackage.jsonc} (95%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/{task graph.snap => task graph.jsonc} (89%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter entry lacks task dependency has it.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter entry lacks task dependency has it.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter intermediate lacks task is skipped.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter intermediate lacks task is skipped.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive build skips intermediate without task.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive build skips intermediate without task.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive from package without task.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive from package without task.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive with package specifier lacking task.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive with package specifier lacking task.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/{task graph.snap => task graph.jsonc} (93%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/query - vpr expands to vt run.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/query - vpr expands to vt run.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/{task graph.snap => task graph.jsonc} (90%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/query - cd changes cwd so skip rule does not fire.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/query - cd changes cwd so skip rule does not fire.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/{task graph.snap => task graph.jsonc} (89%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/query - depends on through passthrough.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/query - depends on through passthrough.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/{task graph.snap => task graph.jsonc} (94%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/query - multi command skips recursive part.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/query - multi command skips recursive part.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/{task graph.snap => task graph.jsonc} (89%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion/snapshots/{task graph.snap => task graph.jsonc} (94%) rename crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-no-package-json/snapshots/{task graph.snap => task graph.jsonc} (89%) create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root expands without self.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root expands without self.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root with extra arg expands without self.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root with extra arg expands without self.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build skips self.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build skips self.snap create mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build with extra arg skips self.jsonc delete mode 100644 crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build with extra arg skips self.snap rename crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/{task graph.snap => task graph.jsonc} (92%) diff --git a/.oxfmtrc.json b/.oxfmtrc.json index d26a6a74..38913e27 100644 --- a/.oxfmtrc.json +++ b/.oxfmtrc.json @@ -1,4 +1,8 @@ { "singleQuote": true, - "ignorePatterns": ["crates/fspy_detours_sys/detours", "crates/vite_task_graph/run-config.ts"] + "ignorePatterns": [ + "crates/fspy_detours_sys/detours", + "crates/vite_task_graph/run-config.ts", + "**/fixtures/*/snapshots" + ] } diff --git a/Cargo.lock b/Cargo.lock index 311e3639..9609dcde 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -258,9 +258,6 @@ name = "bitflags" version = "2.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3" -dependencies = [ - "serde_core", -] [[package]] name = "block-buffer" @@ -542,18 +539,6 @@ dependencies = [ "static_assertions", ] -[[package]] -name = "console" -version = "0.15.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8" -dependencies = [ - "encode_unicode", - "libc", - "once_cell", - "windows-sys 0.59.0", -] - [[package]] name = "const_format" version = "0.2.35" @@ -1012,12 +997,6 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "55dd888a213fc57e957abf2aa305ee3e8a28dbe05687a251f33b637cd46b0070" -[[package]] -name = "encode_unicode" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34aa73646ffb006b8f5147f3dc182bd4bcb190227ce861fc4a4844bf8e3cb2c0" - [[package]] name = "env_filter" version = "0.1.4" @@ -1500,19 +1479,6 @@ version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0cc23270f6e1808e30a928bdc84dea0b9b4136a8bc82338574f23baf47bbd280" -[[package]] -name = "globset" -version = "0.4.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52dfc19153a48bde0cbd630453615c8151bce3a5adfac7a0aebfbf0a1e1f57e3" -dependencies = [ - "aho-corasick", - "bstr", - "log", - "regex-automata", - "regex-syntax", -] - [[package]] name = "hashbrown" version = "0.15.5" @@ -1627,25 +1593,6 @@ dependencies = [ "libc", ] -[[package]] -name = "insta" -version = "1.46.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e82db8c87c7f1ccecb34ce0c24399b8a73081427f3c7c50a5d597925356115e4" -dependencies = [ - "console", - "globset", - "once_cell", - "pest", - "pest_derive", - "regex", - "ron", - "serde", - "similar", - "tempfile", - "walkdir", -] - [[package]] name = "instability" version = "0.3.11" @@ -2956,20 +2903,6 @@ version = "0.8.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c" -[[package]] -name = "ron" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd490c5b18261893f14449cbd28cb9c0b637aebf161cd77900bfdedaff21ec32" -dependencies = [ - "bitflags 2.10.0", - "once_cell", - "serde", - "serde_derive", - "typeid", - "unicode-ident", -] - [[package]] name = "rusqlite" version = "0.37.0" @@ -3291,6 +3224,15 @@ version = "2.0.0-alpha.12" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef784004ca8777809dcdad6ac37629f0a97caee4c685fcea805278d81dd8b857" +[[package]] +name = "snapshot_test" +version = "0.1.0" +dependencies = [ + "serde", + "serde_json", + "similar", +] + [[package]] name = "socket2" version = "0.6.2" @@ -3818,12 +3760,6 @@ dependencies = [ "rand 0.9.2", ] -[[package]] -name = "typeid" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc7d623258602320d5c55d1bc22793b57daff0ec7efc270ea7d55ce1d5f5471c" - [[package]] name = "typenum" version = "1.19.0" @@ -4042,7 +3978,6 @@ dependencies = [ "cow-utils", "cp_r", "ctrlc", - "insta", "jsonc-parser", "libc", "libtest-mimic", @@ -4054,6 +3989,7 @@ dependencies = [ "serde", "serde_json", "shell-escape", + "snapshot_test", "tempfile", "tokio", "toml", @@ -4098,7 +4034,6 @@ dependencies = [ "copy_dir", "cow-utils", "futures-util", - "insta", "libtest-mimic", "petgraph", "rustc-hash", @@ -4106,6 +4041,7 @@ dependencies = [ "serde_json", "sha2", "shell-escape", + "snapshot_test", "supports-color 3.0.2", "tempfile", "thiserror 2.0.18", @@ -4506,22 +4442,13 @@ version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5" -[[package]] -name = "windows-sys" -version = "0.59.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" -dependencies = [ - "windows-targets 0.52.6", -] - [[package]] name = "windows-sys" version = "0.60.2" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb" dependencies = [ - "windows-targets 0.53.5", + "windows-targets", ] [[package]] @@ -4533,22 +4460,6 @@ dependencies = [ "windows-link", ] -[[package]] -name = "windows-targets" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" -dependencies = [ - "windows_aarch64_gnullvm 0.52.6", - "windows_aarch64_msvc 0.52.6", - "windows_i686_gnu 0.52.6", - "windows_i686_gnullvm 0.52.6", - "windows_i686_msvc 0.52.6", - "windows_x86_64_gnu 0.52.6", - "windows_x86_64_gnullvm 0.52.6", - "windows_x86_64_msvc 0.52.6", -] - [[package]] name = "windows-targets" version = "0.53.5" @@ -4556,22 +4467,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3" dependencies = [ "windows-link", - "windows_aarch64_gnullvm 0.53.1", + "windows_aarch64_gnullvm", "windows_aarch64_msvc 0.53.1", "windows_i686_gnu 0.53.1", - "windows_i686_gnullvm 0.53.1", + "windows_i686_gnullvm", "windows_i686_msvc 0.53.1", "windows_x86_64_gnu 0.53.1", - "windows_x86_64_gnullvm 0.53.1", + "windows_x86_64_gnullvm", "windows_x86_64_msvc 0.53.1", ] -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" - [[package]] name = "windows_aarch64_gnullvm" version = "0.53.1" @@ -4584,12 +4489,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17cffbe740121affb56fad0fc0e421804adf0ae00891205213b5cecd30db881d" -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" - [[package]] name = "windows_aarch64_msvc" version = "0.53.1" @@ -4602,24 +4501,12 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2564fde759adb79129d9b4f54be42b32c89970c18ebf93124ca8870a498688ed" -[[package]] -name = "windows_i686_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" - [[package]] name = "windows_i686_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3" -[[package]] -name = "windows_i686_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" - [[package]] name = "windows_i686_gnullvm" version = "0.53.1" @@ -4632,12 +4519,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9cd9d32ba70453522332c14d38814bceeb747d80b3958676007acadd7e166956" -[[package]] -name = "windows_i686_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" - [[package]] name = "windows_i686_msvc" version = "0.53.1" @@ -4650,24 +4531,12 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cfce6deae227ee8d356d19effc141a509cc503dfd1f850622ec4b0f84428e1f4" -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" - [[package]] name = "windows_x86_64_gnu" version = "0.53.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499" -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" - [[package]] name = "windows_x86_64_gnullvm" version = "0.53.1" @@ -4680,12 +4549,6 @@ version = "0.34.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d19538ccc21819d01deaf88d6a17eae6596a12e9aafdbb97916fb49896d89de9" -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" - [[package]] name = "windows_x86_64_msvc" version = "0.53.1" diff --git a/Cargo.toml b/Cargo.toml index 8b23875b..efeba969 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -80,7 +80,6 @@ fspy_shared = { path = "crates/fspy_shared" } fspy_shared_unix = { path = "crates/fspy_shared_unix" } futures = "0.3.31" futures-util = "0.3.31" -insta = "1.44.3" jsonc-parser = { version = "0.29.0", features = ["serde"] } libc = "0.2.172" libtest-mimic = "0.8.2" @@ -119,7 +118,9 @@ serde_yml = "0.0.12" sha2 = "0.10.9" shared_memory = "0.12.4" shell-escape = "0.1.5" +similar = "2.7.0" smallvec = { version = "2.0.0-alpha.12", features = ["std"] } +snapshot_test = { path = "crates/snapshot_test" } stackalloc = "1.2.1" subprocess_test = { path = "crates/subprocess_test" } supports-color = "3.0.1" diff --git a/crates/snapshot_test/Cargo.toml b/crates/snapshot_test/Cargo.toml new file mode 100644 index 00000000..329f9de4 --- /dev/null +++ b/crates/snapshot_test/Cargo.toml @@ -0,0 +1,20 @@ +[package] +name = "snapshot_test" +version = "0.1.0" +authors.workspace = true +edition.workspace = true +license.workspace = true +publish = false +rust-version.workspace = true + +[lints] +workspace = true + +[lib] +test = false +doctest = false + +[dependencies] +serde = { workspace = true } +serde_json = { workspace = true } +similar = { workspace = true } diff --git a/crates/snapshot_test/src/lib.rs b/crates/snapshot_test/src/lib.rs new file mode 100644 index 00000000..11e7eb42 --- /dev/null +++ b/crates/snapshot_test/src/lib.rs @@ -0,0 +1,103 @@ +#![expect( + clippy::disallowed_types, + clippy::disallowed_macros, + clippy::missing_panics_doc, + clippy::missing_errors_doc, + reason = "standalone test utility crate; std types and format! are appropriate" +)] + +use std::{ + fmt::Write as _, + fs, + path::{Path, PathBuf}, +}; + +use serde::Serialize; + +/// Scoped snapshot configuration. Created per-fixture, drives all assertions within. +pub struct Snapshots { + snapshot_dir: PathBuf, + update: bool, +} + +impl Snapshots { + pub fn new(snapshot_dir: impl Into) -> Self { + let update = std::env::var("UPDATE_SNAPSHOTS").is_ok_and(|v| v == "1"); + Self { snapshot_dir: snapshot_dir.into(), update } + } + + /// Serialize `value` as pretty JSON, prepend `// {comment}`, and compare + /// against `{snapshot_dir}/{name}.jsonc`. + pub fn check_json_snapshot( + &self, + name: &str, + comment: &str, + value: &impl Serialize, + ) -> Result<(), String> { + let json = serde_json::to_string_pretty(value).expect("failed to serialize snapshot value"); + self.check_snapshot(&format!("{name}.jsonc"), &format!("// {comment}\n{json}\n")) + } + + /// Compare `actual` text against `{snapshot_dir}/{name}`. + /// `name` is used as the filename directly (caller includes any extension). + pub fn check_snapshot(&self, name: &str, actual: &str) -> Result<(), String> { + let snap_path = self.snapshot_dir.join(name); + + if self.update { + fs::create_dir_all(&self.snapshot_dir).expect("failed to create snapshot directory"); + fs::write(&snap_path, actual).expect("failed to write snapshot"); + let _ = fs::remove_file(new_path(&snap_path)); + return Ok(()); + } + + let expected = match fs::read_to_string(&snap_path) { + Ok(content) => content, + Err(e) if e.kind() == std::io::ErrorKind::NotFound => { + fs::create_dir_all(&self.snapshot_dir) + .expect("failed to create snapshot directory"); + fs::write(new_path(&snap_path), actual).expect("failed to write new snapshot"); + return Err(format_new_snapshot(name, &snap_path, actual)); + } + Err(e) => { + return Err(format!("failed to read snapshot {}: {e}", snap_path.display())); + } + }; + + if expected == actual { + return Ok(()); + } + + fs::write(new_path(&snap_path), actual).expect("failed to write new snapshot"); + Err(format_diff(name, &snap_path, &expected, actual)) + } +} + +/// Append `.new` to the full filename (e.g. `foo.jsonc` → `foo.jsonc.new`). +fn new_path(snap_path: &Path) -> PathBuf { + let mut s = snap_path.as_os_str().to_owned(); + s.push(".new"); + PathBuf::from(s) +} + +fn format_diff(name: &str, snap_path: &Path, expected: &str, actual: &str) -> String { + let diff = similar::TextDiff::from_lines(expected, actual); + let mut out = String::new(); + let _ = writeln!(out, "Snapshot: {name}"); + let _ = writeln!(out, "Stored new snapshot at: {}", new_path(snap_path).display()); + let _ = writeln!(out); + let _ = write!(out, "{}", diff.unified_diff().context_radius(3).header("expected", "actual")); + let _ = writeln!(out); + let _ = writeln!(out, "To update, re-run with UPDATE_SNAPSHOTS=1"); + out +} + +fn format_new_snapshot(name: &str, snap_path: &Path, actual: &str) -> String { + let mut out = String::new(); + let _ = writeln!(out, "Snapshot: {name}"); + let _ = writeln!(out, "Stored new snapshot at: {}", new_path(snap_path).display()); + let _ = writeln!(out); + let _ = writeln!(out, "{actual}"); + let _ = writeln!(out); + let _ = writeln!(out, "To update, re-run with UPDATE_SNAPSHOTS=1"); + out +} diff --git a/crates/vite_task_bin/Cargo.toml b/crates/vite_task_bin/Cargo.toml index 1a6a026a..d5213a99 100644 --- a/crates/vite_task_bin/Cargo.toml +++ b/crates/vite_task_bin/Cargo.toml @@ -34,7 +34,7 @@ which = { workspace = true } cow-utils = { workspace = true } cp_r = { workspace = true } libtest-mimic = { workspace = true } -insta = { workspace = true, features = ["glob", "json", "redactions", "filters", "ron"] } +snapshot_test = { workspace = true } pty_terminal = { workspace = true } pty_terminal_test = { workspace = true } regex = { workspace = true } diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/associate-existing-cache/snapshots/associate existing cache.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/associate-existing-cache/snapshots/associate existing cache.snap index b3ab1305..57413709 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/associate-existing-cache/snapshots/associate existing cache.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/associate-existing-cache/snapshots/associate existing cache.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run script1 # cache miss $ vtt print hello hello diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/builtin-different-cwd/snapshots/builtin different cwd.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/builtin-different-cwd/snapshots/builtin different cwd.snap index 8c9a623e..c78e1d41 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/builtin-different-cwd/snapshots/builtin different cwd.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/builtin-different-cwd/snapshots/builtin different cwd.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run cwd1 # cache miss in folder1 ~/folder1$ vt tool print-cwd /folder1 diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-disabled/snapshots/task with cache disabled.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-disabled/snapshots/task with cache disabled.snap index 55f21ff3..8ca777c0 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-disabled/snapshots/task with cache disabled.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-disabled/snapshots/task with cache disabled.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run no-cache-task # cache miss $ vtt print-file test.txt ⊘ cache disabled test content diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-disabled/snapshots/task with cache enabled.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-disabled/snapshots/task with cache enabled.snap index 2af15642..1e84b463 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-disabled/snapshots/task with cache enabled.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-disabled/snapshots/task with cache enabled.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run cached-task # cache miss $ vtt print-file test.txt test content diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-command-change/snapshots/cache miss command change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-command-change/snapshots/cache miss command change.snap index 187841f5..1ba375a5 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-command-change/snapshots/cache miss command change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-command-change/snapshots/cache miss command change.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run task # cache miss $ vtt print foo foo diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/cwd changed.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/cwd changed.snap index e5ab7848..95a07d2e 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/cwd changed.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/cwd changed.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run test # cache miss $ vtt print-file test.txt initial content diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env added.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env added.snap index 2759ff8d..614e6cef 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env added.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env added.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run test # cache miss $ vtt print-file test.txt initial content diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env removed.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env removed.snap index 68adcaaa..dcfc0e1e 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env removed.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env removed.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > MY_ENV=1 vt run test # cache miss $ vtt print-file test.txt initial content diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env value changed.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env value changed.snap index 04cca402..ac2105e1 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env value changed.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/env value changed.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > MY_ENV=1 vt run test # cache miss $ vtt print-file test.txt initial content diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/glob input changes.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/glob input changes.snap index 312c0ba6..6ea8345c 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/glob input changes.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/glob input changes.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run glob-test # cache miss $ vtt print glob-test glob-test diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/inferred input changes.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/inferred input changes.snap index 95be6571..412da445 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/inferred input changes.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/inferred input changes.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run test # cache miss $ vtt print-file test.txt initial content diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/input config changed.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/input config changed.snap index 1e42d1d4..a8dcd1a7 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/input config changed.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/input config changed.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run test # cache miss $ vtt print-file test.txt initial content diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/untracked env added.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/untracked env added.snap index e320457d..cfa532d2 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/untracked env added.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/untracked env added.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run test # cache miss $ vtt print-file test.txt initial content diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/untracked env removed.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/untracked env removed.snap index 0626582e..c4d10081 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/untracked env removed.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-miss-reasons/snapshots/untracked env removed.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vtt replace-file-content vite-task.json '"cache": true' '"cache": true, "untrackedEnv": ["MY_UNTRACKED"]' # setup > vt run test # cache miss diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-subcommand/snapshots/cache clean.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-subcommand/snapshots/cache clean.snap index b2ee0c0b..5ce62fbb 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-subcommand/snapshots/cache clean.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-subcommand/snapshots/cache clean.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run cached-task # cache miss $ vtt print-file test.txt test content diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-task-select/snapshots/cache hit with interactive selector and --cache.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-task-select/snapshots/cache hit with interactive selector and --cache.snap index 2b22f3c3..e8e1c349 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-task-select/snapshots/cache hit with interactive selector and --cache.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/cache-task-select/snapshots/cache hit with interactive selector and --cache.snap @@ -1,8 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -assertion_line: 441 -expression: e2e_outputs ---- > vt run --cache @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/colon-in-name/snapshots/read file with colon in name.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/colon-in-name/snapshots/read file with colon in name.snap index 14f35a70..ce5c6d56 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/colon-in-name/snapshots/read file with colon in name.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/colon-in-name/snapshots/read file with colon in name.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run read_colon_in_name # cache miss $ vtt print-file node:fs node:fs: not found diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills concurrent cached tasks.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills concurrent cached tasks.snap index 21d12bf7..2c987b7e 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills concurrent cached tasks.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills concurrent cached tasks.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [1]> vt run -r --cache test ~/packages/a$ vtt barrier ../../.barrier test-sync 2 --exit=1 ~/packages/b$ vtt barrier ../../.barrier test-sync 2 --hang diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills concurrent tasks.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills concurrent tasks.snap index 9be79448..93fb081f 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills concurrent tasks.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills concurrent tasks.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [1]> vt run -r test ~/packages/a$ vtt barrier ../../.barrier test-sync 2 --exit=1 ⊘ cache disabled ~/packages/b$ vtt barrier ../../.barrier test-sync 2 --hang ⊘ cache disabled diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills daemonized concurrent tasks.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills daemonized concurrent tasks.snap index 0c230f23..36d610c1 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills daemonized concurrent tasks.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/failure kills daemonized concurrent tasks.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [1]> vt run -r --cache daemon ~/packages/a$ vtt barrier ../../.barrier daemon-sync 2 --exit=1 ~/packages/b$ vtt barrier ../../.barrier daemon-sync 2 --daemonize diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/independent tasks run concurrently.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/independent tasks run concurrently.snap index ede9c773..5b921ac7 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/independent tasks run concurrently.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/concurrent-execution/snapshots/independent tasks run concurrently.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r build ~/packages/a$ vtt barrier ../../.barrier sync 2 ⊘ cache disabled ~/packages/b$ vtt barrier ../../.barrier sync 2 ⊘ cache disabled diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c prevents caching.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c prevents caching.snap index 9f201464..667633f0 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c prevents caching.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c prevents caching.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run @ctrl-c/a#dev # exits 0 but should not be cached @ expect-milestone: ready ~/packages/a$ vtt exit-on-ctrlc diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c prevents future tasks.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c prevents future tasks.snap index d3ba5c9a..ac8a250d 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c prevents future tasks.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c prevents future tasks.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r --no-cache dev @ expect-milestone: ready ~/packages/a$ vtt exit-on-ctrlc ⊘ cache disabled diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c terminates running tasks (cached).snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c terminates running tasks (cached).snap index 6f0bca35..797f8eb8 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c terminates running tasks (cached).snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c terminates running tasks (cached).snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run @ctrl-c/a#dev @ expect-milestone: ready ~/packages/a$ vtt exit-on-ctrlc diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c terminates running tasks.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c terminates running tasks.snap index a29e7572..9dbf1dfd 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c terminates running tasks.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/ctrl-c/snapshots/ctrl-c terminates running tasks.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --no-cache @ctrl-c/a#dev @ expect-milestone: ready ~/packages/a$ vtt exit-on-ctrlc ⊘ cache disabled diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/error_cycle_dependency/snapshots/cycle dependency error.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/error_cycle_dependency/snapshots/cycle dependency error.snap index 94bfc0dd..8eef1831 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/error_cycle_dependency/snapshots/cycle dependency error.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/error_cycle_dependency/snapshots/cycle dependency error.snap @@ -1,6 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [1]> vt run task-a # task-a -> task-b -> task-a cycle Error: Cycle dependency detected: error-cycle-dependency-test#task-a -> error-cycle-dependency-test#task-b -> error-cycle-dependency-test#task-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/chained command with && stops at first failure.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/chained command with && stops at first failure.snap index 50dfe4db..81da3bbe 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/chained command with && stops at first failure.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/chained command with && stops at first failure.snap @@ -1,6 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [3]> vt run pkg-a#chained # first fails with exit code 3, second should not run ~/packages/pkg-a$ vtt exit 3 diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/dependency failure fast-fails dependents.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/dependency failure fast-fails dependents.snap index 0506fb32..348d85cb 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/dependency failure fast-fails dependents.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/dependency failure fast-fails dependents.snap @@ -1,8 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/pkg-b ---- [1]> vt run -t check # pkg-a fails, pkg-b is skipped ~/packages/pkg-a$ vtt exit 1 diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/single task failure returns task exit code.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/single task failure returns task exit code.snap index 31f09693..de3d8d28 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/single task failure returns task exit code.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/single task failure returns task exit code.snap @@ -1,6 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [42]> vt run pkg-a#fail # exits with code 42 ~/packages/pkg-a$ vtt exit 42 diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/task failure fast-fails remaining tasks.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/task failure fast-fails remaining tasks.snap index 2a434927..f72eb91f 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/task failure fast-fails remaining tasks.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/exit-codes/snapshots/task failure fast-fails remaining tasks.snap @@ -1,6 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [42]> vt run -r fail # pkg-a fails, pkg-b is skipped ~/packages/pkg-a$ vtt exit 42 diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/multiple unmatched filters warn individually.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/multiple unmatched filters warn individually.snap index 175d247b..94485a13 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/multiple unmatched filters warn individually.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/multiple unmatched filters warn individually.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --filter @test/app --filter nope1 --filter nope2 build No packages matched the filter: nope1 No packages matched the filter: nope2 diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/partial match warns for unmatched filter.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/partial match warns for unmatched filter.snap index 2066e003..b72b68c1 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/partial match warns for unmatched filter.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/partial match warns for unmatched filter.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --filter @test/app --filter nonexistent build No packages matched the filter: nonexistent ~/packages/app$ vtt print built-app diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched directory filter warns.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched directory filter warns.snap index d4615abc..f57b846f 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched directory filter warns.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched directory filter warns.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --filter @test/app --filter ./packages/nope build No packages matched the filter: ./packages/nope ~/packages/app$ vtt print built-app diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched exclusion filter does not warn.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched exclusion filter does not warn.snap index a76436fe..c51f525d 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched exclusion filter does not warn.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched exclusion filter does not warn.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --filter @test/app --filter !nonexistent build ~/packages/app$ vtt print built-app built-app diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched glob filter warns.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched glob filter warns.snap index 6e519b6f..db418781 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched glob filter warns.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/unmatched glob filter warns.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --filter @test/app --filter @nope/* build No packages matched the filter: @nope/* ~/packages/app$ vtt print built-app diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/whitespace split filter warns for unmatched token.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/whitespace split filter warns for unmatched token.snap index 9b2bcc01..a029aac9 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/whitespace split filter warns for unmatched token.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/filter-unmatched/snapshots/whitespace split filter warns for unmatched token.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --filter '@test/app nope' build No packages matched the filter: nope ~/packages/app$ vtt print built-app diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - matches src files.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - matches src files.snap index a9cb0e35..ed726dcb 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - matches src files.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - matches src files.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run root-glob-test $ vtt print-file src/root.ts export const root = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - subpackage path unmatched by relative glob.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - subpackage path unmatched by relative glob.snap index ab0d79c7..e915c357 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - subpackage path unmatched by relative glob.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - subpackage path unmatched by relative glob.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run root-glob-test $ vtt print-file src/root.ts export const root = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - unmatched directory.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - unmatched directory.snap index 4d8586b8..8219f3c7 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - unmatched directory.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob - unmatched directory.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run root-glob-test $ vtt print-file src/root.ts export const root = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob with cwd - glob relative to package not cwd.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob with cwd - glob relative to package not cwd.snap index 25929f16..c26c0419 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob with cwd - glob relative to package not cwd.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/root glob with cwd - glob relative to package not cwd.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run root-glob-with-cwd ~/src$ vtt print-file root.ts export const root = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - matches own src files.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - matches own src files.snap index 0384187b..d386f983 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - matches own src files.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - matches own src files.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#sub-glob-test ~/packages/sub-pkg$ vtt print-file src/sub.ts export const sub = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - root path unmatched by relative glob.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - root path unmatched by relative glob.snap index c9ca80da..aa32a006 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - root path unmatched by relative glob.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - root path unmatched by relative glob.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#sub-glob-test ~/packages/sub-pkg$ vtt print-file src/sub.ts export const sub = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - unmatched directory in subpackage.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - unmatched directory in subpackage.snap index c6e80464..192a3d99 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - unmatched directory in subpackage.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob - unmatched directory in subpackage.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#sub-glob-test ~/packages/sub-pkg$ vtt print-file src/sub.ts export const sub = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob with cwd - glob relative to package not cwd.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob with cwd - glob relative to package not cwd.snap index ea3c3e56..fd8a0133 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob with cwd - glob relative to package not cwd.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/glob-base-test/snapshots/subpackage glob with cwd - glob relative to package not cwd.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#sub-glob-with-cwd ~/packages/sub-pkg/src$ vtt print-file sub.ts export const sub = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache hit, replayed.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache hit, replayed.snap index 6893d63e..5669a28a 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache hit, replayed.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache hit, replayed.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=grouped -r check-tty-cached [other#check-tty-cached] ~/packages/other$ vtt check-tty ── [other#check-tty-cached] ── diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache miss, grouped output.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache miss, grouped output.snap index 918bcec7..a4982dac 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache miss, grouped output.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache miss, grouped output.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=grouped -r check-tty-cached [other#check-tty-cached] ~/packages/other$ vtt check-tty ── [other#check-tty-cached] ── diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache off, grouped output.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache off, grouped output.snap index 31313239..e7f06768 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache off, grouped output.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/multiple tasks, cache off, grouped output.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=grouped -r check-tty [other#check-tty] ~/packages/other$ vtt check-tty ── [other#check-tty] ── diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache hit, replayed.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache hit, replayed.snap index da4b3f9c..46ee70b2 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache hit, replayed.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache hit, replayed.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=grouped check-tty-cached [grouped-stdio-test#check-tty-cached] $ vtt check-tty ── [grouped-stdio-test#check-tty-cached] ── diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache miss, grouped output.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache miss, grouped output.snap index d6847f92..1f864ac0 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache miss, grouped output.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache miss, grouped output.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=grouped check-tty-cached [grouped-stdio-test#check-tty-cached] $ vtt check-tty ── [grouped-stdio-test#check-tty-cached] ── diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache off, grouped output.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache off, grouped output.snap index 78f7277a..25664e69 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache off, grouped output.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/single task, cache off, grouped output.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=grouped check-tty [grouped-stdio-test#check-tty] $ vtt check-tty ⊘ cache disabled ── [grouped-stdio-test#check-tty] ── diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/stdin is always null.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/stdin is always null.snap index 5b216f0e..a72bd1fb 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/stdin is always null.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/grouped-stdio/snapshots/stdin is always null.snap @@ -1,6 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vtt pipe-stdin from-stdin -- vt run --log=grouped read-stdin [grouped-stdio-test#read-stdin] $ vtt read-stdin ⊘ cache disabled diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/individual-cache-for-adt-args/snapshots/individual cache for extra args.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/individual-cache-for-adt-args/snapshots/individual cache for extra args.snap index b056865f..c3e0d869 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/individual-cache-for-adt-args/snapshots/individual cache for extra args.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/individual-cache-for-adt-args/snapshots/individual cache for extra args.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run say a # cache miss $ vtt print a a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/individual-cache-for-env/snapshots/individual cache for env.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/individual-cache-for-env/snapshots/individual cache for env.snap index ea5ccb0a..28d49176 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/individual-cache-for-env/snapshots/individual cache for env.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/individual-cache-for-env/snapshots/individual cache for env.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > FOO=1 vt run hello # cache miss $ vtt print-env FOO 1 diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto only - hit on non-inferred file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto only - hit on non-inferred file change.snap index 63657482..32536e5e 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto only - hit on non-inferred file change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto only - hit on non-inferred file change.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run auto-only $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto only - miss on inferred file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto only - miss on inferred file change.snap index b91b093c..238e9064 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto only - miss on inferred file change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto only - miss on inferred file change.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run auto-only $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto with negative - hit on excluded inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto with negative - hit on excluded inferred file.snap index 6dca9c9d..739756e7 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto with negative - hit on excluded inferred file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto with negative - hit on excluded inferred file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run auto-with-negative $ vtt print-file src/main.ts dist/output.js export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto with negative - miss on non-excluded inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto with negative - miss on non-excluded inferred file.snap index f3dc88e3..ec899615 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto with negative - miss on non-excluded inferred file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/auto with negative - miss on non-excluded inferred file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run auto-with-negative $ vtt print-file src/main.ts dist/output.js export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/empty input - hit despite file changes.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/empty input - hit despite file changes.snap index 3f905608..1d8c6805 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/empty input - hit despite file changes.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/empty input - hit despite file changes.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run empty-inputs $ vtt print-file ./src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/empty input - miss on command change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/empty input - miss on command change.snap index a6da829a..8dfa8bfc 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/empty input - miss on command change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/empty input - miss on command change.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run empty-inputs $ vtt print-file ./src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder input - hit despite file changes and folder deletion.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder input - hit despite file changes and folder deletion.snap index bdb4ce8d..211ecc81 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder input - hit despite file changes and folder deletion.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder input - hit despite file changes and folder deletion.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run folder-input $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder slash input - hit on file outside directory.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder slash input - hit on file outside directory.snap index ee1fbe2d..e99fa82d 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder slash input - hit on file outside directory.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder slash input - hit on file outside directory.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run folder-slash-input $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder slash input - miss on direct and nested file changes.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder slash input - miss on direct and nested file changes.snap index 068d0d65..4a1d2e89 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder slash input - miss on direct and nested file changes.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/folder slash input - miss on direct and nested file changes.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run folder-slash-input $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/fspy env - not set when auto inference disabled.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/fspy env - not set when auto inference disabled.snap index 6e120632..02de9e73 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/fspy env - not set when auto inference disabled.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/fspy env - not set when auto inference disabled.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run check-fspy-env-without-auto $ vtt print-env FSPY (undefined) diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/fspy env - set when auto inference enabled.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/fspy env - set when auto inference enabled.snap index abf2faef..ec819840 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/fspy env - set when auto inference enabled.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/fspy env - set when auto inference enabled.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run check-fspy-env-with-auto $ vtt print-env FSPY 1 diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - hit on excluded file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - hit on excluded file.snap index b6e32bc5..822aa148 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - hit on excluded file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - hit on excluded file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run positive-auto-negative $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - miss on explicit glob file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - miss on explicit glob file.snap index df02c2f9..405f833f 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - miss on explicit glob file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - miss on explicit glob file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run positive-auto-negative $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - miss on inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - miss on inferred file.snap index 1a9dd120..f1d15da1 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - miss on inferred file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive auto negative - miss on inferred file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run positive-auto-negative $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs - hit on read but unmatched file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs - hit on read but unmatched file.snap index ef72290b..920a7489 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs - hit on read but unmatched file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs - hit on read but unmatched file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run positive-globs-reads-unmatched $ vtt print-file src/main.ts src/utils.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - cache hit on second run.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - cache hit on second run.snap index 65847426..844b4527 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - cache hit on second run.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - cache hit on second run.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run positive-globs-only $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - hit on unmatched file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - hit on unmatched file change.snap index 4bfde2c2..05262eb3 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - hit on unmatched file change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - hit on unmatched file change.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run positive-globs-only $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - miss on matched file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - miss on matched file change.snap index eec0d0d4..cb42c3fa 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - miss on matched file change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive globs only - miss on matched file change.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run positive-globs-only $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive negative globs - hit on excluded file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive negative globs - hit on excluded file.snap index 2fc29600..83210a53 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive negative globs - hit on excluded file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive negative globs - hit on excluded file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run positive-negative-globs $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive negative globs - miss on non-excluded file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive negative globs - miss on non-excluded file.snap index 10b8982d..bf5535c8 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive negative globs - miss on non-excluded file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-cache-test/snapshots/positive negative globs - miss on non-excluded file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run positive-negative-globs $ vtt print-file src/main.ts export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-glob-meta-in-path/snapshots/cache hit then miss on file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-glob-meta-in-path/snapshots/cache hit then miss on file change.snap index c0a9a130..2c3cb95e 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-glob-meta-in-path/snapshots/cache hit then miss on file change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-glob-meta-in-path/snapshots/cache hit then miss on file change.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run [lib]#build ~/packages/[lib]$ vtt print-file src/main.ts export const lib = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot auto negative - hit on excluded sibling inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot auto negative - hit on excluded sibling inferred file.snap index 8f4290e4..0e271e38 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot auto negative - hit on excluded sibling inferred file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot auto negative - hit on excluded sibling inferred file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#dotdot-auto-negative ~/packages/sub-pkg$ vtt print-file ../shared/src/utils.ts ../shared/dist/output.js export const shared = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot auto negative - miss on non-excluded sibling inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot auto negative - miss on non-excluded sibling inferred file.snap index 1722f033..1e0951fe 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot auto negative - miss on non-excluded sibling inferred file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot auto negative - miss on non-excluded sibling inferred file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#dotdot-auto-negative ~/packages/sub-pkg$ vtt print-file ../shared/src/utils.ts ../shared/dist/output.js export const shared = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive glob - hit on unmatched file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive glob - hit on unmatched file change.snap index 68d69088..05125959 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive glob - hit on unmatched file change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive glob - hit on unmatched file change.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#dotdot-positive ~/packages/sub-pkg$ vtt print-file ../shared/src/utils.ts export const shared = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive glob - miss on sibling file change.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive glob - miss on sibling file change.snap index 69dca92c..fbff404d 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive glob - miss on sibling file change.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive glob - miss on sibling file change.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#dotdot-positive ~/packages/sub-pkg$ vtt print-file ../shared/src/utils.ts export const shared = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive negative - hit on excluded sibling file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive negative - hit on excluded sibling file.snap index cc6d22f6..6491c71a 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive negative - hit on excluded sibling file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive negative - hit on excluded sibling file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#dotdot-positive-negative ~/packages/sub-pkg$ vtt print-file ../shared/src/utils.ts ../shared/dist/output.js export const shared = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive negative - miss on non-excluded sibling file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive negative - miss on non-excluded sibling file.snap index acb2029d..723473b2 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive negative - miss on non-excluded sibling file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/dotdot positive negative - miss on non-excluded sibling file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#dotdot-positive-negative ~/packages/sub-pkg$ vtt print-file ../shared/src/utils.ts ../shared/dist/output.js export const shared = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/subpackage auto with negative - hit on excluded inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/subpackage auto with negative - hit on excluded inferred file.snap index 2943696e..fc4fbc6b 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/subpackage auto with negative - hit on excluded inferred file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/subpackage auto with negative - hit on excluded inferred file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#auto-with-negative ~/packages/sub-pkg$ vtt print-file src/main.ts dist/output.js export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/subpackage auto with negative - miss on non-excluded inferred file.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/subpackage auto with negative - miss on non-excluded inferred file.snap index 386cbb95..8f815611 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/subpackage auto with negative - miss on non-excluded inferred file.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-negative-glob-subpackage/snapshots/subpackage auto with negative - miss on non-excluded inferred file.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run sub-pkg#auto-with-negative ~/packages/sub-pkg$ vtt print-file src/main.ts dist/output.js export const main = 'initial'; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/multi task with read-write shows not cached in summary.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/multi task with read-write shows not cached in summary.snap index 0049752b..2cc5b125 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/multi task with read-write shows not cached in summary.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/multi task with read-write shows not cached in summary.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r task ~/packages/normal-pkg$ vtt print hello hello diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/single O_RDWR open is not cached.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/single O_RDWR open is not cached.snap index 9f8ba0c5..f3be53a9 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/single O_RDWR open is not cached.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/single O_RDWR open is not cached.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/touch-pkg ---- > vt run task ~/packages/touch-pkg$ vtt touch-file src/data.txt diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/single read-write task shows not cached message.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/single read-write task shows not cached message.snap index e2f48659..189f589c 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/single read-write task shows not cached message.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/single read-write task shows not cached message.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/rw-pkg ---- > vt run task ~/packages/rw-pkg$ vtt replace-file-content src/data.txt i ! diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/verbose read-write task shows path in full summary.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/verbose read-write task shows path in full summary.snap index 65e6a2a5..32965366 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/verbose read-write task shows path in full summary.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/input-read-write-not-cached/snapshots/verbose read-write task shows path in full summary.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/rw-pkg ---- > vt run -v task ~/packages/rw-pkg$ vtt replace-file-content src/data.txt i ! diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/cache off inherits stdin.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/cache off inherits stdin.snap index ab418453..0fa6d872 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/cache off inherits stdin.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/cache off inherits stdin.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vtt pipe-stdin from-stdin -- vt run read-stdin $ vtt read-stdin ⊘ cache disabled from-stdin diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/cache on gets null stdin.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/cache on gets null stdin.snap index 3d895dce..798b5501 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/cache on gets null stdin.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/cache on gets null stdin.snap @@ -1,6 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vtt pipe-stdin from-stdin -- vt run read-stdin-cached $ vtt read-stdin diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache hit, replayed.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache hit, replayed.snap index 88d55ab1..c1edd00c 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache hit, replayed.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache hit, replayed.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r check-tty-cached ~/packages/other$ vtt check-tty stdin:not-tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache miss, piped stdio.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache miss, piped stdio.snap index 9d0c4c41..064e44c1 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache miss, piped stdio.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache miss, piped stdio.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r check-tty-cached ~/packages/other$ vtt check-tty stdin:not-tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache off, inherit stdio.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache off, inherit stdio.snap index db5ad977..e1d964c6 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache off, inherit stdio.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/multiple tasks, cache off, inherit stdio.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r check-tty ~/packages/other$ vtt check-tty stdin:not-tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache hit, replayed.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache hit, replayed.snap index 2b087778..3f44fef6 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache hit, replayed.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache hit, replayed.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run check-tty-cached $ vtt check-tty stdin:not-tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache miss, piped stdio.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache miss, piped stdio.snap index b78b3dfe..3314c8a1 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache miss, piped stdio.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache miss, piped stdio.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run check-tty-cached $ vtt check-tty stdin:not-tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache off, inherits stdio.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache off, inherits stdio.snap index 85c4a9b9..faf1f6fc 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache off, inherits stdio.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/interleaved-stdio/snapshots/single task, cache off, inherits stdio.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run check-tty $ vtt check-tty ⊘ cache disabled stdin:tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache hit, replayed.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache hit, replayed.snap index 9ed6981e..d96f3aac 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache hit, replayed.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache hit, replayed.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=labeled -r check-tty-cached [other#check-tty-cached] ~/packages/other$ vtt check-tty [other#check-tty-cached] stdin:not-tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache miss, piped stdio.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache miss, piped stdio.snap index 81d50a3d..95e019e4 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache miss, piped stdio.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache miss, piped stdio.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=labeled -r check-tty-cached [other#check-tty-cached] ~/packages/other$ vtt check-tty [other#check-tty-cached] stdin:not-tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache off, piped stdio.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache off, piped stdio.snap index 34486dc2..5cd53f90 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache off, piped stdio.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/multiple tasks, cache off, piped stdio.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=labeled -r check-tty [other#check-tty] ~/packages/other$ vtt check-tty [other#check-tty] stdin:not-tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache hit, replayed.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache hit, replayed.snap index 89d5dbf9..2865c40d 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache hit, replayed.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache hit, replayed.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=labeled check-tty-cached [labeled-stdio-test#check-tty-cached] $ vtt check-tty [labeled-stdio-test#check-tty-cached] stdin:not-tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache miss, piped stdio.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache miss, piped stdio.snap index 7b552bf6..a829acfe 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache miss, piped stdio.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache miss, piped stdio.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=labeled check-tty-cached [labeled-stdio-test#check-tty-cached] $ vtt check-tty [labeled-stdio-test#check-tty-cached] stdin:not-tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache off, piped stdio.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache off, piped stdio.snap index 174d0afa..d9c0cdd6 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache off, piped stdio.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/single task, cache off, piped stdio.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run --log=labeled check-tty [labeled-stdio-test#check-tty] $ vtt check-tty ⊘ cache disabled [labeled-stdio-test#check-tty] stdin:not-tty diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/stdin is always null.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/stdin is always null.snap index 0c3b39e7..761ce49e 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/stdin is always null.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/labeled-stdio/snapshots/stdin is always null.snap @@ -1,6 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vtt pipe-stdin from-stdin -- vt run --log=labeled read-stdin [labeled-stdio-test#read-stdin] $ vtt read-stdin ⊘ cache disabled diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/malformed-fspy-path/snapshots/malformed observed path does not panic.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/malformed-fspy-path/snapshots/malformed observed path does not panic.snap index fe34e746..b9251601 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/malformed-fspy-path/snapshots/malformed observed path does not panic.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/malformed-fspy-path/snapshots/malformed observed path does not panic.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > TEMP=. TMP=. vt run read-malformed-path $ vtt print-file foo/C:/bar foo/C:/bar: not found diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/parallel-execution/snapshots/parallel flag runs dependent tasks concurrently.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/parallel-execution/snapshots/parallel flag runs dependent tasks concurrently.snap index a06f33e0..672237a8 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/parallel-execution/snapshots/parallel flag runs dependent tasks concurrently.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/parallel-execution/snapshots/parallel flag runs dependent tasks concurrently.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r --parallel build ~/packages/a$ vtt barrier ../../.barrier sync 2 ⊘ cache disabled ~/packages/b$ vtt barrier ../../.barrier sync 2 ⊘ cache disabled diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/pass-args-to-task/snapshots/pass args to task.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/pass-args-to-task/snapshots/pass args to task.snap index b67cb323..dd5e453b 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/pass-args-to-task/snapshots/pass args to task.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/pass-args-to-task/snapshots/pass args to task.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run echo --help $ echo --help ⊘ cache disabled --help diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/shared-caching-input/snapshots/shared caching input.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/shared-caching-input/snapshots/shared caching input.snap index 599b54bd..e1ad294b 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/shared-caching-input/snapshots/shared caching input.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/shared-caching-input/snapshots/shared caching input.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run script1 # cache miss $ vtt print-file foo.txt initial content diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/signal-exit/snapshots/signal terminated task returns non-zero exit code.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/signal-exit/snapshots/signal terminated task returns non-zero exit code.snap index 2916a7ab..b0a260b4 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/signal-exit/snapshots/signal terminated task returns non-zero exit code.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/signal-exit/snapshots/signal terminated task returns non-zero exit code.snap @@ -1,6 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [134]> vt run abort # SIGABRT -> exit code 134 $ node -e "process.kill(process.pid, 6)" diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details after multi task run shows saved summary.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details after multi task run shows saved summary.snap index 478420a1..caf3699f 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details after multi task run shows saved summary.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details after multi task run shows saved summary.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r build # populate summary file ~/packages/a$ vtt print built-a built-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details after run shows saved summary.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details after run shows saved summary.snap index d838f61d..d5ae70d3 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details after run shows saved summary.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details after run shows saved summary.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/a ---- > vt run build # populate summary file ~/packages/a$ vtt print built-a built-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details with no previous run shows error.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details with no previous run shows error.snap index 7ceb1986..e6fa99e8 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details with no previous run shows error.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/last details with no previous run shows error.snap @@ -1,6 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [1]> vt run --last-details No previous run summary found. Run a task first to generate a summary. diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task all cache miss shows compact summary.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task all cache miss shows compact summary.snap index a52b6646..f21d5c46 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task all cache miss shows compact summary.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task all cache miss shows compact summary.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r build ~/packages/a$ vtt print built-a built-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task verbose shows full summary.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task verbose shows full summary.snap index 1c6cbffb..106b9a59 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task verbose shows full summary.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task verbose shows full summary.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r -v build ~/packages/a$ vtt print built-a built-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task verbose with cache hits shows full summary.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task verbose with cache hits shows full summary.snap index 39f42f40..94633b4d 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task verbose with cache hits shows full summary.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task verbose with cache hits shows full summary.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r build # first run, populate cache ~/packages/a$ vtt print built-a built-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task with cache hits shows compact summary.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task with cache hits shows compact summary.snap index 19cae015..227a6f2a 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task with cache hits shows compact summary.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/multi task with cache hits shows compact summary.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r build # first run, all miss ~/packages/a$ vtt print built-a built-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task cache hit shows compact summary.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task cache hit shows compact summary.snap index 4d922023..ad080053 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task cache hit shows compact summary.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task cache hit shows compact summary.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/a ---- > vt run build # first run, cache miss ~/packages/a$ vtt print built-a built-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task cache miss shows no summary.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task cache miss shows no summary.snap index 84daea86..831f32bd 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task cache miss shows no summary.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task cache miss shows no summary.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/a ---- > vt run build ~/packages/a$ vtt print built-a built-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task verbose shows full summary.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task verbose shows full summary.snap index ebe40257..9a06ceec 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task verbose shows full summary.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/summary-output/snapshots/single task verbose shows full summary.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/a ---- > vt run -v build ~/packages/a$ vtt print built-a built-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/list tasks from package dir.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/list tasks from package dir.snap index 17a559df..1ec432b1 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/list tasks from package dir.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/list tasks from package dir.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vtt pipe-stdin -- vt run build: echo build app lint: echo lint app diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/list tasks from workspace root.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/list tasks from workspace root.snap index a366311a..e8fa1b10 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/list tasks from workspace root.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/list tasks from workspace root.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vtt pipe-stdin -- vt run hello: echo hello from root list-tasks: vt run diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/vt run in script.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/vt run in script.snap index 2466c406..c4ffe53b 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/vt run in script.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-list/snapshots/vt run in script.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run list-tasks @ expect-milestone: task-select::0 $ vt run ⊘ cache disabled diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-no-trailing-newline/snapshots/no trailing newline.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-no-trailing-newline/snapshots/no trailing newline.snap index ecbd3c82..42e60cd6 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-no-trailing-newline/snapshots/no trailing newline.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-no-trailing-newline/snapshots/no trailing newline.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run hello # runs echo -n hello $ echo -n foo ⊘ cache disabled foo diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select-truncate/snapshots/interactive long command truncated.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select-truncate/snapshots/interactive long command truncated.snap index 692b2e0b..914a904a 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select-truncate/snapshots/interactive long command truncated.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select-truncate/snapshots/interactive long command truncated.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive ctrl-c cancels.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive ctrl-c cancels.snap index e9513666..8c87d38c 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive ctrl-c cancels.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive ctrl-c cancels.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- [130]> vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): @@ -22,3 +16,4 @@ Select a task (↑/↓, Enter to run, type to search): deploy echo deploy root (…5 more) @ write-key: ctrl-c + diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive enter with no results does nothing.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive enter with no results does nothing.snap index 0d5fa856..088605ce 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive enter with no results does nothing.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive enter with no results does nothing.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive escape clears query.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive escape clears query.snap index 47c25827..b8b2a0ae 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive escape clears query.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive escape clears query.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive scroll long list.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive scroll long list.snap index ebb962c1..519d3265 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive scroll long list.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive scroll long list.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search other package task.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search other package task.snap index 047ca216..5f6877f2 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search other package task.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search other package task.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search preserves rating within package.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search preserves rating within package.snap index a9d45302..c0387c7a 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search preserves rating within package.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search preserves rating within package.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/lib ---- > vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search then select.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search then select.snap index 27165fae..bc0b9085 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search then select.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search then select.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search with hash skips reorder.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search with hash skips reorder.snap index 0b387852..5c58bae7 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search with hash skips reorder.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive search with hash skips reorder.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select from other package.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select from other package.snap index cdfe2041..28f6beb0 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select from other package.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select from other package.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select task from lib.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select task from lib.snap index aedbf6fe..dda78f88 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select task from lib.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select task from lib.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/lib ---- > vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select task.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select task.snap index fe5340fe..94b8d046 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select task.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select task.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run @ expect-milestone: task-select::0 Select a task (↑/↓, Enter to run, type to search): diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select with typo.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select with typo.snap index 65769cde..1af71ee4 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select with typo.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/interactive select with typo.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run buid @ expect-milestone: task-select:buid:0 Task "buid" not found. diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive did you mean.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive did you mean.snap index 41a80b21..71e37456 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive did you mean.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive did you mean.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [1]> vtt pipe-stdin -- vt run buid Task "buid" not found. Did you mean: app#build: echo build app diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive list tasks from lib.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive list tasks from lib.snap index 7618d10d..2e2f1be2 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive list tasks from lib.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive list tasks from lib.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/lib ---- > vtt pipe-stdin -- vt run build: echo build lib lint: echo lint lib diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive list tasks.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive list tasks.snap index bc74e817..8b911c4a 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive list tasks.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive list tasks.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vtt pipe-stdin -- vt run check: echo check root clean: echo clean root diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive no suggestions.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive no suggestions.snap index 1843e99b..a4775288 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive no suggestions.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive no suggestions.snap @@ -1,6 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [1]> vtt pipe-stdin -- vt run zzzzz Task "zzzzz" not found. diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive recursive typo errors.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive recursive typo errors.snap index c93d8737..84b074ef 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive recursive typo errors.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/non-interactive recursive typo errors.snap @@ -1,6 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [1]> vtt pipe-stdin -- vt run -r buid Error: Task "buid" not found diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/recursive without task errors.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/recursive without task errors.snap index cfa41815..271674ac 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/recursive without task errors.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/recursive without task errors.snap @@ -1,8 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- [1]> vt run -r Error: No task specifier provided for 'run' command diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/transitive typo errors.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/transitive typo errors.snap index 246cdb0a..c62dcaee 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/transitive typo errors.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/transitive typo errors.snap @@ -1,8 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- [1]> vt run -t buid Error: Task "buid" not found diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/typo in task script fails without list.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/typo in task script fails without list.snap index 271b5f50..410dc45e 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/typo in task script fails without list.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/typo in task script fails without list.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- [1]> vt run run-typo-task Error: Failed to plan tasks from `vt run nonexistent-xyz` in task task-select-test#run-typo-task diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/verbose with typo enters selector.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/verbose with typo enters selector.snap index bc084185..c81954e3 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/verbose with typo enters selector.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/verbose with typo enters selector.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run --verbose buid @ expect-milestone: task-select:buid:0 Task "buid" not found. diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/verbose without task errors.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/verbose without task errors.snap index 3de34734..18ceaec9 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/verbose without task errors.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/task-select/snapshots/verbose without task errors.snap @@ -1,8 +1,2 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- [1]> vt run --verbose Error: No task specifier provided for 'run' command diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/recursive build runs dependencies before dependents.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/recursive build runs dependencies before dependents.snap index 79a5327c..c184a5a9 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/recursive build runs dependencies before dependents.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/recursive build runs dependencies before dependents.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r build # core -> lib -> app ~/packages/core$ echo 'Building core' ⊘ cache disabled Building core diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/transitive build from app runs all dependencies.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/transitive build from app runs all dependencies.snap index 2cfb2117..7563620f 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/transitive build from app runs all dependencies.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/transitive build from app runs all dependencies.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/app ---- > vt run -t build # core -> lib -> app ~/packages/core$ echo 'Building core' ⊘ cache disabled Building core diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/transitive build from lib runs only its dependencies.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/transitive build from lib runs only its dependencies.snap index 183086f1..521b260c 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/transitive build from lib runs only its dependencies.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/topological-execution-order/snapshots/transitive build from lib runs only its dependencies.snap @@ -1,9 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs -info: - cwd: packages/lib ---- > vt run -t build # core -> lib ~/packages/core$ echo 'Building core' ⊘ cache disabled Building core diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vite-task-smoke/snapshots/cache hit after file modification.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vite-task-smoke/snapshots/cache hit after file modification.snap index 54e0f76b..ed653e95 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vite-task-smoke/snapshots/cache hit after file modification.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vite-task-smoke/snapshots/cache hit after file modification.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run test-task # cache miss $ echo hello ⊘ cache disabled hello diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/workspace-root-self-reference/snapshots/build from root prunes root from nested expansion.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/workspace-root-self-reference/snapshots/build from root prunes root from nested expansion.snap index 2f3318ac..02cbe54a 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/workspace-root-self-reference/snapshots/build from root prunes root from nested expansion.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/workspace-root-self-reference/snapshots/build from root prunes root from nested expansion.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run build # only a and b run under root, root is pruned ~/packages/a$ echo building-a ⊘ cache disabled building-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/workspace-root-self-reference/snapshots/recursive build skips root self-reference.snap b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/workspace-root-self-reference/snapshots/recursive build skips root self-reference.snap index 37f122aa..1a1126f3 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/workspace-root-self-reference/snapshots/recursive build skips root self-reference.snap +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/workspace-root-self-reference/snapshots/recursive build skips root self-reference.snap @@ -1,7 +1,3 @@ ---- -source: crates/vite_task_bin/tests/e2e_snapshots/main.rs -expression: e2e_outputs ---- > vt run -r build # only a and b run, root is skipped ~/packages/a$ echo building-a ⊘ cache disabled building-a diff --git a/crates/vite_task_bin/tests/e2e_snapshots/main.rs b/crates/vite_task_bin/tests/e2e_snapshots/main.rs index c8d8c1a4..5d3441f8 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/main.rs +++ b/crates/vite_task_bin/tests/e2e_snapshots/main.rs @@ -192,17 +192,11 @@ struct SnapshotsFile { pub e2e_cases: Vec, } -#[expect(clippy::disallowed_types, reason = "Path required by insta::glob! callback signature")] -fn run_case(tmpdir: &AbsolutePath, fixture_path: &std::path::Path) { +#[expect(clippy::disallowed_types, reason = "Path required for fixture path handling")] +fn run_case(tmpdir: &AbsolutePath, fixture_path: &std::path::Path) -> Result<(), String> { let fixture_name = fixture_path.file_name().unwrap().to_str().unwrap(); - - // Configure insta to write snapshots to fixture directory - let mut settings = insta::Settings::clone_current(); - settings.set_snapshot_path(fixture_path.join("snapshots")); - settings.set_prepend_module_to_snapshot(false); - settings.remove_snapshot_suffix(); - - settings.bind(|| run_case_inner(tmpdir, fixture_path, fixture_name)); + let snapshots = snapshot_test::Snapshots::new(fixture_path.join("snapshots")); + run_case_inner(tmpdir, fixture_path, fixture_name, &snapshots) } enum TerminationState { @@ -216,9 +210,14 @@ enum TerminationState { )] #[expect( clippy::disallowed_types, - reason = "Path required by insta::glob! callback; String required by from_utf8_lossy and string accumulation" + reason = "Path required for fixture handling; String required by from_utf8_lossy and string accumulation" )] -fn run_case_inner(tmpdir: &AbsolutePath, fixture_path: &std::path::Path, fixture_name: &str) { +fn run_case_inner( + tmpdir: &AbsolutePath, + fixture_path: &std::path::Path, + fixture_name: &str, + snapshots: &snapshot_test::Snapshots, +) -> Result<(), String> { // Copy the case directory to a temporary directory to avoid discovering workspace outside of the test case. let stage_path = tmpdir.join(fixture_name); CopyOptions::new().copy_tree(fixture_path, stage_path.as_path()).unwrap(); @@ -266,14 +265,6 @@ fn run_case_inner(tmpdir: &AbsolutePath, fixture_path: &std::path::Path, fixture } } - let _info_guard = if e2e.cwd.as_str().is_empty() { - None - } else { - let mut case_settings = insta::Settings::clone_current(); - case_settings.set_info(&serde_json::json!({ "cwd": e2e.cwd.as_str() })); - Some(case_settings.bind_to_scope()) - }; - let e2e_stage_path = tmpdir.join(vite_str::format!("{fixture_name}_e2e_stage_{e2e_count}")); e2e_count += 1; CopyOptions::new().copy_tree(fixture_path, e2e_stage_path.as_path()).unwrap(); @@ -420,14 +411,9 @@ fn run_case_inner(tmpdir: &AbsolutePath, fixture_path: &std::path::Path, fixture break; } } - #[expect( - clippy::disallowed_macros, - reason = "insta::assert_snapshot! internally uses std::format!" - )] - { - insta::assert_snapshot!(e2e.name.as_str(), e2e_outputs); - } + snapshots.check_snapshot(vite_str::format!("{}.snap", e2e.name).as_str(), &e2e_outputs)?; } + Ok(()) } #[expect(clippy::disallowed_types, reason = "Path required for CARGO_MANIFEST_DIR path traversal")] @@ -459,8 +445,7 @@ fn main() { let name = fixture_path.file_name().unwrap().to_str().unwrap().to_owned(); let tmp_dir_path = tmp_dir_path.clone(); libtest_mimic::Trial::test(name, move || { - run_case(&tmp_dir_path, &fixture_path); - Ok(()) + run_case(&tmp_dir_path, &fixture_path).map_err(|e| e.into()) }) }) .collect(); diff --git a/crates/vite_task_plan/Cargo.toml b/crates/vite_task_plan/Cargo.toml index ebd27a2e..5b2e6ef3 100644 --- a/crates/vite_task_plan/Cargo.toml +++ b/crates/vite_task_plan/Cargo.toml @@ -36,7 +36,7 @@ clap = { workspace = true, features = ["derive"] } copy_dir = { workspace = true } libtest-mimic = { workspace = true } cow-utils = { workspace = true } -insta = { workspace = true, features = ["glob", "json", "redactions", "filters", "ron"] } +snapshot_test = { workspace = true } serde_json = { workspace = true } tempfile = { workspace = true } tokio = { workspace = true, features = ["rt", "macros"] } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/query - tool synthetic task in user task.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/query - tool synthetic task in user task.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/query - tool synthetic task in user task.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/query - tool synthetic task in user task.jsonc index ab370951..9f64c076 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/query - tool synthetic task in user task.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/query - tool synthetic task in user task.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - env-test -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env ---- +// run env-test { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/task graph.jsonc similarity index 90% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/task graph.jsonc index 5b46654e..253fae9f 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/additional-env ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache and --no-cache conflict.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache and --no-cache conflict.snap index 2d3ca9d8..e6f26f84 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache and --no-cache conflict.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache and --no-cache conflict.snap @@ -1,14 +1,3 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: err -info: - args: - - run - - "--cache" - - "--no-cache" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override ---- error: the argument '--cache' cannot be used with '--no-cache' Usage: vt run --cache ... diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache does not override per-task cache false.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache does not override per-task cache false.jsonc similarity index 85% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache does not override per-task cache false.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache does not override per-task cache false.jsonc index a4a3a4a3..07dd66eb 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache does not override per-task cache false.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache does not override per-task cache false.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "--cache" - - deploy -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override ---- +// run --cache deploy { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables script caching.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables script caching.jsonc similarity index 91% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables script caching.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables script caching.jsonc index 1fec2e4c..67b1ae1c 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables script caching.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables script caching.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "--cache" - - test -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override ---- +// run --cache test { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables task caching even when cache.tasks is false.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables task caching even when cache.tasks is false.jsonc similarity index 91% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables task caching even when cache.tasks is false.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables task caching even when cache.tasks is false.jsonc index 474a1ab4..4ceddbc2 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables task caching even when cache.tasks is false.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache enables task caching even when cache.tasks is false.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "--cache" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override ---- +// run --cache build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache on task with per-task cache true enables caching.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache on task with per-task cache true enables caching.jsonc similarity index 91% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache on task with per-task cache true enables caching.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache on task with per-task cache true enables caching.jsonc index ea5b94f3..cf1e3a1e 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache on task with per-task cache true enables caching.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --cache on task with per-task cache true enables caching.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "--cache" - - check -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override ---- +// run --cache check { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - baseline - tasks not cached when cache.tasks is false.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache disables task caching.jsonc similarity index 86% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - baseline - tasks not cached when cache.tasks is false.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache disables task caching.jsonc index 94f369ca..da3b0062 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - baseline - tasks not cached when cache.tasks is false.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache disables task caching.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override ---- +// run --no-cache build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache overrides per-task cache true.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache overrides per-task cache true.jsonc similarity index 85% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache overrides per-task cache true.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache overrides per-task cache true.jsonc index 609a8abc..9c3872d5 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache overrides per-task cache true.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache overrides per-task cache true.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "--no-cache" - - check -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override ---- +// run --no-cache check { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache disables task caching.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - baseline - tasks not cached when cache.tasks is false.jsonc similarity index 85% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache disables task caching.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - baseline - tasks not cached when cache.tasks is false.jsonc index 7bb3c028..1516c9e6 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - --no-cache disables task caching.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/query - baseline - tasks not cached when cache.tasks is false.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "--no-cache" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override ---- +// run build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/task graph.jsonc similarity index 95% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/task graph.jsonc index 0c3f0fc6..feb1a3c6 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-cli-override ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - echo and lint with extra args.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - echo and lint with extra args.jsonc similarity index 93% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - echo and lint with extra args.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - echo and lint with extra args.jsonc index 6e75db7d..6bcfb7bc 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - echo and lint with extra args.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - echo and lint with extra args.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - echo-and-lint - - "--fix" -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys ---- +// run echo-and-lint --fix { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - lint and echo with extra args.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - lint and echo with extra args.jsonc similarity index 93% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - lint and echo with extra args.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - lint and echo with extra args.jsonc index 63e165ba..e1997caf 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - lint and echo with extra args.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - lint and echo with extra args.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - lint-and-echo - - Linting complete -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys ---- +// run lint-and-echo Linting complete { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - normal task with extra args.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - normal task with extra args.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - normal task with extra args.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - normal task with extra args.jsonc index 2b8b8c95..e273f579 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - normal task with extra args.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - normal task with extra args.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - hello - - a.txt -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys ---- +// run hello a.txt { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task with cwd.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task with cwd.jsonc index b5b496c5..10fcc3e0 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task with cwd.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - lint -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys ---- +// run lint { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task with cwd.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task.jsonc similarity index 91% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task with cwd.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task.jsonc index f33b18c9..10fcc3e0 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task with cwd.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task in user task.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - lint - cwd: subdir -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys ---- +// run lint { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task with extra args in user task.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task with extra args in user task.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task with extra args in user task.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task with extra args in user task.jsonc index 1437733f..364b3e97 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task with extra args in user task.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/query - synthetic task with extra args in user task.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - lint - - "--fix" -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys ---- +// run lint --fix { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/task graph.jsonc similarity index 94% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/task graph.jsonc index 5dd95d01..2ca6de9a 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-keys ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/query - script not cached by default.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/query - script not cached by default.jsonc similarity index 86% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/query - script not cached by default.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/query - script not cached by default.jsonc index fab6d952..e46b2615 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/query - script not cached by default.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/query - script not cached by default.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default ---- +// run build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/task graph.jsonc similarity index 90% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/task graph.jsonc index 0bb81cd4..87693078 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-default ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-enabled/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-enabled/snapshots/task graph.jsonc similarity index 89% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-enabled/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-enabled/snapshots/task graph.jsonc index 2f8715f6..bc7667e7 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-enabled/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-enabled/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-enabled ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-error-non-root/snapshots/task graph load error.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-error-non-root/snapshots/task graph load error.snap index 8006fe4f..09ae8010 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-error-non-root/snapshots/task graph load error.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-error-non-root/snapshots/task graph load error.snap @@ -1,6 +1 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: err_str.as_ref() -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-error-non-root ---- -`cache` can only be set in the workspace root config, but found in /packages/pkg-a +`cache` can only be set in the workspace root config, but found in /packages/pkg-a \ No newline at end of file diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - another task cached by default.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - another task cached by default.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - another task cached by default.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - another task cached by default.jsonc index 1cae81f1..901475f0 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - another task cached by default.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - another task cached by default.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - deploy -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override ---- +// run deploy { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - script not cached by default.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - script not cached by default.jsonc similarity index 86% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - script not cached by default.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - script not cached by default.jsonc index d4a0b5ff..076a50b5 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - script not cached by default.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - script not cached by default.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - test -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override ---- +// run test { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - task cached by default.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - task cached by default.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - task cached by default.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - task cached by default.jsonc index 869906ce..d34e6f5c 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - task cached by default.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/query - task cached by default.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override ---- +// run build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/task graph.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/task graph.jsonc index 5a36d594..a5632de7 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-scripts-task-override ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-sharing/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-sharing/snapshots/task graph.jsonc similarity index 93% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-sharing/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-sharing/snapshots/task graph.jsonc index 7d6298a3..4688df73 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-sharing/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-sharing/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-sharing ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/query - cache clean in script.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/query - cache clean in script.jsonc similarity index 86% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/query - cache clean in script.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/query - cache clean in script.jsonc index 5275a8f5..d5aba213 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/query - cache clean in script.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/query - cache clean in script.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - clean-cache -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand ---- +// run clean-cache { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/task graph.jsonc similarity index 82% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/task graph.jsonc index 9b72f860..b8b92665 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-subcommand ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - per-task cache true still disabled by cache.tasks false.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - per-task cache true still disabled by cache.tasks false.jsonc similarity index 86% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - per-task cache true still disabled by cache.tasks false.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - per-task cache true still disabled by cache.tasks false.jsonc index bb0b66cc..221ec75d 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - per-task cache true still disabled by cache.tasks false.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - per-task cache true still disabled by cache.tasks false.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - deploy -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled ---- +// run deploy { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - script not cached.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - script not cached.jsonc similarity index 86% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - script not cached.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - script not cached.jsonc index 9594a9d9..80dd9519 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - script not cached.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - script not cached.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - test -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled ---- +// run test { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - task not cached when cache.tasks is false.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - task not cached when cache.tasks is false.jsonc similarity index 86% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - task not cached when cache.tasks is false.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - task not cached when cache.tasks is false.jsonc index e72d2099..977c0058 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - task not cached when cache.tasks is false.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/query - task not cached when cache.tasks is false.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled ---- +// run build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/task graph.jsonc similarity index 93% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/task graph.jsonc index d88be6a0..1d5d0edf 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-tasks-disabled ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - script cached when global cache true.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - script cached when global cache true.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - script cached when global cache true.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - script cached when global cache true.jsonc index fcfb2ef0..7d74b65d 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - script cached when global cache true.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - script cached when global cache true.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - test -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable ---- +// run test { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task cached when global cache true.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task cached when global cache true.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task cached when global cache true.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task cached when global cache true.jsonc index 26fe7993..dbcb6a68 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task cached when global cache true.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task cached when global cache true.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - deploy -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable ---- +// run deploy { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task with cache false not cached despite global cache true.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task with cache false not cached despite global cache true.jsonc similarity index 86% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task with cache false not cached despite global cache true.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task with cache false not cached despite global cache true.jsonc index 700ad40e..d7fda693 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task with cache false not cached despite global cache true.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/query - task with cache false not cached despite global cache true.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable ---- +// run build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/task graph.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/task graph.jsonc index e40ec2fe..b19be370 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cache-true-no-force-enable ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt lint should put synthetic task under cwd.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt lint should put synthetic task under cwd.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt lint should put synthetic task under cwd.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt lint should put synthetic task under cwd.jsonc index d675dd9a..1f463667 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt lint should put synthetic task under cwd.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt lint should put synthetic task under cwd.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - cd-lint -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts ---- +// run cd-lint { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt run should not affect expanded task cwd.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt run should not affect expanded task cwd.jsonc similarity index 95% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt run should not affect expanded task cwd.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt run should not affect expanded task cwd.jsonc index fea71c5a..93c1d00e 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt run should not affect expanded task cwd.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/query - cd before vt run should not affect expanded task cwd.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - cd-build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts ---- +// run cd-build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/task graph.jsonc similarity index 93% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/task graph.jsonc index 21d84cb1..4fc7ccaa 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cd-in-scripts ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/comprehensive-task-graph/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/comprehensive-task-graph/snapshots/task graph.jsonc similarity index 99% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/comprehensive-task-graph/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/comprehensive-task-graph/snapshots/task graph.jsonc index db308f55..c02cdb6e 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/comprehensive-task-graph/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/comprehensive-task-graph/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/comprehensive-task-graph ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/conflict-test/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/conflict-test/snapshots/task graph.jsonc similarity index 93% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/conflict-test/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/conflict-test/snapshots/task graph.jsonc index 0a0e6f9d..9b82411d 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/conflict-test/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/conflict-test/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/conflict-test ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency/snapshots/query - cycle dependency error.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency/snapshots/query - cycle dependency error.snap index f2a62da2..be30147e 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency/snapshots/query - cycle dependency error.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency/snapshots/query - cycle dependency error.snap @@ -1,10 +1 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: err_str.as_ref() -info: - args: - - run - - task-a -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency ---- -Cycle dependency detected: cycle-dependency-test#task-a -> cycle-dependency-test#task-b -> cycle-dependency-test#task-a +Cycle dependency detected: cycle-dependency-test#task-a -> cycle-dependency-test#task-b -> cycle-dependency-test#task-a \ No newline at end of file diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency/snapshots/task graph.jsonc similarity index 90% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency/snapshots/task graph.jsonc index 24e8e8b3..6336fe8a 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/cycle-dependency ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/dependency-both-topo-and-explicit/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/dependency-both-topo-and-explicit/snapshots/task graph.jsonc similarity index 89% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/dependency-both-topo-and-explicit/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/dependency-both-topo-and-explicit/snapshots/task graph.jsonc index 31cccc61..ae123672 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/dependency-both-topo-and-explicit/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/dependency-both-topo-and-explicit/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/dependency-both-topo-and-explicit ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - ambiguous package name with transitive.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - ambiguous package name with transitive.snap index 3a695001..7fd2c448 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - ambiguous package name with transitive.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - ambiguous package name with transitive.snap @@ -1,11 +1 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: err_str.as_ref() -info: - args: - - run - - "-t" - - "@test/duplicate#build" -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names ---- -Package name '@test/duplicate' is ambiguous; found in multiple locations: /packages/pkg-a, /packages/pkg-b +Package name '@test/duplicate' is ambiguous; found in multiple locations: /packages/pkg-a, /packages/pkg-b \ No newline at end of file diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - ambiguous package name.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - ambiguous package name.snap index 05e375f0..7fd2c448 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - ambiguous package name.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - ambiguous package name.snap @@ -1,10 +1 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: err_str.as_ref() -info: - args: - - run - - "@test/duplicate#build" -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names ---- -Package name '@test/duplicate' is ambiguous; found in multiple locations: /packages/pkg-a, /packages/pkg-b +Package name '@test/duplicate' is ambiguous; found in multiple locations: /packages/pkg-a, /packages/pkg-b \ No newline at end of file diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - filter matches both duplicates.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - filter matches both duplicates.jsonc new file mode 100644 index 00000000..1554751d --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - filter matches both duplicates.jsonc @@ -0,0 +1,5 @@ +// run --filter @test/duplicate build +{ + "packages/pkg-a#build": [], + "packages/pkg-b#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - filter matches both duplicates.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - filter matches both duplicates.snap deleted file mode 100644 index 17b77c66..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/query - filter matches both duplicates.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/duplicate" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names ---- -{ - "packages/pkg-a#build": [], - "packages/pkg-b#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/task graph.jsonc similarity index 90% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/task graph.jsonc index e9a14127..2b1c82e4 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/duplicate-package-names ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/empty-package-test/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/empty-package-test/snapshots/task graph.jsonc similarity index 97% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/empty-package-test/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/empty-package-test/snapshots/task graph.jsonc index 9e49964c..726f2938 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/empty-package-test/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/empty-package-test/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/empty-package-test ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/explicit-deps-workspace/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/explicit-deps-workspace/snapshots/task graph.jsonc similarity index 98% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/explicit-deps-workspace/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/explicit-deps-workspace/snapshots/task graph.jsonc index aaeb7b1a..3d0fc433 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/explicit-deps-workspace/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/explicit-deps-workspace/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/explicit-deps-workspace ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/query - extra args only reach requested task.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/query - extra args only reach requested task.jsonc similarity index 95% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/query - extra args only reach requested task.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/query - extra args only reach requested task.jsonc index 55f40a0d..a6b86de0 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/query - extra args only reach requested task.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/query - extra args only reach requested task.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - test - - some-filter -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on ---- +// run test some-filter { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/task graph.jsonc similarity index 89% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/task graph.jsonc index 043c2812..a110c9d8 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/extra-args-not-forwarded-to-depends-on ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - cherry picked filters respect dependency order.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - cherry picked filters respect dependency order.jsonc new file mode 100644 index 00000000..e98fff7a --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - cherry picked filters respect dependency order.jsonc @@ -0,0 +1,7 @@ +// run --filter @test/app --filter @test/lib build +{ + "packages/app#build": [ + "packages/lib#build" + ], + "packages/lib#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - cherry picked filters respect dependency order.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - cherry picked filters respect dependency order.snap deleted file mode 100644 index 54be2e45..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - cherry picked filters respect dependency order.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/app" - - "--filter" - - "@test/lib" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build" - ], - "packages/lib#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - recursive flag.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude nonexistent package.jsonc similarity index 53% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - recursive flag.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude nonexistent package.jsonc index 6be57072..089c547e 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - recursive flag.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude nonexistent package.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-r" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- +// run --filter !nonexistent build { "packages/app#build": [ "packages/lib#build", diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude only filter.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude only filter.jsonc new file mode 100644 index 00000000..683d4282 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude only filter.jsonc @@ -0,0 +1,10 @@ +// run --filter !@test/core build +{ + "packages/app#build": [ + "packages/lib#build", + "packages/utils#build" + ], + "packages/cli#build": [], + "packages/lib#build": [], + "packages/utils#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude only filter.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude only filter.snap deleted file mode 100644 index 06b4dd87..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude only filter.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "!@test/core" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build", - "packages/utils#build" - ], - "packages/cli#build": [], - "packages/lib#build": [], - "packages/utils#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter both deps and dependents.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter both deps and dependents.jsonc new file mode 100644 index 00000000..224cf44e --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter both deps and dependents.jsonc @@ -0,0 +1,12 @@ +// run --filter ...@test/lib... build +{ + "packages/app#build": [ + "packages/lib#build", + "packages/utils#build" + ], + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ], + "packages/utils#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter both deps and dependents.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter both deps and dependents.snap deleted file mode 100644 index e88d60fd..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter both deps and dependents.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "...@test/lib..." - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build", - "packages/utils#build" - ], - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ], - "packages/utils#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependencies.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependencies.jsonc new file mode 100644 index 00000000..21f2f58d --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependencies.jsonc @@ -0,0 +1,12 @@ +// run --filter {./packages/app}... build +{ + "packages/app#build": [ + "packages/lib#build", + "packages/utils#build" + ], + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ], + "packages/utils#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependencies.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependencies.snap deleted file mode 100644 index 37be66f8..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependencies.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "{./packages/app}..." - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build", - "packages/utils#build" - ], - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ], - "packages/utils#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependents.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependents.jsonc new file mode 100644 index 00000000..b6fdd46e --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependents.jsonc @@ -0,0 +1,13 @@ +// run --filter ...{./packages/core} build +{ + "packages/app#build": [ + "packages/lib#build" + ], + "packages/cli#build": [ + "packages/core#build" + ], + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependents.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependents.snap deleted file mode 100644 index e0ac44d5..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path with dependents.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "...{./packages/core}" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build" - ], - "packages/cli#build": [ - "packages/core#build" - ], - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path.jsonc new file mode 100644 index 00000000..244e8e15 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path.jsonc @@ -0,0 +1,4 @@ +// run --filter {./packages/app} build +{ + "packages/app#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path.snap deleted file mode 100644 index 9e340f05..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by braced path.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "{./packages/app}" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by glob.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob double star.jsonc similarity index 51% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by glob.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob double star.jsonc index 8ede9303..f5aed689 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by glob.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob double star.jsonc @@ -1,14 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/*" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- +// run --filter ./packages/** build { "packages/app#build": [ "packages/lib#build", diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob double star.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob double star.snap deleted file mode 100644 index b803c2a0..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob double star.snap +++ /dev/null @@ -1,25 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "./packages/**" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build", - "packages/utils#build" - ], - "packages/cli#build": [ - "packages/core#build" - ], - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ], - "packages/utils#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob star.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob star.jsonc similarity index 50% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob star.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob star.jsonc index acb90629..8b5b1455 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob star.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory glob star.jsonc @@ -1,14 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "./packages/*" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- +// run --filter ./packages/* build { "packages/app#build": [ "packages/lib#build", diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory ignores trailing dots.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory ignores trailing dots.jsonc new file mode 100644 index 00000000..8280250b --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory ignores trailing dots.jsonc @@ -0,0 +1,4 @@ +// run --filter ./packages/app... build +{ + "packages/app#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory ignores trailing dots.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory ignores trailing dots.snap deleted file mode 100644 index c63ae72d..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory ignores trailing dots.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "./packages/app..." - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory.jsonc new file mode 100644 index 00000000..6b10d635 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory.jsonc @@ -0,0 +1,4 @@ +// run --filter ./packages/app build +{ + "packages/app#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory.snap deleted file mode 100644 index a7e2ac9e..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by directory.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "./packages/app" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by exact name.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by exact name.jsonc new file mode 100644 index 00000000..d99036e3 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by exact name.jsonc @@ -0,0 +1,4 @@ +// run --filter @test/app build +{ + "packages/app#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by exact name.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by exact name.snap deleted file mode 100644 index 39dd7de2..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by exact name.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/app" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude nonexistent package.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by glob.jsonc similarity index 50% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude nonexistent package.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by glob.jsonc index 40a0e659..cadfd601 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - exclude nonexistent package.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by glob.jsonc @@ -1,14 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "!nonexistent" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- +// run --filter @test/* build { "packages/app#build": [ "packages/lib#build", diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by name and directory intersection.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by name and directory intersection.jsonc new file mode 100644 index 00000000..de1ce0e2 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by name and directory intersection.jsonc @@ -0,0 +1,4 @@ +// run --filter @test/*{./packages/lib} build +{ + "packages/lib#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by name and directory intersection.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by name and directory intersection.snap deleted file mode 100644 index 169f4f04..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter by name and directory intersection.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/*{./packages/lib}" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/lib#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependencies only exclude self.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependencies only exclude self.jsonc new file mode 100644 index 00000000..5a72cc6f --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependencies only exclude self.jsonc @@ -0,0 +1,8 @@ +// run --filter @test/app^... build +{ + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ], + "packages/utils#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependencies only exclude self.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependencies only exclude self.snap deleted file mode 100644 index 1dd1570e..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependencies only exclude self.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/app^..." - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ], - "packages/utils#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependents only exclude self.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependents only exclude self.jsonc new file mode 100644 index 00000000..a075368e --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependents only exclude self.jsonc @@ -0,0 +1,8 @@ +// run --filter ...^@test/core build +{ + "packages/app#build": [ + "packages/lib#build" + ], + "packages/cli#build": [], + "packages/lib#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependents only exclude self.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependents only exclude self.snap deleted file mode 100644 index 885bc6bc..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dependents only exclude self.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "...^@test/core" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build" - ], - "packages/cli#build": [], - "packages/lib#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter deps skips packages without task.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter deps skips packages without task.jsonc new file mode 100644 index 00000000..e8ca7e93 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter deps skips packages without task.jsonc @@ -0,0 +1,10 @@ +// run --filter @test/app... test +{ + "packages/app#test": [ + "packages/lib#test" + ], + "packages/core#test": [], + "packages/lib#test": [ + "packages/core#test" + ] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter deps skips packages without task.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter deps skips packages without task.snap deleted file mode 100644 index 13639a07..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter deps skips packages without task.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/app..." - - test -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#test": [ - "packages/lib#test" - ], - "packages/core#test": [], - "packages/lib#test": [ - "packages/core#test" - ] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dot ignores trailing dots from package.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dot ignores trailing dots from package.jsonc new file mode 100644 index 00000000..8e7c2f02 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dot ignores trailing dots from package.jsonc @@ -0,0 +1,4 @@ +// run --filter .... build +{ + "packages/app#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dot ignores trailing dots from package.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dot ignores trailing dots from package.snap deleted file mode 100644 index af2acf36..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dot ignores trailing dots from package.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "...." - - build - cwd: packages/app -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dotdot ignores trailing dots.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dotdot ignores trailing dots.jsonc new file mode 100644 index 00000000..564da692 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dotdot ignores trailing dots.jsonc @@ -0,0 +1,4 @@ +// run --filter ..... build +{ + "packages/app#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dotdot ignores trailing dots.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dotdot ignores trailing dots.snap deleted file mode 100644 index cd3146c6..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter dotdot ignores trailing dots.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "....." - - build - cwd: packages/app/src -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter include and exclude.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter include and exclude.jsonc new file mode 100644 index 00000000..06a93da0 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter include and exclude.jsonc @@ -0,0 +1,10 @@ +// run --filter @test/app... --filter !@test/utils build +{ + "packages/app#build": [ + "packages/lib#build" + ], + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter include and exclude.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter include and exclude.snap deleted file mode 100644 index f987328b..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter include and exclude.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/app..." - - "--filter" - - "!@test/utils" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build" - ], - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter space-separated in single value.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter space-separated in single value.jsonc new file mode 100644 index 00000000..157c606a --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter space-separated in single value.jsonc @@ -0,0 +1,5 @@ +// run --filter @test/app @test/cli build +{ + "packages/app#build": [], + "packages/cli#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter space-separated in single value.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter space-separated in single value.snap deleted file mode 100644 index 2827cc22..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter space-separated in single value.snap +++ /dev/null @@ -1,15 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/app @test/cli" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [], - "packages/cli#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependencies.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependencies.jsonc new file mode 100644 index 00000000..696f04cb --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependencies.jsonc @@ -0,0 +1,12 @@ +// run --filter @test/app... build +{ + "packages/app#build": [ + "packages/lib#build", + "packages/utils#build" + ], + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ], + "packages/utils#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependencies.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependencies.snap deleted file mode 100644 index 8e0d9be8..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependencies.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/app..." - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build", - "packages/utils#build" - ], - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ], - "packages/utils#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependents.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependents.jsonc new file mode 100644 index 00000000..6a0f9a9e --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependents.jsonc @@ -0,0 +1,13 @@ +// run --filter ...@test/core build +{ + "packages/app#build": [ + "packages/lib#build" + ], + "packages/cli#build": [ + "packages/core#build" + ], + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependents.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependents.snap deleted file mode 100644 index 5576ed45..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - filter with dependents.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "...@test/core" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build" - ], - "packages/cli#build": [ - "packages/core#build" - ], - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - mixed traversal filters.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - mixed traversal filters.jsonc new file mode 100644 index 00000000..ad86411c --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - mixed traversal filters.jsonc @@ -0,0 +1,10 @@ +// run --filter @test/lib... --filter @test/cli build +{ + "packages/cli#build": [ + "packages/core#build" + ], + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - mixed traversal filters.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - mixed traversal filters.snap deleted file mode 100644 index a8cecdcc..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - mixed traversal filters.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/lib..." - - "--filter" - - "@test/cli" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/cli#build": [ - "packages/core#build" - ], - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple exclusion-only filters.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple exclusion-only filters.jsonc new file mode 100644 index 00000000..1f8eb79a --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple exclusion-only filters.jsonc @@ -0,0 +1,6 @@ +// run --filter !@test/app --filter !@test/core build +{ + "packages/cli#build": [], + "packages/lib#build": [], + "packages/utils#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple exclusion-only filters.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple exclusion-only filters.snap deleted file mode 100644 index 639f2b2f..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple exclusion-only filters.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "!@test/app" - - "--filter" - - "!@test/core" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/cli#build": [], - "packages/lib#build": [], - "packages/utils#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple filters union.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple filters union.jsonc new file mode 100644 index 00000000..46bf271f --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple filters union.jsonc @@ -0,0 +1,5 @@ +// run --filter @test/app --filter @test/cli build +{ + "packages/app#build": [], + "packages/cli#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple filters union.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple filters union.snap deleted file mode 100644 index 64f5f14c..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - multiple filters union.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/app" - - "--filter" - - "@test/cli" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [], - "packages/cli#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - nested vt run with filter in script.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - nested vt run with filter in script.jsonc new file mode 100644 index 00000000..b9254537 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - nested vt run with filter in script.jsonc @@ -0,0 +1,11 @@ +// run --filter @test/app deploy +{ + "packages/app#deploy": { + "items": [ + { + "packages/app#build": [] + } + ], + "neighbors": [] + } +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - nested vt run with filter in script.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - nested vt run with filter in script.snap deleted file mode 100644 index b05cd427..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - nested vt run with filter in script.snap +++ /dev/null @@ -1,21 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/app" - - deploy -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#deploy": { - "items": [ - { - "packages/app#build": [] - } - ], - "neighbors": [] - } -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - recursive flag.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - recursive flag.jsonc new file mode 100644 index 00000000..62a997a6 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - recursive flag.jsonc @@ -0,0 +1,15 @@ +// run -r build +{ + "packages/app#build": [ + "packages/lib#build", + "packages/utils#build" + ], + "packages/cli#build": [ + "packages/core#build" + ], + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ], + "packages/utils#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag from package subfolder.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag from package subfolder.jsonc new file mode 100644 index 00000000..902370b8 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag from package subfolder.jsonc @@ -0,0 +1,12 @@ +// run -t build +{ + "packages/app#build": [ + "packages/lib#build", + "packages/utils#build" + ], + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ], + "packages/utils#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag from package subfolder.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag from package subfolder.snap deleted file mode 100644 index fa64212e..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag from package subfolder.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-t" - - build - cwd: packages/app/src/components -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build", - "packages/utils#build" - ], - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ], - "packages/utils#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag.jsonc new file mode 100644 index 00000000..902370b8 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag.jsonc @@ -0,0 +1,12 @@ +// run -t build +{ + "packages/app#build": [ + "packages/lib#build", + "packages/utils#build" + ], + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ], + "packages/utils#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag.snap deleted file mode 100644 index cc10050d..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive flag.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-t" - - build - cwd: packages/app -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build", - "packages/utils#build" - ], - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ], - "packages/utils#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive with package specifier.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive with package specifier.jsonc new file mode 100644 index 00000000..4c95ed76 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive with package specifier.jsonc @@ -0,0 +1,12 @@ +// run -t @test/app#build +{ + "packages/app#build": [ + "packages/lib#build", + "packages/utils#build" + ], + "packages/core#build": [], + "packages/lib#build": [ + "packages/core#build" + ], + "packages/utils#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive with package specifier.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive with package specifier.snap deleted file mode 100644 index 3adf1aa0..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - transitive with package specifier.snap +++ /dev/null @@ -1,21 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-t" - - "@test/app#build" -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "packages/app#build": [ - "packages/lib#build", - "packages/utils#build" - ], - "packages/core#build": [], - "packages/lib#build": [ - "packages/core#build" - ], - "packages/utils#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root flag.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root flag.jsonc new file mode 100644 index 00000000..2abe93c6 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root flag.jsonc @@ -0,0 +1,4 @@ +// run -w check +{ + "#check": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root flag.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root flag.snap deleted file mode 100644 index 34faca5c..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root flag.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-w" - - check -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "#check": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with filter.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with filter.jsonc new file mode 100644 index 00000000..b7a8bd03 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with filter.jsonc @@ -0,0 +1,5 @@ +// run -w --filter @test/app check +{ + "#check": [], + "packages/app#check": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with filter.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with filter.snap deleted file mode 100644 index 018a3ded..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with filter.snap +++ /dev/null @@ -1,16 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-w" - - "--filter" - - "@test/app" - - check -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "#check": [], - "packages/app#check": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with recursive.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with recursive.jsonc new file mode 100644 index 00000000..c50f78a9 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with recursive.jsonc @@ -0,0 +1,10 @@ +// run -w -r check +{ + "#check": [ + "packages/core#check" + ], + "packages/app#check": [ + "packages/core#check" + ], + "packages/core#check": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with recursive.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with recursive.snap deleted file mode 100644 index 21418d25..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with recursive.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-w" - - "-r" - - check -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "#check": [ - "packages/core#check" - ], - "packages/app#check": [ - "packages/core#check" - ], - "packages/core#check": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with transitive.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with transitive.jsonc new file mode 100644 index 00000000..cf14f114 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with transitive.jsonc @@ -0,0 +1,7 @@ +// run -w -t check +{ + "#check": [ + "packages/core#check" + ], + "packages/core#check": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with transitive.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with transitive.snap deleted file mode 100644 index 9c5d27da..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/query - workspace root with transitive.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-w" - - "-t" - - check -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- -{ - "#check": [ - "packages/core#check" - ], - "packages/core#check": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/task graph.jsonc similarity index 98% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/task graph.jsonc index 3634acb5..13011495 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/filter-workspace ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/input-trailing-slash/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/input-trailing-slash/snapshots/task graph.jsonc similarity index 82% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/input-trailing-slash/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/input-trailing-slash/snapshots/task graph.jsonc index 24dff9ab..a793212e 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/input-trailing-slash/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/input-trailing-slash/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/input-trailing-slash ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/input-workspace-base/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/input-workspace-base/snapshots/task graph.jsonc similarity index 84% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/input-workspace-base/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/input-workspace-base/snapshots/task graph.jsonc index 3d2cb5bf..03b8005d 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/input-workspace-base/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/input-workspace-base/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/input-workspace-base ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --cache enables inner task caching.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --cache enables inner task caching.jsonc similarity index 95% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --cache enables inner task caching.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --cache enables inner task caching.jsonc index 541fc3df..e1b6e4bb 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --cache enables inner task caching.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --cache enables inner task caching.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - outer-cache -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override ---- +// run outer-cache { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --no-cache disables inner task caching.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --no-cache disables inner task caching.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --no-cache disables inner task caching.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --no-cache disables inner task caching.jsonc index aed12a13..c6406c29 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --no-cache disables inner task caching.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested --no-cache disables inner task caching.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - outer-no-cache -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override ---- +// run outer-no-cache { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested run without flags inherits parent cache.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested run without flags inherits parent cache.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested run without flags inherits parent cache.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested run without flags inherits parent cache.jsonc index 626ebf28..0dbc2692 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested run without flags inherits parent cache.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - nested run without flags inherits parent cache.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - outer-inherit -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override ---- +// run outer-inherit { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --cache propagates to nested run without flags.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --cache propagates to nested run without flags.jsonc similarity index 95% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --cache propagates to nested run without flags.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --cache propagates to nested run without flags.jsonc index 987a8c07..d3ba94f6 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --cache propagates to nested run without flags.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --cache propagates to nested run without flags.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "--cache" - - outer-inherit -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override ---- +// run --cache outer-inherit { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache does not propagate into nested --cache.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache does not propagate into nested --cache.jsonc similarity index 95% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache does not propagate into nested --cache.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache does not propagate into nested --cache.jsonc index 156ff02f..bfd03358 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache does not propagate into nested --cache.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache does not propagate into nested --cache.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "--no-cache" - - outer-cache -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override ---- +// run --no-cache outer-cache { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache propagates to nested run without flags.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache propagates to nested run without flags.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache propagates to nested run without flags.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache propagates to nested run without flags.jsonc index c29e017d..f2df25d2 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache propagates to nested run without flags.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/query - outer --no-cache propagates to nested run without flags.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "--no-cache" - - outer-inherit -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override ---- +// run --no-cache outer-inherit { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/task graph.jsonc similarity index 94% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/task graph.jsonc index ebcd664d..269edec0 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-cache-override ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/query - nested vt run.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/query - nested vt run.jsonc new file mode 100644 index 00000000..0bf2dfab --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/query - nested vt run.jsonc @@ -0,0 +1,11 @@ +// run script2 +{ + "#script2": { + "items": [ + { + "#script1": [] + } + ], + "neighbors": [] + } +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/query - nested vt run.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/query - nested vt run.snap deleted file mode 100644 index 2caf27bc..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/query - nested vt run.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - script2 -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks ---- -{ - "#script2": { - "items": [ - { - "#script1": [] - } - ], - "neighbors": [] - } -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/task graph.jsonc similarity index 90% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/task graph.jsonc index 01cd79f5..8492756a 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/nested-tasks ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - build in self-referential package.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - build in self-referential package.jsonc new file mode 100644 index 00000000..546ba723 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - build in self-referential package.jsonc @@ -0,0 +1,4 @@ +// run build +{ + "packages/self-dep#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - build in self-referential package.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - build in self-referential package.snap deleted file mode 100644 index fd0c9e54..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - build in self-referential package.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - build - cwd: packages/self-dep -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency ---- -{ - "packages/self-dep#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - recursive build across workspace.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - recursive build across workspace.jsonc new file mode 100644 index 00000000..5f46d07d --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - recursive build across workspace.jsonc @@ -0,0 +1,4 @@ +// run -r build +{ + "packages/self-dep#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - recursive build across workspace.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - recursive build across workspace.snap deleted file mode 100644 index 4021dcd7..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/query - recursive build across workspace.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-r" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency ---- -{ - "packages/self-dep#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/task graph.jsonc similarity index 82% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/task graph.jsonc index 253579bb..837fc00b 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/package-self-dependency ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - baseline recursive build.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - baseline recursive build.jsonc new file mode 100644 index 00000000..1a874cc4 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - baseline recursive build.jsonc @@ -0,0 +1,11 @@ +// run -r build +{ + "#build": [], + "packages/a#build": [ + "packages/b#build" + ], + "packages/b#build": [ + "packages/c#build" + ], + "packages/c#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - baseline recursive build.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - baseline recursive build.snap deleted file mode 100644 index 70c370c3..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - baseline recursive build.snap +++ /dev/null @@ -1,20 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-r" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency ---- -{ - "#build": [], - "packages/a#build": [ - "packages/b#build" - ], - "packages/b#build": [ - "packages/c#build" - ], - "packages/c#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - cli flag overrides env var.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - cli flag overrides env var.jsonc similarity index 93% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - cli flag overrides env var.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - cli flag overrides env var.jsonc index 052cc154..15ec91af 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - cli flag overrides env var.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - cli flag overrides env var.jsonc @@ -1,15 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "-r" - - "--concurrency-limit" - - "3" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency ---- +// run -r --concurrency-limit 3 build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - concurrency-limit with explicit value.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - concurrency-limit with explicit value.jsonc similarity index 93% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - concurrency-limit with explicit value.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - concurrency-limit with explicit value.jsonc index a33bbd36..d4cde4cb 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - concurrency-limit with explicit value.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - concurrency-limit with explicit value.jsonc @@ -1,15 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "-r" - - "--concurrency-limit" - - "5" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency ---- +// run -r --concurrency-limit 5 build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - env var sets concurrency.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - env var sets concurrency.jsonc similarity index 94% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - env var sets concurrency.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - env var sets concurrency.jsonc index db02c515..461648de 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - env var sets concurrency.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - env var sets concurrency.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "-r" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency ---- +// run -r build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - nested with explicit concurrency-limit.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - nested with explicit concurrency-limit.jsonc similarity index 96% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - nested with explicit concurrency-limit.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - nested with explicit concurrency-limit.jsonc index a786312f..f8767975 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - nested with explicit concurrency-limit.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - nested with explicit concurrency-limit.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - build-with-concurrency -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency ---- +// run build-with-concurrency { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel discards edges.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel discards edges.jsonc new file mode 100644 index 00000000..f0a3f1b1 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel discards edges.jsonc @@ -0,0 +1,7 @@ +// run -r --parallel build +{ + "#build": [], + "packages/a#build": [], + "packages/b#build": [], + "packages/c#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel discards edges.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel discards edges.snap deleted file mode 100644 index 71abf02d..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel discards edges.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-r" - - "--parallel" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency ---- -{ - "#build": [], - "packages/a#build": [], - "packages/b#build": [], - "packages/c#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel only affects current level.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel only affects current level.jsonc similarity index 51% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel only affects current level.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel only affects current level.jsonc index bb9d06db..6a348e03 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel only affects current level.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel only affects current level.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--parallel" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency ---- +// run --parallel build { "#build": { "items": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel with concurrency-limit.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel with concurrency-limit.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel with concurrency-limit.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel with concurrency-limit.jsonc index 7d856058..59edd6ea 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel with concurrency-limit.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel with concurrency-limit.jsonc @@ -1,16 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "-r" - - "--parallel" - - "--concurrency-limit" - - "3" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency ---- +// run -r --parallel --concurrency-limit 3 build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel without concurrency-limit.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel without concurrency-limit.jsonc similarity index 93% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel without concurrency-limit.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel without concurrency-limit.jsonc index 55c94875..e5f3d271 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel without concurrency-limit.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/query - parallel without concurrency-limit.jsonc @@ -1,14 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - "-r" - - "--parallel" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency ---- +// run -r --parallel build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/task graph.jsonc similarity index 95% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/task graph.jsonc index 768246a6..5c4ce9eb 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/parallel-and-concurrency ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/query - allow `packages` in pnpm-workspace.yaml to be optional.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/query - allow `packages` in pnpm-workspace.yaml to be optional.jsonc new file mode 100644 index 00000000..9b471830 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/query - allow `packages` in pnpm-workspace.yaml to be optional.jsonc @@ -0,0 +1,4 @@ +// run hello +{ + "#hello": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/query - allow `packages` in pnpm-workspace.yaml to be optional.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/query - allow `packages` in pnpm-workspace.yaml to be optional.snap deleted file mode 100644 index 64abe11b..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/query - allow `packages` in pnpm-workspace.yaml to be optional.snap +++ /dev/null @@ -1,12 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - hello -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional ---- -{ - "#hello": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/task graph.jsonc similarity index 80% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/task graph.jsonc index 78a6b146..8c09f955 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/pnpm-workspace-packages-optional ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/recursive-topological-workspace/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/recursive-topological-workspace/snapshots/task graph.jsonc similarity index 97% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/recursive-topological-workspace/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/recursive-topological-workspace/snapshots/task graph.jsonc index 4ffca3de..49781abe 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/recursive-topological-workspace/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/recursive-topological-workspace/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/recursive-topological-workspace ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-conflict/snapshots/task graph load error.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-conflict/snapshots/task graph load error.snap index 4a7c6cd6..e756b946 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-conflict/snapshots/task graph load error.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-conflict/snapshots/task graph load error.snap @@ -1,6 +1 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: err_str.as_ref() -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-conflict ---- -Task @test/script-conflict#build conflicts with a package.json script of the same name. Remove the script from package.json or rename the task +Task @test/script-conflict#build conflicts with a package.json script of the same name. Remove the script from package.json or rename the task \ No newline at end of file diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/query - test runs without hooks when disabled.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/query - test runs without hooks when disabled.jsonc similarity index 83% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/query - test runs without hooks when disabled.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/query - test runs without hooks when disabled.jsonc index 173cfbf0..0e523757 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/query - test runs without hooks when disabled.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/query - test runs without hooks when disabled.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - test -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled ---- +// run test { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/task graph.jsonc similarity index 93% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/task graph.jsonc index 1f90c544..43f2ac98 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-disabled ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/query - prescriptInHook runs when scriptInHook is called from a hook.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/query - prescriptInHook runs when scriptInHook is called from a hook.jsonc similarity index 95% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/query - prescriptInHook runs when scriptInHook is called from a hook.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/query - prescriptInHook runs when scriptInHook is called from a hook.jsonc index 3627717f..f4da57c8 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/query - prescriptInHook runs when scriptInHook is called from a hook.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/query - prescriptInHook runs when scriptInHook is called from a hook.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - test -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run ---- +// run test { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/task graph.jsonc similarity index 94% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/task graph.jsonc index b4bfbae6..b7db1210 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-nested-run ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/query - task config test does not expand pretest hook.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/query - task config test does not expand pretest hook.jsonc similarity index 83% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/query - task config test does not expand pretest hook.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/query - task config test does not expand pretest hook.jsonc index 8c4c1322..4bbabc55 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/query - task config test does not expand pretest hook.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/query - task config test does not expand pretest hook.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - test -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook ---- +// run test { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/task graph.jsonc similarity index 89% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/task graph.jsonc index 7d9b0080..a70ddee4 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks-task-no-hook ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - build runs with pre hook only.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - build runs with pre hook only.jsonc similarity index 90% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - build runs with pre hook only.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - build runs with pre hook only.jsonc index b3e378f8..fbd1810b 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - build runs with pre hook only.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - build runs with pre hook only.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks ---- +// run build { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - extra args not passed to hooks.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - extra args not passed to hooks.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - extra args not passed to hooks.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - extra args not passed to hooks.jsonc index b3592131..e36faefb 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - extra args not passed to hooks.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - extra args not passed to hooks.jsonc @@ -1,13 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - test - - "--coverage" -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks ---- +// run test --coverage { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - pretest directly expands prepretest but not when called as hook.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - pretest directly expands prepretest but not when called as hook.jsonc similarity index 90% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - pretest directly expands prepretest but not when called as hook.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - pretest directly expands prepretest but not when called as hook.jsonc index d6caa487..289d95d1 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - pretest directly expands prepretest but not when called as hook.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - pretest directly expands prepretest but not when called as hook.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - pretest -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks ---- +// run pretest { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - test runs with pre and post hooks.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - test runs with pre and post hooks.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - test runs with pre and post hooks.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - test runs with pre and post hooks.jsonc index 8c59d369..79d4dadd 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - test runs with pre and post hooks.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/query - test runs with pre and post hooks.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - test -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks ---- +// run test { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/task graph.jsonc similarity index 96% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/task graph.jsonc index 837bd23b..bb5913bb 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/script-hooks ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/query - shell fallback for pipe command.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/query - shell fallback for pipe command.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/query - shell fallback for pipe command.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/query - shell fallback for pipe command.jsonc index b0496247..738582f7 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/query - shell fallback for pipe command.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/query - shell fallback for pipe command.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - pipe-test -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback ---- +// run pipe-test { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/task graph.jsonc similarity index 82% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/task graph.jsonc index 00f9833e..c0d1aba3 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/shell-fallback ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - parent cache false does not affect expanded query tasks.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - parent cache false does not affect expanded query tasks.jsonc similarity index 95% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - parent cache false does not affect expanded query tasks.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - parent cache false does not affect expanded query tasks.jsonc index 7dc94216..06e4fc59 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - parent cache false does not affect expanded query tasks.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - parent cache false does not affect expanded query tasks.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - run-build-no-cache -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled ---- +// run run-build-no-cache { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script cache false does not affect expanded synthetic cache.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script cache false does not affect expanded synthetic cache.jsonc similarity index 95% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script cache false does not affect expanded synthetic cache.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script cache false does not affect expanded synthetic cache.jsonc index 5b5acfec..a6bbadea 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script cache false does not affect expanded synthetic cache.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script cache false does not affect expanded synthetic cache.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - run-build-cache-false -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled ---- +// run run-build-cache-false { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script without cache.scripts defaults to no cache.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script without cache.scripts defaults to no cache.jsonc similarity index 86% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script without cache.scripts defaults to no cache.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script without cache.scripts defaults to no cache.jsonc index 13285719..c976fc3b 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script without cache.scripts defaults to no cache.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - script without cache.scripts defaults to no cache.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - lint -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled ---- +// run lint { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task untrackedEnv inherited by synthetic.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task untrackedEnv inherited by synthetic.jsonc similarity index 91% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task untrackedEnv inherited by synthetic.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task untrackedEnv inherited by synthetic.jsonc index cea7eaa8..b36b29e2 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task untrackedEnv inherited by synthetic.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task untrackedEnv inherited by synthetic.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - lint-with-untracked-env -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled ---- +// run lint-with-untracked-env { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache false disables synthetic cache.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache false disables synthetic cache.jsonc similarity index 86% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache false disables synthetic cache.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache false disables synthetic cache.jsonc index 1b9647c6..851b5c94 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache false disables synthetic cache.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache false disables synthetic cache.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - lint-no-cache -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled ---- +// run lint-no-cache { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache true enables synthetic cache.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache true enables synthetic cache.jsonc similarity index 91% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache true enables synthetic cache.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache true enables synthetic cache.jsonc index 0aabadb4..c3e7c5ff 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache true enables synthetic cache.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/query - task with cache true enables synthetic cache.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - lint-with-cache -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled ---- +// run lint-with-cache { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/task graph.jsonc similarity index 96% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/task graph.jsonc index 20f204e5..b1cfddc1 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-cache-disabled ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/query - synthetic-in-subpackage.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/query - synthetic-in-subpackage.jsonc similarity index 95% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/query - synthetic-in-subpackage.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/query - synthetic-in-subpackage.jsonc index f387431f..2c60292b 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/query - synthetic-in-subpackage.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/query - synthetic-in-subpackage.jsonc @@ -1,12 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&plan_json" -info: - args: - - run - - lint -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage ---- +// run lint { "graph": [ { diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/task graph.jsonc similarity index 89% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/task graph.jsonc index ebe0e7fd..554d3ab0 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic-in-subpackage ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter entry lacks task dependency has it.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter entry lacks task dependency has it.jsonc new file mode 100644 index 00000000..c74c50d2 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter entry lacks task dependency has it.jsonc @@ -0,0 +1,4 @@ +// run --filter @test/middle... build +{ + "packages/bottom#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter entry lacks task dependency has it.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter entry lacks task dependency has it.snap deleted file mode 100644 index ebd35c8c..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter entry lacks task dependency has it.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/middle..." - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate ---- -{ - "packages/bottom#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter intermediate lacks task is skipped.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter intermediate lacks task is skipped.jsonc new file mode 100644 index 00000000..4949faeb --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter intermediate lacks task is skipped.jsonc @@ -0,0 +1,7 @@ +// run --filter @test/top... build +{ + "packages/bottom#build": [], + "packages/top#build": [ + "packages/bottom#build" + ] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter intermediate lacks task is skipped.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter intermediate lacks task is skipped.snap deleted file mode 100644 index 384b5b11..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - filter intermediate lacks task is skipped.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "--filter" - - "@test/top..." - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate ---- -{ - "packages/bottom#build": [], - "packages/top#build": [ - "packages/bottom#build" - ] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive build skips intermediate without task.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive build skips intermediate without task.jsonc new file mode 100644 index 00000000..b740f0e2 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive build skips intermediate without task.jsonc @@ -0,0 +1,7 @@ +// run -t build +{ + "packages/bottom#build": [], + "packages/top#build": [ + "packages/bottom#build" + ] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive build skips intermediate without task.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive build skips intermediate without task.snap deleted file mode 100644 index 396cec4e..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive build skips intermediate without task.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-t" - - build - cwd: packages/top -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate ---- -{ - "packages/bottom#build": [], - "packages/top#build": [ - "packages/bottom#build" - ] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive from package without task.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive from package without task.jsonc new file mode 100644 index 00000000..6a8fb1dc --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive from package without task.jsonc @@ -0,0 +1,4 @@ +// run -t build +{ + "packages/bottom#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive from package without task.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive from package without task.snap deleted file mode 100644 index 6dd0d91b..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive from package without task.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-t" - - build - cwd: packages/middle -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate ---- -{ - "packages/bottom#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive with package specifier lacking task.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive with package specifier lacking task.jsonc new file mode 100644 index 00000000..c980c2aa --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive with package specifier lacking task.jsonc @@ -0,0 +1,4 @@ +// run -t @test/middle#build +{ + "packages/bottom#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive with package specifier lacking task.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive with package specifier lacking task.snap deleted file mode 100644 index 0c93f028..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/query - transitive with package specifier lacking task.snap +++ /dev/null @@ -1,13 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-t" - - "@test/middle#build" -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate ---- -{ - "packages/bottom#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/task graph.jsonc similarity index 93% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/task graph.jsonc index f28fdf84..23a84412 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/transitive-skip-intermediate ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/query - vpr expands to vt run.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/query - vpr expands to vt run.jsonc new file mode 100644 index 00000000..374ab860 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/query - vpr expands to vt run.jsonc @@ -0,0 +1,11 @@ +// run all +{ + "#all": { + "items": [ + { + "#build": [] + } + ], + "neighbors": [] + } +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/query - vpr expands to vt run.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/query - vpr expands to vt run.snap deleted file mode 100644 index f248f957..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/query - vpr expands to vt run.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - all -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand ---- -{ - "#all": { - "items": [ - { - "#build": [] - } - ], - "neighbors": [] - } -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/task graph.jsonc similarity index 90% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/task graph.jsonc index 83a7535b..0ae0ad7d 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/vpr-shorthand ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/query - cd changes cwd so skip rule does not fire.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/query - cd changes cwd so skip rule does not fire.jsonc new file mode 100644 index 00000000..3e7514e7 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/query - cd changes cwd so skip rule does not fire.jsonc @@ -0,0 +1,11 @@ +// run deploy +{ + "#deploy": { + "items": [ + { + "packages/a#deploy": [] + } + ], + "neighbors": [] + } +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/query - cd changes cwd so skip rule does not fire.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/query - cd changes cwd so skip rule does not fire.snap deleted file mode 100644 index e3e3e0e2..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/query - cd changes cwd so skip rule does not fire.snap +++ /dev/null @@ -1,19 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - deploy -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip ---- -{ - "#deploy": { - "items": [ - { - "packages/a#deploy": [] - } - ], - "neighbors": [] - } -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/task graph.jsonc similarity index 89% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/task graph.jsonc index 2b797265..5a9820d5 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-cd-no-skip ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/query - depends on through passthrough.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/query - depends on through passthrough.jsonc new file mode 100644 index 00000000..1c48367c --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/query - depends on through passthrough.jsonc @@ -0,0 +1,8 @@ +// run -r build +{ + "#build": [ + "#lint" + ], + "#lint": [], + "packages/a#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/query - depends on through passthrough.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/query - depends on through passthrough.snap deleted file mode 100644 index 5a399f4d..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/query - depends on through passthrough.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-r" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough ---- -{ - "#build": [ - "#lint" - ], - "#lint": [], - "packages/a#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/task graph.jsonc similarity index 94% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/task graph.jsonc index 2b2df2a9..68302384 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-depends-on-passthrough ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/query - multi command skips recursive part.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/query - multi command skips recursive part.jsonc new file mode 100644 index 00000000..19421f4d --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/query - multi command skips recursive part.jsonc @@ -0,0 +1,5 @@ +// run -r build +{ + "#build": [], + "packages/a#build": [] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/query - multi command skips recursive part.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/query - multi command skips recursive part.snap deleted file mode 100644 index cc995ad3..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/query - multi command skips recursive part.snap +++ /dev/null @@ -1,14 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-r" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command ---- -{ - "#build": [], - "packages/a#build": [] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/task graph.jsonc similarity index 89% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/task graph.jsonc index ad3d26a1..1cd3ba45 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-multi-command ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion/snapshots/query - mutual recursion error.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion/snapshots/query - mutual recursion error.snap index ea18f6a9..2c40ba38 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion/snapshots/query - mutual recursion error.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion/snapshots/query - mutual recursion error.snap @@ -1,11 +1 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: err_str.as_ref() -info: - args: - - run - - "-r" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion ---- -Failed to plan tasks from `vt run -r test` in task test-workspace#build: Failed to plan tasks from `vt run -r build` in task test-workspace#test: Detected a recursion in task call stack: the last frame calls the 1th frame +Failed to plan tasks from `vt run -r test` in task test-workspace#build: Failed to plan tasks from `vt run -r build` in task test-workspace#test: Detected a recursion in task call stack: the last frame calls the 1th frame \ No newline at end of file diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion/snapshots/task graph.jsonc similarity index 94% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion/snapshots/task graph.jsonc index 56f5e1d1..1e0d1452 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-mutual-recursion ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-no-package-json/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-no-package-json/snapshots/task graph.jsonc similarity index 89% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-no-package-json/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-no-package-json/snapshots/task graph.jsonc index 9a47bc01..56576d86 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-no-package-json/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-no-package-json/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-no-package-json ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root expands without self.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root expands without self.jsonc new file mode 100644 index 00000000..4d238d7a --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root expands without self.jsonc @@ -0,0 +1,14 @@ +// run build +{ + "#build": { + "items": [ + { + "packages/a#build": [], + "packages/b#build": [ + "packages/a#build" + ] + } + ], + "neighbors": [] + } +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root expands without self.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root expands without self.snap deleted file mode 100644 index 6a5f1a90..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root expands without self.snap +++ /dev/null @@ -1,22 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference ---- -{ - "#build": { - "items": [ - { - "packages/a#build": [], - "packages/b#build": [ - "packages/a#build" - ] - } - ], - "neighbors": [] - } -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root with extra arg expands without self.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root with extra arg expands without self.jsonc new file mode 100644 index 00000000..ec5c1a18 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root with extra arg expands without self.jsonc @@ -0,0 +1,14 @@ +// run build extra_arg +{ + "#build": { + "items": [ + { + "packages/a#build": [], + "packages/b#build": [ + "packages/a#build" + ] + } + ], + "neighbors": [] + } +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root with extra arg expands without self.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root with extra arg expands without self.snap deleted file mode 100644 index 9009d2c5..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - build from root with extra arg expands without self.snap +++ /dev/null @@ -1,23 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - build - - extra_arg -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference ---- -{ - "#build": { - "items": [ - { - "packages/a#build": [], - "packages/b#build": [ - "packages/a#build" - ] - } - ], - "neighbors": [] - } -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build skips self.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build skips self.jsonc new file mode 100644 index 00000000..f6fc6fae --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build skips self.jsonc @@ -0,0 +1,8 @@ +// run -r build +{ + "#build": [], + "packages/a#build": [], + "packages/b#build": [ + "packages/a#build" + ] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build skips self.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build skips self.snap deleted file mode 100644 index 0a7ad813..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build skips self.snap +++ /dev/null @@ -1,17 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-r" - - build -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference ---- -{ - "#build": [], - "packages/a#build": [], - "packages/b#build": [ - "packages/a#build" - ] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build with extra arg skips self.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build with extra arg skips self.jsonc new file mode 100644 index 00000000..6e7b2c90 --- /dev/null +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build with extra arg skips self.jsonc @@ -0,0 +1,8 @@ +// run -r build extra_arg +{ + "#build": [], + "packages/a#build": [], + "packages/b#build": [ + "packages/a#build" + ] +} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build with extra arg skips self.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build with extra arg skips self.snap deleted file mode 100644 index 38205f59..00000000 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/query - recursive build with extra arg skips self.snap +++ /dev/null @@ -1,18 +0,0 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: "&compact_plan" -info: - args: - - run - - "-r" - - build - - extra_arg -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference ---- -{ - "#build": [], - "packages/a#build": [], - "packages/b#build": [ - "packages/a#build" - ] -} diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/task graph.snap b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/task graph.jsonc similarity index 92% rename from crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/task graph.snap rename to crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/task graph.jsonc index 74c8e04e..0b4cbfe8 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/task graph.snap +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference/snapshots/task graph.jsonc @@ -1,8 +1,4 @@ ---- -source: crates/vite_task_plan/tests/plan_snapshots/main.rs -expression: task_graph_json -input_file: crates/vite_task_plan/tests/plan_snapshots/fixtures/workspace-root-self-reference ---- +// task graph [ { "key": [ diff --git a/crates/vite_task_plan/tests/plan_snapshots/main.rs b/crates/vite_task_plan/tests/plan_snapshots/main.rs index 6def5251..5af5ae85 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/main.rs +++ b/crates/vite_task_plan/tests/plan_snapshots/main.rs @@ -111,23 +111,20 @@ impl CompactPlan { } } -#[expect(clippy::disallowed_types, reason = "Path required by insta::glob! callback signature")] -fn run_case(runtime: &Runtime, tmpdir: &AbsolutePath, fixture_path: &std::path::Path) { +#[expect(clippy::disallowed_types, reason = "Path required for fixture path handling")] +fn run_case( + runtime: &Runtime, + tmpdir: &AbsolutePath, + fixture_path: &std::path::Path, +) -> Result<(), String> { let fixture_name = fixture_path.file_name().unwrap().to_str().unwrap(); - - // Configure insta to write snapshots to fixture directory - let mut settings = insta::Settings::clone_current(); - settings.set_snapshot_path(fixture_path.join("snapshots")); - settings.set_prepend_module_to_snapshot(false); - settings.remove_snapshot_suffix(); - settings.set_input_file(fixture_path); - - settings.bind(|| run_case_inner(runtime, tmpdir, fixture_path, fixture_name)); + let snapshots = snapshot_test::Snapshots::new(fixture_path.join("snapshots")); + run_case_inner(runtime, tmpdir, fixture_path, fixture_name, &snapshots) } #[expect( clippy::disallowed_types, - reason = "Path required by insta::glob! callback; String required by std::fs::read and toml::from_slice" + reason = "Path required for fixture handling; String required by std::fs::read and toml::from_slice" )] #[expect(clippy::too_many_lines, reason = "test setup and assertion logic in a single function")] fn run_case_inner( @@ -135,7 +132,8 @@ fn run_case_inner( tmpdir: &AbsolutePath, fixture_path: &std::path::Path, fixture_name: &str, -) { + snapshots: &snapshot_test::Snapshots, +) -> Result<(), String> { // Copy the case directory to a temporary directory to avoid discovering workspace outside of the test case. let stage_path = tmpdir.join(fixture_name); copy_dir(fixture_path, &stage_path).unwrap(); @@ -184,33 +182,25 @@ fn run_case_inner( let err_str = err_formatted.as_str().cow_replace(workspace_root_str, ""); let err_str = if cfg!(windows) { err_str.as_ref().cow_replace('\\', "/") } else { err_str }; - #[expect( - clippy::disallowed_macros, - reason = "insta::assert_snapshot! internally uses std::format!" - )] - { - insta::assert_snapshot!("task graph load error", err_str.as_ref()); - } - return; + snapshots.check_snapshot("task graph load error.snap", err_str.as_ref())?; + return Ok(()); } }; let task_graph_json = redact_snapshot( &vite_graph_ser::SerializeByKey(task_graph.task_graph()), workspace_root_str, ); - insta::assert_json_snapshot!("task graph", task_graph_json); + snapshots.check_json_snapshot("task graph", "task graph", &task_graph_json)?; for plan in cases_file.plan_cases { - let snapshot_name = vite_str::format!("query - {}", plan.name); + let snapshot_base = vite_str::format!("query - {}", plan.name); let compact = plan.compact; - - let mut case_settings = insta::Settings::clone_current(); - let mut info = serde_json::json!({ "args": plan.args }); - if !plan.cwd.as_str().is_empty() { - info["cwd"] = serde_json::json!(plan.cwd.as_str()); - } - case_settings.set_info(&info); - let _guard = case_settings.bind_to_scope(); + #[expect( + clippy::disallowed_types, + reason = "String required for building command display" + )] + let args_display = + plan.args.iter().map(vite_str::Str::as_str).collect::>().join(" "); let cli = match Cli::try_parse_from( std::iter::once("vt") // dummy program name @@ -220,10 +210,13 @@ fn run_case_inner( Err(err) => { #[expect( clippy::disallowed_macros, - reason = "insta::assert_snapshot! internally uses std::format!" + reason = "Display impl of clap::Error uses std::format!" )] { - insta::assert_snapshot!(snapshot_name.as_str(), err); + snapshots.check_snapshot( + vite_str::format!("{snapshot_base}.snap").as_str(), + &err.to_string(), + )?; } continue; } @@ -262,33 +255,37 @@ fn run_case_inner( } else { err_str }; - #[expect( - clippy::disallowed_macros, - reason = "insta::assert_snapshot! internally uses std::format!" - )] - { - insta::assert_snapshot!(snapshot_name.as_str(), err_str.as_ref()); - } + snapshots.check_snapshot( + vite_str::format!("{snapshot_base}.snap").as_str(), + err_str.as_ref(), + )?; continue; } }; + let comment = vite_str::format!("{args_display}"); if compact { let compact_plan = CompactPlan::from_execution_graph(&plan, &workspace_root.path); - insta::assert_json_snapshot!(snapshot_name.as_str(), &compact_plan); + snapshots.check_json_snapshot( + snapshot_base.as_str(), + comment.as_str(), + &compact_plan, + )?; } else { let plan_json = redact_snapshot(&plan, workspace_root_str); - insta::assert_json_snapshot!(snapshot_name.as_str(), &plan_json); + snapshots.check_json_snapshot( + snapshot_base.as_str(), + comment.as_str(), + &plan_json, + )?; } } - }); + Ok(()) + }) } #[expect(clippy::disallowed_types, reason = "Path required for CARGO_MANIFEST_DIR path traversal")] fn main() { - // SAFETY: Called before any threads are spawned; insta reads this lazily on first assertion. - unsafe { std::env::set_var("INSTA_REQUIRE_FULL_MATCH", "1") }; - let tokio_runtime = Arc::new(Runtime::new().unwrap()); let tmp_dir = tempfile::tempdir().unwrap(); let tmp_dir_path = AbsolutePathBuf::new(tmp_dir.path().canonicalize().unwrap()).unwrap(); @@ -312,8 +309,7 @@ fn main() { let tmp_dir_path = tmp_dir_path.clone(); let runtime = Arc::clone(&tokio_runtime); libtest_mimic::Trial::test(name, move || { - run_case(&runtime, &tmp_dir_path, &fixture_path); - Ok(()) + run_case(&runtime, &tmp_dir_path, &fixture_path).map_err(|e| e.into()) }) }) .collect(); From 3ab2bd5bf74f0937617ecc20e687d15684b85213 Mon Sep 17 00:00:00 2001 From: branchseer Date: Thu, 16 Apr 2026 23:31:59 +0800 Subject: [PATCH 3/7] fix: normalize CRLF in snapshot reads, fix clippy warnings - Normalize \r\n to \n when reading snapshot files for Windows compat - Replace redundant closures with Into::into - Remove unfulfilled #[expect] attributes - Add disallowed_methods to snapshot_test module-level expect Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/snapshot_test/src/lib.rs | 5 +++-- .../vite_task_bin/tests/e2e_snapshots/main.rs | 2 +- .../tests/plan_snapshots/main.rs | 20 +++++-------------- 3 files changed, 9 insertions(+), 18 deletions(-) diff --git a/crates/snapshot_test/src/lib.rs b/crates/snapshot_test/src/lib.rs index 11e7eb42..19c2e2b1 100644 --- a/crates/snapshot_test/src/lib.rs +++ b/crates/snapshot_test/src/lib.rs @@ -1,9 +1,10 @@ #![expect( clippy::disallowed_types, clippy::disallowed_macros, + clippy::disallowed_methods, clippy::missing_panics_doc, clippy::missing_errors_doc, - reason = "standalone test utility crate; std types and format! are appropriate" + reason = "standalone test utility crate; std types, methods, and format! are appropriate" )] use std::{ @@ -51,7 +52,7 @@ impl Snapshots { } let expected = match fs::read_to_string(&snap_path) { - Ok(content) => content, + Ok(content) => content.replace("\r\n", "\n"), Err(e) if e.kind() == std::io::ErrorKind::NotFound => { fs::create_dir_all(&self.snapshot_dir) .expect("failed to create snapshot directory"); diff --git a/crates/vite_task_bin/tests/e2e_snapshots/main.rs b/crates/vite_task_bin/tests/e2e_snapshots/main.rs index 5d3441f8..01a89cc3 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/main.rs +++ b/crates/vite_task_bin/tests/e2e_snapshots/main.rs @@ -445,7 +445,7 @@ fn main() { let name = fixture_path.file_name().unwrap().to_str().unwrap().to_owned(); let tmp_dir_path = tmp_dir_path.clone(); libtest_mimic::Trial::test(name, move || { - run_case(&tmp_dir_path, &fixture_path).map_err(|e| e.into()) + run_case(&tmp_dir_path, &fixture_path).map_err(Into::into) }) }) .collect(); diff --git a/crates/vite_task_plan/tests/plan_snapshots/main.rs b/crates/vite_task_plan/tests/plan_snapshots/main.rs index 5af5ae85..d74787ab 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/main.rs +++ b/crates/vite_task_plan/tests/plan_snapshots/main.rs @@ -195,10 +195,6 @@ fn run_case_inner( for plan in cases_file.plan_cases { let snapshot_base = vite_str::format!("query - {}", plan.name); let compact = plan.compact; - #[expect( - clippy::disallowed_types, - reason = "String required for building command display" - )] let args_display = plan.args.iter().map(vite_str::Str::as_str).collect::>().join(" "); @@ -208,16 +204,10 @@ fn run_case_inner( ) { Ok(ok) => ok, Err(err) => { - #[expect( - clippy::disallowed_macros, - reason = "Display impl of clap::Error uses std::format!" - )] - { - snapshots.check_snapshot( - vite_str::format!("{snapshot_base}.snap").as_str(), - &err.to_string(), - )?; - } + snapshots.check_snapshot( + vite_str::format!("{snapshot_base}.snap").as_str(), + &err.to_string(), + )?; continue; } }; @@ -309,7 +299,7 @@ fn main() { let tmp_dir_path = tmp_dir_path.clone(); let runtime = Arc::clone(&tokio_runtime); libtest_mimic::Trial::test(name, move || { - run_case(&runtime, &tmp_dir_path, &fixture_path).map_err(|e| e.into()) + run_case(&runtime, &tmp_dir_path, &fixture_path).map_err(Into::into) }) }) .collect(); From d2b0fb8d2de9edea8556332c4768331319b68efa Mon Sep 17 00:00:00 2001 From: branchseer Date: Fri, 17 Apr 2026 07:55:08 +0800 Subject: [PATCH 4/7] fix(tests): force single-threaded execution for e2e snapshots libtest-mimic defaults to `available_parallelism()` threads, but the previous custom `fn main()` harness ran fixtures sequentially. Running e2e fixtures in parallel causes PTY and signal-routing contention, especially on the ctrl-c test, which intermittently fails on Linux/musl CI when task B gets launched before vt processes the ctrl-c signal. Force `test_threads = 1` unless the user explicitly overrides via `--test-threads`. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/vite_task_bin/tests/e2e_snapshots/main.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/crates/vite_task_bin/tests/e2e_snapshots/main.rs b/crates/vite_task_bin/tests/e2e_snapshots/main.rs index 01a89cc3..ce2fa8d1 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/main.rs +++ b/crates/vite_task_bin/tests/e2e_snapshots/main.rs @@ -437,7 +437,13 @@ fn main() { .collect::>(); fixture_paths.sort(); - let args = libtest_mimic::Arguments::from_args(); + let mut args = libtest_mimic::Arguments::from_args(); + // Force single-threaded execution: e2e tests spawn PTY child processes and + // send signals (ctrl-c); running them in parallel causes signal routing + // races and PTY resource contention on CI. + if args.test_threads.is_none() { + args.test_threads = Some(1); + } let tests: Vec = fixture_paths .into_iter() From a3ff0f7657109cf6cb842eee6bfe74b445ab1d28 Mon Sep 17 00:00:00 2001 From: branchseer Date: Fri, 17 Apr 2026 07:56:16 +0800 Subject: [PATCH 5/7] fix(tests): only force single-threaded e2e on linux macOS and Windows CI were unaffected by the ctrl-c flakiness. Scope the single-thread override to Linux only so other platforms keep the faster parallel execution. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/vite_task_bin/tests/e2e_snapshots/main.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/vite_task_bin/tests/e2e_snapshots/main.rs b/crates/vite_task_bin/tests/e2e_snapshots/main.rs index ce2fa8d1..27f4fd61 100644 --- a/crates/vite_task_bin/tests/e2e_snapshots/main.rs +++ b/crates/vite_task_bin/tests/e2e_snapshots/main.rs @@ -438,10 +438,10 @@ fn main() { fixture_paths.sort(); let mut args = libtest_mimic::Arguments::from_args(); - // Force single-threaded execution: e2e tests spawn PTY child processes and - // send signals (ctrl-c); running them in parallel causes signal routing - // races and PTY resource contention on CI. - if args.test_threads.is_none() { + // On Linux, running e2e fixtures in parallel causes PTY and signal-routing + // contention (ctrl-c test intermittently fails). macOS and Windows are + // unaffected, so only force sequential execution on Linux. + if cfg!(target_os = "linux") && args.test_threads.is_none() { args.test_threads = Some(1); } From f2383308f0f94cb99330d1d27ac17883d9f09bff Mon Sep 17 00:00:00 2001 From: branchseer Date: Fri, 17 Apr 2026 08:33:12 +0800 Subject: [PATCH 6/7] docs(snapshot_test): add README explaining design choice Explain why we didn't use `insta`: its panic-based assertion API prints the diff to stderr, which doesn't make it into libtest-mimic's failure summary. Co-Authored-By: Claude Opus 4.6 (1M context) --- crates/snapshot_test/README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 crates/snapshot_test/README.md diff --git a/crates/snapshot_test/README.md b/crates/snapshot_test/README.md new file mode 100644 index 00000000..8dd9bf13 --- /dev/null +++ b/crates/snapshot_test/README.md @@ -0,0 +1,14 @@ +# snapshot_test + +Minimal snapshot testing primitive for this workspace. Two methods: + +```rust +snapshots.check_snapshot(name, actual)?; // raw text → {name} +snapshots.check_json_snapshot(name, comment, value)?; // JSON → {name}.jsonc with `// {comment}` header +``` + +Both return `Result<(), String>` — the `String` contains a unified diff on mismatch, pointing to a `.new` file. Set `UPDATE_SNAPSHOTS=1` to accept new output in-place. + +## Why not `insta`? + +`insta::assert_*!` panics on mismatch and prints the diff to stderr. When run under `libtest-mimic` (which doesn't capture stdout/stderr), that diff appears in the middle of the test-runner output stream, _not_ inside the `failures:` summary section. The summary only shows the panic message (`snapshot assertion for 'X' failed in line N`). Returning `Result<(), String>` lets us put the full diff directly into the failure message where `cargo test` prints it at the end. From 775c31b255bdb816fc18967a33a58b56080ecb35 Mon Sep 17 00:00:00 2001 From: branchseer Date: Fri, 17 Apr 2026 08:36:59 +0800 Subject: [PATCH 7/7] docs: update snapshot update command to UPDATE_SNAPSHOTS=1 Replace stale `INSTA_UPDATE=always` references with `UPDATE_SNAPSHOTS=1` in CLAUDE.md and CONTRIBUTING.md to match the new snapshot_test crate. Co-Authored-By: Claude Opus 4.6 (1M context) --- CLAUDE.md | 2 +- CONTRIBUTING.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 9173704a..0ca1b27c 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -47,7 +47,7 @@ cargo test # All tests cargo test -p vite_task_bin --test e2e_snapshots # E2E snapshot tests cargo test -p vite_task_plan --test plan_snapshots # Plan snapshot tests cargo test --test e2e_snapshots -- stdin # Filter by test name -INSTA_UPDATE=always cargo test # Update snapshots +UPDATE_SNAPSHOTS=1 cargo test # Update snapshots ``` Integration tests (e2e, plan, fspy) require `pnpm install` in `packages/tools` first. You don't need `pnpm install` in test fixture directories. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index db3ceab3..ea40a647 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -45,7 +45,7 @@ cargo test # All tests cargo test -p vite_task_bin --test e2e_snapshots # E2E snapshot tests cargo test -p vite_task_plan --test plan_snapshots # Plan snapshot tests cargo test --test e2e_snapshots -- stdin # Filter by test name -INSTA_UPDATE=always cargo test # Update snapshots +UPDATE_SNAPSHOTS=1 cargo test # Update snapshots ``` Integration tests (e2e, plan, fspy) require `pnpm install` in `packages/tools` first. You don't need `pnpm install` in test fixture directories.