voidzero-dev / voidzero-dev/vite-plus
Do not resolve project-level Node.js version for global pm commands
- Dominant language
- Rust
- Stars
- 5.8k
- Forks
- 262
- Avg merge
- 1d 34m
- Merged PRs (30d)
- 135
Description
### Description
For now, `vp add -g`, `vp install -g`, `vp update -g` use the node version returned by `resolve_version`. which will care about project level's node version like `.node-version` file and even `package.json#engines.node`.
Semantically speaking, would it make more sense to always use global node version (set with `vp env default`)?
### Suggested solution
Skip project-level's node version, the resolve order is like:
1. *`VP_NODE_VERSION` env var (session override from `vp env use`) and `.session-node-version` file (session override written by `vp env use` for shell-wrapper-less environments)* **⬅️ Should we keep this layer? I prefer ignore them actually.**
2. User default from config.json
3. Latest LTS version
### Alternative
N / A
### Additional context
I'm willing to help with it, it may be partially related to #1598
### Validations
- [x] Read the [Contributing Guidelines](https://github.com/voidzero-dev/vite-plus/blob/main/CONTRIBUTING.md).
- [x] Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- [x] Check that there isn't already an issue requesting the same feature.
Contributor guide
Assessment
This issue has not been assessed yet.