diff --git a/CHANGELOG.md b/CHANGELOG.md index a76e814d..5c5c30f4 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 3c330796..7fe1b435 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 00000000..6ff3c181 --- /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 00000000..69cc1901 --- /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 00000000..1092a92c --- /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 00000000..07f5a25c --- /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 0dcfd0a9..b0b0d7e7 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 19d343d3..512f1c87 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 b9455434..c6e8c430 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 d175c94b..8d4e5a36 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 5462e6f1..a79a5c6b 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 62e2a361..d0e8eadb 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 d6600a3b..a1034cfd 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 442d2ce3..81e45d45 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 90793bdc..e5579470 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 49c6c7b2..2d97cc20 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 7ea76240..0b1ad642 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 da5b8aef..7845069e 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 94e3756f..9ccc4738 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 b9a276a8..58992f1f 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 cd55927e..6fd2f817 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 cd55927e..6fd2f817 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 415e91aa..4718c65b 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 54edeba0..14ddc413 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 0f4de905..dc4daf33 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 d10e5ba1..aaad339d 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 36e7e21e..130a82e2 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 7c6d38ec..3fc409bf 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 6c334db2..6a950222 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 1feeadf2..5c74849e 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 01cbb45a..4af4ef78 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 cc9a2869..84764d3a 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 60afcc33..f668adb9 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 36a38f4c..d927383e 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 dc31da6b..011cad7d 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 7c14c564..d4d4f328 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 c7ace788..47c260eb 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 3f46916b..7b9bf4a9 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 3139a3dd..905f0ea8 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 7cc30f7e..846bdb86 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 b6f8507a..d83faa9c 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 a88a1937..c24e06ce 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 aad2c92b..ed3e2246 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 283a111b..fbfe2473 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 02417507..d97722ed 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 670e7321..4be96a06 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 fdf0955d..29932536 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 f8895042..c7bfd0df 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 aafb7481..695874d9 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 618261df..ed0c7439 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 4e6fedf0..c1e99b33 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 7d755741..92742654 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 50e3d4a7..ea2e126f 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 fab46abe..8911d691 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 b8b1ce63..4a4592c9 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 29e0f1aa..165b8d50 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 4c28fc73..d620b49d 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 9551ce0a..98e3d3fb 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 f082e3b2..6d993d7e 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 f8e12919..8bc113cf 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" }