jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
Upgrading jsdom From 4.5.2 to 5.0.0
1 release in betweenevery note read
- 1
- change to make
- 0
- advisories fixed
- 1
- new
- 0
- fixes
Before you upgrade
Tick each one off as you go- Breaking5.0.0
Release by release
- Breaking
Removed
options.jarandoptions.document.cookieDomainfrom the configuration for creating jsdom documents. - New
Implemented automatic cookie-jar sharing with descendant
<iframe>s. (So, if the iframe is same-domain, it can automatically access the appropriate cookies.)
- Breaking
3 other lines we could not sort, mostly version bumps
- 5.0.0
Instead, there is now a new option,
options.cookieJar, which accepts cookie jars created by the newjsdom.createCookieJar()API. You should use this if you intend to share cookie jars among multiple jsdom documents. - 5.0.0
Within a given cookie jar, cookie access is now automatically handled on a domain basis, as the browser does, with the domain calculated from the document's URL (supplied as
options.urlwhen creating a document). This supplants the formeroptions.document.cookieDomain. - 5.0.0
Let
options.document.cookieaccept arrays, instead of just strings, for if you want to set multiple cookies at once.
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.