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

Prevent deprecated punycode usage #80

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

adrai
Copy link
Contributor

@adrai adrai commented Jan 23, 2025

Down the cross-fetch dependency the [email protected] module uses the deprecated punycode api.

This PR omits to require cross-fetch if the native fetch api of Node.js is available (should be the case since v18)

This will prevent the punycode deprecation warning and a workaround like this is not necessary: #67 (comment)

(node:55558) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.

more infos: node-fetch/node-fetch#1793 (comment)

@valeriansaliou
Copy link
Owner

valeriansaliou commented Jan 23, 2025

What about asking the cross-fetch authors to bump node-fetch to v3.x (it currently depends on v2.x), which itself does not depend anymore on whatwg-url? That'd be the cleanest option long term :)

@adrai
Copy link
Contributor Author

adrai commented Jan 23, 2025

node-fetch v3.x is esm only => https://github.com/node-fetch/node-fetch?tab=readme-ov-file#commonjs

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

Successfully merging this pull request may close these issues.

2 participants