Packages

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

Other targets from 4.5.2Latest31.0.1
  1. 4.5.2yours
  2. 5.0.0target
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

  1. 5.0.0

    Migration needed16 Apr 20151 new
    • Breaking

      Removed options.jar and options.document.cookieDomain from 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.)

3 other lines we could not sort, mostly version bumps
  • Instead, there is now a new option, options.cookieJar, which accepts cookie jars created by the new jsdom.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.url when creating a document). This supplants the former options.document.cookieDomain.

    5.0.0
  • Let options.document.cookie accept arrays, instead of just strings, for if you want to set multiple cookies at once.

    5.0.0

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.