nodejs / nodejs/userland-migrations

node-url-to-whatwg-url codemod causes app to crash

Open
#249 5 comments 1 reaction 0 assignees View on GitHub

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.

Uncaught TypeError: Invalid URL
    at new URL (node:internal/url:825:25) {
  code: 'ERR_INVALID_URL',
  input: '/path?query=string#hash'

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.