jsdom
31.0.1 · 13 Nov 2026MIT166.8M / weekRepositoryHomepagenpmAtom feed
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/cssomandcssstyledependencies with fresh internal implementations built on webidl2js wrappers and thecss-treeparser. Serialization, parsing, and API behavior is improved in various ways, especially around edge cases.Added
CSSCounterStyleRuleandCSSNamespaceRuleto jsdomWindows.Added
cssMediaRule.matchesandcssSupportsRule.matchesgetters.Added proper media query parsing in
MediaList, usingcss-treeinstead of naive comma-splitting. Invalid queries become"not all"per spec.Added
cssKeyframeRule.keyTextgetter/setter validation.Added
cssStyleRule.selectorTextsetter validation: invalid selectors are now rejected.Added
styleSheet.ownerNode,styleSheet.href, andstyleSheet.title.Added bad port blocking per the fetch specification, preventing fetches to commonly-abused ports.
Improved
Documentinitialization performance by lazily initializing the CSS selector engine, avoiding ~0.5 ms of overhead perDocument.Fixed a memory leak when stylesheets were removed from the document.
Fixed
CSSStyleDeclarationmodifications to properly trigger custom element reactions.Fixed nested
@mediarule parsing.Fixed
CSSStyleSheet's "disallow modification" flag not being checked in all mutation methods.Fixed
XMLHttpRequest'sresponsegetter returning parsed JSON during theLOADINGstate instead ofnull.Fixed
getComputedStyle()crashing in XHTML documents when stylesheets contained at-rules such as@pageor@font-face.Fixed a potential hang in synchronous
XMLHttpRequestcaused 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.