Skip the `vpr` hint when the script runs the same built-in
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 85/100
Direzione di ricerca
Inizia da packages/cli/binding/src/cli/script_note.rs, in particolare da has_package_json_script, e leggi i test esistenti e i punti in cui viene chiamato. Esegui i test CLI pertinenti, quindi verifica che il suggerimento venga saltato per uno script esattamente uguale a vp <same-command>, ma rimanga quando lo script aggiunge argomenti, come vp test --coverage.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
The hint from #2243 shows even when the matching script just runs the same built-in:
{
"scripts": {
"test": "vp test"
}
}
$ vp test
note: You are running `vp test` as a Vite+ built-in command. If you meant to run the test npm script, use `vpr test` instead.
vp test and vpr test do the same thing here, so the note is noise.
vp create generates "dev": "vp dev" (snapshot), so new projects show the note on vp dev.
The only way to avoid the note is to rename the script (e.g. test → test:unit).
Suggested solution
has_package_json_script already reads the script value (it checks is_string), so this only changes the condition: skip the hint when the script is exactly vp <same-command>. Keep it if the script adds arguments (e.g. vp test --coverage), since the two commands then differ.
Alternative
Add an option to turn off the hint.
Additional context
Reproduced on Vite+ v1.0.0. Source links point to main (1d549b9).
Validations
- Read the Contributing Guidelines.
- Confirm this request is for Vite+ itself and not for Vite, Vitest, tsdown, Rolldown, or Oxc.
- Check that there isn't already an issue requesting the same feature.
- Lingua principale
- Rust
- Stelle
- 6k
- Fork
- 271
- Merge medio
- 1g 15h
- PR unite (30g)
- 172
Preparare l'ambiente
Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di voidzero-dev/vite-plus
-
`~/.vite-plus/env` costs 85-315 ms per shell start on long PATHs (super-linear `${var#*pattern}` in the dedupe loop)Forse già presa @jonatankruszewski l’ha presa 1 giorno fa. Apertacontribution welcome
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
voidzero-dev/vite-plus#2898 · 3 reazioni ·
I maintainer di solito rispondono entro 1 giorno
-
pending triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
voidzero-dev/vite-plus#2882 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
documentation pending triage
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
voidzero-dev/vite-plus#2875 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
voidzero-dev/vite-plus#2849 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
voidzero-dev/vite-plus#2097 · 10 commenti · 2 reazioni ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di voidzero-dev/vite-plus
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
rubys/roundhouse#571 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
documentation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
fastrevmd-lab/rustmistmcp#161 ·
-
arch-audit refactor
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
SocketDev/socket-patch#1011 ·
I maintainer di solito rispondono entro 1 giorno