Closed as not planned
Closed as not planned
Description
🚀 Feature Proposal
Upgrade jsdom to v24 from v22.
The current chain of dependencies from jest-environment-jsdom
import punycode
. As of Node 21, requiring punycode emits a deprecation warning.
The dependency chain is:
- jest-environment-jsdom
- depends on jsdom
^22.0.0
- depends on tough-cookie
^4.1.2
- tough-cookie 4.1.2 depends on psl
^1.9.0
- psl depends on node:punycode
tough-cookie replaced psl with tldts in salesforce/tough-cookie#346, avoiding the deprecation warning.
Motivation
Every test with jsdom logs a deprecation warning:
(node:15100) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
at node:punycode:3:9
at BuiltinModule.compileForInternalLoader (node:internal/bootstrap/realm:398:7)
at BuiltinModule.compileForPublicLoader (node:internal/bootstrap/realm:337:10)
at loadBuiltinModule (node:internal/modules/helpers:104:7)
at Function.Module._load (node:internal/modules/cjs/loader:999:17)
at Module.require (node:internal/modules/cjs/loader:1230:19)
at require (node:internal/modules/helpers:179:18)
at Object.<anonymous> (/opt/p/simc/node_modules/psl/index.js:5:16)
at Module._compile (node:internal/modules/cjs/loader:1368:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1426:10)
Example
Should be no change excepting breaking changes in jsdom.
Pitch
Because jest already imports jsdom.