node:url: url.parse and url.resolve report name parse/resolve instead of Node's urlParse/urlResolve

Open Beginner friendly
#15,234 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
82/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
node.js, rust, typescript
Domain
compilers

Research direction

Start in crates/perry-runtime/src/object/native_module/callable_exports.rs, where url.resolveObject already gets its display name through native_callable_export_display_name. Add the same display-name mapping for url.parse → urlParse and url.resolve → urlResolve, checking how the legacy node:url exports are registered. Reproduce with the issue's console.log(url.parse.name, url.resolve.name) snippet and run the relevant runtime/url tests to confirm both names match Node.

Written by the indexing model from the issue text.

Description

area:stdlib effort:S impact:low parity type:bug

Node names the legacy url.parse and url.resolve functions urlParse and urlResolve (url.parse.name, url.resolve.name), but Perry reports parse and resolve: the realm declares no display-name rename for them, unlike url.resolveObject → urlResolveObject (fixed in #15231 through native_callable_export_display_name in crates/perry-runtime/src/object/native_module/callable_exports.rs).

import url from "node:url";
console.log(url.parse.name, url.resolve.name); // node: urlParse urlResolve

Found while fixing #15125 (PR #15231).

Dominant language
Rust
Stars
4.9k
Forks
166
Avg merge
6h 59m
Merged PRs (30d)
955

Getting set up

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.

More from PerryTS/perry

All issues in PerryTS/perry

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.