You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 blob.text(), blob.arrayBuffer(), and blob.bytes() methods.
Improved getComputedStyle() to account for CSS specificity when multiple rules apply. (asamuzaK)
Improved synchronous XMLHttpRequest performance by using a persistent worker thread, avoiding ~400ms of setup overhead on every synchronous request after the first one.
Improved performance of node.getRootNode(), node.isConnected, and event.dispatchEvent() by caching the root node of document-connected trees.
Fixed getComputedStyle() to correctly handle !important priority. (asamuzaK)
Fixed document.getElementById() to return the first element in tree order when multiple elements share the same ID.
Fixed <svg> elements to no longer incorrectly proxy event handlers to the Window.
Fixed FileReader event timing and fileReader.result state to more closely follow the spec.
Fixed a potential hang when synchronous XMLHttpRequest encountered dispatch errors.
Fixed compatibility with environments where Node.js's built-in fetch() has been used before importing jsdom, by working around undici v6/v7 incompatibilities.
Overhauled resource loading customization. See the new README for details on the new API.
Added MIME type sniffing to <iframe> and <frame> loads.
Regression: WebSockets are no longer correctly throttled to one connection per origin. This is a result of the bug at nodejs/undici#4743.
Fixed decoding of the query components of <a> and <area> elements in non-UTF-8 documents.
Fixed XMLHttpRequest fetches and WebSocket upgrade requests to be interceptable by the new customizable resource loading. (Except synchronous XMLHttpRequests.)
Fixed the referrer of a document to be set correctly when redirects are involved; it is now the initiating page, not the last hop in the redirect chain.
Fixed correctness bugs when passing ArrayBuffers or typed arrays to various APIs, where they would not correctly snapshot the data.
Fixed require("url").parse() deprecation warning when using WebSockets.
Fixed <iframe>, <frame>, and <img> (when canvas is installed) to fire load events, not error events, on non-OK HTTP responses.
Improved CSS parsing by switching to @acemir/cssom, including support for nested selectors, nested declarations, layer statements, and improved at-rule validation. (acemir)
Fixed some selector cache invalidation issues where changes to attributes were not being picked up. (asamuzaK)
Fixed package.json"engines" field to reflect the new minimum Node.js versions needed to run jsdom, as noted in the changelog for v27.0.1.
Fixed some regressions in CSS selectors. Most such regression fixes were done in a minor update of a dependency, and thus available for all fresh installs of v27.0.0. However, one related to class="" attribute changes is only possible with a new version of jsdom. (asamuzaK)
Added a variety of event constructors, even though we do not implement their associated specifications or ever fire them: BeforeUnloadEvent, BlobEvent, DeviceMotionEvent (omitting requestPermission()), DeviceOrientationEvent (omitting requestPermission()), PointerEvent, PromiseRejectionEvent, and TransitionEvent.
Added movementX and movementY to MouseEvent. (These are from the Pointer Lock specification, the rest of which is not implemented.)
"jsdomError" events are now documented, with specific type properties and other properties that depend on the type.
sendTo() was renamed to forwardTo().
The jsdomErrors option to forwardTo() can be used to control which errors are sent to the Node.js console. This replaces the previous omitJSDOMErrors boolean option.
"jsdomError"s for failed XMLHttpRequest fetches are no longer emitted.
The values that are printed when forwarding "jsdomError"s to the Node.js console are streamlined.
Upgraded tough-cookie, which now considers URLs like http://localhost/ to be secure contexts (per the spec), and thus will return Secure-flagged cookies for such URLs. (colincasey)
Upgraded cssstyle, which brings along many improvements and fixes to the CSSStyleDeclaration object and its properties.
Updated the user agent stylesheet to be derived from the HTML Standard, instead of from an old revision of Chromium.
Changed element.click() to fire a PointerEvent instead of a MouseEvent.
Changed certain events to be passive by default.
Changed the <input> element's pattern="" attribute to use the v regular expression flag, instead of u.
Fixed many specification conformance issues with the Window object, including named properties and changing various data properties to accessor properties.
Fixed document.createEvent() to accept a more correct set of event names.
Fixed the ElementInternals accessibility getters and setters. (They were introduced in v23.1.0, but due to inadequate test coverage never actually worked.)
Fixed using Object.defineProperty() on certain objects, such as HTMLSelectElement instances.
Fixed jsdom.reconfigure({ url }) not updating document.baseURI or properties derived from it. (This regressed in v26.1.0.)
Fixed CSS system colors, as well as the initial, inherit, and unset keywords, to resolve correctly. (asamuzaK)
Fixed CSS display style resolution. (asamuzaK)
Changes since 27.0.0-beta.3
Upgraded cssstyle, which brings along various CSS parsing fixes.
Configuration
📅 Schedule: Branch creation - "every weekend" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
If you want to rebase/retry this PR, check this box
Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.
♻ Renovate will retry this branch, including artifacts, only when one of the following happens:
any of the package files in this branch needs updating, or
the branch becomes conflicted, or
you click the rebase/retry checkbox if found above, or
you rename this PR's title to start with "rebase!" to trigger it manually
The artifact failure details are included below:
File name: package-lock.json
npm warn Unknown env config "store". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm error code EOVERRIDE
npm error Override for jsdom@26.1.0 conflicts with direct dependency
npm error A complete log of this run can be found in: /runner/cache/others/npm/_logs/2026-04-04T09_51_29_313Z-debug-0.log
This review is AI-generated. Please use common sense when accepting these suggestions, as they may not always be accurate or appropriate for your specific context.
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
26.1.0→29.0.1Release Notes
jsdom/jsdom (jsdom)
v29.0.1Compare Source
v29.0.0Compare Source
Breaking changes:
Other changes:
@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.CSSCounterStyleRuleandCSSNamespaceRuleto jsdomWindows.cssMediaRule.matchesandcssSupportsRule.matchesgetters.MediaList, usingcss-treeinstead of naive comma-splitting. Invalid queries become"not all"per spec.cssKeyframeRule.keyTextgetter/setter validation.cssStyleRule.selectorTextsetter validation: invalid selectors are now rejected.styleSheet.ownerNode,styleSheet.href, andstyleSheet.title.Documentinitialization performance by lazily initializing the CSS selector engine, avoiding ~0.5 ms of overhead perDocument. (thypon)CSSStyleDeclarationmodifications to properly trigger custom element reactions.@mediarule parsing.CSSStyleSheet's "disallow modification" flag not being checked in all mutation methods.XMLHttpRequest'sresponsegetter returning parsed JSON during theLOADINGstate instead ofnull.getComputedStyle()crashing in XHTML documents when stylesheets contained at-rules such as@pageor@font-face.XMLHttpRequestcaused by a race condition with the worker thread's idle timeout.v28.1.0Compare Source
blob.text(),blob.arrayBuffer(), andblob.bytes()methods.getComputedStyle()to account for CSS specificity when multiple rules apply. (asamuzaK)XMLHttpRequestperformance by using a persistent worker thread, avoiding ~400ms of setup overhead on every synchronous request after the first one.node.getRootNode(),node.isConnected, andevent.dispatchEvent()by caching the root node of document-connected trees.getComputedStyle()to correctly handle!importantpriority. (asamuzaK)document.getElementById()to return the first element in tree order when multiple elements share the same ID.<svg>elements to no longer incorrectly proxy event handlers to theWindow.FileReaderevent timing andfileReader.resultstate to more closely follow the spec.XMLHttpRequestencountered dispatch errors.fetch()has been used before importing jsdom, by working around undici v6/v7 incompatibilities.v28.0.0Compare Source
<iframe>and<frame>loads.WebSockets are no longer correctly throttled to one connection per origin. This is a result of the bug at nodejs/undici#4743.<a>and<area>elements in non-UTF-8 documents.XMLHttpRequestfetches andWebSocketupgrade requests to be interceptable by the new customizable resource loading. (Except synchronousXMLHttpRequests.)ArrayBuffers or typed arrays to various APIs, where they would not correctly snapshot the data.require("url").parse()deprecation warning when usingWebSockets.<iframe>,<frame>, and<img>(whencanvasis installed) to fireloadevents, noterrorevents, on non-OK HTTP responses.XMLHttpRequest.v27.4.0Compare Source
TextEncoderandTextDecoder.@exodus/bytespackage; it is now much more correct. (ChALkeR)<meta charset>or using the parent frame's encoding.Ranges were used and then the elements referred to by those ranges were removed.v27.3.0Compare Source
@acemir/cssom. (acemir)v27.2.0Compare Source
CSSGroupingRule,CSSNestedDeclarations,CSSConditionRule,CSSContainerRule,CSSScopeRule,CSSSupportsRule,CSSLayerBlockRule, andCSSLayerStatementRuleto jsdomWindows. (acemir)@acemir/cssom. (acemir)@import-ed stylesheets to be properly exposed to CSSOM, and not to overwrite the sheet created from the<link>or<style>element. (acemir)v27.1.0Compare Source
@acemir/cssom, including support for nested selectors, nested declarations, layer statements, and improved at-rule validation. (acemir)package.json"engines"field to reflect the new minimum Node.js versions needed to run jsdom, as noted in the changelog for v27.0.1.v27.0.1Compare Source
class=""attribute changes is only possible with a new version of jsdom. (asamuzaK)v27.0.0Compare Source
Changes since 26.1.0
BeforeUnloadEvent,BlobEvent,DeviceMotionEvent(omittingrequestPermission()),DeviceOrientationEvent(omittingrequestPermission()),PointerEvent,PromiseRejectionEvent, andTransitionEvent.movementXandmovementYtoMouseEvent. (These are from the Pointer Lock specification, the rest of which is not implemented.)customElements.getName(). (mash-graz)"jsdomError"events are now documented, with specifictypeproperties and other properties that depend on the type.sendTo()was renamed toforwardTo().jsdomErrorsoption toforwardTo()can be used to control which errors are sent to the Node.js console. This replaces the previousomitJSDOMErrorsboolean option."jsdomError"s for failedXMLHttpRequestfetches are no longer emitted."jsdomError"s to the Node.js console are streamlined.nwsapito@asamuzakjp/dom-selector, closing over 20 selector-related bugs.tough-cookie, which now considers URLs likehttp://localhost/to be secure contexts (per the spec), and thus will returnSecure-flagged cookies for such URLs. (colincasey)cssstyle, which brings along many improvements and fixes to theCSSStyleDeclarationobject and its properties.element.click()to fire aPointerEventinstead of aMouseEvent.<input>element'spattern=""attribute to use thevregular expression flag, instead ofu.Windowobject, including named properties and changing various data properties to accessor properties.document.createEvent()to accept a more correct set of event names.ElementInternalsaccessibility getters and setters. (They were introduced in v23.1.0, but due to inadequate test coverage never actually worked.)Object.defineProperty()on certain objects, such asHTMLSelectElementinstances.jsdom.reconfigure({ url })not updatingdocument.baseURIor properties derived from it. (This regressed in v26.1.0.)initial,inherit, andunsetkeywords, to resolve correctly. (asamuzaK)displaystyle resolution. (asamuzaK)Changes since 27.0.0-beta.3
cssstyle, which brings along various CSS parsing fixes.Configuration
📅 Schedule: Branch creation - "every weekend" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.