Packages

jsdom

31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed

Upgrading jsdom From 6.2.0 to 6.5.1

4 releases in betweenevery note read

Other targets from 6.2.0Latest31.0.1
  1. 6.2.0yours
  2. 6.3.0breaking
  3. 6.4.0
  4. 6.5.0
  5. 6.5.1target

Before you upgrade

Tick each one off as you go
  • Breaking6.3.0

Release by release

  1. 6.5.1

    19 Sep 20151 fix
    • Fixed

      Fixed an issue where with jsdom.jsdom, you had to pass referrer and cookie options as top-level, whereas with jsdom.env, you had to nest them under a document option. This was unnecessarily confusing. Now both possibilities are allowed for both functions. (The readme only documents the top-level version, though.)

  2. 6.5.0

    14 Sep 20151 new
    • New

      Added NodeList.prototype[Symbol.iterator], so you can now use for-of loops with NodeLists.

  3. 6.4.0

    13 Sep 20153 new
    • New

      Added jsdom.nodeLocation(node) to get the location within the source text of a given node.

    • New

      Added jsdom.reconfigureWindow(window, { top }) to allow changing the value of a window's top property.

    • New

      Added the element argument to the custom resource loader, so you can customize resource loads depending on which element loaded them.

  4. 6.3.0

    Migration needed30 Aug 20152 new · 9 fixes
    • Breaking

      HTMLIsIndexElement was removed; it has never been produced by the parser since 1.0.0-pre.1, and so it has been just a vestigial global property.

    • New

      Added a fully spec-compliant implementation of window.atob and window.btoa.

    • New

      Added Node.prototype.baseURI property to get the node's owner document's base URL.

    • Fixed

      With the canvas npm package installed, <canvas> elements are now properly instanceof HTMLCanvasElement and instanceof HTMLElement.

5 other lines we could not sort, mostly version bumps
  • Updated getElementsByClassName to match the spec. It now correctly splits on whitespace to try to find elements with all the given classes; it returns a HTMLCollection instead of a NodeList; and it memoizes the result.

    6.4.0
  • Updated NodeList and HTMLCollection to match the spec. The most noticable change is that HTMLCollection no longer inherits from NodeList.

    6.4.0
  • HTMLBaseElement's href getter now contains appropriate fallbacks and always returns an absolute URL, per spec.

    6.3.0
  • If there are no base elements in an "about:blank" iframe document, the base URL correctly falls back to the parent window's base URL.

    6.3.0
  • When you provide a url: ... option to jsdom.jsdom() or jsdom.env(), the given string is now attempted to be resolved as a URL before it is installed as document.URL.

    6.3.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.