nodejs / nodejs/userland-migrations

bug(`node-url-to-whatwg-url`): url-parse didn't support dynamic import

Open
#515 0 comments 0 reactions 0 assignees View on GitHub

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

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 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.