Skip to content

Commit cd3c964

Browse files
branchseerclaude
andcommitted
refactor: update vite-task and simplify CLI command types
Update vite-task to 24baf0b3 which renames `ParsedCommand` to `Command` and makes resolved dispatch types internal. Remove `.into_command()` calls that are no longer needed. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent b67c6dc commit cd3c964

File tree

4 files changed

+30
-33
lines changed

4 files changed

+30
-33
lines changed

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
@@ -82,7 +82,7 @@ dunce = "1.0.5"
8282
fast-glob = "1.0.0"
8383
flate2 = { version = "=1.1.5", features = ["zlib-rs"] }
8484
form_urlencoded = "1.2.1"
85-
fspy = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
85+
fspy = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "af03f796c717ff8e1e12832ffe823f50e0b300d1" }
8686
futures = "0.3.31"
8787
futures-util = "0.3.31"
8888
glob = "0.3.2"
@@ -181,14 +181,14 @@ vfs = "0.12.1"
181181
vite_command = { path = "crates/vite_command" }
182182
vite_error = { path = "crates/vite_error" }
183183
vite_js_runtime = { path = "crates/vite_js_runtime" }
184-
vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
184+
vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "af03f796c717ff8e1e12832ffe823f50e0b300d1" }
185185
vite_install = { path = "crates/vite_install" }
186186
vite_migration = { path = "crates/vite_migration" }
187187
vite_shared = { path = "crates/vite_shared" }
188-
vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
189-
vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
190-
vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
191-
vite_workspace = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "cc005960698a8cd88fe193183620d691df834536" }
188+
vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "af03f796c717ff8e1e12832ffe823f50e0b300d1" }
189+
vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "af03f796c717ff8e1e12832ffe823f50e0b300d1" }
190+
vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "af03f796c717ff8e1e12832ffe823f50e0b300d1" }
191+
vite_workspace = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "af03f796c717ff8e1e12832ffe823f50e0b300d1" }
192192
walkdir = "2.5.0"
193193
wax = "0.6.0"
194194
which = "8.0.0"

packages/cli/binding/src/cli.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@ use vite_path::{AbsolutePath, AbsolutePathBuf};
1616
use vite_shared::{PrependOptions, prepend_to_path_env};
1717
use vite_str::Str;
1818
use vite_task::{
19-
Command, CommandHandler, ExitStatus, HandledCommand, ParsedCommand, ScriptCommand, Session,
20-
SessionCallbacks,
19+
Command, CommandHandler, ExitStatus, HandledCommand, ScriptCommand, Session, SessionCallbacks,
2120
config::{
2221
UserRunConfig,
2322
user::{EnabledCacheConfig, UserCacheConfig},
@@ -108,7 +107,7 @@ pub enum SynthesizableSubcommand {
108107
enum CLIArgs {
109108
/// vite-task commands (run, cache)
110109
#[command(flatten)]
111-
ViteTask(ParsedCommand),
110+
ViteTask(Command),
112111

113112
/// Built-in subcommands (lint, build, test, etc.)
114113
#[command(flatten)]
@@ -589,7 +588,7 @@ impl CommandHandler for VitePlusCommandHandler {
589588
let resolved = self.resolver.resolve(subcmd, &command.envs, &command.cwd).await?;
590589
Ok(HandledCommand::Synthesized(resolved.into_synthetic_plan_request()))
591590
}
592-
CLIArgs::ViteTask(cmd) => Ok(HandledCommand::ViteTaskCommand(cmd.into_command())),
591+
CLIArgs::ViteTask(cmd) => Ok(HandledCommand::ViteTaskCommand(cmd)),
593592
}
594593
}
595594
}
@@ -825,9 +824,7 @@ pub async fn main(
825824

826825
match cli_args {
827826
CLIArgs::Synthesizable(subcmd) => execute_direct_subcommand(subcmd, &cwd, options).await,
828-
CLIArgs::ViteTask(command) => {
829-
execute_vite_task_command(command.into_command(), cwd, options).await
830-
}
827+
CLIArgs::ViteTask(command) => execute_vite_task_command(command, cwd, options).await,
831828
}
832829
}
833830

packages/cli/snap-tests/plain-terminal-ui-nested/snap.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Found 0 warnings and 0 errors.
88
Finished in <variable>ms on 3 files with <variable> rules using <variable> threads.
99

1010
---
11-
[vp run] 0/2 cache hit (0%). (Run `vp run --verbose` for full details)
11+
[vp run] 0/2 cache hit (0%). (Run `vp run --last-details` for full details)
1212

1313
> echo 'console.log(123)' > a.ts
1414
> vp run hello # report cache status from the inner runner
@@ -21,4 +21,4 @@ Found 0 warnings and 0 errors.
2121
Finished in <variable>ms on 3 files with <variable> rules using <variable> threads.
2222

2323
---
24-
[vp run] 1/2 cache hit (50%), <variable>ms saved. (Run `vp run --verbose` for full details)
24+
[vp run] 1/2 cache hit (50%), <variable>ms saved. (Run `vp run --last-details` for full details)

0 commit comments

Comments
 (0)