nodejs / nodejs/userland-migrations
node-url-to-whatwg-url codemod causes app to crash
Open
Nobody has claimed this yet.
confirmed
- Dominant language
- TypeScript
- Stars
- 85
- Forks
- 55
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 9
Description
My previous comment was not addressed so I'm opening a new issue to track this bug
You can see the input gets transformed into the expected output. However the expected output crashes when you try to run it.
- node-url-to-whatwg-url/tests/url-parse/input/file-10.js
- node-url-to-whatwg-url/tests/url-parse/expected/file-10.js
Uncaught TypeError: Invalid URL
at new URL (node:internal/url:825:25) {
code: 'ERR_INVALID_URL',
input: '/path?query=string#hash'
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.
Research direction
Start with recipes/node-url-to-whatwg-url/tests/url-parse/input/file-10.js and the corresponding expected/file-10.js. Reproduce the transformed file and inspect why running it passes '/path?query=string#hash' to URL without a valid base. Done means the codemod output runs without the reported ERR_INVALID_URL failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, nodejs, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100