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

Closed
camiloux opened this issue Dec 2, 2023 · 9 comments
Closed

Deprecation Warning: punycode Dependency via uri-js #2350

camiloux opened this issue Dec 2, 2023 · 9 comments

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
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"
 }

@Niek
Copy link

Niek commented May 18, 2024

@jasoniangreen Any chance to switch over the dependency to uri-js-replace?

@jasoniangreen
Copy link
Collaborator

Hi @Niek thanks for your suggestion but I think this will be our most likely move. We already have fast-uri as a second option in the codebase/docs so it makes sense to switch it to be the default.

@jasoniangreen
Copy link
Collaborator

Closed as we are moving to fast-uri

@kibertoad
Copy link

@jasoniangreen fast-uri was reverted. What is the plan now?

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.

9 participants