-
-
Notifications
You must be signed in to change notification settings - Fork 79
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dependency on deprecated Node "punycode" module #296
Comments
For browser targets using psl, punycode.js's readme has this wrinkle in it:
|
I believe that part of the readme about browser support is just referring to that they started using ES2015isms like This library psl is already in CommonJS format and requires a bundler to be used within a browser, so adding a dependency on Punycode.js v2 would not cause a regression for people targeting (ES2015-supporting non-ancient) browsers specifically. But it would cause an issue for people not transpiling their code like with Babel and targeting ancient runtimes that don't support ES6 features like |
Many thanks for reporting this @Macil ⭐ I have opened a PR with the suggested change (see #298). It would be amazing if you could try it before I merge it 😉
This repo also provides browserified and minified versions of I recently added automated cross-browser testing (thanks to a free account provided by @browserstack) and will be adding more browser/os combinations soon to make sure we provide enough coverage for old browsers (and Node versions). |
@lupomontero after using |
Nice one @wegry 💪 |
When can we get this merged? |
In Node.js 21, `require('punycode')` causes `DeprecationWarning` to be thrown. Since `psl` (dep of `tough-cookie`, dep of `request`) requires punycode, this causes tests to fail. Disable until lupomontero/psl#296 is fixed. Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
@lupomontero any chance of getting this out? |
Hi guys, any chance we can get this merged now that Node 21 rolls out? Cheers, |
Will this be in a release anytime soon? |
The project calls
require('punycode')
, using the Node punycode module which has been deprecated since v7 (2016). The Node docs now recommend using punycode.js in place of it.This also means that when this library is used in a project using webpack, webpack must be manually configured to load punycode.js as a replacement for the punycode module because webpack since v5 (2020) no longer defaults to including shims for Node APIs like punycode.
It would be helpful if this library switched to using punycode.js instead of the Node punycode module.
The text was updated successfully, but these errors were encountered: