voidzero-dev / voidzero-dev/vite-plus
Do not resolve project-level Node.js version for global pm commands
- Lingua principale
- Rust
- Stelle
- 5.8k
- Fork
- 262
- Merge medio
- 23h 41m
- PR unite (30g)
- 138
Descrizione
### 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.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dai percorsi dei comandi globali `vp add -g`, `vp install -g` e `vp update -g` e segui il loro utilizzo di `resolve_version`. Verifica in che modo `.node-version`, `package.json#engines.node`, `VP_NODE_VERSION`, `.session-node-version` e `config.json` influenzano la risoluzione; il lavoro è completato quando i comandi globali seguono l’ordine previsto delle versioni globali senza impostazioni a livello di progetto.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- node.js
- Ambito
- cli
- Tipo di issue
- Funzionalità
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Attiva
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 58/100