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

Name collision #97

Open joeyhub opened 4 years ago

joeyhub commented 4 years ago

This package uses the same name as the inbuilt punycode package in node.js.

While this might work with the default loader (haven't tried), it can cause an annoyance for package builders (some seem to ignore it as a build in).

Any chance of being able to alias it?

SukkaW commented 4 years ago

Currently I am facing the same issue. Although I have installed the package through npm i punycode, but eslint continues to tells me that 'punycode' module was deprecated since v7.

And I have found this: https://www.npmjs.com/package/punycode.js . punycode.js is exactly the same as punycode which could avoid the case.

nbouvrette commented 1 year ago

Unfortunately npm i --save-dev @types/punycode.js fails so there is no way to get proper typing with punycode.js

milahu commented 6 months ago

https://www.npmjs.com/package/punycode

Note that userland modules don't hide core modules. For example, `require('punycode')` still imports the deprecated core module even if you executed npm install punycode. Use `require('punycode/')` to import userland modules rather than core modules. ```js const punycode = require('punycode/'); ```