Packages

jsdom

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

Your version

29.0.0

major15 Mar 2026Where it was published

29.1.1 is the newest release of 29.x.

In short

1 breaking7 new7 fixed2 changed

  • Breaking

    Node.js v22.13.0+ is now the minimum supported v22 version (was v22.12.0+).

Release note

Breaking changes:

  • Breaking

    Node.js v22.13.0+ is now the minimum supported v22 version (was v22.12.0+).

Other changes:

  • Overhauled the CSSOM implementation, replacing the @acemir/cssom and cssstyle dependencies with fresh internal implementations built on webidl2js wrappers and the css-tree parser. Serialization, parsing, and API behavior is improved in various ways, especially around edge cases.

  • Added CSSCounterStyleRule and CSSNamespaceRule to jsdom Windows.

  • Added cssMediaRule.matches and cssSupportsRule.matches getters.

  • Added proper media query parsing in MediaList, using css-tree instead of naive comma-splitting. Invalid queries become "not all" per spec.

  • Added cssKeyframeRule.keyText getter/setter validation.

  • Added cssStyleRule.selectorText setter validation: invalid selectors are now rejected.

  • Added styleSheet.ownerNode, styleSheet.href, and styleSheet.title.

  • Added bad port blocking per the fetch specification, preventing fetches to commonly-abused ports.

  • Improved Document initialization performance by lazily initializing the CSS selector engine, avoiding ~0.5 ms of overhead per Document.

  • Fixed a memory leak when stylesheets were removed from the document.

  • Fixed CSSStyleDeclaration modifications to properly trigger custom element reactions.

  • Fixed nested @media rule parsing.

  • Fixed CSSStyleSheet's "disallow modification" flag not being checked in all mutation methods.

  • Fixed XMLHttpRequest's response getter returning parsed JSON during the LOADING state instead of null.

  • Fixed getComputedStyle() crashing in XHTML documents when stylesheets contained at-rules such as @page or @font-face.

  • Fixed a potential hang in synchronous XMLHttpRequest caused by a race condition with the worker thread's idle timeout.

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.