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

Update @whatwg-node/fetch to avoid punycode deprecation warning in Node #9955

Open
daniel-nagy opened this issue Apr 28, 2024 · 2 comments
Open

Comments

@daniel-nagy
Copy link

Is your feature request related to a problem? Please describe.

It looks like this package is using an old version of @whatwg-node/fetch. After upgrading to Node v22.0.0, I see warnings about punycode being deprecated. The source is graphql-codegen.

Describe the solution you'd like

Upgrade @whatwg-node/fetch to the latest version.

Describe alternatives you've considered

No response

Is your feature request related to a problem? Please describe.

punycode is deprecated but used by old versions of @whatwg-node/fetch.

@ardatan
Copy link
Collaborator

ardatan commented Apr 29, 2024

Have you tried to update your lockfile?

@gblues
Copy link

gblues commented May 21, 2024

This issue doesn't have anything to do with the lockfile.

Very simple reproduction steps:

  1. Make an empty directory
  2. run node --version and confirm node is version 22.0.0 or newer
  3. run npm init -y to create package.json
  4. run npm install -D @graphql-codegen/cli @graphql-codegen/typescript @graphql-codegen/typescript-resolvers
  5. run npx graphql-code-generator init

The punycode warning appears immediately:

npx graphql-code-generator init
(node:2916) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)

This same warning appears when running graphql-codegen

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

No branches or pull requests

3 participants