-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
[Feature]: Upgrade jest-environment-jsdom dependency to jsdom@^26.0.0 #15325
Comments
Further motivation: a number of APIs are missing in older jsdom versions that were recently added, e.g. |
As a side-note, the current latest |
As a follow-on to the above side-note, including |
+1. it looks like the latest alpha still has jsdom 22. But v23 is the first one without the deprecated
|
Versions of jsdom below 24.1.2 rely on a vulnerable version of ws package. https://nvd.nist.gov/vuln/detail/CVE-2024-37890. |
How about giving this issue a bit more focus like changing it from a Feature Request to a Bug? |
even renovate wants this #15276 |
Any updates on this? We are still seeing this message on every one of our test suite runs: (node:10249) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created) It's rather annoying. |
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. |
I would still like this to be fixed, so... it's not stale to me |
With jsdom@^26.0.0 "Error: Could not parse CSS stylesheet" when css @layer rule is used would also be fixed... |
+1. this would fix all the above mentioned issues and more. please upgrade this dependency |
Hey folks, does anyone here know how to get the attention of people in this repo? It seems like a lot of people want this? It also seems like the last change to this package was 5 months ago (the repo is still being worked on though). |
@ThomasGreenspan would you mind updating the jsdom version in the issue title to latest (v26.0.0)? |
If the reason for closing is that jest doesn't want to drop support for node@16 ... then how come this could be a thing: #15461 |
Hi all, not sure if the jest package maintainers will approve / merge my PR (due to several breaking changes). I built a custom jest environment in the meantime to help us all out. Feel free to play around with it: https://github.com/andreibereczki/jest-environment-jsdom-twentysix If something doesn't work, please drop me a message and i'll look into it. |
🚀 Feature Proposal
For package jest-environment-jsdom, change dependency on jsdom from:
"jsdom": "^22.0.0"
to
"jsdom": "^25.0.1"
Edit: now should be ^26.0.0
Motivation
jsdom versions before 25.0.1 (including 25.0.0) indirectly rely on punycode which is deprecated and emits deprecation warnings for every test.
A more detailed explanation can be found on this older issue which was closed without addressing (although I believe it needs to be ugpraded all the way up to v25):
#15148
Example
No response
Pitch
The package already relies on jsdom, this is just requesting an upgrade of one of its dependencies.
I currently use a dependency override and the behavior is fully preserved. Of course, I have a limited set of tests so I'm not sure that there is no impact but it is possible that this is a very small effortless change. While the override does handle my issue, overrides are always a little dangerous and I think it would be good for the lib to not rely on deprecated code.
The text was updated successfully, but these errors were encountered: