Skip to content

Commit 5036f44

Browse files
committed
fix: exclude node_modules/.vite-temp from cache input tracking
Add negative input glob `!node_modules/.vite-temp/**` to Pack and Build subcommands to exclude Vite's transient config files from fspy tracking. Bump vite-task to 8c3cc35e which merges synthetic task input config in the inherited cache path. Closes #1095
1 parent 88eea4a commit 5036f44

3 files changed

Lines changed: 33 additions & 27 deletions

File tree

Cargo.lock

Lines changed: 18 additions & 18 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ dunce = "1.0.5"
8585
fast-glob = "1.0.0"
8686
flate2 = { version = "=1.1.9", features = ["zlib-rs"] }
8787
form_urlencoded = "1.2.1"
88-
fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "ffd0eed36cf20d3fbefc1e451b5a7c2b3ca44cd6" }
88+
fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "8c3cc35e31713738f45756b42e80996d97ec6429" }
8989
futures = "0.3.31"
9090
futures-util = "0.3.31"
9191
glob = "0.3.2"
@@ -185,15 +185,15 @@ vfs = "0.13.0"
185185
vite_command = { path = "crates/vite_command" }
186186
vite_error = { path = "crates/vite_error" }
187187
vite_js_runtime = { path = "crates/vite_js_runtime" }
188-
vite_glob = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "ffd0eed36cf20d3fbefc1e451b5a7c2b3ca44cd6" }
188+
vite_glob = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "8c3cc35e31713738f45756b42e80996d97ec6429" }
189189
vite_install = { path = "crates/vite_install" }
190190
vite_migration = { path = "crates/vite_migration" }
191191
vite_shared = { path = "crates/vite_shared" }
192192
vite_static_config = { path = "crates/vite_static_config" }
193-
vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "ffd0eed36cf20d3fbefc1e451b5a7c2b3ca44cd6" }
194-
vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "ffd0eed36cf20d3fbefc1e451b5a7c2b3ca44cd6" }
195-
vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "ffd0eed36cf20d3fbefc1e451b5a7c2b3ca44cd6" }
196-
vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "ffd0eed36cf20d3fbefc1e451b5a7c2b3ca44cd6" }
193+
vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "8c3cc35e31713738f45756b42e80996d97ec6429" }
194+
vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "8c3cc35e31713738f45756b42e80996d97ec6429" }
195+
vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "8c3cc35e31713738f45756b42e80996d97ec6429" }
196+
vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "8c3cc35e31713738f45756b42e80996d97ec6429" }
197197
walkdir = "2.5.0"
198198
wax = "0.6.0"
199199
which = "8.0.0"

packages/cli/binding/src/cli.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use vite_task::{
2323
Command, CommandHandler, ExitStatus, HandledCommand, ScriptCommand, Session, SessionConfig,
2424
config::{
2525
UserRunConfig,
26-
user::{EnabledCacheConfig, UserCacheConfig},
26+
user::{EnabledCacheConfig, UserCacheConfig, UserInputEntry},
2727
},
2828
loader::UserConfigLoader,
2929
plan_request::SyntheticPlanRequest,
@@ -329,7 +329,10 @@ impl SubcommandResolver {
329329
cache_config: UserCacheConfig::with_config(EnabledCacheConfig {
330330
env: Some(Box::new([Str::from("VITE_*")])),
331331
untracked_env: None,
332-
input: None,
332+
input: Some(vec![
333+
UserInputEntry::Auto { auto: true },
334+
UserInputEntry::Glob(Str::from("!node_modules/.vite-temp/**")),
335+
]),
333336
}),
334337
envs: merge_resolved_envs_with_version(envs, resolved.envs),
335338
})
@@ -381,7 +384,10 @@ impl SubcommandResolver {
381384
cache_config: UserCacheConfig::with_config(EnabledCacheConfig {
382385
env: None,
383386
untracked_env: None,
384-
input: None,
387+
input: Some(vec![
388+
UserInputEntry::Auto { auto: true },
389+
UserInputEntry::Glob(Str::from("!node_modules/.vite-temp/**")),
390+
]),
385391
}),
386392
envs: merge_resolved_envs(envs, resolved.envs),
387393
})

0 commit comments

Comments
 (0)