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

[Bug]: punycode deprecation warning on Node 22 LTS #15367

Open
camsteffen opened this issue Oct 30, 2024 · 9 comments
Open

[Bug]: punycode deprecation warning on Node 22 LTS #15367

camsteffen opened this issue Oct 30, 2024 · 9 comments

Comments

@camsteffen
Copy link

camsteffen commented Oct 30, 2024

Version

29.7.0

Steps to reproduce

Run any test suite with jest environment jsdom using Node 22.

Expected behavior

No deprecation warning is printed.

Actual behavior

The following warning is printed before tests run.

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

Additional context

This problem is also mentioned in #15148, but while upgrading jest-environment-jsdom is a possible solution, I'd like to specifically track the deprecation warning happening on the stable release (#15148 seems to be about the alpha release).

Environment

System:
OS: macOS 15.0.1
CPU: (12) arm64 Apple M2 Pro
Binaries:
Node: 22.11.0 - ~/.local/state/fnm_multishells/98505_1730127764871/bin/node
npm: 10.9.0 - ~/.local/state/fnm_multishells/98505_1730127764871/bin/npm
npmPackages:
jest: ^29.7.0 => 29.7.0

@tylerd-canva
Copy link

relevant #15276

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 30 days.

@github-actions github-actions bot added the Stale label Dec 17, 2024
@camsteffen
Copy link
Author

(no activity indeed)

@github-actions github-actions bot removed the Stale label Dec 17, 2024
@alfaproject
Copy link

Jest feels abandoned ):

@ginosanterre
Copy link

It looks like that. Are you going to replace it with something else? What are the options?

@Smrtnyk
Copy link

Smrtnyk commented Dec 23, 2024

@ginosanterre https://github.com/vitest-dev/vitest is currently the most popular option

@ashwintmbi
Copy link

Anyone successfully patch this?

@MirKml
Copy link

MirKml commented Dec 26, 2024

This clumsy npm overrides works for our app. It also fixes punycode problem in other our deps. packages.
Because punycode problem is warning only and will be same for a long time, I hope it will be fixed in jest@next at least. 🙏

 "overrides": {
    "psl": "npm:@imput/[email protected]",
    "data-urls@3.*": {
      "whatwg-url": "12.0.1"
    },
    "jest-environment-jsdom": {
      "jsdom": {
        "whatwg-url": "12.0.1"
      }
    }
  }

@LiviuSosu
Copy link

@MirKml where did you write that snippet? I've already looked into the pakage.json and similar files, but I could not get a hint of where should I write that code snippet.

Many thanks in advance to anyone who cold answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants