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

Deprecation Warning: punycode Dependency via uri-js #2350

Open
camiloux opened this issue Dec 2, 2023 · 5 comments · May be fixed by #2377
Open

Deprecation Warning: punycode Dependency via uri-js #2350

camiloux opened this issue Dec 2, 2023 · 5 comments · May be fixed by #2377

Comments

@camiloux
Copy link

camiloux commented Dec 2, 2023

Version 8.12.0, Node 21.2.0, using npm.

Hi there,
I wanted to raise an issue regarding uri-js dependency, which uses punycode under the hood, which has been deprecated.

While working with ajv, I've noticed deprecation warnings related to the usage of the punycode module through its dependency on uri-js. It seems uri-js hasn't been updated for three years, causing these warnings.

├─┬ ajv@8.12.0
│ └─┬ uri-js@4.4.1
│ └── punycode@2.3.0

Just thought I'd bring this up for consideration. Thank you for your work on ajv!

@domdomegg
Copy link

I've opened a PR to fix this in uri-js, the package ajv depends on here: garycourt/uri-js#95

@ThatOneCalculator
Copy link

Since uri-js seems to be unmaintained, maybe ajv should use a fork of uri-js (i.e. the repo maintained by domdomegg)

@kibertoad kibertoad linked a pull request Feb 9, 2024 that will close this issue
@kibertoad
Copy link

kibertoad commented Feb 9, 2024

@ThatOneCalculator I've created a fork that addresses this problem: https://github.com/kibertoad/toad-uri-js

Happy to invite ajv folks to co-maintain if there is interest.

@ttodua
Copy link

ttodua commented Apr 4, 2024

any update on this?
@kibertoad did you have any response from ajv devs?

@andreinwald
Copy link

Hi there,
I created a replacement for library uri-js as temporal solution.

  • 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 (runned all Ajv tests)

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

You can add to package.json of your project:

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

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

Successfully merging a pull request may close this issue.

7 participants
@kibertoad @domdomegg @ttodua @andreinwald @ThatOneCalculator @camiloux and others