Repo checker: the share line says "1 dependency checked has" where the headline says "1 checked package has"

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

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
1/5
预计耗时
1 小时以内
新手友好度
88/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
领域
web-dev

调研方向

文案在 site/check/check-logic.mjs 中的 shareText() 里构建:清洁分支会构建 deps,然后调用 .replace() 插入 "checked",而缺口分支从不这样做。请阅读这两个分支,然后运行 node --test tests/site/check-logic.test.mjs,其中表格行的三个新用例应先失败。当 notChecked > 0 的行显示 "checked dependency/dependencies",且 notChecked === 0 的输出保持不变时,即为完成。

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

描述

bug good first issue

When some packages weren't checked (a private index's), the repo checker's headline and its plain-text share line say the same thing in different words, and the share line's wording is awkward. Read from site/check/check-logic.mjs on main and run in Node:

result headline (verdictText) share line (shareText)
1 package, no gap, 1 not checked 1 checked package has a wheel for this target; 1 more wasn't checked … o/r: 1 dependency checked has a wheel on Python 3.13 for 1 platform; 1 more wasn't checked …
3 packages, no gap, 2 not checked All 3 checked packages have a wheel … o/r: all 3 dependencies checked have a wheel …
5 packages, 2 gaps, 1 not checked 2 of 5 checked packages have no wheel … o/r: 2 of 5 dependencies have no wheel …

The share line is pasted where the page's alerts don't follow it, so it should say what the headline says: which packages were counted.

Where

shareText() in site/check/check-logic.mjs: the clean branch builds deps and then does deps.replace(/ (has|have)$/, " checked $1"); the gaps branch never adds "checked".

What to do

  • With notChecked > 0, put "checked" before the noun in every branch: 1 checked dependency has, all 3 checked dependencies have, 2 of 5 checked dependencies have no wheel. Build the words directly instead of the .replace().
  • With notChecked === 0, every share line stays byte-for-byte as it is.

Done when

  • Tests in tests/site/check-logic.test.mjs for the three rows above (the new wording) and for the same results with notChecked = 0 (unchanged). The first three fail on main.
  • node --test tests/site/check-logic.test.mjs passes. The tests need no network.
主要语言
JavaScript
星标
0
派生
0
平均合并
1 小时 37 分钟
30 天内合并 PR
134

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

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

wheelgap/tracker 的其他 Issue

查看 wheelgap/tracker 的全部 Issue

相似的 Issue

更多 JavaScript Issue

把新 issue 发到你的邮箱

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