mathiasbynens / punycode.js

A robust Punycode converter that fully complies to RFC 3492 and RFC 5891.
https://mths.be/punycode
MIT License
1.59k stars 158 forks source link

Suggest using `punycode.js` npm package #122

Open silverwind opened 1 year ago

silverwind commented 1 year ago

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.

mathiasbynens commented 1 year ago

Publication of both punycode and punycode.js is now automated for every Git tag pushed to this repository! I'm open to a PR that changes the README to recommend the use of punycode.js.