git node wpt <name> crashes if <name> isn't found
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Quiet
- Tech stack
- javascript
- Domain
- cli
Research direction
Start by reproducing git node wpt File, then inspect components/git/wpt.js, lib/wpt/index.js, and lib/github/tree.js along the stack trace. Done means an unknown WPT name exits cleanly with a useful message instead of attempting the lookup and crashing.
Written by the indexing model from the issue text.
Description
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?"
- Dominant language
- JavaScript
- Stars
- 313
- Forks
- 137
- Avg merge
- 2d 8h
- Merged PRs (30d)
- 24
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from nodejs/node-core-utils
-
Difficulty 3/5 1-2 days Newbie friendliness 65/100
nodejs/node-core-utils#1164 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 68/100
nodejs/node-core-utils#1160 · 3 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
nodejs/node-core-utils#1151 ·
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
nodejs/node-core-utils#1063 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
nodejs/node-core-utils#967 · 4 comments ·
All issues in nodejs/node-core-utils
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
HarperFast/skills#96 ·
-
[Block] Latest Posts [Type] Bug
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Automattic/studio#4908 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
sugarlabs/musicblocks#8847 ·