Skip the `vpr` hint when the script runs the same built-in
メンテナーはふだん 1 日以内に返信
評価
調査の方向性
まず packages/cli/binding/src/cli/script_note.rs、特に has_package_json_script を確認し、既存のテストと呼び出し元を読みます。関連するCLIテストを実行し、スクリプトが正確に vp <same-command> の場合はヒントが省略される一方、vp test --coverage のようにスクリプトに引数が追加される場合はヒントが残ることを確認します。
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Rust
- スター
- 6k
- フォーク
- 271
- 平均マージ
- 1日 12時間
- マージ済み PR(30日)
- 198
環境構築
このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
voidzero-dev/vite-plus のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
voidzero-dev/vite-plus#2970 ·
メンテナーはふだん 1 日以内に返信
-
PowerShell `vp` wrapper hides failures: `$?` is `True` and `&&` keeps going after `vp` fails対応中かも @fengmk2 が 2 日前に担当しました。 オープンbug pending triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
voidzero-dev/vite-plus#2934 · コメント 2 件 · 担当者 1 名 ·
メンテナーはふだん 1 日以内に返信
-
pending triage
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
voidzero-dev/vite-plus#2882 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
`lazyPlugins` docs: dynamic import of a local module still slows down config loading対応中かも @kshanxs が今日担当しました。 オープンdocumentation pending triage
難易度 1/5 1時間未満 初心者へのやさしさ 78/100
voidzero-dev/vite-plus#2875 · コメント 4 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
voidzero-dev/vite-plus#2097 · コメント 10 件 · リアクション 2 件 ·
メンテナーはふだん 1 日以内に返信
voidzero-dev/vite-plus の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
rescript-lang/rescript#8765 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
chroma-core/chroma#7879 ·
メンテナーはふだん 1 日以内に返信
-
priority middle
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
KATO-Hiro/AtCoderClans#12838 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 1 日以内に返信