Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Skip the `vpr` hint when the script runs the same built-in

Aperta Adatta ai principianti
#2,892 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

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
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
rust
Ambito
cli

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

pending triage
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

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di voidzero-dev/vite-plus

Tutte le issue di voidzero-dev/vite-plus

Issue simili

Altre issue su Rust

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.