Skip to content

Commit 9297687

Browse files
committed
chore: bump vite-task to 2663222c
Use GlobWithBase with InputBase::Workspace for .vite-temp exclusion, ensuring the negative glob resolves relative to the workspace root. Closes #1095
1 parent 106c72a commit 9297687

4 files changed

Lines changed: 60 additions & 41 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 = "8c3cc35e31713738f45756b42e80996d97ec6429" }
88+
fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "2663222c6b5bf4be8ca60e1c2e5bd6619596f414" }
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 = "8c3cc35e31713738f45756b42e80996d97ec6429" }
188+
vite_glob = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "2663222c6b5bf4be8ca60e1c2e5bd6619596f414" }
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 = "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" }
193+
vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "2663222c6b5bf4be8ca60e1c2e5bd6619596f414" }
194+
vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "2663222c6b5bf4be8ca60e1c2e5bd6619596f414" }
195+
vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "2663222c6b5bf4be8ca60e1c2e5bd6619596f414" }
196+
vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "2663222c6b5bf4be8ca60e1c2e5bd6619596f414" }
197197
walkdir = "2.5.0"
198198
wax = "0.6.0"
199199
which = "8.0.0"

packages/cli/binding/src/cli.rs

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ use vite_task::{
2323
Command, CommandHandler, ExitStatus, HandledCommand, ScriptCommand, Session, SessionConfig,
2424
config::{
2525
UserRunConfig,
26-
user::{EnabledCacheConfig, UserCacheConfig, UserInputEntry},
26+
user::{
27+
AutoInput, EnabledCacheConfig, GlobWithBase, InputBase, UserCacheConfig, UserInputEntry,
28+
},
2729
},
2830
loader::UserConfigLoader,
2931
plan_request::SyntheticPlanRequest,
@@ -330,8 +332,11 @@ impl SubcommandResolver {
330332
env: Some(Box::new([Str::from("VITE_*")])),
331333
untracked_env: None,
332334
input: Some(vec![
333-
UserInputEntry::Auto { auto: true },
334-
UserInputEntry::Glob(Str::from("!node_modules/.vite-temp/**")),
335+
UserInputEntry::Auto(AutoInput { auto: true }),
336+
UserInputEntry::GlobWithBase(GlobWithBase {
337+
pattern: Str::from("!node_modules/.vite-temp/**"),
338+
base: InputBase::Workspace,
339+
}),
335340
]),
336341
}),
337342
envs: merge_resolved_envs_with_version(envs, resolved.envs),
@@ -385,8 +390,11 @@ impl SubcommandResolver {
385390
env: None,
386391
untracked_env: None,
387392
input: Some(vec![
388-
UserInputEntry::Auto { auto: true },
389-
UserInputEntry::Glob(Str::from("!node_modules/.vite-temp/**")),
393+
UserInputEntry::Auto(AutoInput { auto: true }),
394+
UserInputEntry::GlobWithBase(GlobWithBase {
395+
pattern: Str::from("!node_modules/.vite-temp/**"),
396+
base: InputBase::Workspace,
397+
}),
390398
]),
391399
}),
392400
envs: merge_resolved_envs(envs, resolved.envs),

packages/cli/src/run-config.ts

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,25 @@
11
// This file is auto-generated by `cargo test`. Do not edit manually.
22

3+
export type AutoInput = {
4+
/**
5+
* Automatically track which files the task reads
6+
*/
7+
auto: boolean;
8+
};
9+
10+
export type GlobWithBase = {
11+
/**
12+
* The glob pattern (positive or negative starting with `!`)
13+
*/
14+
pattern: string;
15+
/**
16+
* The base directory for resolving the pattern
17+
*/
18+
base: InputBase;
19+
};
20+
21+
export type InputBase = 'package' | 'workspace';
22+
323
export type Task = {
424
/**
525
* The command to run for the task.
@@ -32,21 +52,12 @@ export type Task = {
3252
*
3353
* - Omitted: automatically tracks which files the task reads
3454
* - `[]` (empty): disables file tracking entirely
35-
* - Glob patterns (e.g. `"src/**"`) select specific files
55+
* - Glob patterns (e.g. `"src/**"`) select specific files, relative to the package directory
56+
* - `{pattern: "...", base: "workspace" | "package"}` specifies a glob with an explicit base directory
3657
* - `{auto: true}` enables automatic file tracking
3758
* - Negative patterns (e.g. `"!dist/**"`) exclude matched files
38-
*
39-
* Patterns are relative to the package directory.
4059
*/
41-
input?: Array<
42-
| string
43-
| {
44-
/**
45-
* Automatically track which files the task reads
46-
*/
47-
auto: boolean;
48-
}
49-
>;
60+
input?: Array<string | GlobWithBase | AutoInput>;
5061
}
5162
| {
5263
/**

0 commit comments

Comments
 (0)