[Feature] Clean & Restart Packager logs show an incorrect total step count

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
76/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
react-native, typescript, vscode

调研方向

找到“Clean & Restart Packager”命令及其进度消息,然后阅读该命令附近的测试。更新显示的编号,使其从步骤 1/4 到步骤 4/4,包括重启消息,并添加一个回归测试,检查消息内容及其顺序。

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

描述

enhancement

Problem

The “Clean & Restart Packager” command performs four steps:

  1. Terminate the Metro process.
  2. Clean the Metro cache.
  3. Clean the Watchman cache, if available.
  4. Restart the packager.

However, the first three steps are logged as Step 1/3, Step 2/3,
and Step 3/3. The restart step is logged without a step number.

This makes the progress output inconsistent with the actual workflow.

Steps to reproduce

  1. Open a React Native project.
  2. Run the “Clean & Restart Packager” command.
  3. Inspect the progress messages in the React Native output channel.

Actual behavior

The output shows three numbered steps followed by an unnumbered restart:

  • Step 1/3: Terminating Metro process...
  • Step 2/3: Cleaning Metro cache...
  • Step 3/3: Cleaning Watchman cache...
  • Restarting Packager with clean cache...

Expected behavior

Display consistent numbering from Step 1/4 through Step 4/4,
including the packager restart.

Suggested fix

Update the four progress messages and add a regression test that verifies
their content and order. No changes to the cleanup or restart logic are needed.

主要语言
TypeScript
星标
2.7k
派生
303
平均合并
19 小时 16 分钟
30 天内合并 PR
29

环境准备

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

从这里开始

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

microsoft/vscode-react-native 的其他 Issue

查看 microsoft/vscode-react-native 的全部 Issue

相似的 Issue

更多 TypeScript Issue

把新 issue 发到你的邮箱

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