Jest: Upgrade jsdom to 12.0.0

Created on 30 Aug 2018  路  7Comments  路  Source: facebook/jest

馃殌 Feature Proposal

Upgrade jsdom dependency of jest-environment-jsdom package to version 12.0.0.

Motivation

jsdom 12.0.0 drops the left-pad dependency (https://github.com/jsdom/jsdom/commit/f42751e2503a5dc314e868c65f239a1dc541f8d5). left-pad is licensed under WTFPL which got reject by OSI (https://opensource.org/minutes20090304)

Potential Problem

jsdom 12.0.0 drops support for node.js below v8 (https://github.com/jsdom/jsdom/commit/67eb73efc22d85b2aa3c7b0237be58ac5129b584)

Most helpful comment

It's just a deprecation, nothing to worry about.

We'll be upgrading to JSDOM 15 as part of Jest 25

All 7 comments

We won't upgrade before a major due to the node version requirement. Feel free to publish a package similar to https://www.npmjs.com/package/jest-environment-jsdom-11.0.0 for v12

@SimenB Thank you for the fast response! 馃弾

We won't upgrade before a major due to the node version requirement.

I fully understand. Is there a way for me to know when the next major version is planned to help with the dependency upgrade?

We have no planned schedule, plus we'll likely not drop Node 6 in v24 or even v25. It would be quite safe to assume that we drop it once it reaches its EOL.

In case someone else stumbles upon this closed issue looking for an alternative:

With help from @SimenB I copied some code out of this project and released a version of jest-environment-jsdom which ships with JSDOM version 12 as an alternative to waiting for Jest to drop Node 6 support.

GitHub: https://github.com/theneva/jest-environment-jsdom-twelve
npm: https://www.npmjs.com/package/jest-environment-jsdom-twelve

Feel free to use that as your testEnvironment :smile:

See a warning about this dependency due to jsdom 11.x (using [email protected]) when installing [email protected]:

warning react-scripts > jest > jest-cli > jest-config > jest-environment-jsdom 
> jsdom > [email protected]: use String.prototype.padStart()

It's just a deprecation, nothing to worry about.

We'll be upgrading to JSDOM 15 as part of Jest 25

@SimenB Any idea on a timeline for Jest 25? 馃

Was this page helpful?
0 / 5 - 0 ratings