Skip to content

refactor: consolidate get_cache_dir logic via vite_shared crate#509

Merged
fengmk2 merged 2 commits intomainfrom
vite_shared
Jan 29, 2026
Merged

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

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Jan 26, 2026

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.

Copy link
Copy Markdown
Member Author

fengmk2 commented Jan 26, 2026

@fengmk2 fengmk2 self-assigned this Jan 26, 2026
@fengmk2 fengmk2 force-pushed the vite_shared branch 4 times, most recently from f3d3769 to 70c38fe Compare January 27, 2026 02:39
@fengmk2 fengmk2 force-pushed the nodejs-version-manager branch 2 times, most recently from d71ed84 to 58a0450 Compare January 27, 2026 02:40
@fengmk2 fengmk2 force-pushed the vite_shared branch 3 times, most recently from 16de800 to f3bb37e Compare January 27, 2026 03:20
@fengmk2 fengmk2 force-pushed the nodejs-version-manager branch from 6e4df5c to b064bbf Compare January 27, 2026 03:20
@fengmk2 fengmk2 force-pushed the vite_shared branch 4 times, most recently from a0436c9 to d914c1a Compare January 27, 2026 09:02
@fengmk2 fengmk2 marked this pull request as ready for review January 27, 2026 09:16
@fengmk2 fengmk2 force-pushed the nodejs-version-manager branch from d4885e8 to 8922738 Compare January 27, 2026 09:23
@Brooooooklyn
Copy link
Copy Markdown
Member

cursor review

Copy link
Copy Markdown

@cursor cursor Bot left a comment

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/509 January 29, 2026 08:23
@fengmk2 fengmk2 changed the base branch from graphite-base/509 to main January 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 main Jan 29, 2026
16 of 18 checks passed
Copy link
Copy Markdown
Member Author

fengmk2 commented Jan 29, 2026

Merge activity

@fengmk2 fengmk2 deleted the vite_shared branch January 29, 2026 08:32
Sign up for free to 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