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

Đang mở Phù hợp với người mới
#254 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
1/5
Thời gian dự kiến
Dưới một giờ
Mức phù hợp với người mới
88/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript, node.js
Lĩnh vực
web-dev

Hướng nghiên cứu

Chuỗi văn bản được tạo trong shareText() ở site/check/check-logic.mjs: nhánh trường hợp sạch tạo deps rồi gọi .replace() để chèn "checked", còn nhánh trường hợp thiếu thì không bao giờ làm việc này. Hãy đọc hai nhánh đó, sau đó chạy node --test tests/site/check-logic.test.mjs, trong đó ba trường hợp mới cho các hàng bảng sẽ lỗi trước. Hoàn thành khi các dòng notChecked > 0 hiển thị "checked dependency/dependencies" và kết quả của notChecked === 0 không thay đổi.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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.
Ngôn ngữ chính
JavaScript
Star
0
Fork
0
Merge trung bình
1 giờ 37 phút
Pull request đã merge (30 ngày)
134

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của wheelgap/tracker

Tất cả issue của wheelgap/tracker

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.