diff --git a/bench/benches/auto_install.sh b/bench/benches/auto_install.sh deleted file mode 100755 index e1176db09d..0000000000 --- a/bench/benches/auto_install.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -# Benchmark script to compare performance with and without auto-install -# Our implementation uses VITE_DISABLE_AUTO_INSTALL=1 to disable nested auto-install execution - -AUTO_INSTALL_CMD="node ./packages/cli/src/bin.ts lint" - -echo "=== Performance comparison: auto-install enabled vs disabled ===" -echo "" - -# Test with auto-install enabled (default behavior) -echo "Testing with auto-install enabled…" -time ${AUTO_INSTALL_CMD} - -echo "" - -# Test with auto-install disabled (simulating nested execution) -echo "Testing with auto-install disabled (nested execution simulation)…" -time VITE_DISABLE_AUTO_INSTALL=1 ${AUTO_INSTALL_CMD} - -echo "" -echo "=== Running detailed benchmark with hyperfine ===" - -# Run detailed benchmark comparison -hyperfine -w 2 -r 5 -i \ - -n "auto-install-enabled" "${AUTO_INSTALL_CMD}" \ - -n "auto-install-disabled" "VITE_DISABLE_AUTO_INSTALL=1 ${AUTO_INSTALL_CMD}" diff --git a/docs/vite/guide/cli.md b/docs/vite/guide/cli.md index 820fa1001b..ffa3e27da7 100644 --- a/docs/vite/guide/cli.md +++ b/docs/vite/guide/cli.md @@ -367,12 +367,11 @@ vp cache clean ### Environment Variables -| Variable | Description | -| --------------------------- | ------------------------------------------------------- | -| `VITE_LOG` | Set logging level (e.g., `VITE_LOG=debug`) | -| `VITE_DISABLE_AUTO_INSTALL` | Set to `1` to disable automatic dependency installation | -| `VITE_TASK_EXECUTION_ENV` | Internal: indicates running inside vite task | -| `VITE_TASK_EXECUTION_ID` | Internal: unique ID for task execution | +| Variable | Description | +| ------------------------- | -------------------------------------------- | +| `VITE_LOG` | Set logging level (e.g., `VITE_LOG=debug`) | +| `VITE_TASK_EXECUTION_ENV` | Internal: indicates running inside vite task | +| `VITE_TASK_EXECUTION_ID` | Internal: unique ID for task execution | ### Execution Modes diff --git a/packages/cli/binding/src/cli.rs b/packages/cli/binding/src/cli.rs index c6f8d6c72a..d0646cff46 100644 --- a/packages/cli/binding/src/cli.rs +++ b/packages/cli/binding/src/cli.rs @@ -644,32 +644,6 @@ impl UserConfigLoader for VitePlusConfigLoader { } } -/// Create auto-install synthetic plan request -async fn create_install_synthetic_request( - cwd: &AbsolutePathBuf, -) -> Result { - let package_manager = vite_install::PackageManager::builder(cwd).build_with_default().await?; - let resolve_command = package_manager.resolve_install_command(&vec![]); - - let mut envs: FxHashMap, Arc> = std::env::vars_os() - .map(|(k, v)| (Arc::from(k.as_os_str()), Arc::from(v.as_os_str()))) - .collect(); - - for (k, v) in resolve_command.envs { - envs.insert(Arc::from(OsStr::new(&k)), Arc::from(OsStr::new(&v))); - } - - Ok(SyntheticPlanRequest { - program: Arc::::from(OsStr::new(&resolve_command.bin_path).to_os_string()), - args: resolve_command.args.into_iter().map(Str::from).collect(), - cache_config: UserCacheConfig::with_config(EnabledCacheConfig { - envs: None, - pass_through_envs: None, - }), - envs: Arc::new(envs), - }) -} - /// Execute a synthesizable subcommand directly (not through vite-task Session). /// No caching, no task graph, no dependency resolution. async fn execute_direct_subcommand( @@ -766,21 +740,6 @@ async fn execute_vite_task_command( user_config_loader: &mut config_loader, })?; - // Auto-install (using Session::exec) - if env::var_os("VITE_DISABLE_AUTO_INSTALL") != Some("1".into()) { - if let Ok(install_request) = create_install_synthetic_request(&cwd).await { - let cache_key: Arc<[Str]> = vec![Str::from("install")].into(); - let status = session - .execute_synthetic(install_request, cache_key, true) - .await - .map_err(|e| Error::Anyhow(e))?; - if status != ExitStatus::SUCCESS { - command_handler.cleanup_temp_files().await; - return Ok(status); - } - } - } - // Main execution (consumes session) let result = session.main(command).await.map_err(|e| Error::Anyhow(e)); diff --git a/packages/cli/snap-tests-global/command-add-npm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-add-npm10-with-workspace/steps.json index f32dcbb18f..5df7b7981f 100644 --- a/packages/cli/snap-tests-global/command-add-npm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-add-npm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp add testnpm2 -D -w -- --no-audit && cat package.json packages/app/package.json packages/utils/package.json # should add package to workspace root", "vp add @vite-plus-test/utils --workspace -- --no-audit && cat package.json packages/app/package.json packages/utils/package.json # should add @vite-plus-test/utils to workspace root", diff --git a/packages/cli/snap-tests-global/command-add-npm10/steps.json b/packages/cli/snap-tests-global/command-add-npm10/steps.json index c3fe3a15fb..5c07d9771d 100644 --- a/packages/cli/snap-tests-global/command-add-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-add-npm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp add --help # should show help", "vp add testnpm2 -D -- --no-audit && cat package.json # should add package as dev dependencies", diff --git a/packages/cli/snap-tests-global/command-add-npm11-with-workspace/steps.json b/packages/cli/snap-tests-global/command-add-npm11-with-workspace/steps.json index f32dcbb18f..5df7b7981f 100644 --- a/packages/cli/snap-tests-global/command-add-npm11-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-add-npm11-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp add testnpm2 -D -w -- --no-audit && cat package.json packages/app/package.json packages/utils/package.json # should add package to workspace root", "vp add @vite-plus-test/utils --workspace -- --no-audit && cat package.json packages/app/package.json packages/utils/package.json # should add @vite-plus-test/utils to workspace root", diff --git a/packages/cli/snap-tests-global/command-add-npm11/steps.json b/packages/cli/snap-tests-global/command-add-npm11/steps.json index c3fe3a15fb..5c07d9771d 100644 --- a/packages/cli/snap-tests-global/command-add-npm11/steps.json +++ b/packages/cli/snap-tests-global/command-add-npm11/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp add --help # should show help", "vp add testnpm2 -D -- --no-audit && cat package.json # should add package as dev dependencies", diff --git a/packages/cli/snap-tests-global/command-add-pnpm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-add-pnpm10-with-workspace/steps.json index c5a43049e9..3400981d3e 100644 --- a/packages/cli/snap-tests-global/command-add-pnpm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-add-pnpm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp add testnpm2 -D -w && cat package.json # should add package to workspace root", "vp add @vite-plus-test/utils --workspace && cat package.json # should add @vite-plus-test/utils to workspace root", diff --git a/packages/cli/snap-tests-global/command-add-pnpm10/steps.json b/packages/cli/snap-tests-global/command-add-pnpm10/steps.json index f57443c957..2c0868694e 100644 --- a/packages/cli/snap-tests-global/command-add-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-add-pnpm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp add --help # should show help", "vp add # should error because no packages specified", diff --git a/packages/cli/snap-tests-global/command-add-pnpm9-with-workspace/steps.json b/packages/cli/snap-tests-global/command-add-pnpm9-with-workspace/steps.json index 17bcee22b3..8442989867 100644 --- a/packages/cli/snap-tests-global/command-add-pnpm9-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-add-pnpm9-with-workspace/steps.json @@ -1,7 +1,6 @@ { "ignoredPlatforms": ["win32"], "env": { - "VITE_DISABLE_AUTO_INSTALL": "1", "NODE_OPTIONS": "--no-deprecation" }, "commands": [ diff --git a/packages/cli/snap-tests-global/command-add-pnpm9/steps.json b/packages/cli/snap-tests-global/command-add-pnpm9/steps.json index 6cbd91a32a..eff3b1cb8f 100644 --- a/packages/cli/snap-tests-global/command-add-pnpm9/steps.json +++ b/packages/cli/snap-tests-global/command-add-pnpm9/steps.json @@ -1,7 +1,6 @@ { "ignoredPlatforms": ["win32"], "env": { - "VITE_DISABLE_AUTO_INSTALL": "1", "NODE_OPTIONS": "--no-deprecation" }, "commands": [ diff --git a/packages/cli/snap-tests-global/command-add-yarn4-with-workspace/steps.json b/packages/cli/snap-tests-global/command-add-yarn4-with-workspace/steps.json index 33b3e3295b..99fefefbc6 100644 --- a/packages/cli/snap-tests-global/command-add-yarn4-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-add-yarn4-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp add testnpm2 -D -w && cat package.json packages/app/package.json packages/utils/package.json # should add package to workspace root", "vp add @vite-plus-test/utils --workspace -w && cat package.json packages/app/package.json packages/utils/package.json # should add @vite-plus-test/utils to workspace root", diff --git a/packages/cli/snap-tests-global/command-add-yarn4/steps.json b/packages/cli/snap-tests-global/command-add-yarn4/steps.json index 4a7b03f71f..9402891b72 100644 --- a/packages/cli/snap-tests-global/command-add-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-add-yarn4/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp add --help # should show help", "vp add testnpm2 -D && cat package.json # should add package as dev dependencies", diff --git a/packages/cli/snap-tests-global/command-cache-npm10/steps.json b/packages/cli/snap-tests-global/command-cache-npm10/steps.json index 0d528cd197..1addd45b74 100644 --- a/packages/cli/snap-tests-global/command-cache-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-cache-npm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm cache dir # should show cache directory (uses npm config get cache)", "vp pm cache path # should show cache path (alias for dir, uses npm config get cache)" diff --git a/packages/cli/snap-tests-global/command-cache-pnpm10/steps.json b/packages/cli/snap-tests-global/command-cache-pnpm10/steps.json index 8416e89dc1..23198b09c4 100644 --- a/packages/cli/snap-tests-global/command-cache-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-cache-pnpm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm cache --help # should show help", "vp pm cache dir > /dev/null # should show cache directory (uses pnpm store path)", diff --git a/packages/cli/snap-tests-global/command-cache-yarn4/steps.json b/packages/cli/snap-tests-global/command-cache-yarn4/steps.json index f7aa5f1bf2..6443f72dda 100644 --- a/packages/cli/snap-tests-global/command-cache-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-cache-yarn4/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32", "darwin"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm cache dir # should show cache directory (uses yarn config get cacheFolder)", "vp pm cache path # should show cache path (alias for dir, uses yarn config get cacheFolder)" diff --git a/packages/cli/snap-tests-global/command-config-npm10/steps.json b/packages/cli/snap-tests-global/command-config-npm10/steps.json index e7e9b6ff01..849c8b08f8 100644 --- a/packages/cli/snap-tests-global/command-config-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-config-npm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "# vite pm config set vite-plus-pm-config-test-key test-value --location project # npm set will check valid keys start from npm v9, see https://github.com/npm/cli/issues/5852", "vp pm config get vite-plus-pm-config-test-key --location project # should get config value from project scope", diff --git a/packages/cli/snap-tests-global/command-config-pnpm10/steps.json b/packages/cli/snap-tests-global/command-config-pnpm10/steps.json index 32ef67bbdc..cc7100f93a 100644 --- a/packages/cli/snap-tests-global/command-config-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-config-pnpm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm config --help # should show help", "vp pm config list --location project > /dev/null # should list all project configuration", diff --git a/packages/cli/snap-tests-global/command-config-yarn1/steps.json b/packages/cli/snap-tests-global/command-config-yarn1/steps.json index 6f99d468b4..1dd7b227d5 100644 --- a/packages/cli/snap-tests-global/command-config-yarn1/steps.json +++ b/packages/cli/snap-tests-global/command-config-yarn1/steps.json @@ -1,6 +1,5 @@ { "env": { - "VITE_DISABLE_AUTO_INSTALL": "1", "NODE_OPTIONS": "--no-deprecation" }, "commands": [ diff --git a/packages/cli/snap-tests-global/command-config-yarn4/steps.json b/packages/cli/snap-tests-global/command-config-yarn4/steps.json index 931f5fc357..5da176346e 100644 --- a/packages/cli/snap-tests-global/command-config-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-config-yarn4/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm config set vite-plus-pm-config-test-key test-value --location project # should set config value in project scope", "vp pm config get vite-plus-pm-config-test-key --location project # should get config value from project scope", diff --git a/packages/cli/snap-tests-global/command-dedupe-npm10/steps.json b/packages/cli/snap-tests-global/command-dedupe-npm10/steps.json index f240fb5f14..23f246628a 100644 --- a/packages/cli/snap-tests-global/command-dedupe-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-dedupe-npm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp dedupe && cat package.json # should dedupe dependencies", "vp dedupe --check && cat package.json # should check if deduplication would make changes", diff --git a/packages/cli/snap-tests-global/command-dedupe-pnpm10/steps.json b/packages/cli/snap-tests-global/command-dedupe-pnpm10/steps.json index 36b8920a5d..6b161dfdc9 100644 --- a/packages/cli/snap-tests-global/command-dedupe-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-dedupe-pnpm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp dedupe --help # should show help", "vp dedupe && cat package.json # should dedupe dependencies", diff --git a/packages/cli/snap-tests-global/command-dedupe-yarn4/steps.json b/packages/cli/snap-tests-global/command-dedupe-yarn4/steps.json index 5b5d0b2d45..d642c2765d 100644 --- a/packages/cli/snap-tests-global/command-dedupe-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-dedupe-yarn4/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp dedupe && cat package.json # should dedupe dependencies", "vp dedupe --check && cat package.json # should check if deduplication would make changes", diff --git a/packages/cli/snap-tests-global/command-dlx-npm10/steps.json b/packages/cli/snap-tests-global/command-dlx-npm10/steps.json index d263433453..1ad3ecb05c 100644 --- a/packages/cli/snap-tests-global/command-dlx-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-dlx-npm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp dlx --help # should show help message", "vp dlx -s cowsay hello # should run cowsay with npm exec", diff --git a/packages/cli/snap-tests-global/command-dlx-pnpm10/steps.json b/packages/cli/snap-tests-global/command-dlx-pnpm10/steps.json index 9225e7836a..8e2a8b772b 100644 --- a/packages/cli/snap-tests-global/command-dlx-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-dlx-pnpm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp dlx --help # should show help message", "vp dlx -s cowsay hello # should run cowsay with pnpm dlx", diff --git a/packages/cli/snap-tests-global/command-dlx-yarn4/steps.json b/packages/cli/snap-tests-global/command-dlx-yarn4/steps.json index 8bfd7930fb..ebfa4b812a 100644 --- a/packages/cli/snap-tests-global/command-dlx-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-dlx-yarn4/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp dlx --help # should show help message", "vp dlx -s cowsay hello # should run cowsay with yarn dlx", diff --git a/packages/cli/snap-tests-global/command-install-auto-create-package-json/steps.json b/packages/cli/snap-tests-global/command-install-auto-create-package-json/steps.json index a600c41b6e..aa37f35ceb 100644 --- a/packages/cli/snap-tests-global/command-install-auto-create-package-json/steps.json +++ b/packages/cli/snap-tests-global/command-install-auto-create-package-json/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "test ! -f package.json && echo 'no package.json' # verify no package.json exists", "vp install --silent && cat package.json # should auto-create package.json and install", diff --git a/packages/cli/snap-tests-global/command-install-bug-31/steps.json b/packages/cli/snap-tests-global/command-install-bug-31/steps.json index 0b360cba49..bf97e9f125 100644 --- a/packages/cli/snap-tests-global/command-install-bug-31/steps.json +++ b/packages/cli/snap-tests-global/command-install-bug-31/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install --no-frozen-lockfile --silent # install dependencies work", "mkdir -p packages/sub-project && echo '{\"name\": \"sub-project\", \"dependencies\": { \"testnpm2\": \"1.0.0\" }}' > packages/sub-project/package.json # create sub project and package.json", diff --git a/packages/cli/snap-tests-global/command-link-npm10/steps.json b/packages/cli/snap-tests-global/command-link-npm10/steps.json index 140a720583..a438d03d22 100644 --- a/packages/cli/snap-tests-global/command-link-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-link-npm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "mkdir -p ../test-lib-npm && echo '{\"name\": \"test-lib-npm\", \"version\": \"1.0.0\"}' > ../test-lib-npm/package.json # create test library", "vp link ../test-lib-npm && cat package.json # should link local directory", diff --git a/packages/cli/snap-tests-global/command-link-pnpm10/steps.json b/packages/cli/snap-tests-global/command-link-pnpm10/steps.json index 71a2b79767..f56346977c 100644 --- a/packages/cli/snap-tests-global/command-link-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-link-pnpm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32", "linux"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp link -h # should show help message", "vp install # install initial dependencies", diff --git a/packages/cli/snap-tests-global/command-link-yarn4/steps.json b/packages/cli/snap-tests-global/command-link-yarn4/steps.json index a50277d390..23d3f82825 100644 --- a/packages/cli/snap-tests-global/command-link-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-link-yarn4/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "mkdir -p ../test-lib-yarn && echo '{\"name\": \"test-lib-yarn\", \"version\": \"1.0.0\"}' > ../test-lib-yarn/package.json # create test library", "vp link ../test-lib-yarn && cat package.json # should link local directory", diff --git a/packages/cli/snap-tests-global/command-list-npm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-list-npm10-with-workspace/steps.json index 6dfbfa29b8..e0f9ee1c84 100644 --- a/packages/cli/snap-tests-global/command-list-npm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-list-npm10-with-workspace/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install # should install packages first", "vp pm list --json # should list current workspace root dependencies", diff --git a/packages/cli/snap-tests-global/command-list-npm10/steps.json b/packages/cli/snap-tests-global/command-list-npm10/steps.json index 91af807eec..1c187c374c 100644 --- a/packages/cli/snap-tests-global/command-list-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-list-npm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install # should install packages first", "vp pm list --json # should list installed packages", diff --git a/packages/cli/snap-tests-global/command-list-pnpm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-list-pnpm10-with-workspace/steps.json index bae99ad138..01e66e8a54 100644 --- a/packages/cli/snap-tests-global/command-list-pnpm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-list-pnpm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install # should install packages first", "vp pm list # should list current workspace root dependencies", diff --git a/packages/cli/snap-tests-global/command-list-pnpm10/steps.json b/packages/cli/snap-tests-global/command-list-pnpm10/steps.json index 1e6f2ac116..5bde08798f 100644 --- a/packages/cli/snap-tests-global/command-list-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-list-pnpm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install # should install packages first", "vp pm list --help # should show help", diff --git a/packages/cli/snap-tests-global/command-list-yarn1/steps.json b/packages/cli/snap-tests-global/command-list-yarn1/steps.json index a141e342dd..6236751c91 100644 --- a/packages/cli/snap-tests-global/command-list-yarn1/steps.json +++ b/packages/cli/snap-tests-global/command-list-yarn1/steps.json @@ -1,6 +1,5 @@ { "env": { - "VITE_DISABLE_AUTO_INSTALL": "1", "NODE_OPTIONS": "--no-deprecation" }, "commands": [ diff --git a/packages/cli/snap-tests-global/command-list-yarn4/steps.json b/packages/cli/snap-tests-global/command-list-yarn4/steps.json index 95199c9324..80baf36800 100644 --- a/packages/cli/snap-tests-global/command-list-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-list-yarn4/steps.json @@ -1,6 +1,3 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp pm list # should show warning that yarn@2+ does not support list command"] } diff --git a/packages/cli/snap-tests-global/command-outdated-npm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-outdated-npm10-with-workspace/steps.json index e5c775ed0e..f14fca3617 100644 --- a/packages/cli/snap-tests-global/command-outdated-npm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-outdated-npm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install", "vp outdated testnpm2 -w # should outdated in workspace root", diff --git a/packages/cli/snap-tests-global/command-outdated-npm10/steps.json b/packages/cli/snap-tests-global/command-outdated-npm10/steps.json index fa88b61923..3690d07120 100644 --- a/packages/cli/snap-tests-global/command-outdated-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-outdated-npm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install # should install packages first", "vp outdated testnpm2 # should outdated package", diff --git a/packages/cli/snap-tests-global/command-outdated-pnpm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-outdated-pnpm10-with-workspace/steps.json index 7527c4280e..49be7120e4 100644 --- a/packages/cli/snap-tests-global/command-outdated-pnpm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-outdated-pnpm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install", "vp outdated testnpm2 -w # should outdated in workspace root", diff --git a/packages/cli/snap-tests-global/command-outdated-pnpm10/steps.json b/packages/cli/snap-tests-global/command-outdated-pnpm10/steps.json index ccab803397..b1e9e87cf3 100644 --- a/packages/cli/snap-tests-global/command-outdated-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-outdated-pnpm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp outdated --help # should show help", "vp install # should install packages first", diff --git a/packages/cli/snap-tests-global/command-outdated-yarn4/steps.json b/packages/cli/snap-tests-global/command-outdated-yarn4/steps.json index 9243f097b7..537a30f2d0 100644 --- a/packages/cli/snap-tests-global/command-outdated-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-outdated-yarn4/steps.json @@ -1,7 +1,4 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp outdated -- -h # should show yarn upgrade-interactive help"] } diff --git a/packages/cli/snap-tests-global/command-owner-npm10/steps.json b/packages/cli/snap-tests-global/command-owner-npm10/steps.json index da50da4543..de79172f65 100644 --- a/packages/cli/snap-tests-global/command-owner-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-owner-npm10/steps.json @@ -1,6 +1,3 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp pm owner list testnpm2 # should list package owners"] } diff --git a/packages/cli/snap-tests-global/command-owner-pnpm10/steps.json b/packages/cli/snap-tests-global/command-owner-pnpm10/steps.json index e50961cdd6..e5e626f011 100644 --- a/packages/cli/snap-tests-global/command-owner-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-owner-pnpm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm owner --help # should show help", "vp pm owner list testnpm2 # should list package owners (uses npm owner)" diff --git a/packages/cli/snap-tests-global/command-owner-yarn1/steps.json b/packages/cli/snap-tests-global/command-owner-yarn1/steps.json index 76e9398133..52942b128f 100644 --- a/packages/cli/snap-tests-global/command-owner-yarn1/steps.json +++ b/packages/cli/snap-tests-global/command-owner-yarn1/steps.json @@ -1,6 +1,3 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp pm owner list testnpm2 # should list package owners (uses npm owner)"] } diff --git a/packages/cli/snap-tests-global/command-owner-yarn4/steps.json b/packages/cli/snap-tests-global/command-owner-yarn4/steps.json index 76e9398133..52942b128f 100644 --- a/packages/cli/snap-tests-global/command-owner-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-owner-yarn4/steps.json @@ -1,6 +1,3 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp pm owner list testnpm2 # should list package owners (uses npm owner)"] } diff --git a/packages/cli/snap-tests-global/command-pack-npm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-pack-npm10-with-workspace/steps.json index 5288aebc3a..be795bb4c1 100644 --- a/packages/cli/snap-tests-global/command-pack-npm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-pack-npm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm pack --json # should pack current workspace root", "vp pm pack --recursive --json && rm -rf *.tgz # should pack all packages in workspace (uses --workspaces)", diff --git a/packages/cli/snap-tests-global/command-pack-npm10/steps.json b/packages/cli/snap-tests-global/command-pack-npm10/steps.json index 2b09f6b231..ed0948edf1 100644 --- a/packages/cli/snap-tests-global/command-pack-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-pack-npm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm pack --json && rm -rf *.tgz # should pack current package", "vp pm pack --pack-destination ./dist --json && rm -rf ./dist # should pack with destination", diff --git a/packages/cli/snap-tests-global/command-pack-pnpm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-pack-pnpm10-with-workspace/steps.json index 8c69ae20b7..7c6dc4b414 100644 --- a/packages/cli/snap-tests-global/command-pack-pnpm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-pack-pnpm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm pack && rm -rf *.tgz # should pack current workspace root", "vp pm pack --recursive --json > out.json && tool json-sort out.json '_.name' && cat out.json && rm -rf *.tgz # should pack all packages in workspace", diff --git a/packages/cli/snap-tests-global/command-pack-pnpm10/steps.json b/packages/cli/snap-tests-global/command-pack-pnpm10/steps.json index 27ece87f4e..40db7dd3ea 100644 --- a/packages/cli/snap-tests-global/command-pack-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-pack-pnpm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm pack --help # should show help", "vp pm pack && rm -rf *.tgz # should pack current package", diff --git a/packages/cli/snap-tests-global/command-pack-yarn4-with-workspace/steps.json b/packages/cli/snap-tests-global/command-pack-yarn4-with-workspace/steps.json index ed5d854ae7..7f74c6d327 100644 --- a/packages/cli/snap-tests-global/command-pack-yarn4-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-pack-yarn4-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install -- --mode=update-lockfile # should install packages first", "vp pm pack # should pack current workspace root", diff --git a/packages/cli/snap-tests-global/command-pack-yarn4/steps.json b/packages/cli/snap-tests-global/command-pack-yarn4/steps.json index 20de1ec936..c7fdf32e68 100644 --- a/packages/cli/snap-tests-global/command-pack-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-pack-yarn4/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm pack # should pack current package", "vp pm pack --out ./dist/package.tgz # should pack with output file", diff --git a/packages/cli/snap-tests-global/command-prune-npm10/steps.json b/packages/cli/snap-tests-global/command-prune-npm10/steps.json index 360dd84fa5..b3631fb003 100644 --- a/packages/cli/snap-tests-global/command-prune-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-prune-npm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install # should install packages first", "vp pm prune --help # should show help", diff --git a/packages/cli/snap-tests-global/command-prune-pnpm10/steps.json b/packages/cli/snap-tests-global/command-prune-pnpm10/steps.json index 3e624e2aa5..77481edd61 100644 --- a/packages/cli/snap-tests-global/command-prune-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-prune-pnpm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install # should install packages first", "vp pm prune --help # should show help", diff --git a/packages/cli/snap-tests-global/command-prune-yarn4/steps.json b/packages/cli/snap-tests-global/command-prune-yarn4/steps.json index 244a4c4505..6d96d79769 100644 --- a/packages/cli/snap-tests-global/command-prune-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-prune-yarn4/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm prune --help # should show help", "vp pm prune # should show warning that yarn does not support prune command" diff --git a/packages/cli/snap-tests-global/command-publish-npm10/steps.json b/packages/cli/snap-tests-global/command-publish-npm10/steps.json index 748e0719e2..fb390f356f 100644 --- a/packages/cli/snap-tests-global/command-publish-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-publish-npm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm publish --dry-run -- --loglevel error # should preview publish without actually publishing (uses npm publish --dry-run)" ] diff --git a/packages/cli/snap-tests-global/command-publish-pnpm10/steps.json b/packages/cli/snap-tests-global/command-publish-pnpm10/steps.json index d1d096114c..35a46e6d86 100644 --- a/packages/cli/snap-tests-global/command-publish-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-publish-pnpm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm publish --help # should show help", "vp pm publish --dry-run -- --loglevel error # should preview publish without actually publishing (uses pnpm publish --dry-run)" diff --git a/packages/cli/snap-tests-global/command-publish-yarn1/steps.json b/packages/cli/snap-tests-global/command-publish-yarn1/steps.json index 748e0719e2..fb390f356f 100644 --- a/packages/cli/snap-tests-global/command-publish-yarn1/steps.json +++ b/packages/cli/snap-tests-global/command-publish-yarn1/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm publish --dry-run -- --loglevel error # should preview publish without actually publishing (uses npm publish --dry-run)" ] diff --git a/packages/cli/snap-tests-global/command-publish-yarn4/steps.json b/packages/cli/snap-tests-global/command-publish-yarn4/steps.json index 748e0719e2..fb390f356f 100644 --- a/packages/cli/snap-tests-global/command-publish-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-publish-yarn4/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm publish --dry-run -- --loglevel error # should preview publish without actually publishing (uses npm publish --dry-run)" ] diff --git a/packages/cli/snap-tests-global/command-remove-npm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-remove-npm10-with-workspace/steps.json index a0b369385e..f34a845501 100644 --- a/packages/cli/snap-tests-global/command-remove-npm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-remove-npm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp add testnpm2 -D -w --filter=* -- --no-audit && vp add test-vite-plus-install -w --filter=* -- --no-audit && vp add test-vite-plus-package-optional -O --filter=* -- --no-audit && cat package.json packages/app/package.json packages/utils/package.json # prepare packages", "vp remove testnpm2 -r -- --no-audit && cat package.json packages/app/package.json packages/utils/package.json # should remove package from all workspaces and root", diff --git a/packages/cli/snap-tests-global/command-remove-npm10/steps.json b/packages/cli/snap-tests-global/command-remove-npm10/steps.json index c0c59ee776..43b538a657 100644 --- a/packages/cli/snap-tests-global/command-remove-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-remove-npm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp remove testnpm2 -D -- --no-audit && cat package.json # should pass when remove not exists package", "vp add testnpm2 -- --no-audit && vp add -D test-vite-plus-install -- --no-audit && vp add -O test-vite-plus-package-optional -- --no-audit && cat package.json # should add packages to dependencies", diff --git a/packages/cli/snap-tests-global/command-remove-pnpm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-remove-pnpm10-with-workspace/steps.json index 0175729633..27265fa59b 100644 --- a/packages/cli/snap-tests-global/command-remove-pnpm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-remove-pnpm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp add testnpm2 -D -w --filter=* && vp add test-vite-plus-install -w --filter=* && vp add test-vite-plus-package-optional -O --filter=* && cat package.json packages/app/package.json packages/utils/package.json # prepare packages", "vp remove testnpm2 -r && cat package.json packages/app/package.json packages/utils/package.json # should remove package from all workspaces and root", diff --git a/packages/cli/snap-tests-global/command-remove-pnpm10/steps.json b/packages/cli/snap-tests-global/command-remove-pnpm10/steps.json index 4a13862ca4..7a98a5e6b4 100644 --- a/packages/cli/snap-tests-global/command-remove-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-remove-pnpm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp remove --help # should show help", "vp remove # should error because no packages specified", diff --git a/packages/cli/snap-tests-global/command-remove-yarn4-with-workspace/steps.json b/packages/cli/snap-tests-global/command-remove-yarn4-with-workspace/steps.json index d16264681d..803b08fa7c 100644 --- a/packages/cli/snap-tests-global/command-remove-yarn4-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-remove-yarn4-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp add testnpm2 -D && vp add testnpm2 -D --filter=* --filter=@vite-plus-test/utils && vp add test-vite-plus-install --filter=* --filter=@vite-plus-test/utils && vp add test-vite-plus-package-optional -O --filter=* --filter=@vite-plus-test/utils && cat package.json packages/app/package.json packages/admin/package.json packages/utils/package.json # prepare packages", "vp remove testnpm2 -r && cat package.json packages/app/package.json packages/admin/package.json packages/utils/package.json # should remove package from all workspaces and root", diff --git a/packages/cli/snap-tests-global/command-remove-yarn4/steps.json b/packages/cli/snap-tests-global/command-remove-yarn4/steps.json index b8fa417cad..eeb83985a4 100644 --- a/packages/cli/snap-tests-global/command-remove-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-remove-yarn4/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp remove testnpm2 -D && cat package.json # should error when remove not exists package", "vp add testnpm2 && vp add -D test-vite-plus-install && vp add -O test-vite-plus-package-optional && cat package.json # should add packages to dependencies", diff --git a/packages/cli/snap-tests-global/command-run-without-vite-plus/steps.json b/packages/cli/snap-tests-global/command-run-without-vite-plus/steps.json index ac1d07f1cc..e87631131e 100644 --- a/packages/cli/snap-tests-global/command-run-without-vite-plus/steps.json +++ b/packages/cli/snap-tests-global/command-run-without-vite-plus/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "ignoredPlatforms": ["win32"], "commands": [ "vp run hello # should fall back to pnpm run when no vite-plus dependency", diff --git a/packages/cli/snap-tests-global/command-unlink-npm10/steps.json b/packages/cli/snap-tests-global/command-unlink-npm10/steps.json index c6c69c701f..bafebe5c12 100644 --- a/packages/cli/snap-tests-global/command-unlink-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-unlink-npm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "mkdir -p ../unlink-test-lib-npm && echo '{\"name\": \"unlink-test-lib-npm\", \"version\": \"1.0.0\"}' > ../unlink-test-lib-npm/package.json # create test library", "vp link ../unlink-test-lib-npm && cat package.json # link the library first", diff --git a/packages/cli/snap-tests-global/command-unlink-pnpm10/steps.json b/packages/cli/snap-tests-global/command-unlink-pnpm10/steps.json index a775f3ea87..491581a67b 100644 --- a/packages/cli/snap-tests-global/command-unlink-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-unlink-pnpm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp unlink -h # should show help message", "mkdir -p ../unlink-test-lib && echo '{\"name\": \"unlink-test-lib\", \"version\": \"1.0.0\"}' > ../unlink-test-lib/package.json # create test library", diff --git a/packages/cli/snap-tests-global/command-unlink-yarn4/steps.json b/packages/cli/snap-tests-global/command-unlink-yarn4/steps.json index a0ca20c08b..2694fa27b5 100644 --- a/packages/cli/snap-tests-global/command-unlink-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-unlink-yarn4/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "mkdir -p ../unlink-test-lib-yarn && echo '{\"name\": \"unlink-test-lib-yarn\", \"version\": \"1.0.0\"}' > ../unlink-test-lib-yarn/package.json # create test library", "vp link ../unlink-test-lib-yarn && cat package.json # link the library first", diff --git a/packages/cli/snap-tests-global/command-update-npm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-update-npm10-with-workspace/steps.json index 1d072e8b93..5e985d2770 100644 --- a/packages/cli/snap-tests-global/command-update-npm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-update-npm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp update testnpm2 -w -- --no-audit && cat package.json # should update in workspace root", "vp update testnpm2 --latest --filter app -- --no-audit && cat packages/app/package.json # should update in specific package", diff --git a/packages/cli/snap-tests-global/command-update-npm10/steps.json b/packages/cli/snap-tests-global/command-update-npm10/steps.json index 1c2bfaf198..b5970ab7c7 100644 --- a/packages/cli/snap-tests-global/command-update-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-update-npm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp update testnpm2 -- --no-audit && cat package.json # should update package within semver range", "vp up testnpm2 --latest -- --no-audit && cat package.json # should to absolute latest version", diff --git a/packages/cli/snap-tests-global/command-update-pnpm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-update-pnpm10-with-workspace/steps.json index 275504b5df..3bcf5b33b8 100644 --- a/packages/cli/snap-tests-global/command-update-pnpm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-update-pnpm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp update testnpm2 --latest -w && cat package.json # should update in workspace root", "vp update testnpm2 --latest --filter app && cat packages/app/package.json # should update in specific package", diff --git a/packages/cli/snap-tests-global/command-update-pnpm10/steps.json b/packages/cli/snap-tests-global/command-update-pnpm10/steps.json index 8fb832c59b..6e517683eb 100644 --- a/packages/cli/snap-tests-global/command-update-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-update-pnpm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp update --help # should show help", "vp update testnpm2 && cat package.json # should update package within semver range", diff --git a/packages/cli/snap-tests-global/command-update-yarn4-with-workspace/steps.json b/packages/cli/snap-tests-global/command-update-yarn4-with-workspace/steps.json index 01132b55dc..373054c776 100644 --- a/packages/cli/snap-tests-global/command-update-yarn4-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-update-yarn4-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp update testnpm2 && cat package.json packages/utils/package.json # should update all testnpm2 versions", "vp update testnpm2 --latest --filter app && cat packages/app/package.json # should update in specific package", diff --git a/packages/cli/snap-tests-global/command-update-yarn4/steps.json b/packages/cli/snap-tests-global/command-update-yarn4/steps.json index 5451801393..515897ded8 100644 --- a/packages/cli/snap-tests-global/command-update-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-update-yarn4/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp update testnpm2 && cat package.json # should update package within semver range", "vp rm testnpm2 && vp add testnpm2@1.0.0 -D && vp update testnpm2 --latest && cat package.json # should to absolute latest version", diff --git a/packages/cli/snap-tests-global/command-view-npm10/steps.json b/packages/cli/snap-tests-global/command-view-npm10/steps.json index 4562d0e988..06e6872722 100644 --- a/packages/cli/snap-tests-global/command-view-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-view-npm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm view testnpm2 dist.tarball # should view testnpm2 package information", "vp pm info testnpm2 dist.tarball # should info alias to view", diff --git a/packages/cli/snap-tests-global/command-view-pnpm10/steps.json b/packages/cli/snap-tests-global/command-view-pnpm10/steps.json index 1998548d94..c89aea7830 100644 --- a/packages/cli/snap-tests-global/command-view-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-view-pnpm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm view --help # should show help", "vp pm view testnpm2 # should view lodash package information (uses npm view)", diff --git a/packages/cli/snap-tests-global/command-view-yarn1/steps.json b/packages/cli/snap-tests-global/command-view-yarn1/steps.json index a554e4a81d..2b568f1267 100644 --- a/packages/cli/snap-tests-global/command-view-yarn1/steps.json +++ b/packages/cli/snap-tests-global/command-view-yarn1/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm view testnpm2 # should view testnpm2 package information (uses npm view)", "vp pm view testnpm2 version # should view testnpm2 version field (uses npm view)" diff --git a/packages/cli/snap-tests-global/command-view-yarn4/steps.json b/packages/cli/snap-tests-global/command-view-yarn4/steps.json index a554e4a81d..2b568f1267 100644 --- a/packages/cli/snap-tests-global/command-view-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-view-yarn4/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pm view testnpm2 # should view testnpm2 package information (uses npm view)", "vp pm view testnpm2 version # should view testnpm2 version field (uses npm view)" diff --git a/packages/cli/snap-tests-global/command-vpx-pnpm10/steps.json b/packages/cli/snap-tests-global/command-vpx-pnpm10/steps.json index 1ee5671a13..1947f55875 100644 --- a/packages/cli/snap-tests-global/command-vpx-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-vpx-pnpm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vpx --help # should show vpx help message", "vpx -s cowsay hello # should run cowsay via dlx fallback" diff --git a/packages/cli/snap-tests-global/command-why-npm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-why-npm10-with-workspace/steps.json index 5f96d774f3..135b9d7d35 100644 --- a/packages/cli/snap-tests-global/command-why-npm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-why-npm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install", "vp why testnpm2 --filter app # should check why in specific workspace using --workspace", diff --git a/packages/cli/snap-tests-global/command-why-npm10/steps.json b/packages/cli/snap-tests-global/command-why-npm10/steps.json index 9f1724771b..29cc96566a 100644 --- a/packages/cli/snap-tests-global/command-why-npm10/steps.json +++ b/packages/cli/snap-tests-global/command-why-npm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install # should install packages first", "vp why testnpm2 # should show why package is installed (uses npm explain)", diff --git a/packages/cli/snap-tests-global/command-why-pnpm10-with-workspace/steps.json b/packages/cli/snap-tests-global/command-why-pnpm10-with-workspace/steps.json index 1b88cb08c4..52da8c58de 100644 --- a/packages/cli/snap-tests-global/command-why-pnpm10-with-workspace/steps.json +++ b/packages/cli/snap-tests-global/command-why-pnpm10-with-workspace/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install", "vp why testnpm2 -w # should check why in workspace root", diff --git a/packages/cli/snap-tests-global/command-why-pnpm10/steps.json b/packages/cli/snap-tests-global/command-why-pnpm10/steps.json index 3c495a3760..e7b38a4206 100644 --- a/packages/cli/snap-tests-global/command-why-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/command-why-pnpm10/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp why --help # should show help", "vp install # should install packages first", diff --git a/packages/cli/snap-tests-global/command-why-yarn4/steps.json b/packages/cli/snap-tests-global/command-why-yarn4/steps.json index 919b51e7fa..cf7223a300 100644 --- a/packages/cli/snap-tests-global/command-why-yarn4/steps.json +++ b/packages/cli/snap-tests-global/command-why-yarn4/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install -- --mode=update-lockfile # should install packages first", "vp why testnpm2 # should show why package is installed", diff --git a/packages/cli/snap-tests-global/dev-engines-runtime-pnpm10/steps.json b/packages/cli/snap-tests-global/dev-engines-runtime-pnpm10/steps.json index 01b43448f5..2bf71c6544 100644 --- a/packages/cli/snap-tests-global/dev-engines-runtime-pnpm10/steps.json +++ b/packages/cli/snap-tests-global/dev-engines-runtime-pnpm10/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp dlx -s print-current-version # should print Node.js version 22.11.0 from devEngines.runtime" ] diff --git a/packages/cli/snap-tests-global/global-cli-fallback/steps.json b/packages/cli/snap-tests-global/global-cli-fallback/steps.json index a72e8c6a04..7ea415e472 100644 --- a/packages/cli/snap-tests-global/global-cli-fallback/steps.json +++ b/packages/cli/snap-tests-global/global-cli-fallback/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "ignoredPlatforms": ["win32"], "commands": [ "vp build -h # should fall back to global vite-plus and show build help", diff --git a/packages/cli/snap-tests-global/migration-agent-claude/steps.json b/packages/cli/snap-tests-global/migration-agent-claude/steps.json index 4a544f202c..a492a4273f 100644 --- a/packages/cli/snap-tests-global/migration-agent-claude/steps.json +++ b/packages/cli/snap-tests-global/migration-agent-claude/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --agent claude --no-interactive # migration with --agent claude should write CLAUDE.md", "cat CLAUDE.md | head -3 # verify CLAUDE.md was created" diff --git a/packages/cli/snap-tests-global/migration-auto-create-vite-config/steps.json b/packages/cli/snap-tests-global/migration-auto-create-vite-config/steps.json index ecde497a32..22f495e2ec 100644 --- a/packages/cli/snap-tests-global/migration-auto-create-vite-config/steps.json +++ b/packages/cli/snap-tests-global/migration-auto-create-vite-config/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should auto create vite.config.ts and remove oxlintrc and oxfmtrc", "cat vite.config.ts # check vite.config.ts", diff --git a/packages/cli/snap-tests-global/migration-from-tsdown-json-config/steps.json b/packages/cli/snap-tests-global/migration-from-tsdown-json-config/steps.json index a7d3c4fd7c..68b08d1b03 100644 --- a/packages/cli/snap-tests-global/migration-from-tsdown-json-config/steps.json +++ b/packages/cli/snap-tests-global/migration-from-tsdown-json-config/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should rewrite imports to vite-plus", "cat tsdown.config.json && exit 1 || true # check tsdown.config.json should be removed", diff --git a/packages/cli/snap-tests-global/migration-from-tsdown/steps.json b/packages/cli/snap-tests-global/migration-from-tsdown/steps.json index 12b3d97676..5a050e597a 100644 --- a/packages/cli/snap-tests-global/migration-from-tsdown/steps.json +++ b/packages/cli/snap-tests-global/migration-from-tsdown/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should rewrite imports to vite-plus", "cat tsdown.config.ts # check tsdown.config.ts", diff --git a/packages/cli/snap-tests-global/migration-from-vitest-config/steps.json b/packages/cli/snap-tests-global/migration-from-vitest-config/steps.json index 1342707009..593345b4fd 100644 --- a/packages/cli/snap-tests-global/migration-from-vitest-config/steps.json +++ b/packages/cli/snap-tests-global/migration-from-vitest-config/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should rewrite imports to vite-plus", "cat vitest.config.ts # check vitest.config.ts", diff --git a/packages/cli/snap-tests-global/migration-from-vitest-files/steps.json b/packages/cli/snap-tests-global/migration-from-vitest-files/steps.json index e823162737..c1088f184a 100644 --- a/packages/cli/snap-tests-global/migration-from-vitest-files/steps.json +++ b/packages/cli/snap-tests-global/migration-from-vitest-files/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should rewrite imports to vite-plus", "cat package.json # check package.json", diff --git a/packages/cli/snap-tests-global/migration-lintstagedrc-json/steps.json b/packages/cli/snap-tests-global/migration-lintstagedrc-json/steps.json index 21ae3fc2fc..05166b8252 100644 --- a/packages/cli/snap-tests-global/migration-lintstagedrc-json/steps.json +++ b/packages/cli/snap-tests-global/migration-lintstagedrc-json/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate -h # migration help message", "vp migrate --no-interactive # migration work with lintstagedrc.json", diff --git a/packages/cli/snap-tests-global/migration-lintstagedrc-not-support/steps.json b/packages/cli/snap-tests-global/migration-lintstagedrc-not-support/steps.json index bcc8077a34..60443e188e 100644 --- a/packages/cli/snap-tests-global/migration-lintstagedrc-not-support/steps.json +++ b/packages/cli/snap-tests-global/migration-lintstagedrc-not-support/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should not support non-json format lintstagedrc", "cat .lintstagedrc # check .lintstagedrc is not updated", diff --git a/packages/cli/snap-tests-global/migration-merge-vite-config-js/steps.json b/packages/cli/snap-tests-global/migration-merge-vite-config-js/steps.json index 924ddf3214..0375320d78 100644 --- a/packages/cli/snap-tests-global/migration-merge-vite-config-js/steps.json +++ b/packages/cli/snap-tests-global/migration-merge-vite-config-js/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should merge vite.config.js and remove oxlintrc", "cat vite.config.js # check vite.config.js", diff --git a/packages/cli/snap-tests-global/migration-merge-vite-config-ts/steps.json b/packages/cli/snap-tests-global/migration-merge-vite-config-ts/steps.json index 557279f85d..542a8d33d6 100644 --- a/packages/cli/snap-tests-global/migration-merge-vite-config-ts/steps.json +++ b/packages/cli/snap-tests-global/migration-merge-vite-config-ts/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should merge vite.config.ts and remove oxlintrc and oxfmtrc", "cat vite.config.ts # check vite.config.ts", diff --git a/packages/cli/snap-tests-global/migration-monorepo-pnpm-overrides-dependency-selector/steps.json b/packages/cli/snap-tests-global/migration-monorepo-pnpm-overrides-dependency-selector/steps.json index 3dfcdd464d..fed3fce908 100644 --- a/packages/cli/snap-tests-global/migration-monorepo-pnpm-overrides-dependency-selector/steps.json +++ b/packages/cli/snap-tests-global/migration-monorepo-pnpm-overrides-dependency-selector/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should merge pnpm overrides with dependency selector", "cat vite.config.ts # check vite.config.ts", diff --git a/packages/cli/snap-tests-global/migration-monorepo-pnpm/steps.json b/packages/cli/snap-tests-global/migration-monorepo-pnpm/steps.json index d63145d090..d4bda211fe 100644 --- a/packages/cli/snap-tests-global/migration-monorepo-pnpm/steps.json +++ b/packages/cli/snap-tests-global/migration-monorepo-pnpm/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should merge vite.config.ts and remove oxlintrc and oxfmtrc", "cat vite.config.ts # check vite.config.ts", diff --git a/packages/cli/snap-tests-global/migration-monorepo-skip-vite-peer-dependency/steps.json b/packages/cli/snap-tests-global/migration-monorepo-skip-vite-peer-dependency/steps.json index e7b6c2e6c5..4cd2e5c2d3 100644 --- a/packages/cli/snap-tests-global/migration-monorepo-skip-vite-peer-dependency/steps.json +++ b/packages/cli/snap-tests-global/migration-monorepo-skip-vite-peer-dependency/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should check each package's peerDependencies", "cat packages/vite-plugin/src/index.ts # vite-plugin has vite in peerDeps: vite NOT rewritten, vitest rewritten", diff --git a/packages/cli/snap-tests-global/migration-monorepo-yarn4/steps.json b/packages/cli/snap-tests-global/migration-monorepo-yarn4/steps.json index 9196fa1106..03324b637b 100644 --- a/packages/cli/snap-tests-global/migration-monorepo-yarn4/steps.json +++ b/packages/cli/snap-tests-global/migration-monorepo-yarn4/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should merge vite.config.ts and remove oxlintrc", "cat vite.config.ts # check vite.config.ts", diff --git a/packages/cli/snap-tests-global/migration-no-agent/steps.json b/packages/cli/snap-tests-global/migration-no-agent/steps.json index 6c604001cd..a810a7b109 100644 --- a/packages/cli/snap-tests-global/migration-no-agent/steps.json +++ b/packages/cli/snap-tests-global/migration-no-agent/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-agent --no-interactive # migration with --no-agent should skip agent instructions", "ls -la | grep -E '(AGENTS|CLAUDE)' || echo 'No agent file created' # verify no agent file was created" diff --git a/packages/cli/snap-tests-global/migration-not-supported-npm8.2/steps.json b/packages/cli/snap-tests-global/migration-not-supported-npm8.2/steps.json index e29c5aed8d..9d7134ea9e 100644 --- a/packages/cli/snap-tests-global/migration-not-supported-npm8.2/steps.json +++ b/packages/cli/snap-tests-global/migration-not-supported-npm8.2/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should fail because npm version is not supported", "cat package.json # check package.json is not updated" diff --git a/packages/cli/snap-tests-global/migration-not-supported-pnpm9.4/steps.json b/packages/cli/snap-tests-global/migration-not-supported-pnpm9.4/steps.json index a533e24783..707db2e2d1 100644 --- a/packages/cli/snap-tests-global/migration-not-supported-pnpm9.4/steps.json +++ b/packages/cli/snap-tests-global/migration-not-supported-pnpm9.4/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should fail because pnpm version is not supported", "cat package.json # check package.json is not updated" diff --git a/packages/cli/snap-tests-global/migration-not-supported-vite6/steps.json b/packages/cli/snap-tests-global/migration-not-supported-vite6/steps.json index 3659b71fd5..a6ac0e2648 100644 --- a/packages/cli/snap-tests-global/migration-not-supported-vite6/steps.json +++ b/packages/cli/snap-tests-global/migration-not-supported-vite6/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ { "command": "vp install # install dependencies first", diff --git a/packages/cli/snap-tests-global/migration-not-supported-vitest3/steps.json b/packages/cli/snap-tests-global/migration-not-supported-vitest3/steps.json index 3861e3203f..6aa4946fb5 100644 --- a/packages/cli/snap-tests-global/migration-not-supported-vitest3/steps.json +++ b/packages/cli/snap-tests-global/migration-not-supported-vitest3/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ { "command": "vp install # install dependencies first", diff --git a/packages/cli/snap-tests-global/migration-rewrite-declare-module/steps.json b/packages/cli/snap-tests-global/migration-rewrite-declare-module/steps.json index 19b9bada8f..a896881618 100644 --- a/packages/cli/snap-tests-global/migration-rewrite-declare-module/steps.json +++ b/packages/cli/snap-tests-global/migration-rewrite-declare-module/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should rewrite imports to vite-plus", "cat src/index.ts # check src/index.ts", diff --git a/packages/cli/snap-tests-global/migration-skip-vite-dependency/steps.json b/packages/cli/snap-tests-global/migration-skip-vite-dependency/steps.json index c2f5dc4c1e..4d95cc5dde 100644 --- a/packages/cli/snap-tests-global/migration-skip-vite-dependency/steps.json +++ b/packages/cli/snap-tests-global/migration-skip-vite-dependency/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should skip rewriting vite imports when vite is in dependencies", "cat src/index.ts # vite imports should NOT be rewritten, vitest imports SHOULD be rewritten", diff --git a/packages/cli/snap-tests-global/migration-skip-vite-peer-dependency/steps.json b/packages/cli/snap-tests-global/migration-skip-vite-peer-dependency/steps.json index d66832e4fa..6cee4ca524 100644 --- a/packages/cli/snap-tests-global/migration-skip-vite-peer-dependency/steps.json +++ b/packages/cli/snap-tests-global/migration-skip-vite-peer-dependency/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp migrate --no-interactive # migration should skip rewriting vite imports when vite is in peerDependencies", "cat src/index.ts # vite imports should NOT be rewritten, vitest imports SHOULD be rewritten", diff --git a/packages/cli/snap-tests-global/new-create-vite-with-scope-name/steps.json b/packages/cli/snap-tests-global/new-create-vite-with-scope-name/steps.json index 3d4f8de5fa..ffce8fd9e8 100644 --- a/packages/cli/snap-tests-global/new-create-vite-with-scope-name/steps.json +++ b/packages/cli/snap-tests-global/new-create-vite-with-scope-name/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ { "command": "vp create vite:application --no-interactive --directory @my-scope/my-vite-app -- --template vanilla-ts # create vite app with vanilla-ts template with scope name", diff --git a/packages/cli/snap-tests-global/new-create-vite/steps.json b/packages/cli/snap-tests-global/new-create-vite/steps.json index 8b9d8e66f6..a3a241c268 100644 --- a/packages/cli/snap-tests-global/new-create-vite/steps.json +++ b/packages/cli/snap-tests-global/new-create-vite/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ { "command": "vp create vite:application --no-interactive # create vite app with default values", diff --git a/packages/cli/snap-tests-todo/command-pack-watch-restart/steps.json b/packages/cli/snap-tests-todo/command-pack-watch-restart/steps.json index 41e0cd82fe..1a0642130c 100644 --- a/packages/cli/snap-tests-todo/command-pack-watch-restart/steps.json +++ b/packages/cli/snap-tests-todo/command-pack-watch-restart/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "bash run-watch.sh", "bash wait-for-dist.sh # wait for initial build", diff --git a/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/steps.json b/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/steps.json index 8487ad9d94..6d8f62d58c 100644 --- a/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/steps.json +++ b/packages/cli/snap-tests-todo/exit-non-zero-on-cmd-not-exists/steps.json @@ -1,7 +1,4 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vite command-not-exists # should exit with non-zero code"] } diff --git a/packages/cli/snap-tests-todo/pnpm-install-with-options/steps.json b/packages/cli/snap-tests-todo/pnpm-install-with-options/steps.json index f3b5bd7ce9..cf11422a88 100644 --- a/packages/cli/snap-tests-todo/pnpm-install-with-options/steps.json +++ b/packages/cli/snap-tests-todo/pnpm-install-with-options/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vite install --help | head -n 20 # print help message", "vite install --prod # https://pnpm.io/cli/install#--prod--p", diff --git a/packages/cli/snap-tests-todo/test-panicked-fix/steps.json b/packages/cli/snap-tests-todo/test-panicked-fix/steps.json index 453ddd3e9a..03be996f34 100644 --- a/packages/cli/snap-tests-todo/test-panicked-fix/steps.json +++ b/packages/cli/snap-tests-todo/test-panicked-fix/steps.json @@ -1,7 +1,4 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vite lint --help | head -n 20 # print help message and no panicked"] } diff --git a/packages/cli/snap-tests/auto-install-before-task/package.json b/packages/cli/snap-tests/auto-install-before-task/package.json deleted file mode 100644 index 037ac3ff61..0000000000 --- a/packages/cli/snap-tests/auto-install-before-task/package.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "name": "auto-install-before-task", - "version": "1.0.0", - "private": true, - "scripts": { - "hello": "echo hello" - }, - "packageManager": "pnpm@10.15.1" -} diff --git a/packages/cli/snap-tests/auto-install-before-task/snap.txt b/packages/cli/snap-tests/auto-install-before-task/snap.txt deleted file mode 100644 index d815101758..0000000000 --- a/packages/cli/snap-tests/auto-install-before-task/snap.txt +++ /dev/null @@ -1,12 +0,0 @@ -> vp run hello # first run - should show pnpm install output -Already up to date - -Done in ms using pnpm v -$ echo hello ⊘ cache disabled -hello - - -> vp run hello # second run - no pnpm install output (cache hit, silent) -$ echo hello ⊘ cache disabled -hello - diff --git a/packages/cli/snap-tests/auto-install-before-task/steps.json b/packages/cli/snap-tests/auto-install-before-task/steps.json deleted file mode 100644 index ba74e89860..0000000000 --- a/packages/cli/snap-tests/auto-install-before-task/steps.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "ignoredPlatforms": [], - "commands": [ - "vp run hello # first run - should show pnpm install output", - "vp run hello # second run - no pnpm install output (cache hit, silent)" - ] -} diff --git a/packages/cli/snap-tests/build-vite-env/steps.json b/packages/cli/snap-tests/build-vite-env/steps.json index a66b46ef49..4ceca167c3 100644 --- a/packages/cli/snap-tests/build-vite-env/steps.json +++ b/packages/cli/snap-tests/build-vite-env/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "VITE_MY_VAR=1 vp run build", "VITE_MY_VAR=1 vp run build # should hit cache", diff --git a/packages/cli/snap-tests/cache-clean/steps.json b/packages/cli/snap-tests/cache-clean/steps.json index 16856b7848..de31515e84 100644 --- a/packages/cli/snap-tests/cache-clean/steps.json +++ b/packages/cli/snap-tests/cache-clean/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": [], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run hello # create the cache for 'echo hello'", "vp run hello # hit the cache", diff --git a/packages/cli/snap-tests/cache-scripts-default/steps.json b/packages/cli/snap-tests/cache-scripts-default/steps.json index ed7442141b..b02f102cd6 100644 --- a/packages/cli/snap-tests/cache-scripts-default/steps.json +++ b/packages/cli/snap-tests/cache-scripts-default/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run hello 2>&1 | grep 'cache disabled' # cache should be disabled by default for package.json scripts", "vp run hello 2>&1 | grep 'cache disabled' # second run should also show cache disabled" diff --git a/packages/cli/snap-tests/cache-scripts-enabled/steps.json b/packages/cli/snap-tests/cache-scripts-enabled/steps.json index 47e53d5d82..f6d27bf56c 100644 --- a/packages/cli/snap-tests/cache-scripts-enabled/steps.json +++ b/packages/cli/snap-tests/cache-scripts-enabled/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run hello # first run should be cache miss", "vp run hello # second run should be cache hit" diff --git a/packages/cli/snap-tests/change-passthrough-env-config/steps.json b/packages/cli/snap-tests/change-passthrough-env-config/steps.json index 0c6a6121bc..8cca3f2d39 100644 --- a/packages/cli/snap-tests/change-passthrough-env-config/steps.json +++ b/packages/cli/snap-tests/change-passthrough-env-config/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": [], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "MY_ENV=1 vp run hello", "MY_ENV=2 vp run hello # MY_ENV is pass-through. should hit the cache created in step 1", diff --git a/packages/cli/snap-tests/check-oxlint-env/steps.json b/packages/cli/snap-tests/check-oxlint-env/steps.json index bf36b56013..5f00079496 100644 --- a/packages/cli/snap-tests/check-oxlint-env/steps.json +++ b/packages/cli/snap-tests/check-oxlint-env/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "OXLINT_TSGOLINT_PATH=./invalid-path vp lint --type-aware # should error that ./invalid-path doesn't exist" ] diff --git a/packages/cli/snap-tests/command-dev-with-port/steps.json b/packages/cli/snap-tests/command-dev-with-port/steps.json index 18ace90e0d..c920c64a79 100644 --- a/packages/cli/snap-tests/command-dev-with-port/steps.json +++ b/packages/cli/snap-tests/command-dev-with-port/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp dev --port 12312312312 2>&1 | grep -E '(RangeError|No available ports)' # intentionally use an invalid port (exceeds 0-65535) to trigger port error" ] diff --git a/packages/cli/snap-tests/command-doc/steps.json b/packages/cli/snap-tests/command-doc/steps.json index 634264c5e5..4eeb29ac64 100644 --- a/packages/cli/snap-tests/command-doc/steps.json +++ b/packages/cli/snap-tests/command-doc/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32", "darwin", "linux"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run doc # build documentation", "vp run doc # build documentation again should hit the cache" diff --git a/packages/cli/snap-tests/command-helper/steps.json b/packages/cli/snap-tests/command-helper/steps.json index 6bffc046a8..a96e837228 100644 --- a/packages/cli/snap-tests/command-helper/steps.json +++ b/packages/cli/snap-tests/command-helper/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp -h # help message", "vp pack -h # pack help message", diff --git a/packages/cli/snap-tests/command-install-shortcut/steps.json b/packages/cli/snap-tests/command-install-shortcut/steps.json index d65e9fc0bb..9706ac24b6 100644 --- a/packages/cli/snap-tests/command-install-shortcut/steps.json +++ b/packages/cli/snap-tests/command-install-shortcut/steps.json @@ -1,6 +1,3 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp run install # install shortcut", "vp run install # install shortcut hit cache"] } diff --git a/packages/cli/snap-tests/command-pack-monorepo/steps.json b/packages/cli/snap-tests/command-pack-monorepo/steps.json index 0bbaba597d..1ec7bec7e0 100644 --- a/packages/cli/snap-tests/command-pack-monorepo/steps.json +++ b/packages/cli/snap-tests/command-pack-monorepo/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ { "command": "vp run hello#build # should build the library", diff --git a/packages/cli/snap-tests/command-pack/steps.json b/packages/cli/snap-tests/command-pack/steps.json index 553c0484cf..4382434805 100644 --- a/packages/cli/snap-tests/command-pack/steps.json +++ b/packages/cli/snap-tests/command-pack/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp pack -h # should print the help message", "vp run pack # should build the library", diff --git a/packages/cli/snap-tests/command-preview/steps.json b/packages/cli/snap-tests/command-preview/steps.json index 50831f4d0c..4607aee40a 100644 --- a/packages/cli/snap-tests/command-preview/steps.json +++ b/packages/cli/snap-tests/command-preview/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp preview --port 12312312312 2>&1 | grep -E '(RangeError|No available ports)' # intentionally use an invalid port (exceeds 0-65535) to trigger port error" ] diff --git a/packages/cli/snap-tests/command-vp-alias/steps.json b/packages/cli/snap-tests/command-vp-alias/steps.json index bf362c8a16..cd17e010ae 100644 --- a/packages/cli/snap-tests/command-vp-alias/steps.json +++ b/packages/cli/snap-tests/command-vp-alias/steps.json @@ -1,7 +1,4 @@ { "ignoredPlatforms": ["linux"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp -h # vp should show help same as vite", "vp run -h # vp run should show help"] } diff --git a/packages/cli/snap-tests/exit-code/steps.json b/packages/cli/snap-tests/exit-code/steps.json index 0c764ed7a0..c78188069a 100644 --- a/packages/cli/snap-tests/exit-code/steps.json +++ b/packages/cli/snap-tests/exit-code/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run script1 # script1 run, create the cache and should be success", "vp run script1 # script1 should hit the updated cache", diff --git a/packages/cli/snap-tests/fingerprint-ignore-test/steps.json b/packages/cli/snap-tests/fingerprint-ignore-test/steps.json index 0ca68d6bb3..e462d114ad 100644 --- a/packages/cli/snap-tests/fingerprint-ignore-test/steps.json +++ b/packages/cli/snap-tests/fingerprint-ignore-test/steps.json @@ -1,19 +1,13 @@ { "ignoredPlatforms": ["linux", "win32", "darwin"], "_comment": "TEMPORARILY disabled on darwin - fingerprintIgnores not yet supported in vite-task user config", - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run create-files # first run", "vp run create-files # cache hit - no changes", - "echo 'module.exports = {modified: true}' > node_modules/pkg-a/index.js", "vp run create-files # cache hit - index.js ignored", - "echo 'modified output' > dist/bundle.js", "vp run create-files # cache hit - dist ignored", - "echo '{\"name\":\"pkg-a\",\"version\":\"2.0.0\"}' > node_modules/pkg-a/package.json", "vp run create-files # cache miss - package.json NOT ignored" ] diff --git a/packages/cli/snap-tests/fmt-check-ignore-temp-config/steps.json b/packages/cli/snap-tests/fmt-check-ignore-temp-config/steps.json index 1ea9012c2e..1c1aeef893 100644 --- a/packages/cli/snap-tests/fmt-check-ignore-temp-config/steps.json +++ b/packages/cli/snap-tests/fmt-check-ignore-temp-config/steps.json @@ -1,6 +1,3 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp fmt --check # Test that vp fmt --check ignores the temp config file"] } diff --git a/packages/cli/snap-tests/fmt-ignore-patterns/steps.json b/packages/cli/snap-tests/fmt-ignore-patterns/steps.json index 01850c1072..c93797d401 100644 --- a/packages/cli/snap-tests/fmt-ignore-patterns/steps.json +++ b/packages/cli/snap-tests/fmt-ignore-patterns/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp fmt src/ # Test that fmt ignorePatterns works - ignored files should not be formatted", "cat src/ignored/badly-formatted.js # Verify that ignored file still has bad formatting (was not formatted)" diff --git a/packages/cli/snap-tests/ignore_dist/steps.json b/packages/cli/snap-tests/ignore_dist/steps.json index 27d8a329d3..dad0585fa9 100644 --- a/packages/cli/snap-tests/ignore_dist/steps.json +++ b/packages/cli/snap-tests/ignore_dist/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run lint", "mkdir dist", diff --git a/packages/cli/snap-tests/lint-ignore-patterns/steps.json b/packages/cli/snap-tests/lint-ignore-patterns/steps.json index b956fc36d6..3fd809e8ae 100644 --- a/packages/cli/snap-tests/lint-ignore-patterns/steps.json +++ b/packages/cli/snap-tests/lint-ignore-patterns/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp lint src/ # Test that lint ignorePatterns works - ignored files should not be linted" ] diff --git a/packages/cli/snap-tests/lint-ignore-temp-config/steps.json b/packages/cli/snap-tests/lint-ignore-temp-config/steps.json index fecf52890f..7ba1e94953 100644 --- a/packages/cli/snap-tests/lint-ignore-temp-config/steps.json +++ b/packages/cli/snap-tests/lint-ignore-temp-config/steps.json @@ -1,6 +1,3 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp lint # Test that vp lint ignores the temp config file"] } diff --git a/packages/cli/snap-tests/npm-install-with-options/steps.json b/packages/cli/snap-tests/npm-install-with-options/steps.json index eb069dec32..e443ea4b23 100644 --- a/packages/cli/snap-tests/npm-install-with-options/steps.json +++ b/packages/cli/snap-tests/npm-install-with-options/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp install --help # print help message", "vp run install # https://docs.npmjs.com/cli/v10/commands/npm-install", diff --git a/packages/cli/snap-tests/oxlint-typeaware/steps.json b/packages/cli/snap-tests/oxlint-typeaware/steps.json index 855abc3092..9baac9a2a9 100644 --- a/packages/cli/snap-tests/oxlint-typeaware/steps.json +++ b/packages/cli/snap-tests/oxlint-typeaware/steps.json @@ -1,13 +1,9 @@ { "ignoredPlatforms": [""], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run lint", "echo //comment >> types.ts", "vp run lint # non-type-aware linting doesn't read types.ts", - "vp run lint-typeaware", "echo //comment >> types.ts", "vp run lint-typeaware # type-aware linting reads types.ts" diff --git a/packages/cli/snap-tests/pass-no-color-env/steps.json b/packages/cli/snap-tests/pass-no-color-env/steps.json index 74aa3521d3..b13a1bc3ec 100644 --- a/packages/cli/snap-tests/pass-no-color-env/steps.json +++ b/packages/cli/snap-tests/pass-no-color-env/steps.json @@ -1,7 +1,4 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run check -- --foo # get NO_COLOR=true from default env", "NO_COLOR=false vp run check -- --bar # get NO_COLOR=false from custom env" diff --git a/packages/cli/snap-tests/plain-terminal-ui-nested/steps.json b/packages/cli/snap-tests/plain-terminal-ui-nested/steps.json index c830e38919..94dd489903 100644 --- a/packages/cli/snap-tests/plain-terminal-ui-nested/steps.json +++ b/packages/cli/snap-tests/plain-terminal-ui-nested/steps.json @@ -1,7 +1,6 @@ { "env": { - "VITE_PLUS_CLI_TEST": "0", - "VITE_DISABLE_AUTO_INSTALL": "1" + "VITE_PLUS_CLI_TEST": "0" }, "commands": [ "vp run hello", diff --git a/packages/cli/snap-tests/plain-terminal-ui/steps.json b/packages/cli/snap-tests/plain-terminal-ui/steps.json index 915f5b6cb8..d0e30de703 100644 --- a/packages/cli/snap-tests/plain-terminal-ui/steps.json +++ b/packages/cli/snap-tests/plain-terminal-ui/steps.json @@ -1,22 +1,17 @@ { "env": { - "VITE_PLUS_CLI_TEST": "0", - "VITE_DISABLE_AUTO_INSTALL": "1" + "VITE_PLUS_CLI_TEST": "0" }, "commands": [ "FOO=1 vp run hello", "FOO=1 vp run hello # hit cache", - "FOO=2 vp run hello # env changed", "FOO=2 BAR=1 vp run hello # env added", "vp run hello # env removed", - "echo bar > input.txt", "vp run hello # input changed", - "# set passThroughEnvs via env var", "VITE_TASK_PASS_THROUGH_ENVS=PTE vp run hello # passThroughEnvs changed", - "# set cwd via env var (keep passThroughEnvs from previous step)", "VITE_TASK_PASS_THROUGH_ENVS=PTE VITE_TASK_CWD=subfolder vp run hello # cwd changed" ] diff --git a/packages/cli/snap-tests/synthetic-build-cache-disabled/steps.json b/packages/cli/snap-tests/synthetic-build-cache-disabled/steps.json index 8165a95834..ec31de1eab 100644 --- a/packages/cli/snap-tests/synthetic-build-cache-disabled/steps.json +++ b/packages/cli/snap-tests/synthetic-build-cache-disabled/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run build # synthetic build (vp build) should have cache disabled without cacheScripts" ] diff --git a/packages/cli/snap-tests/synthetic-dev-cache-disabled/steps.json b/packages/cli/snap-tests/synthetic-dev-cache-disabled/steps.json index 0050ff8abd..0d9dff3231 100644 --- a/packages/cli/snap-tests/synthetic-dev-cache-disabled/steps.json +++ b/packages/cli/snap-tests/synthetic-dev-cache-disabled/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run dev # synthetic dev (vp dev) should have cache disabled even with cacheScripts" ] diff --git a/packages/cli/snap-tests/task-config-cwd/steps.json b/packages/cli/snap-tests/task-config-cwd/steps.json index 7da22707fc..072ab57b0d 100644 --- a/packages/cli/snap-tests/task-config-cwd/steps.json +++ b/packages/cli/snap-tests/task-config-cwd/steps.json @@ -1,6 +1,3 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp run hello"] } diff --git a/packages/cli/snap-tests/test-nested-tasks/steps.json b/packages/cli/snap-tests/test-nested-tasks/steps.json index 7357cd4b12..66d481fc13 100644 --- a/packages/cli/snap-tests/test-nested-tasks/steps.json +++ b/packages/cli/snap-tests/test-nested-tasks/steps.json @@ -1,6 +1,3 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp run script1 # simple task", "vp run script2 # nested task should work"] } diff --git a/packages/cli/snap-tests/vite-config-task/steps.json b/packages/cli/snap-tests/vite-config-task/steps.json index 2a2b77a748..9e656f383c 100644 --- a/packages/cli/snap-tests/vite-config-task/steps.json +++ b/packages/cli/snap-tests/vite-config-task/steps.json @@ -1,6 +1,3 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["# Test that task config is picked up from vite.config.ts", "vp run build"] } diff --git a/packages/cli/snap-tests/vite-task-path-env-include-pm/snap.txt b/packages/cli/snap-tests/vite-task-path-env-include-pm/snap.txt index f201ae80c2..9128904048 100644 --- a/packages/cli/snap-tests/vite-task-path-env-include-pm/snap.txt +++ b/packages/cli/snap-tests/vite-task-path-env-include-pm/snap.txt @@ -12,14 +12,5 @@ ➤ YN0000: · Done with warnings in ms ms > vp run check-yarn-version -➤ YN0000: · Yarn -➤ YN0000: ┌ Resolution step -➤ YN0000: └ Completed -➤ YN0000: ┌ Fetch step -➤ YN0000: └ Completed -➤ YN0000: ┌ Link step -➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental -➤ YN0000: └ Completed -➤ YN0000: · Done with warnings in ms ms $ node main.js diff --git a/packages/cli/snap-tests/vitest-browser-mode/steps.json b/packages/cli/snap-tests/vitest-browser-mode/steps.json index cbedc0b30f..13d8513736 100644 --- a/packages/cli/snap-tests/vitest-browser-mode/steps.json +++ b/packages/cli/snap-tests/vitest-browser-mode/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32", "darwin", "linux"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "vp run test", "echo //comment >> src/foo.js", diff --git a/packages/cli/snap-tests/vp-run-expansion/steps.json b/packages/cli/snap-tests/vp-run-expansion/steps.json index 9aa51c2fac..3c0b9f0723 100644 --- a/packages/cli/snap-tests/vp-run-expansion/steps.json +++ b/packages/cli/snap-tests/vp-run-expansion/steps.json @@ -1,6 +1,3 @@ { - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": ["vp run hello", "vp run hello # should hit cache"] } diff --git a/packages/cli/snap-tests/workspace-root-vite-config/steps.json b/packages/cli/snap-tests/workspace-root-vite-config/steps.json index c4da3d0153..de08940777 100644 --- a/packages/cli/snap-tests/workspace-root-vite-config/steps.json +++ b/packages/cli/snap-tests/workspace-root-vite-config/steps.json @@ -1,8 +1,5 @@ { "ignoredPlatforms": ["win32"], - "env": { - "VITE_DISABLE_AUTO_INSTALL": "1" - }, "commands": [ "# Test that lint picks up workspace root config", "# vite lint", diff --git a/packages/cli/snap-tests/yarn-install-with-options/steps.json b/packages/cli/snap-tests/yarn-install-with-options/steps.json index b0f8b44e8e..fd6705461d 100644 --- a/packages/cli/snap-tests/yarn-install-with-options/steps.json +++ b/packages/cli/snap-tests/yarn-install-with-options/steps.json @@ -1,7 +1,6 @@ { "ignoredPlatforms": ["linux", "win32"], "env": { - "VITE_DISABLE_AUTO_INSTALL": "1", "NODE_OPTIONS": "--no-deprecation" }, "commands": [ diff --git a/packages/tools/src/snap-test.ts b/packages/tools/src/snap-test.ts index fb07763451..e581d0bbe2 100755 --- a/packages/tools/src/snap-test.ts +++ b/packages/tools/src/snap-test.ts @@ -126,15 +126,30 @@ export async function snapTest() { const casesDir = path.resolve(values.dir || 'snap-tests'); const taskFunctions: (() => Promise)[] = []; + const missingStepsJson: string[] = []; for (const caseName of fs.readdirSync(casesDir)) { if (caseName.startsWith('.')) { continue; - } // Skip hidden files like .DS_Store + } + const caseDir = path.join(casesDir, caseName); + if (!fs.statSync(caseDir).isDirectory()) { + continue; + } + if (!fs.existsSync(path.join(caseDir, 'steps.json'))) { + missingStepsJson.push(caseName); + continue; + } if (caseName.includes(filter)) { taskFunctions.push(() => runTestCase(caseName, tempTmpDir, casesDir, values['bin-dir'])); } } + if (missingStepsJson.length > 0) { + throw new Error( + `${missingStepsJson.length} test case(s) missing steps.json: ${missingStepsJson.join(', ')}`, + ); + } + if (taskFunctions.length > 0) { const cpuCount = cpus().length; console.log( diff --git a/rfcs/global-cli-rust-binary.md b/rfcs/global-cli-rust-binary.md index 3b28fa80a5..ca52df683b 100644 --- a/rfcs/global-cli-rust-binary.md +++ b/rfcs/global-cli-rust-binary.md @@ -173,7 +173,7 @@ These commands delegate to the local `vite-plus` package through the JS entry po | ---------------------------------------------------------------- | -------------------------------------------------------- | | `dev`, `build`, `test`, `lint`, `fmt`, `run`, `preview`, `cache` | Rust CLI → Managed Node.js → `dist/index.js` → local CLI | -**Note:** The global CLI uses `vite_js_runtime` to ensure Node.js is available, resolving the version from the project's `devEngines.runtime` configuration. The JS entry point handles detecting if vite-plus is installed locally, auto-installing if needed, and delegating to the local CLI's `dist/bin.js`. +**Note:** The global CLI uses `vite_js_runtime` to ensure Node.js is available, resolving the version from the project's `devEngines.runtime` configuration. The JS entry point handles detecting if vite-plus is installed locally and delegating to the local CLI's `dist/bin.js`. #### Category D: Pure Rust Commands (No Node.js Required) @@ -375,7 +375,7 @@ impl JsExecutor { - `vite_js_runtime` handles all `devEngines.runtime` logic internally (reading package.json, resolving versions, caching) - CLI commands use CLI's package.json directory (e.g., `packages/global/`) - Project delegation uses project's directory and passes commands through `dist/index.js` -- The JS entry point handles local CLI detection, auto-installation, and delegation +- The JS entry point handles local CLI detection and delegation ### Implementation Phases @@ -1005,7 +1005,7 @@ pub enum Error { } ``` -**Note:** Local CLI detection errors are handled by the JS layer (`dist/index.js`), which provides better UX with auto-install prompts and user-friendly messages. +**Note:** Local CLI detection errors are handled by the JS layer (`dist/index.js`), which provides user-friendly messages. ### Local Development diff --git a/rfcs/run-without-vite-plus-dependency.md b/rfcs/run-without-vite-plus-dependency.md index d7157fdb57..18554779ce 100644 --- a/rfcs/run-without-vite-plus-dependency.md +++ b/rfcs/run-without-vite-plus-dependency.md @@ -58,7 +58,7 @@ Check the nearest `package.json` from the current working directory for `vite-pl **Decision: Check `package.json` only, NOT `node_modules`** -- If vite-plus is listed in `package.json` but not installed, the existing JS layer handles auto-installation +- If vite-plus is listed in `package.json` but not installed, the user must run `install` manually - If vite-plus is NOT listed in `package.json`, we fall back to PM run - Checking `node_modules` would be fragile (hoisted deps, workspaces) and inconsistent with the intent