Skip to content

chore(deps): update dependency jsdom to v31 - #357

Merged
ReenigneArcher merged 1 commit into
masterfrom
renovate/jsdom-31-x
Nov 7, 2026
Merged

ReenigneArcher merged 1 commit into
masterfrom
renovate/jsdom-31-x

Conversation

@renovate

@renovate renovate Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
jsdom 30.1.3 → 31.0.0 age confidence

Release Notes

jsdom/jsdom (jsdom)

v31.0.0

Compare Source

Breaking changes

  • Changed the optional canvas and image decoding backend from canvas to @napi-rs/canvas. Install @napi-rs/canvas v1.0.13 or later in the v1.x series alongside jsdom; installing canvas alone no longer enables this support. The new backend provides prebuilt Skia binaries on supported platforms, and rendering and encoded image bytes can differ. Projects using native canvas objects or custom font registration should follow the canvas migration guidance. Added WebP serialization through canvas.toDataURL() and canvas.toBlob(). Fixed image loading to wait for decoding before firing load, discard obsolete source requests, avoid refetching when dimensions change, and prevent failed images from drawing stale contents. Fixed canvas context and serialization behavior, including unsupported context types, read-only ctx.canvas, image-drawing exceptions, MIME type and quality normalization, and asynchronous null results from canvas.toBlob() for empty canvases or encoding failures. (@​Brooooooklyn)
  • Changed CSS parsing, selector matching, and computed styles to use a new integrated implementation, with substantially expanded support and faster selector queries and repeated style reads. This includes cascade layers, nesting, @scope, custom-property substitution and registration through @property and CSS.registerProperty(), typed attr(), conditional if(), shadow-tree styling with :host, ::slotted(), and ::part(), pseudo-element computed styles, and constructable stylesheets with document.adoptedStyleSheets and shadowRoot.adoptedStyleSheets. Fixed numerous cascade, shorthand, serialization, and default-style issues; computed declarations now stay live across DOM and stylesheet changes. CSS serialization and computed values can differ from previous releases.
  • Changed HTML and XML parsing to pause at blocking scripts until their required resources are ready. The JSDOM constructor, JSDOM.fromURL(), and JSDOM.fromFile() can now return partially parsed documents. Wait for DOMContentLoaded for the finished tree, or the window's load event for load-delaying resources, checking document.readyState first in case the event has already fired. XML syntax errors encountered after asynchronous parsing resumes are reported through the virtual console as "xml-parsing" errors.

Other changes

  • Added window.reportError(), which dispatches an error event and reports uncanceled errors to the virtual console. (@​sarankumar1325)
  • Added element.ariaBrailleLabel and element.ariaBrailleRoleDescription. (@​Kjubikstronk)
  • Fixed page-completion load events to fire only on the window. Use window.addEventListener("load", ...) or window.onload instead of listening on the document.
  • Fixed document.open(), including implicit calls from document.write(), to clear event listeners and handlers from the document, its descendants, and its window when replacing the input stream.
  • Fixed document.write() to process successive writes through the parser's input stream, preserve insertion points across nested scripts, and make completed text immediately visible. Script-created input streams now remain open until document.close().
  • Fixed dynamically inserted scripts to respect script.async = false execution order, use their source text and document from preparation time, and avoid executing after adoption into another document. Scripts parsed through inert fragment APIs no longer execute when subsequently inserted.
  • Fixed unrelated images, stylesheets, and frames being delayed behind scripts, and resource completion events firing before nested stylesheet imports finish. Cyclic imports no longer prevent completion, and <style> elements in shadow trees now fire load events.
  • Fixed window.stop() to cancel pending subresource and XMLHttpRequest requests in descendant frames and suppress completion events for canceled loads, while allowing subsequent requests to proceed.
  • Fixed repeated document.close() calls replaying readiness and load events, and incorrect iframe load events when reopening documents from event handlers.
  • Fixed memory leaks where pending request interceptor promises retained closed windows, introduced in v28.0.0.
  • Fixed focus remaining on elements that become non-focusable after DOM or style changes. Focus now moves asynchronously to the document's viewport, and element.blur() can release it immediately.
  • Fixed document.hasFocus() returning false before an element is focused or during focus transitions within the document, including inside frames.
  • Fixed <template> parsing and template.innerHTML serialization in XML documents, including templates with namespace prefixes. (@​b84330808)
  • Fixed rect.toJSON() and performance.toJSON() to create their result objects in the method's realm instead of the host Node.js realm.

Configuration

📅 Schedule: (in timezone America/New_York)

  • Branch creation
    • "after 1am and before 8am"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Never, 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

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added dependencies Pull requests that update a dependency file js labels Nov 6, 2026
@sonarqubecloud

sonarqubecloud Bot commented Nov 6, 2026

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 6, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 74.45%. Comparing base (3c32f1f) to head (55566ee).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #357      +/-   ##
==========================================
+ Coverage   74.43%   74.45%   +0.01%     
==========================================
  Files          88       88              
  Lines       21970    21970              
==========================================
+ Hits        16353    16357       +4     
+ Misses       5617     5613       -4     
Flag Coverage Δ
aarch64-apple-darwin 73.37% <ø> (?)
aarch64-unknown-linux-gnu 73.37% <ø> (ø)
aarch64-unknown-linux-musl 73.77% <ø> (ø)
x86_64-apple-darwin 73.36% <ø> (ø)
x86_64-pc-windows-msvc 74.47% <ø> (+0.01%) ⬆️
x86_64-unknown-linux-gnu 73.37% <ø> (ø)
x86_64-unknown-linux-musl 73.77% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.
see 14 files with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3c32f1f...55566ee. Read the comment docs.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@ReenigneArcher
ReenigneArcher merged commit 3775dcd into master Nov 7, 2026
48 checks passed
@ReenigneArcher
ReenigneArcher deleted the renovate/jsdom-31-x branch November 7, 2026 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file js

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant