Repository navigation
Update dependency jsdom to v31 - #1903
Merged
Merged
Conversation
Deploying mouseterm with
|
| Latest commit: |
fddc466
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://c7cf47c7.mouseterm.pages.dev |
| Branch Preview URL: | https://renovate-jsdom-31-x.mouseterm.pages.dev |
dormouse-bot
left a comment
Collaborator
There was a problem hiding this comment.
The Library Tests check is red on this head, with 269 failures across five lib files. Main passes the same workflow. I'm pushing the fix to this branch. Both causes are jsdom 31 behavior changes the tests depend on, not product regressions:
- Stranded animation frames (
Wall.test.tsx,TerminalContext.test.tsx). jsdom 31 added a focus-fixup step: when the focused element goes inert or is removed, it starts its rendering-updatesetInterval. That interval uses the Node global, whichvi.useFakeTimers()replaces. A test that closes a focused menu under fake timers and then callsvi.useRealTimers()leaves the interval on a discarded clock. From then on norequestAnimationFramein that file's window fires, so every laterflushFrame()times out. This caused 258 of Wall's 268 failures and TerminalContext's 8. The fix runs one fake frame before restoring real timers, in the Wall context-exit test and in TerminalContext'safterEach. - CSS serialization (
SelectionRing,SurfacePaneHeader,WorkspaceSelectionOverlaytests). The new CSS engine reads back0 0as0px 0px,calc(100vw - 24px)ascalc(-24px + 100vw), and theanimationshorthand with the name last. The components still set the same values, so the fix updates the three expected strings.
jsdom 31 starts its rendering interval for focus fixup on whichever clock is current; one started under vi.useFakeTimers() never runs after vi.useRealTimers(), so every later requestAnimationFrame in the file hangs. Run one fake frame before restoring real timers. Update three assertions for the new CSS engine's serialization.
dormouse-bot
approved these changes
Nov 28, 2026
Contributor
Author
Edited/Blocked NotificationRenovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR. You can manually request rebase by checking the rebase/retry box above. |
This branch was successfully deployed
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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:
^30.0.0→^31.0.0Release Notes
jsdom/jsdom (jsdom)
v31.0.1Compare Source
node.isConnected. (@scttcper)element.tabIndexhandling of invalid and out-of-rangetabindex=""values to use the element's default instead of returning zero or wrapping. Values with trailing non-digits now use their leading integer, sotabindex="1e2"yields1instead of100. (@rome-xi)ident()results containing spaces or leading digits losing their required escaping during serialization and variable substitution. (@scttcper)autoto serialize with the integer first, such as3 auto.v31.0.0Compare Source
Breaking changes
canvasto@napi-rs/canvas. Install@napi-rs/canvasv1.0.13 or later in the v1.x series alongside jsdom; installingcanvasalone 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 throughcanvas.toDataURL()andcanvas.toBlob(). Fixed image loading to wait for decoding before firingload, 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-onlyctx.canvas, image-drawing exceptions, MIME type and quality normalization, and asynchronousnullresults fromcanvas.toBlob()for empty canvases or encoding failures. (@Brooooooklyn)@scope, custom-property substitution and registration through@propertyandCSS.registerProperty(), typedattr(), conditionalif(), shadow-tree styling with:host,::slotted(), and::part(), pseudo-element computed styles, and constructable stylesheets withdocument.adoptedStyleSheetsandshadowRoot.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.JSDOMconstructor,JSDOM.fromURL(), andJSDOM.fromFile()can now return partially parsed documents. Wait forDOMContentLoadedfor the finished tree, or the window'sloadevent for load-delaying resources, checkingdocument.readyStatefirst 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
window.reportError(), which dispatches anerrorevent and reports uncanceled errors to the virtual console. (@sarankumar1325)element.ariaBrailleLabelandelement.ariaBrailleRoleDescription. (@Kjubikstronk)loadevents to fire only on the window. Usewindow.addEventListener("load", ...)orwindow.onloadinstead of listening on the document.document.open(), including implicit calls fromdocument.write(), to clear event listeners and handlers from the document, its descendants, and its window when replacing the input stream.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 untildocument.close().script.async = falseexecution 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.<style>elements in shadow trees now fireloadevents.window.stop()to cancel pending subresource andXMLHttpRequestrequests in descendant frames and suppress completion events for canceled loads, while allowing subsequent requests to proceed.document.close()calls replaying readiness and load events, and incorrect iframe load events when reopening documents from event handlers.element.blur()can release it immediately.document.hasFocus()returning false before an element is focused or during focus transitions within the document, including inside frames.<template>parsing andtemplate.innerHTMLserialization in XML documents, including templates with namespace prefixes. (@b84330808)rect.toJSON()andperformance.toJSON()to create their result objects in the method's realm instead of the host Node.js realm.Configuration
📅 Schedule: (in timezone America/Los_Angeles)
* * * * 1)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, 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.