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

Proposed changed to update punycode #366

Closed
wants to merge 2 commits into from

Conversation

urizennnn
Copy link

@urizennnn urizennnn commented Mar 31, 2024

I just did yarn add punycode and changed dependencies that require punycode to fix #365

@urizennnn urizennnn requested a review from a team as a code owner March 31, 2024 22:31
@urizennnn urizennnn changed the title Proposed changed to update punycode Proposed changed to update punycode Mar 31, 2024
@dgellow
Copy link

dgellow commented Apr 1, 2024

Hi @urizennnn. Unfortunately I do not think that would be enough. The problem here is that require("punycode") imports the punycode node core library that has been deprecated. whatwg-url, a dependency of node-fetch does that import. Even if we add punycode explicitly the core library would still be the one being imported.

To get rid of the warning we would either need to replace node-fetch (the work would be similar to what is done with openai/openai-node#402), or have users of the sdk patch require("punycode") in whatwg-url to become require("punycode/") (using a patch utility such as https://github.com/ds300/patch-package?tab=readme-ov-file).

@urizennnn
Copy link
Author

Hi @urizennnn. Unfortunately I do not think that would be enough. The problem here is that require("punycode") imports the punycode node core library that has been deprecated. whatwg-url, a dependency of node-fetch does that import. Even if we add punycode explicitly the core library would still be the one being imported.

To get rid of the warning we would either need to replace node-fetch (the work would be similar to what is done with openai/openai-node#402), or patch require("punycode") in whatwg-url to become require("punycode/").

oh ok, so are there any temporal fixes available atm?

@urizennnn urizennnn marked this pull request as draft April 1, 2024 16:49
@rattrayalex
Copy link
Collaborator

In the short term, you can work around this by overriding the dependency in your package.json, eg:

"overrides": {
  "whatwg-url": "13.0.0"
}

@rattrayalex rattrayalex closed this Apr 1, 2024
@urizennnn urizennnn deleted the victor-puny branch April 1, 2024 18:10
@urizennnn
Copy link
Author

In the short term, you can work around this by overriding the dependency in your package.json, eg:

"overrides": {
  "whatwg-url": "13.0.0"
}

Considering my case that won't work since I am not running the code in native js (not sure that is the right way to explain but yh), it being ran from a lua file so i'm not sure it would fix that but i just added the --no-deprecation flag to it

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.

punycode update?
3 participants