Skip to content

Commit 930f74c

Browse files
branchseerclaude
andauthored
refactor: split vite_package_manager into vite_workspace and vite_install (#261)
# Rename vite_package_manager to vite_install and extract workspace functionality to vite_workspace This PR splits the functionality of the former `vite_package_manager` crate into two more focused crates: 1. `vite_install` - Handles package manager detection, installation, and commands (install, add, remove, update) 2. `vite_workspace` - Manages workspace detection, package discovery, and dependency graph building The separation provides clearer responsibilities and better code organization: - `vite_install` focuses on package manager operations - `vite_workspace` handles workspace structure and relationships Added README files to both crates to document their primary responsibilities. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ffcb2bf commit 930f74c

28 files changed

Lines changed: 219 additions & 151 deletions

File tree

Cargo.lock

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

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,11 @@ twox-hash = "2.1.1"
136136
uuid = "1.18.1"
137137
vite_error = { path = "crates/vite_error" }
138138
vite_glob = { path = "crates/vite_glob" }
139-
vite_package_manager = { path = "crates/vite_package_manager" }
139+
vite_install = { path = "crates/vite_install" }
140140
vite_path = { path = "crates/vite_path" }
141141
vite_str = { path = "crates/vite_str" }
142142
vite_task = { path = "crates/vite_task" }
143+
vite_workspace = { path = "crates/vite_workspace" }
143144
wax = "0.6.0"
144145
which = "7.0.3"
145146
widestring = "1.2.0"
Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[package]
2-
name = "vite_package_manager"
2+
name = "vite_install"
33
version = "0.0.0"
44
authors.workspace = true
55
edition.workspace = true
@@ -16,13 +16,10 @@ futures-util = { workspace = true }
1616
hex = { workspace = true }
1717
indoc = { workspace = true }
1818
pathdiff = { workspace = true }
19-
petgraph = { workspace = true, features = ["serde-1"] }
20-
rustc-hash = { workspace = true }
2119
semver = { workspace = true }
2220
serde = { workspace = true, features = ["derive"] }
2321
# use `preserve_order` feature to preserve the order of the fields in `package.json`
2422
serde_json = { workspace = true, features = ["preserve_order"] }
25-
serde_yml = { workspace = true }
2623
sha1 = { workspace = true }
2724
sha2 = { workspace = true }
2825
tar = { workspace = true }
@@ -31,10 +28,9 @@ tokio = { workspace = true, features = ["full"] }
3128
tracing = { workspace = true }
3229
tracing-subscriber = { workspace = true }
3330
vite_error = { workspace = true }
34-
vite_glob = { workspace = true }
3531
vite_path = { workspace = true }
3632
vite_str = { workspace = true }
37-
wax = { workspace = true }
33+
vite_workspace = { workspace = true }
3834

3935
[target.'cfg(target_os = "windows")'.dependencies]
4036
reqwest = { workspace = true, features = ["stream", "native-tls-vendored", "json"] }
@@ -48,6 +44,7 @@ httpmock = { workspace = true }
4844
tempfile = { workspace = true }
4945
test-log = { workspace = true }
5046
tokio-test = { workspace = true }
47+
vite_glob = { workspace = true }
5148

5249
[lints]
5350
workspace = true

crates/vite_install/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# vite_install
2+
3+
- Auto-detects package manager type and version from package.json's `packageManager` field
4+
- Downloads and caches the specified version
5+
- Handles install, add, etc. commands for pnpm/yarn/npm.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)