Skip to content

build(deps-dev): bump jsdom from 30.1.3 to 31.0.1 - #534

Merged
chhoumann merged 3 commits into
masterfrom
dependabot/npm_and_yarn/jsdom-31.0.0
Nov 21, 2026
Merged

chhoumann merged 3 commits into
masterfrom
dependabot/npm_and_yarn/jsdom-31.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Bumps jsdom from 30.1.3 to 31.0.1.

Release notes

Sourced from jsdom's releases.

v31.0.1

  • Improved performance of computed style reads, selector matching, CSS variable substitution, CSS shorthand updates, and focus handling on pages with many style rules. (@​scttcper)
  • Improved performance when building detached DOM trees and reading node.isConnected. (@​scttcper)
  • Fixed element.tabIndex handling of invalid and out-of-range tabindex="" values to use the element's default instead of returning zero or wrapping. Values with trailing non-digits now use their leading integer, so tabindex="1e2" yields 1 instead of 100. (@​rome-xi)
  • Fixed CSS ident() results containing spaces or leading digits losing their required escaping during serialization and variable substitution. (@​scttcper)
  • Fixed 'max-lines' values combining an integer and auto to serialize with the integer first, such as 3 auto.

v31.0.0

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.
Commits
  • b76da26 31.0.1
  • 8a39b93 Track whether each node is connected
  • 463254b Speed up type and relative selector matching
  • afb7299 Fix max-lines serialization order
  • 574765e Fix tabIndex reflection of invalid and out-of-range values
  • 2cdcc44 Skip stylesheets that cannot apply to an element
  • 1ba3b6b Skip fetch cancellation test on affected Node versions
  • 40a0a14 Reduce CSS shorthand mutation overhead
  • 8a68119 Speed up CSS variable substitution
  • da2b11b Index pseudo-element rules apart from element rules
  • Additional commits viewable in compare view

Note

Bump jsdom from 30.1.3 to 31.0.1 and adapt style tests

  • Updates the declared jsdom range to ^31.0.1 in package.json
  • Adds a theme-variable fixture with concrete CSS values to styles.test.ts, so tests assert resolved colors, shadows, and spacing instead of unresolved CSS variables
  • Updates expected values in reduced-motion, focus-ring, hover, transcript, tablet rail, and player stage tests; the clipped transcript label is now expected to display as block
  • Reworks componentCss.ts to match jsdom's media-query behavior: media and container query rules are only applied when their query string is listed in media, otherwise wrapped in a nonmatching query

Macroscope summarized 18d9f46.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Deploying podnotes with  Cloudflare Pages  Cloudflare Pages

Latest commit: 18d9f46
Status: ✅  Deploy successful!
Preview URL: https://8648f417.podnotes.pages.dev
Branch Preview URL: https://dependabot-npm-and-yarn-jsdo-tkd1.podnotes.pages.dev

View logs

@dependabot
dependabot Bot requested a review from chhoumann as a code owner November 12, 2026 12:23
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Nov 12, 2026
cursor[bot]
cursor Bot previously requested changes Nov 12, 2026

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not mergeable as a lockfile-only bump. jsdom 31.0.0 replaces CSS parsing, selector matching, and computed styles; src/ui/PodcastView/styles.test.ts is written against jsdom 30 serialization and fails 10 of 16 cases. GitHub Test / Unit tests is red. Plugin runtime is untouched (jsdom is test-only), so this needs a dedicated assertion migration, not Dependabot.

Bump: jsdom 30.1.3 → 31.0.0 (package.json + lockfile). Published 2026-11-05; 7-day cooldown is satisfied. Title is build(deps-dev): and will not cut a release.

