Skip to content

refactor: consolidate get_cache_dir logic via vite_shared crate - #509

Merged
fengmk2 merged 2 commits into
mainfrom
vite_shared
Jan 29, 2026
Merged

refactor: consolidate get_cache_dir logic via vite_shared crate#509
fengmk2 merged 2 commits into
mainfrom
vite_shared

Conversation

@fengmk2

@fengmk2fengmk2 commented Jan 26, 2026

Copy link
Copy Markdown
Member

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.

  • Add vite_shared with get_cache_dir() (crates/vite_shared), including tests
  • Refactor vite_install and vite_js_runtime to use vite_shared::get_cache_dir(); remove local implementations and related tests
  • Introduce vite_js_runtime::cache module and route runtime caching through crate::cache::get_cache_dir() (now $CACHE_DIR/vite/js_runtime)
  • Update dependencies: add vite_shared to workspace and affected crates; drop direct directories deps where no longer needed

Written by Cursor Bugbot for commit 6cf4de2. This will update automatically on new commits. Configure here.

@fengmk2Graphite App

fengmk2 commented Jan 26, 2026

Copy link
Copy Markdown
MemberAuthor

@fengmk2fengmk2 self-assigned this Jan 26, 2026
@fengmk2
fengmk2force-pushed the vite_shared branch 4 times, most recently from f3d3769 to 70c38feCompareJanuary 27, 2026 02:39
@fengmk2
fengmk2force-pushed the nodejs-version-manager branch 2 times, most recently from d71ed84 to 58a0450CompareJanuary 27, 2026 02:40
@fengmk2
fengmk2force-pushed the vite_shared branch 3 times, most recently from 16de800 to f3bb37eCompareJanuary 27, 2026 03:20
@fengmk2
fengmk2force-pushed the nodejs-version-manager branch from 6e4df5c to b064bbfCompareJanuary 27, 2026 03:20
@fengmk2
fengmk2force-pushed the vite_shared branch 4 times, most recently from a0436c9 to d914c1aCompareJanuary 27, 2026 09:02
@fengmk2
fengmk2 marked this pull request as ready for review January 27, 2026 09:16
@fengmk2
fengmk2force-pushed the nodejs-version-manager branch from d4885e8 to 8922738CompareJanuary 27, 2026 09:23
@Brooooooklyn

Copy link
Copy Markdown
Member

cursor review

@cursorcursorBot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

@fengmk2
fengmk2 changed the base branch from nodejs-version-manager to graphite-base/509January 29, 2026 08:23
@fengmk2
fengmk2 changed the base branch from graphite-base/509 to mainJanuary 29, 2026 08:24
- 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.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying vite-plus with Cloudflare Pages Cloudflare Pages

Latest commit:c6a1f1e
Status:⚡️ Build in progress...

View logs

@fengmk2
fengmk2 merged commit e0da176 into mainJan 29, 2026
16 of 18 checks passed
@fengmk2Graphite App

Copy link
Copy Markdown
MemberAuthor

Merge activity

@fengmk2
fengmk2 deleted the vite_shared branch January 29, 2026 08:32
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@fengmk2@Brooooooklyn