nodejs / nodejs/node-core-utils
git node wpt <name> crashes if <name> isn't found
Offen
Anfängerfreundlich
Dieses Issue hat noch niemand übernommen.
bug
- Vorherrschende Sprache
- JavaScript
- Sterne
- 314
- Forks
- 137
- Ø Merge
- 2 T. 8 Std.
- Gemergte PRs (30 T.)
- 24
Beschreibung
I just encountered this whilst trying to pull in the FileAPI tests for a backport, and I'd written:
$ git node wpt File
Instead of:
$ git node wpt FileAPI
Which resulted in the following crash:
$ git node wpt File
⚠ Please create File.json in test/wpt/status
------------------------- Checking updates for File... -------------------------
No records for File in local test/fixtures/wpt/versions.json
pulling files from scratch...
----------------- Writing assets to test/fixtures/wpt/File... ------------------
⠧ Querying asset list for File...TypeError: Cannot read properties of undefined (reading 'oid')
at GitHubTree._getLastCommit (file:///usr/local/lib/node_modules/node-core-utils/lib/github/tree.js:38:56)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async GitHubTree.getLastCommit (file:///usr/local/lib/node_modules/node-core-utils/lib/github/tree.js:48:23)
at async GitHubTree.getFiles (file:///usr/local/lib/node_modules/node-core-utils/lib/github/tree.js:100:20)
at async WPTUpdater.getAssetList (file:///usr/local/lib/node_modules/node-core-utils/lib/wpt/index.js:61:34)
at async WPTUpdater.pullAllAssets (file:///usr/local/lib/node_modules/node-core-utils/lib/wpt/index.js:73:16)
at async WPTUpdater.update (file:///usr/local/lib/node_modules/node-core-utils/lib/wpt/index.js:160:5)
at async main (file:///usr/local/lib/node_modules/node-core-utils/components/git/wpt.js:80:5)```
It may need a check to see if the specified `<name>` is even a web platform test case, here I'd expect it to exit with -1 and a message saying "We couldn't find the File WPT tests, maybe you misspelled or have the wrong API identifier?"
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne damit, git node wpt File zu reproduzieren, und untersuche anschließend components/git/wpt.js, lib/wpt/index.js und lib/github/tree.js entlang des Stacktraces. Als erledigt gilt es, wenn ein unbekannter WPT-Name sauber mit einer nützlichen Meldung beendet wird, anstatt den Lookup zu versuchen und abzustürzen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript
- Bereich
- cli
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 62/100