Skip to content

Commit ceb7e3a

Browse files
committed
refactor(command): use shared vite_powershell crate for ps1 rewrite
Switch `vite_command::ps1_shim` to depend on the new `vite_powershell` crate (companion change in voidzero-dev/vite-task#368) for the PowerShell host lookup, the fixed argument prefix, and the sibling-`.ps1` discovery. This module now just composes those primitives with vp's own conventions: absolute `.ps1` path in args and `Vec<OsString>` return type to match the spawn API. Bumps the vite-task git rev across all pinned crates to pick up the extraction.
1 parent c74f562 commit ceb7e3a

4 files changed

Lines changed: 58 additions & 120 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ dunce = "1.0.5"
8989
fast-glob = "1.0.0"
9090
flate2 = { version = "=1.1.9", features = ["zlib-rs"] }
9191
form_urlencoded = "1.2.1"
92-
fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "d1b8cdae8b6df5eab8b9f1143ceb4fb13933a5ef" }
92+
fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1e2b7913840c15aa670d702f8bf4c7fdcd45c56f" }
9393
futures = "0.3.31"
9494
futures-util = "0.3.31"
9595
glob = "0.3.2"
@@ -194,17 +194,18 @@ vfs = "0.13.0"
194194
vite_command = { path = "crates/vite_command" }
195195
vite_error = { path = "crates/vite_error" }
196196
vite_js_runtime = { path = "crates/vite_js_runtime" }
197-
vite_glob = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "d1b8cdae8b6df5eab8b9f1143ceb4fb13933a5ef" }
197+
vite_glob = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1e2b7913840c15aa670d702f8bf4c7fdcd45c56f" }
198198
vite_install = { path = "crates/vite_install" }
199199
vite_migration = { path = "crates/vite_migration" }
200200
vite_pm_cli = { path = "crates/vite_pm_cli" }
201201
vite_setup = { path = "crates/vite_setup" }
202202
vite_shared = { path = "crates/vite_shared" }
203203
vite_static_config = { path = "crates/vite_static_config" }
204-
vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "d1b8cdae8b6df5eab8b9f1143ceb4fb13933a5ef" }
205-
vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "d1b8cdae8b6df5eab8b9f1143ceb4fb13933a5ef" }
206-
vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "d1b8cdae8b6df5eab8b9f1143ceb4fb13933a5ef" }
207-
vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "d1b8cdae8b6df5eab8b9f1143ceb4fb13933a5ef" }
204+
vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1e2b7913840c15aa670d702f8bf4c7fdcd45c56f" }
205+
vite_powershell = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1e2b7913840c15aa670d702f8bf4c7fdcd45c56f" }
206+
vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1e2b7913840c15aa670d702f8bf4c7fdcd45c56f" }
207+
vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1e2b7913840c15aa670d702f8bf4c7fdcd45c56f" }
208+
vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "1e2b7913840c15aa670d702f8bf4c7fdcd45c56f" }
208209
walkdir = "2.5.0"
209210
wax = "0.6.0"
210211
which = "8.0.0"
@@ -315,6 +316,7 @@ string_wizard = { path = "./rolldown/crates/string_wizard", features = ["serde"]
315316
# fspy = { path = "../vite-task/crates/fspy" }
316317
# vite_glob = { path = "../vite-task/crates/vite_glob" }
317318
# vite_path = { path = "../vite-task/crates/vite_path" }
319+
# vite_powershell = { path = "../vite-task/crates/vite_powershell" }
318320
# vite_str = { path = "../vite-task/crates/vite_str" }
319321
# vite_task = { path = "../vite-task/crates/vite_task" }
320322
# vite_workspace = { path = "../vite-task/crates/vite_workspace" }

crates/vite_command/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ tokio-util = { workspace = true }
1414
tracing = { workspace = true }
1515
vite_error = { workspace = true }
1616
vite_path = { workspace = true }
17+
vite_powershell = { workspace = true }
1718
which = { workspace = true, features = ["tracing"] }
1819

1920
[target.'cfg(not(target_os = "windows"))'.dependencies]

0 commit comments

Comments
 (0)