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 小时
- 30 天内合并 PR
- 198
环境准备
在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 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 于 1 天前认领。 未关闭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 个 reaction ·
维护者通常 1 天内回复
查看 voidzero-dev/vite-plus 的全部 Issue
相似的 Issue
-
✨ enhancement needs-discussion
难度 1/5 1 小时以内 新手友好度 85/100
-
area:docs documentation good first issue priority:low
难度 2/5 1-3 小时 新手友好度 68/100
维护者通常 1 天内回复
-
triage:accepted
难度 2/5 1-3 小时 新手友好度 65/100
open-telemetry/otel-arrow#4343 ·
维护者通常 2 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 75/100
mishraprafful/multihull#150 ·
维护者通常 1 天内回复
-
area:tooling bug good first issue priority:P3
难度 2/5 1-3 小时 新手友好度 72/100
michaelnavazhylau/ngspice-rs#129 ·
维护者通常 1 天内回复