mathiasbynens / mathiasbynens/punycode.js

Suggest using `punycode.js` npm package

Open
#122 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.7k
Forks
170
PR merge metrics
No merged PRs in 30d

Description

https://www.npmjs.com/package/punycode.js appears to be a complete copy of https://www.npmjs.com/package/punycode, with the benefit that the name is not ambiguous with the deprecated node core module.

Can the README suggest using it? The workaround mentioned in the readme with `require('punycode/')` does not work with ESM (ERR_UNSUPPORTED_DIR_IMPORT), so there is no way currently to un-ambiguously import `punycode` in node ESM. I suggest to `npm deprecate` the `punycode` module in turn.

The only difference seems to be that 2.1.1 was not published on the `punycode.js` name.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the README section describing the deprecated Node core module and the current require('punycode/') workaround. Check how the README currently presents package usage, then document punycode.js as the unambiguous alternative for Node ESM and ensure the ESM limitation is accurately explained. Done means the README clearly recommends the package without changing implementation code.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.