jsdom / tr46

An implementation of the Unicode UTS #46: Unicode IDNA Compatibility Processing.
MIT License
32 stars 14 forks source link

Require punycode with trailing slash #34

Closed imcotton closed 1 year ago

imcotton commented 2 years ago

Quote from Punycode.js README:

⚠️ 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.

domenic commented 2 years ago

I believe this note is no longer true, as you can test by uninstalling punycode and then the tests will fail.

imcotton commented 2 years ago

By run:

NODE_PENDING_DEPRECATION=1 npm test | grep DEP

Gives:

[DEP0040] DeprecationWarning: The punycode module is deprecated. Please use a userland alternative instead.

In Node.js v16

imcotton commented 2 years ago

Ping...