Skip to content
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

DeprecationWarning: The punycode module is deprecated #96

Open
lorezyra opened this issue Jan 8, 2024 · 9 comments
Open

DeprecationWarning: The punycode module is deprecated #96

lorezyra opened this issue Jan 8, 2024 · 9 comments

Comments

@lorezyra
Copy link

lorezyra commented Jan 8, 2024

(node:29131) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

Can we update the module to replace "punycode"?

@domdomegg
Copy link

See #95

@kibertoad
Copy link

I've published a fork that I intend to keep maintaining that addresses this issue: https://www.npmjs.com/package/toad-uri-js

@tianyingchun
Copy link

any update on this?

@andreinwald
Copy link

Hi there,
I created a replacement for library uri-js

  • Based on Node.js and browser URL api
  • 99% compatible with original URI.js library
  • Solves "The punycode module is deprecated" warning in Node
  • Tested with libraries: ESLint, Webpack, Ajv

https://github.com/andreinwald/uri-js-replace

You can add to package.json of your project:

"overrides": {
    "uri-js": "npm:uri-js-replace"
}

@tianyingchun
Copy link

tianyingchun commented Apr 28, 2024

it only can be used in local dev environment, does it can support npm i -g @package/a if @package/a has

"overrides": {
    "uri-js": "npm:uri-js-replace"
}

it seems that npm i -g xxx xxx package won't replace uri-js to uri-js-replace

@andreinwald
Copy link

@tianyingchun if any library has "uri-js" as direct dependency, then maintainers of that library can just replace "uri-js" to "uri-js-replace" in dependencies zone of package.json

@tianyingchun
Copy link

why uri-js can not bump a new version? cause of so many lib indirect dependents uri-js rather than uri-js-replace?

@andreinwald
Copy link

Creator and maintainer @garycourt haven't updated it for last 3 years.

That's why I ended up with the replacement.

@xavierraffin
Copy link

Made a suggestion to ajv to make this switch official: ajv-validator/ajv#2486

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants