← Back to Pull requests

chore(deps): bump jsdom from 30.1.3 to 31.0.0 #128

Closed
unknown closed this pull request without merging on Nov 10, 2026 20:22 UTC
View on GitHub
unknown unknown commented on Nov 09, 2026 02:37 UTC
Author

Bumps jsdom from 30.1.3 to 31.0.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/jsdom/jsdom/releases">jsdom's releases</a>.</em></p>
<blockquote>
<h2>v31.0.0</h2>
<h2>Breaking changes</h2>
<ul>
<li>Changed the optional canvas and image decoding backend from <code>canvas</code> to <code>@napi-rs/canvas</code>. Install <code>@napi-rs/canvas</code> v1.0.13 or later in the v1.x series alongside jsdom; installing <code>canvas</code> 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 <a href="https://github.com/jsdom/jsdom/blob/v31.0.0/README.md#canvas-support">canvas migration guidance</a>. Added WebP serialization through <code>canvas.toDataURL()</code> and <code>canvas.toBlob()</code>. Fixed image loading to wait for decoding before firing <code>load</code>, 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 <code>ctx.canvas</code>, image-drawing exceptions, MIME type and quality normalization, and asynchronous <code>null</code> results from <code>canvas.toBlob()</code> for empty canvases or encoding failures. (<a href="https://github.com/Brooooooklyn"><code>@​Brooooooklyn</code></a>)</li>
<li>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, <code>@scope</code>, custom-property substitution and registration through <code>@property</code> and <code>CSS.registerProperty()</code>, typed <code>attr()</code>, conditional <code>if()</code>, shadow-tree styling with <code>:host</code>, <code>::slotted()</code>, and <code>::part()</code>, pseudo-element computed styles, and constructable stylesheets with <code>document.adoptedStyleSheets</code> and <code>shadowRoot.adoptedStyleSheets</code>. 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.</li>
<li>Changed HTML and XML parsing to pause at blocking scripts until their required resources are ready. The <code>JSDOM</code> constructor, <code>JSDOM.fromURL()</code>, and <code>JSDOM.fromFile()</code> can now return partially parsed documents. Wait for <code>DOMContentLoaded</code> for the finished tree, or the window's <code>load</code> event for load-delaying resources, checking <code>document.readyState</code> first in case the event has already fired. XML syntax errors encountered after asynchronous parsing resumes are reported through the virtual console as <code>&quot;xml-parsing&quot;</code> errors.</li>
</ul>
<h2>Other changes</h2>
<ul>
<li>Added <code>window.reportError()</code>, which dispatches an <code>error</code> event and reports uncanceled errors to the virtual console. (<a href="https://github.com/sarankumar1325"><code>@​sarankumar1325</code></a>)</li>
<li>Added <code>element.ariaBrailleLabel</code> and <code>element.ariaBrailleRoleDescription</code>. (<a href="https://github.com/Kjubikstronk"><code>@​Kjubikstronk</code></a>)</li>
<li>Fixed page-completion <code>load</code> events to fire only on the window. Use <code>window.addEventListener(&quot;load&quot;, ...)</code> or <code>window.onload</code> instead of listening on the document.</li>
<li>Fixed <code>document.open()</code>, including implicit calls from <code>document.write()</code>, to clear event listeners and handlers from the document, its descendants, and its window when replacing the input stream.</li>
<li>Fixed <code>document.write()</code> 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 <code>document.close()</code>.</li>
<li>Fixed dynamically inserted scripts to respect <code>script.async = false</code> 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.</li>
<li>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 <code>&lt;style&gt;</code> elements in shadow trees now fire <code>load</code> events.</li>
<li>Fixed <code>window.stop()</code> to cancel pending subresource and <code>XMLHttpRequest</code> requests in descendant frames and suppress completion events for canceled loads, while allowing subsequent requests to proceed.</li>
<li>Fixed repeated <code>document.close()</code> calls replaying readiness and load events, and incorrect iframe load events when reopening documents from event handlers.</li>
<li>Fixed memory leaks where pending request interceptor promises retained closed windows, introduced in v28.0.0.</li>
<li>Fixed focus remaining on elements that become non-focusable after DOM or style changes. Focus now moves asynchronously to the document's viewport, and <code>element.blur()</code> can release it immediately.</li>
<li>Fixed <code>document.hasFocus()</code> returning false before an element is focused or during focus transitions within the document, including inside frames.</li>
<li>Fixed <code>\&lt;template&gt;</code> parsing and <code>template.innerHTML</code> serialization in XML documents, including templates with namespace prefixes. (<a href="https://github.com/b84330808"><code>@​b84330808</code></a>)</li>
<li>Fixed <code>rect.toJSON()</code> and <code>performance.toJSON()</code> to create their result objects in the method's realm instead of the host Node.js realm.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/jsdom/jsdom/commit/825fa8efc1e29ec19e4c17a59d28abfb4aa3dc8e"><code>825fa8e</code></a> 31.0.0</li>
<li><a href="https://github.com/jsdom/jsdom/commit/9f2e49a78663b686bc70e639563d52916d4f5c71"><code>9f2e49a</code></a> Add ariaBrailleLabel and ariaBrailleRoleDescription</li>
<li><a href="https://github.com/jsdom/jsdom/commit/4c0a35e11dd6636b90294582fa6af5d6e6737e97"><code>4c0a35e</code></a> Flush text written with document.write()</li>
<li><a href="https://github.com/jsdom/jsdom/commit/fce11d36232ff81c11822b5d03650c787865dc68"><code>fce11d3</code></a> Switch canvas support to <code>@​napi-rs/canvas</code></li>
<li><a href="https://github.com/jsdom/jsdom/commit/27614bf7475018dfd6685b69daf167f352ae44df"><code>27614bf</code></a> Fix document.hasFocus() during focus changes</li>
<li><a href="https://github.com/jsdom/jsdom/commit/627ade229930787320ecaaec4d7bb3bf19c4264d"><code>627ade2</code></a> Implement asynchronous focus fixup</li>
<li><a href="https://github.com/jsdom/jsdom/commit/8bd17a276fa70443aba5bf78dc5f244bece36bd2"><code>8bd17a2</code></a> Implement reportError()</li>
<li><a href="https://github.com/jsdom/jsdom/commit/5ae66cf9264dbaeb474d4a4b06004f9aba0c69de"><code>5ae66cf</code></a> Update webidl2js and remove IDL workarounds</li>
<li><a href="https://github.com/jsdom/jsdom/commit/ce5a100d21c3d1a7c27b40ee9607e76053099f2d"><code>ce5a100</code></a> Align development scripts and CI</li>
<li><a href="https://github.com/jsdom/jsdom/commit/9cc717f47c7be4d56c8e372a14b97262a29df2a9"><code>9cc717f</code></a> Adopt ESLint config v6 and oxfmt</li>
<li>Additional commits viewable in <a href="https://github.com/jsdom/jsdom/compare/v30.1.3...v31.0.0">compare view</a></li>
</ul>
</details>
<br />

Diff: 650 lines (+487 / -163) across 8 files Reviewer: adm01-debug Review duration: 2504m
All Vouch review confidence checks passed
Residual risk 0.22 = Change Risk (0.52) × (1 − Review Confidence (0.57)). Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.52 · 650 lines diff across 8 files
0.52
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
0.17
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
56%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size diff_size
0.388
Shallow Review Depth shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #128"
general weight: 0.35
Reviewers
Assignees
Unassigned
Labels
risk: low confidence: 56.8% reviewed
Vouch Risk Breakdown
AI-powered review risk analysis
Change Risk
Change Risk · Model 1 (XGBoost)
Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
Score: 52% (MEDIUM) · Higher = larger blast radius
52%
Review Confidence
Review Confidence · Models 2 & 3
Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
Score: 56.8% · Lower = rushed or shallow review
56.8%
Residual Risk
Residual Risk · Core Equation
Residual = Change × (1 − Confidence)
Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
Score: 22.5% · Safe to merge
22.5%