garycourt / uri-js

An RFC 3986 compliant, scheme extendable URI parsing/validating/normalizing/resolving library for JavaScript
Other
305 stars 69 forks source link

DeprecationWarning: The `punycode` module is deprecated #96

Open lorezyra opened 7 months ago

lorezyra commented 7 months ago
(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 commented 7 months ago

See https://github.com/garycourt/uri-js/pull/95

kibertoad commented 6 months ago

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

tianyingchun commented 4 months ago

any update on this?

andreinwald commented 4 months ago

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

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

You can add to package.json of your project:

"overrides": {
    "uri-js": "npm:uri-js-replace"
}
tianyingchun commented 4 months ago

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 commented 4 months ago

@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 commented 4 months ago

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

andreinwald commented 4 months ago

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

That's why I ended up with the replacement.

xavierraffin commented 2 weeks ago

Made a suggestion to ajv to make this switch official: https://github.com/ajv-validator/ajv/issues/2486