What passed (Node 22.23.4): npm ci (lockfile unchanged), lint, format:check, typecheck, build, size (318892 raw / 103371 gzip, same as #530). npm audit --omit=dev 0. Remaining 127 unit files / 2816 tests pass. Six style cases still pass (unguarded :hover scan, tablet padding, disabled opacity, search-field padding).

What failed (local and CI):

Case jsdom 30.1.3 jsdom 31.0.0
play/card transition transform 120ms ease transform 0.12s
play/card animation "" none
EQ bars "" / pn-eq 1s ease-in-out infinite all / 1s ease-in-out -0.8s infinite pn-eq
focus outline 2px solid var(--interactive-accent) 3px rgb(0, 0, 0) (UA default; unresolved var() dropped)
hover background-color: var(--background-modifier-hover) preserved custom property rgba(0, 0, 0, 0)
skip-button rest rgba(0, 0, 0, 0) rgb(204, 204, 204)
transcript label display inline block
artwork box-shadow var(--shadow-s) currentcolor none

The hover workaround that retargets background: var( to background-color: var( (added after #515) no longer keeps unresolved custom properties. Same class of failure as #515, worse (10 vs 5).

Do not merge until styles.test.ts is migrated to jsdom 31’s computed-style serialization (and the hover/outline/shadow var() behavior is re-proven, not just retuned). Keep this PR as the version bump only if that migration lands with it; otherwise close in favor of a dedicated PR.

Open in Web View Automation 

Sent by Cursor Automation: Dependabot PRs

Comment thread package.json Resolved
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/jsdom-31.0.0 branch 3 times, most recently from 59b7252 to bd587ec Compare November 17, 2026 21:43
Bumps [jsdom](https://github.com/jsdom/jsdom) from 30.1.3 to 31.0.1.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Commits](jsdom/jsdom@v30.1.3...v31.0.1)

---
updated-dependencies:
- dependency-name: jsdom
  dependency-version: 31.0.0
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot changed the title build(deps-dev): bump jsdom from 30.1.3 to 31.0.0 build(deps-dev): bump jsdom from 30.1.3 to 31.0.1 Nov 21, 2026
@dependabot
dependabot Bot force-pushed the dependabot/npm_and_yarn/jsdom-31.0.0 branch from bd587ec to 764487e Compare November 21, 2026 11:11
jsdom 31 replaced its CSS implementation. It now evaluates media queries
as a desktop that hovers with no motion preference, substitutes var() as
a browser does (an undefined variable falls back to the initial value,
and var() in shorthands works), and applies a UA stylesheet.

- componentCss settles every query itself: listed queries match, others
  become `not all`, so jsdom's emulated device cannot leak in.
- The tests define the Obsidian theme variables they read and assert the
  resolved values; the shorthand stand-ins jsdom 30 needed are gone.
- Test markup carries the real `pn-bare` class, which undoes the UA
  button background as it does Obsidian's.
- An absolutely positioned label computes `display: block`, as CSS
  Display's blockification requires.
- Transition and animation shorthands use jsdom 31's serialization.
@chhoumann

Copy link
Copy Markdown
Owner

PASS+NOTES — independently reviewed head 18d9f46be0c9e1c9580fe375dc95bf2019e33f13.

The goal was to verify that the jsdom 31 adaptations preserve the style tests' behavioral coverage. I found no blocking defect in this dependency update. Review and temporary defect plants ran in a separate clone at the exact head; the PR branch and shared checkout were not changed.

Non-blocking coverage note

  • tests/mocks/componentCss.ts:41 disables every unlisted query, including @media all. This can hide an unwanted conditional rule. I proved it by adding @media all { .pn-stage .pn-cover { box-shadow: var(--shadow-s); } } alongside the existing stage artwork rule in Player.svelte. The artwork test at src/ui/PodcastView/styles.test.ts:219 passed with that defect, and npm run plant reported “Not caught”. With the helper's previous unlisted-query behavior restored, the same plant was caught and the restored baseline passed. No current component uses @media all, and this PR changes no component CSS, so this is a follow-up coverage limitation rather than a blocker. Consider preserving unconditional queries or explicitly rejecting unsupported query strings in future coverage.
  • Conversely, moving an expected effect behind the wrong query is caught. Replacing Deck's (hover: hover) guard with (min-width: 0px) failed “the skip button keeps its resting background after a tap”. Its positive hover assertion at src/ui/PodcastView/styles.test.ts:148 prevents that false pass.

Assertion review

  • src/ui/PodcastView/styles.test.ts:16, :88, :148, :200, and :219: the theme fixture declares only custom properties. Real component declarations must apply them to outline, background, padding, and shadow. These assertions are not tautological. The focus-variable, rail-padding, and stage-selector plants below independently confirm that.
  • src/ui/PodcastView/styles.test.ts:67: both normal and reduced-motion behavior remain asserted. Updated values reflect computed shorthand serialization, including the first equalizer bar's negative animation delay.
  • src/ui/PodcastView/styles.test.ts:128 and :135: pn-bare matches the actual Deck and Player button markup and applies the real reset in PodcastView CSS.
  • src/ui/PodcastView/styles.test.ts:178: display: block is the computed result of absolute-position blockification. The test still checks clipping, visibility, absolute positioning, and the unaffected label in the empty panel.
  • The two removed jsdom 30 workarounds no longer rewrite background shorthands or replace spacing variables before evaluation.

Independent defect plants

Each of these npm run plant runs type-checked, failed the named test with the defect, and passed after restoration:

Defect Test that caught it
Delete transition: none !important the play button stops moving when the user prefers reduced motion
Delete animation: none !important a playing row's bars stops moving when the user prefers reduced motion
Remove Deck's hover query wrapper, retaining its rules the skip button keeps its resting background after a tap
Change that guard to (min-width: 0px) the skip button keeps its resting background after a tap
Change the focus ring to --background-modifier-border draws the video's play button ring inside the frame that clips it, and others outside
Broaden the stage artwork selector from child to descendant dresses its own artwork, not the covers of a panel's rows shown in it
Delete Rail's padding: 0 var(--size-4-2) the rail's add button keeps its own padding over Obsidian's for every button

Validation

Ran fnm exec --using 22.23.2 npm ci, followed by the same prefix with npm run lint, npm run format:check, npm run typecheck, npm run test, and npm run test:tooling. All passed. Application tests: 2,993 passed across 125 files. Tooling tests: 56 passed across 9 files. Both Svelte checks reported zero errors and warnings.

Environment detail: this host's installation selected by --using 22.23.2 reports Node v22.23.4, which also matches the repository's .nvmrc. These were Node 22 runs, not verified runs of the 22.23.2 binary.

PR checks at this head all pass, including Platforms on macOS and Windows. Macroscope's correctness check is skipped. I used the available T3 PR tools to inspect checks and post this comment.

git diff --stat origin/master...HEAD contains exactly package.json, package-lock.json, src/ui/PodcastView/styles.test.ts, and tests/mocks/componentCss.ts. Both the review clone and original checkout are clean after restoration. No Obsidian runtime session was run for this development-dependency/test-only change.

@chhoumann
chhoumann dismissed cursor[bot]’s stale review November 21, 2026 11:45

Addressed in 18d9f46: styles.test.ts migrated to jsdom 31, with the var() behavior re-proven by 21 plants and an independent PASS (issuecomment-7062087330).

@chhoumann
chhoumann merged commit 0d8d0ed into master Nov 21, 2026
16 checks passed
@chhoumann
chhoumann deleted the dependabot/npm_and_yarn/jsdom-31.0.0 branch November 21, 2026 11: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 javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant