refactor: consolidate get_cache_dir logic via vite_shared crate#509
Merged
refactor: consolidate get_cache_dir logic via vite_shared crate#509
Conversation
Member
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
f3d3769 to
70c38fe
Compare
d71ed84 to
58a0450
Compare
16de800 to
f3bb37e
Compare
6e4df5c to
b064bbf
Compare
a0436c9 to
d914c1a
Compare
d4885e8 to
8922738
Compare
Member
|
cursor review |
8922738 to
a6745a0
Compare
3 tasks
Brooooooklyn
approved these changes
Jan 29, 2026
- Add `get_cache_dir()` to vite_shared for centralized cache path management
- Create `cache.rs` module in vite_js_runtime with `get_cache_dir()` helper
- Replace repeated `vite_shared::get_cache_dir()?.join("js_runtime")` pattern
Add platform-specific path documentation for Linux, macOS, and Windows.
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Create a new vite_shared crate to hold common utilities shared across
vite-plus crates. Move duplicate get_cache_dir() implementations from
vite_install and vite_js_runtime into this shared location.
Note
Consolidates duplicated cache directory logic into a new shared crate.
vite_sharedwithget_cache_dir()(crates/vite_shared), including testsvite_installandvite_js_runtimeto usevite_shared::get_cache_dir(); remove local implementations and related testsvite_js_runtime::cachemodule and route runtime caching throughcrate::cache::get_cache_dir()(now$CACHE_DIR/vite/js_runtime)vite_sharedto workspace and affected crates; drop directdirectoriesdeps where no longer neededWritten by Cursor Bugbot for commit 6cf4de2. This will update automatically on new commits. Configure here.