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

Aperta Adatta ai principianti
#254 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
1/5
Tempo stimato
Meno di un'ora
Idoneità per principianti
88/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript, node.js
Ambito
web-dev

Direzione di ricerca

Il testo viene costruito in shareText() in site/check/check-logic.mjs: il ramo del caso pulito costruisce deps e poi chiama .replace() per inserire "checked", mentre il ramo delle lacune non lo fa mai. Leggi questi due rami, poi esegui node --test tests/site/check-logic.test.mjs, dove i tre nuovi casi per le righe della tabella dovrebbero fallire per primi. È completato quando le righe con notChecked > 0 riportano "checked dependency/dependencies" e l'output di notChecked === 0 resta invariato.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

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.
Lingua principale
JavaScript
Stelle
0
Fork
0
Merge medio
1h 37m
PR unite (30g)
134

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di wheelgap/tracker

Tutte le issue di wheelgap/tracker

Issue simili

Altre issue su JavaScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.