Packages

jsdom

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

Upgrading jsdom From 2.0.0 to 3.0.0

1 release in betweenevery note read

Other targets from 2.0.0Latest31.0.1
  1. 2.0.0yours
  2. 3.0.0target
1
change to make
0
advisories fixed
2
new
2
fixes

Before you upgrade

Tick each one off as you go
  • Breaking3.0.0

Release by release

  1. 3.0.0

    Migration needed18 Jan 20152 new · 2 fixes
    • Breaking

      Removed all traces of entities, entity types, notations, default attributes, and CDATA sections.

    • New

      Introduced a new "virtual console" abstraction for capturing console output from inside the page. See the readme for more information. Note that console.error will no longer contribute to the (non-standard, and likely dying in the future) window.errors array.

    • New

      Added the named new Image(width, height) constructor.

    • Fixed

      Fixed an exception when using querySelector with selectors like div:last-child > span[title].

    • Fixed

      Fixed a variety of accessors on Node, Element, Attr, and Document; some were removed that were nonstandard (especially setters); others were updated to reflect the spec; etc.

11 other lines we could not sort, mostly version bumps
  • By default documents now use about:blank as their URL, instead of trying to infer some type of file URL from the call site (in Node.js) or using location.href (in browsers).

    3.0.0
  • Differentiated between XML and HTML documents better, for example in how they handle the casing of tag names and attributes.

    3.0.0
  • Updated DOMImplementation to mostly work per-spec, including removing addFeature and removeFeature methods, the ownerDocument property, and making hasFeature always return true.

    3.0.0
  • Re-did the CharacterData implementation to follow the algorithms in the DOM Standard; this notably removes a few exceptions that were previously thrown.

    3.0.0
  • Re-did Comment, Text, and ProcessingInstruction to follow the DOM Standard and derive from CharacterData.

    3.0.0
  • Re-did DocumentType to follow the DOM Standard and be much simpler, notably removing notations, entities, and default attributes.

    3.0.0
  • Re-did name/qname validation, which is done by various APIs, to work with the xml-name-validator package and some centralized algorithms.

    3.0.0
  • Made the XML parser at least somewhat aware of processing instructions.

    3.0.0
  • Cleaned up doctype parsing and association between doctypes and documents. More exotic doctypes should parse better now.

    3.0.0
  • document.contentType now is generally inferred from the parsing mode of the document.

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