nodejs / nodejs/userland-migrations
bug(`node-url-to-whatwg-url`): url-parse didn't support dynamic import
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 85
- Forks
- 55
- Avg merge
- 3d 11h
- Merged PRs (30d)
- 9
Description
import('node:url').then(({ parse: urlParse }) => {
const myURL = urlParse('https://example.com/path?query=string#hash');
const { auth } = myURL;
const urlAuth = myURL.auth;
const { path } = myURL;
const urlPath = myURL.path;
const { hostname } = myURL;
const urlHostname = myURL.hostname;
});
const urlParse = await import('node:url').then(({ parse }) => parse);
const myURL = urlParse('https://example.com/path?query=string#hash');
const { auth } = myURL;
const urlAuth = myURL.auth;
const { path } = myURL;
const urlPath = myURL.path;
const { hostname } = myURL;
const urlHostname = myURL.hostname;
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 by reproducing the dynamic import examples in the issue and inspect the migration handling for node:url and url-parse. Confirm that both promise-based and awaited dynamic imports are recognized, then verify the existing migration checks cover the destructured and property accesses shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 48/100