jest-environment-jsdom is using a very old jsdom 11.5 released over a year ago. The latest jsdom - 13.1- brings a lot of new features and better compatibility.
It would be great to update to the latest jsdom and fix some of the open issues here, like:
It also brings dropping Node 6, which we still support. Please use custom environment with latest JSDOM, like: https://github.com/theneva/jest-environment-jsdom-thirteen in the meantime.
See the docs on why and how to use it: https://jestjs.io/docs/en/troubleshooting#compatibility-issues
I feel like we should document this better and make users more aware which version of JSDOM they use under the hood. If you have ideas on how to make that better, we'd love a PR with that!
Should we ship with the latest jsdom and give people the option to use a jest-env-jsdom-node-6 environment for full node 6 support?
People would have to ignore engines warning, not sure it's worth the noise?
https://github.com/jsdom/jsdom/blob/2e0e12dd7ac4360017b12f36839aedc665653146/package.json#L107
I support @rickhanlonii on this: it's more practical to support latest version out of the box and give an option to configure environment to support Node 6 if needed
The issue is that the install will fail (or start giving warnings) for people running a supported version of Node
Could make sense to bump jsdom and drop node 6 in the next major release. What do you think?
Node 6 is in maintenance LTS, not active LTS. https://github.com/nodejs/Release#release-schedule
I'd wager that's still not enough to drop it? Gotta wait till April 2019.
I'd wager that's still not enough to drop it?
Aye. And there's no rush here - people wanting a newer jsdom can just install it. I do agree we might wanna document it in a visible spot, but in no way worth ditching node 6 for IMO.
Looking forward to node 8 and not transpiling async though, will probably give us a nice little perf boost
It's April 2019 now, Node 6 is end of life. Can we upgrade now please? I am missing so many things like element.insertAdjacentElement() or MutationObserver
@felixfbecker there's nothing blocking you from using newer JSDOM, see: https://github.com/facebook/jest/issues/7538#issuecomment-449147896
@thymikee there is, I can't use both https://github.com/simon360/jest-environment-jsdom-global and https://github.com/ianschmitz/jest-environment-jsdom-fourteen
File a PR to https://github.com/simon360/jest-environment-jsdom-global then or create your own fork 🤷♂️
@thymikee jest-environment-jsdom-global depends on the official jest-environment-jsdom.
Why this hostility to solve this issue in Jest that was expressed by multiple people? Is Jest gonna use this jsdom version forever? When will it upgrade, if not now that Node 6 is EOL? What's the point of having jsdom support bundled with Jest if users have to jump through hoops and use forked packages to use modern DOM features?
Node 6 EOL is April 30th. As far as I know, it's April 5th today, so 25 days to go.
What's the point of having jsdom support bundled with Jest if users have to jump through hoops and use forked packages to use modern DOM features?
That's a good question. Personally I'd get rid of JSDOM environment from the core and install it as a dependency if one needs it. Maybe we'll get there one day.
Now that Node 6 reached its end of life, how do we look with dropping it?
@kleinfreund in the next major, 25 :)
Most helpful comment
@thymikee
jest-environment-jsdom-globaldepends on the officialjest-environment-jsdom.Why this hostility to solve this issue in Jest that was expressed by multiple people? Is Jest gonna use this jsdom version forever? When will it upgrade, if not now that Node 6 is EOL? What's the point of having jsdom support bundled with Jest if users have to jump through hoops and use forked packages to use modern DOM features?