From e54f4213c387202c4659a02eba80826fac7ca47a Mon Sep 17 00:00:00 2001 From: wan9chi Date: Sun, 26 Jul 2026 21:22:01 +0800 Subject: [PATCH] feat: mark task-spawned processes with VP_RUN ## Motivation A tool started from a task cannot tell whether it was launched by `vp run` or typed directly. Vite+ needs that distinction: its built-in commands point at `vpr ` when a same-named script exists, which is misleading when that very script is what spawned them. Every spawned task now carries `VP_RUN=1`. It is set after `env`/`untrackedEnv` filtering so a task's passthrough config cannot drop it, and it is forced rather than inherited so a stale parent value cannot make a task look like a direct invocation. A prefix assignment on the command still wins. The name is exported as `MARKER_ENV_NAME` so consumers do not hardcode it. Co-authored-by: Claude Opus 5 --- CHANGELOG.md | 1 + crates/vite_task/src/lib.rs | 2 +- .../fixtures/vp_run_env/package.json | 4 +++ .../fixtures/vp_run_env/snapshots.toml | 29 +++++++++++++++++++ .../vp_run_env_marks_every_spawned_task.md | 23 +++++++++++++++ .../fixtures/vp_run_env/vite-task.json | 15 ++++++++++ crates/vite_task_plan/src/envs.rs | 6 ++++ crates/vite_task_plan/src/lib.rs | 1 + crates/vite_task_plan/src/plan.rs | 9 +++++- ...ery_tool_synthetic_task_in_user_task.jsonc | 3 +- ...es_not_override_per_task_cache_false.jsonc | 3 +- ...query___cache_enables_script_caching.jsonc | 3 +- ...ching_even_when_cache_tasks_is_false.jsonc | 3 +- ..._per_task_cache_true_enables_caching.jsonc | 3 +- ...ery___no_cache_disables_task_caching.jsonc | 3 +- ..._cache_overrides_per_task_cache_true.jsonc | 3 +- ...not_cached_when_cache_tasks_is_false.jsonc | 3 +- .../query_echo_and_lint_with_extra_args.jsonc | 3 +- .../query_lint_and_echo_with_extra_args.jsonc | 3 +- .../query_normal_task_with_extra_args.jsonc | 3 +- .../query_synthetic_task_in_user_task.jsonc | 3 +- ...synthetic_task_in_user_task_with_cwd.jsonc | 3 +- ...ic_task_with_extra_args_in_user_task.jsonc | 3 +- .../query_script_not_cached_by_default.jsonc | 3 +- ...query_another_task_cached_by_default.jsonc | 3 +- .../query_script_not_cached_by_default.jsonc | 3 +- .../query_task_cached_by_default.jsonc | 3 +- .../query_cache_clean_in_script.jsonc | 3 +- ..._still_disabled_by_cache_tasks_false.jsonc | 3 +- .../snapshots/query_script_not_cached.jsonc | 3 +- ...not_cached_when_cache_tasks_is_false.jsonc | 3 +- ...script_cached_when_global_cache_true.jsonc | 3 +- ...y_task_cached_when_global_cache_true.jsonc | 3 +- ...not_cached_despite_global_cache_true.jsonc | 3 +- ..._should_put_synthetic_task_under_cwd.jsonc | 3 +- ..._should_not_affect_expanded_task_cwd.jsonc | 3 +- ...extra_args_only_reach_requested_task.jsonc | 6 ++-- ...d___cache_enables_inner_task_caching.jsonc | 3 +- ...no_cache_disables_inner_task_caching.jsonc | 3 +- ..._without_flags_inherits_parent_cache.jsonc | 3 +- ...opagates_to_nested_run_without_flags.jsonc | 3 +- ...es_not_propagate_into_nested___cache.jsonc | 3 +- ...opagates_to_nested_run_without_flags.jsonc | 3 +- ...uery_shell_fallback_for_pipe_command.jsonc | 3 +- ...does_not_affect_expanded_query_tasks.jsonc | 3 +- ..._not_affect_expanded_synthetic_cache.jsonc | 3 +- ...t_cache_scripts_defaults_to_no_cache.jsonc | 3 +- ..._untrackedEnv_inherited_by_synthetic.jsonc | 3 +- ...cache_false_disables_synthetic_cache.jsonc | 3 +- ...h_cache_true_enables_synthetic_cache.jsonc | 3 +- .../query_synthetic_in_subpackage.jsonc | 3 +- .../snapshots/query_array_cd.jsonc | 9 ++++-- .../snapshots/query_array_shorthand.jsonc | 9 ++++-- .../query_array_unbalanced_quotes.jsonc | 6 ++-- .../snapshots/query_array_with_and.jsonc | 9 ++++-- .../snapshots/query_nested_vt_array.jsonc | 6 ++-- .../query_object_array_depends_on.jsonc | 12 +++++--- .../snapshots/query_string_shorthand.jsonc | 3 +- .../query_dev_filter_from_root.jsonc | 3 +- .../snapshots/query_dev_in_subpackage.jsonc | 3 +- 60 files changed, 214 insertions(+), 65 deletions(-) create mode 100644 crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/package.json create mode 100644 crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/snapshots.toml create mode 100644 crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/snapshots/vp_run_env_marks_every_spawned_task.md create mode 100644 crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/vite-task.json diff --git a/CHANGELOG.md b/CHANGELOG.md index a76e814d4..5c5c30f41 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,6 @@ # Changelog +- **Added** Tasks now run with `VP_RUN=1` set, so tools can tell they are running under `vp run` instead of being invoked directly ([#570](https://github.com/voidzero-dev/vite-task/pull/570)). - **Fixed** The task cache now supports much larger automatically tracked input sets without hitting wincode's default 4 MiB sequence preallocation limit ([#554](https://github.com/voidzero-dev/vite-task/pull/554)). - **Fixed** npm workspace patterns beginning with `./` now discover matching packages correctly ([vite-plus#2201](https://github.com/voidzero-dev/vite-plus/issues/2201), [#547](https://github.com/voidzero-dev/vite-task/pull/547)). - **Fixed** Failures while forwarding output from a started task process no longer incorrectly say the process failed to spawn ([#506](https://github.com/voidzero-dev/vite-task/issues/506)). diff --git a/crates/vite_task/src/lib.rs b/crates/vite_task/src/lib.rs index 3c330796c..7fe1b435c 100644 --- a/crates/vite_task/src/lib.rs +++ b/crates/vite_task/src/lib.rs @@ -17,4 +17,4 @@ pub use vite_task_graph::{ }; /// Re-exports useful for `CommandHandler` implementations. pub use vite_task_plan::get_path_env; -pub use vite_task_plan::{plan_request, plan_request::ScriptCommand}; +pub use vite_task_plan::{MARKER_ENV_NAME, plan_request, plan_request::ScriptCommand}; diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/package.json b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/package.json new file mode 100644 index 000000000..6ff3c181c --- /dev/null +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/package.json @@ -0,0 +1,4 @@ +{ + "name": "vp-run-env", + "private": true +} diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/snapshots.toml b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/snapshots.toml new file mode 100644 index 000000000..69cc19013 --- /dev/null +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/snapshots.toml @@ -0,0 +1,29 @@ +[[e2e]] +name = "vp_run_env_marks_every_spawned_task" +comment = """ +Every process a task spawns gets `VP_RUN=1`, so a tool can tell it was started by `vp run` instead of being typed directly. + +The parent shell sets `VP_RUN=0` in both steps to show the marker is forced rather than inherited. The cached task also restricts passthrough to `env: ["NODE_ENV"]`, which filters the parent's value out entirely; the marker is set after that filtering, so it survives either way. +""" +steps = [ + { argv = [ + "vt", + "run", + "print-marker-cached", + ], envs = [ + [ + "VP_RUN", + "0", + ], + ], comment = "cached task: env passthrough cannot drop the marker" }, + { argv = [ + "vt", + "run", + "print-marker-uncached", + ], envs = [ + [ + "VP_RUN", + "0", + ], + ], comment = "uncached task: the parent environment flows through, but the marker still wins" }, +] diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/snapshots/vp_run_env_marks_every_spawned_task.md b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/snapshots/vp_run_env_marks_every_spawned_task.md new file mode 100644 index 000000000..1092a92c3 --- /dev/null +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/snapshots/vp_run_env_marks_every_spawned_task.md @@ -0,0 +1,23 @@ +# vp_run_env_marks_every_spawned_task + +Every process a task spawns gets `VP_RUN=1`, so a tool can tell it was started by `vp run` instead of being typed directly. + +The parent shell sets `VP_RUN=0` in both steps to show the marker is forced rather than inherited. The cached task also restricts passthrough to `env: ["NODE_ENV"]`, which filters the parent's value out entirely; the marker is set after that filtering, so it survives either way. + +## `VP_RUN=0 vt run print-marker-cached` + +cached task: env passthrough cannot drop the marker + +``` +$ vtt print-env VP_RUN +1 +``` + +## `VP_RUN=0 vt run print-marker-uncached` + +uncached task: the parent environment flows through, but the marker still wins + +``` +$ vtt print-env VP_RUN ⊘ cache disabled +1 +``` diff --git a/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/vite-task.json b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/vite-task.json new file mode 100644 index 000000000..07f5a25c0 --- /dev/null +++ b/crates/vite_task_bin/tests/e2e_snapshots/fixtures/vp_run_env/vite-task.json @@ -0,0 +1,15 @@ +{ + "tasks": { + "print-marker-cached": { + "command": "vtt print-env VP_RUN", + "cache": true, + "env": ["NODE_ENV"], + "input": ["package.json"], + "output": [] + }, + "print-marker-uncached": { + "command": "vtt print-env VP_RUN", + "cache": false + } + } +} diff --git a/crates/vite_task_plan/src/envs.rs b/crates/vite_task_plan/src/envs.rs index 0dcfd0a99..b0b0d7e74 100644 --- a/crates/vite_task_plan/src/envs.rs +++ b/crates/vite_task_plan/src/envs.rs @@ -11,6 +11,12 @@ use wincode::{SchemaRead, SchemaWrite}; const SHA256_DIGEST_LEN: usize = 32; const SHA256_PREFIX: &str = "sha256:"; +/// Name of the environment variable set to `1` in every process a task spawns. +/// +/// Lets a tool tell that it is running as part of a task rather than having +/// been invoked directly. +pub const MARKER_ENV_NAME: &str = "VP_RUN"; + /// SHA-256 digest of a fingerprinted environment variable value. #[derive(SchemaWrite, SchemaRead, PartialEq, Eq, Clone, Copy)] pub struct EnvValueHash([u8; SHA256_DIGEST_LEN]); diff --git a/crates/vite_task_plan/src/lib.rs b/crates/vite_task_plan/src/lib.rs index 19d343d3b..512f1c87b 100644 --- a/crates/vite_task_plan/src/lib.rs +++ b/crates/vite_task_plan/src/lib.rs @@ -12,6 +12,7 @@ mod ps1_shim; use std::{collections::BTreeMap, ffi::OsStr, fmt::Debug, sync::Arc}; use context::PlanContext; +pub use envs::MARKER_ENV_NAME; pub use error::Error; pub use execution_graph::{DEFAULT_CONCURRENCY_LIMIT, ExecutionGraph}; pub use in_process::InProcessExecution; diff --git a/crates/vite_task_plan/src/plan.rs b/crates/vite_task_plan/src/plan.rs index b9455434d..c6e8c430a 100644 --- a/crates/vite_task_plan/src/plan.rs +++ b/crates/vite_task_plan/src/plan.rs @@ -31,7 +31,7 @@ use crate::{ ExecutionItem, ExecutionItemDisplay, ExecutionItemKind, LeafExecutionKind, PlanContext, SpawnCommand, SpawnExecution, TaskExecution, cache_metadata::{CacheMetadata, ExecutionCacheKey, ProgramFingerprint, SpawnFingerprint}, - envs::{EnvFingerprints, EnvValueHash}, + envs::{EnvFingerprints, EnvValueHash, MARKER_ENV_NAME}, error::{CdCommandError, Error, PathFingerprintError, PathFingerprintErrorKind, PathType}, execution_graph::{ExecutionGraph, ExecutionNodeIndex, InnerExecutionGraph}, in_process::InProcessExecution, @@ -680,6 +680,13 @@ fn plan_spawn_execution( } } + // Mark the child as task-spawned. Set after `EnvFingerprints::resolve` has + // filtered `spawn_envs`, so a task's `env`/`untrackedEnv` patterns cannot + // drop it, and always to `1`, so a stale value in the parent environment + // cannot make a task look like it was invoked directly. A prefix + // assignment (`VP_RUN=… command`) still wins: those are applied below. + spawn_envs.insert(OsStr::new(MARKER_ENV_NAME).into(), OsStr::new("1").into()); + // Add prefix envs to spawn envs. spawn_envs.extend(prefix_envs.iter().map(|(name, value)| { (OsStr::new(name.as_str()).into(), OsStr::new(value.as_str()).into()) diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/query_tool_synthetic_task_in_user_task.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/query_tool_synthetic_task_in_user_task.jsonc index d175c94bf..8d4e5a366 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/query_tool_synthetic_task_in_user_task.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/additional_env/snapshots/query_tool_synthetic_task_in_user_task.jsonc @@ -76,7 +76,8 @@ "spawn_envs": { "FORCE_COLOR": "1", "PATH": "/node_modules/.bin:", - "TEST_VAR": "hello_world" + "TEST_VAR": "hello_world", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_does_not_override_per_task_cache_false.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_does_not_override_per_task_cache_false.jsonc index 5462e6f1b..a79a5c6bf 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_does_not_override_per_task_cache_false.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_does_not_override_per_task_cache_false.jsonc @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_script_caching.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_script_caching.jsonc index 62e2a3612..d0e8eadbb 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_script_caching.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___cache_enables_script_caching.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } 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.jsonc 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 index d6600a3b6..a1034cfd0 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.jsonc +++ 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 @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } 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.jsonc 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 index 442d2ce30..81e45d45e 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.jsonc +++ 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 @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___no_cache_disables_task_caching.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___no_cache_disables_task_caching.jsonc index 90793bdc4..e55794706 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___no_cache_disables_task_caching.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___no_cache_disables_task_caching.jsonc @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___no_cache_overrides_per_task_cache_true.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___no_cache_overrides_per_task_cache_true.jsonc index 49c6c7b2b..2d97cc20d 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___no_cache_overrides_per_task_cache_true.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query___no_cache_overrides_per_task_cache_true.jsonc @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } 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.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query_baseline___tasks_not_cached_when_cache_tasks_is_false.jsonc index 7ea762405..0b1ad642a 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query_baseline___tasks_not_cached_when_cache_tasks_is_false.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_cli_override/snapshots/query_baseline___tasks_not_cached_when_cache_tasks_is_false.jsonc @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_echo_and_lint_with_extra_args.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_echo_and_lint_with_extra_args.jsonc index da5b8aefa..7845069e0 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_echo_and_lint_with_extra_args.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_echo_and_lint_with_extra_args.jsonc @@ -102,7 +102,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_lint_and_echo_with_extra_args.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_lint_and_echo_with_extra_args.jsonc index 94e3756f7..9ccc47383 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_lint_and_echo_with_extra_args.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_lint_and_echo_with_extra_args.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_normal_task_with_extra_args.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_normal_task_with_extra_args.jsonc index b9a276a86..58992f1f8 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_normal_task_with_extra_args.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_normal_task_with_extra_args.jsonc @@ -75,7 +75,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_in_user_task.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_in_user_task.jsonc index cd55927ed..6fd2f8177 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_in_user_task.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_in_user_task.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_in_user_task_with_cwd.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_in_user_task_with_cwd.jsonc index cd55927ed..6fd2f8177 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_in_user_task_with_cwd.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_in_user_task_with_cwd.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_with_extra_args_in_user_task.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_with_extra_args_in_user_task.jsonc index 415e91aa2..4718c65b4 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_with_extra_args_in_user_task.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_keys/snapshots/query_synthetic_task_with_extra_args_in_user_task.jsonc @@ -77,7 +77,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/query_script_not_cached_by_default.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/query_script_not_cached_by_default.jsonc index 54edeba02..14ddc413e 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/query_script_not_cached_by_default.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_default/snapshots/query_script_not_cached_by_default.jsonc @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_another_task_cached_by_default.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_another_task_cached_by_default.jsonc index 0f4de9059..dc4daf33f 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_another_task_cached_by_default.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_another_task_cached_by_default.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_script_not_cached_by_default.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_script_not_cached_by_default.jsonc index d10e5ba11..aaad339dc 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_script_not_cached_by_default.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_script_not_cached_by_default.jsonc @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_task_cached_by_default.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_task_cached_by_default.jsonc index 36e7e21e9..130a82e2f 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_task_cached_by_default.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_scripts_task_override/snapshots/query_task_cached_by_default.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/query_cache_clean_in_script.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/query_cache_clean_in_script.jsonc index 7c6d38ecc..3fc409bfd 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/query_cache_clean_in_script.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_subcommand/snapshots/query_cache_clean_in_script.jsonc @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } 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.jsonc 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 index 6c334db2f..6a950222c 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.jsonc +++ 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 @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/query_script_not_cached.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/query_script_not_cached.jsonc index 1feeadf22..5c74849e7 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/query_script_not_cached.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/query_script_not_cached.jsonc @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/query_task_not_cached_when_cache_tasks_is_false.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/query_task_not_cached_when_cache_tasks_is_false.jsonc index 01cbb45a6..4af4ef785 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/query_task_not_cached_when_cache_tasks_is_false.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_tasks_disabled/snapshots/query_task_not_cached_when_cache_tasks_is_false.jsonc @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_script_cached_when_global_cache_true.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_script_cached_when_global_cache_true.jsonc index cc9a28696..84764d3a8 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_script_cached_when_global_cache_true.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_script_cached_when_global_cache_true.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_task_cached_when_global_cache_true.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_task_cached_when_global_cache_true.jsonc index 60afcc33b..f668adb9c 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_task_cached_when_global_cache_true.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/cache_true_no_force_enable/snapshots/query_task_cached_when_global_cache_true.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } 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.jsonc 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 index 36a38f4c3..d927383ec 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.jsonc +++ 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 @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } 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.jsonc 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 index dc31da6b3..011cad7dd 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.jsonc +++ 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 @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/src" } 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.jsonc 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 index 7c14c5649..d4d4f3289 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.jsonc +++ 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 @@ -98,7 +98,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } 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.jsonc 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 index c7ace7882..47c260eb1 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.jsonc +++ 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 @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } @@ -161,7 +162,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___cache_enables_inner_task_caching.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___cache_enables_inner_task_caching.jsonc index 3f46916b4..7b9bf4a9b 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___cache_enables_inner_task_caching.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___cache_enables_inner_task_caching.jsonc @@ -98,7 +98,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___no_cache_disables_inner_task_caching.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___no_cache_disables_inner_task_caching.jsonc index 3139a3dd7..905f0ea82 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___no_cache_disables_inner_task_caching.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested___no_cache_disables_inner_task_caching.jsonc @@ -60,7 +60,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested_run_without_flags_inherits_parent_cache.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested_run_without_flags_inherits_parent_cache.jsonc index 7cc30f7e5..846bdb864 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested_run_without_flags_inherits_parent_cache.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_nested_run_without_flags_inherits_parent_cache.jsonc @@ -60,7 +60,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___cache_propagates_to_nested_run_without_flags.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___cache_propagates_to_nested_run_without_flags.jsonc index b6f8507ac..d83faa9c5 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___cache_propagates_to_nested_run_without_flags.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___cache_propagates_to_nested_run_without_flags.jsonc @@ -98,7 +98,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } 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.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___no_cache_does_not_propagate_into_nested___cache.jsonc index a88a1937c..c24e06ce4 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___no_cache_does_not_propagate_into_nested___cache.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___no_cache_does_not_propagate_into_nested___cache.jsonc @@ -98,7 +98,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } 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.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___no_cache_propagates_to_nested_run_without_flags.jsonc index aad2c92be..ed3e22465 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___no_cache_propagates_to_nested_run_without_flags.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/nested_cache_override/snapshots/query_outer___no_cache_propagates_to_nested_run_without_flags.jsonc @@ -60,7 +60,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/query_shell_fallback_for_pipe_command.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/query_shell_fallback_for_pipe_command.jsonc index 283a111bb..fbfe2473e 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/query_shell_fallback_for_pipe_command.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/shell_fallback/snapshots/query_shell_fallback_for_pipe_command.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } 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.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_parent_cache_false_does_not_affect_expanded_query_tasks.jsonc index 024175076..d97722ed3 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_parent_cache_false_does_not_affect_expanded_query_tasks.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_parent_cache_false_does_not_affect_expanded_query_tasks.jsonc @@ -98,7 +98,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } 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.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_script_cache_false_does_not_affect_expanded_synthetic_cache.jsonc index 670e73213..4be96a06a 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_script_cache_false_does_not_affect_expanded_synthetic_cache.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_script_cache_false_does_not_affect_expanded_synthetic_cache.jsonc @@ -98,7 +98,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_script_without_cache_scripts_defaults_to_no_cache.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_script_without_cache_scripts_defaults_to_no_cache.jsonc index fdf0955d3..299325368 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_script_without_cache_scripts_defaults_to_no_cache.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_script_without_cache_scripts_defaults_to_no_cache.jsonc @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_untrackedEnv_inherited_by_synthetic.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_untrackedEnv_inherited_by_synthetic.jsonc index f8895042e..c7bfd0dfe 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_untrackedEnv_inherited_by_synthetic.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_untrackedEnv_inherited_by_synthetic.jsonc @@ -74,7 +74,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_false_disables_synthetic_cache.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_false_disables_synthetic_cache.jsonc index aafb74817..695874d98 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_false_disables_synthetic_cache.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_false_disables_synthetic_cache.jsonc @@ -35,7 +35,8 @@ ], "spawn_envs": { "NO_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_true_enables_synthetic_cache.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_true_enables_synthetic_cache.jsonc index 618261dfa..ed0c74396 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_true_enables_synthetic_cache.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_cache_disabled/snapshots/query_task_with_cache_true_enables_synthetic_cache.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/query_synthetic_in_subpackage.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/query_synthetic_in_subpackage.jsonc index 4e6fedf03..c1e99b334 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/query_synthetic_in_subpackage.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/synthetic_in_subpackage/snapshots/query_synthetic_in_subpackage.jsonc @@ -98,7 +98,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/packages/a/node_modules/.bin:/node_modules/.bin:" + "PATH": "/packages/a/node_modules/.bin:/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/packages/a" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_cd.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_cd.jsonc index 7d755741d..927426548 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_cd.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_cd.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } @@ -141,7 +142,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/snapshots" } @@ -209,7 +211,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/snapshots" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_shorthand.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_shorthand.jsonc index 50e3d4a79..ea2e126f7 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_shorthand.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_shorthand.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } @@ -141,7 +142,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } @@ -209,7 +211,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_unbalanced_quotes.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_unbalanced_quotes.jsonc index fab46abe4..8911d6917 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_unbalanced_quotes.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_unbalanced_quotes.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } @@ -141,7 +142,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_with_and.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_with_and.jsonc index b8b1ce63d..4a4592c9f 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_with_and.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_array_with_and.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } @@ -141,7 +142,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } @@ -209,7 +211,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_nested_vt_array.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_nested_vt_array.jsonc index 29e0f1aa2..165b8d50e 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_nested_vt_array.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_nested_vt_array.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } @@ -166,7 +167,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_object_array_depends_on.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_object_array_depends_on.jsonc index 4c28fc732..d620b49d5 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_object_array_depends_on.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_object_array_depends_on.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } @@ -141,7 +142,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } @@ -209,7 +211,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } @@ -298,7 +301,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_string_shorthand.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_string_shorthand.jsonc index 9551ce0a8..98e3d3fba 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_string_shorthand.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/task_command_shorthands/snapshots/query_string_shorthand.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/node_modules/.bin:" + "PATH": "/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_filter_from_root.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_filter_from_root.jsonc index f082e3b25..6d993d7ec 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_filter_from_root.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_filter_from_root.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/packages/foo/node_modules/.bin:/node_modules/.bin:" + "PATH": "/packages/foo/node_modules/.bin:/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/packages/foo" } diff --git a/crates/vite_task_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_in_subpackage.jsonc b/crates/vite_task_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_in_subpackage.jsonc index f8e12919d..8bc113cfa 100644 --- a/crates/vite_task_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_in_subpackage.jsonc +++ b/crates/vite_task_plan/tests/plan_snapshots/fixtures/windows_cmd_shim_rewrite/snapshots/query_dev_in_subpackage.jsonc @@ -73,7 +73,8 @@ ], "spawn_envs": { "FORCE_COLOR": "1", - "PATH": "/packages/foo/node_modules/.bin:/node_modules/.bin:" + "PATH": "/packages/foo/node_modules/.bin:/node_modules/.bin:", + "VP_RUN": "1" }, "cwd": "/packages/foo" }