GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — feat!: XDG directory layout via VpDirs by forehalo · Pull Request #2346 · voidzero-dev/vite-plus Conversation
|
| Category | Unix default | Windows default | Monolithic VP_HOME |
|---|---|---|---|
| bin | ~/.local/share/vite-plus/bin |
%LOCALAPPDATA%\vite-plus\bin |
<root>/bin |
| data | ~/.local/share/vite-plus |
%LOCALAPPDATA%\vite-plus\data |
<root> |
| cache | ~/.cache/vite-plus |
%LOCALAPPDATA%\vite-plus\cache |
<root>/cache |
| config | ~/.config/vite-plus |
%APPDATA%\vite-plus |
<root> |
| state | ~/.local/state/vite-plus |
%LOCALAPPDATA%\vite-plus\state |
<root> |
The Unix bin directory lives under <DATA> because Vite+ manages more than the vp executable. It also manages Node.js, package-manager, and global-package dispatch shims. A private bin avoids collisions with unrelated executables in ~/.local/bin.
VpDirs resolves each category from these sources:
VP_HOME~/.vite-plus install that contains currentVP_BIN_DIR, VP_DATA_DIR, or VP_CACHE_DIR overridesVP_BIN_DIR takes precedence for the bin category. When it is unset, an absolute VP_DATA_DIR also supplies <DATA>/bin.
On Unix, XDG_DATA_HOME resolves data to $XDG_DATA_HOME/vite-plus and bin to $XDG_DATA_HOME/vite-plus/bin. Vite+ no longer uses XDG_BIN_HOME or derives a sibling bin from $XDG_DATA_HOME/../bin.
Relative VP_* and XDG values are ignored.
The default Unix and Windows bin directories are application-owned.
A user-supplied VP_BIN_DIR remains potentially shared. Installers, env setup, package shim management, and vp implode retain per-entry ownership checks for this case:
The Unix default bin is removed with its containing data root during vp implode.
The shell and PowerShell installers use the selected Vite+ binary as the directory source of truth.
A split-aware binary reports the resolved bin, data, cache, config, and state paths through VP_DUMP_DIRS=1. Installers consume those paths without reproducing VP_HOME, XDG, Windows known-folder, or legacy-grandfathering logic.
External integrations should use the same interface instead of reconstructing <BIN> from $HOME or platform conventions.
The installers also:
$HOME separate from the Windows profile used for directory resolution.Existing default installs remain under ~/.vite-plus. vp upgrade updates them in place.
Fresh installs use the split layout. A split install rejects upgrades to releases older than the first split-aware version and directs the user to upgrade to the latest release.
The upgrade guide documents how users can move an existing install to the split layout by running vp implode, unsetting VP_HOME, and reinstalling. Automatic migration remains follow-up work.
| Install state | Behavior |
|---|---|
Existing ~/.vite-plus install |
Keeps the monolithic layout |
Custom VP_HOME |
Keeps the single-root mapping |
| Fresh Unix install | Uses ~/.local/share/vite-plus/bin and the split XDG roots |
| Fresh Windows install | Uses Local/Roaming application-data roots |
Custom VP_BIN_DIR |
Uses strict per-entry ownership checks |
| Pre-split target version | Uses the monolithic fallback or is rejected by a split install upgrade |
VP_HOME is the primary install root.vp upgrade.vp checkcargo test -p vp_sharedcargo test -p vp_installerinstall.sh smoke test with VP_DUMP_DIRS
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
b8069a5 to
2f8be03
Compare
08b7589 to
4e2abdf
Compare
|
@liangmiQwQ Your refactor needs to wait until this merge is completed first, as the changes are expected to be quite significant. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
78a23b6 to
a433ed4
Compare
There was an error while loading. Please reload this page.
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
6b26e69 to
ca9dcca
Compare
There was an error while loading. Please reload this page.
|
IMO, I would be a little bit curious about the benefit for this move. The current For example, I help maintain the Vite+'s global package installations in several, I'm concerned that using I'm not against this direction, I just want to understand the motivation and the problem it solves. If it does help Vite+ improve, then now is really a good time to implement it (before RC). |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@liangmiQwQ Following the XDG directory convention will allow Vite+ to be more widely accepted, and many mature developer tools follow this convention, such as Claude Code and uv astral-sh/uv#8420 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
ad9d7dd to
5cc3b6c
Compare
756bf47 to
940a1ea
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
use xdg config
There was an error while loading. Please reload this page.