Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

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

未关闭 适合新手
#2,892 1 条评论 1 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@kshanxs 已经在做这个了。

开始于 2026年10月9日。

  • #2965 来自 @kshanxs —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
85/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
rust
领域
cli

调研方向

从 packages/cli/binding/src/cli/script_note.rs 开始,重点查看 has_package_json_script,并阅读现有测试和调用方。运行相关的 CLI 测试,然后验证:对于恰好为 vp <same-command> 的脚本,提示会被跳过;但当脚本添加参数时,例如 vp test --coverage,提示仍会保留。

由索引模型根据 Issue 内容生成。

描述

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.
主要语言
Rust
星标
6k
派生
271
平均合并
1 天 12 小时
30 天内合并 PR
198

环境准备

在 Codespaces 中打开

在浏览器里用你自己的 GitHub 账号启动这个项目的开发容器。

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

voidzero-dev/vite-plus 的其他 Issue

查看 voidzero-dev/vite-plus 的全部 Issue

相似的 Issue

更多 Rust Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。