Skip to content

chore(deps): update dependency jsdom to v29#737

Merged
renovate[bot] merged 1 commit intomainfrom
renovate/jsdom-29.x
Mar 21, 2026
Merged

chore(deps): update dependency jsdom to v29#737
renovate[bot] merged 1 commit intomainfrom
renovate/jsdom-29.x

Conversation

@renovate
Copy link
Contributor

@renovate renovate bot commented Mar 19, 2026

This PR contains the following updates:

Package Change Age Confidence
jsdom ^28.1.0^29.0.0 age confidence

Release Notes

jsdom/jsdom (jsdom)

v29.0.0

Compare Source

Breaking changes:

  • 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 cssKeyframeRule.keyText getter/setter validation.
  • Added cssStyleRule.selectorText setter validation: invalid selectors are now rejected.
  • Added styleSheet.ownerNode, styleSheet.href, and styleSheet.title.
  • Added bad port blocking per the fetch specification, preventing fetches to commonly-abused ports.
  • Improved Document initialization performance by lazily initializing the CSS selector engine, avoiding ~0.5 ms of overhead per Document. (thypon)
  • Fixed a memory leak when stylesheets were removed from the document.
  • Fixed CSSStyleDeclaration modifications to properly trigger custom element reactions.
  • Fixed nested @media rule parsing.
  • Fixed CSSStyleSheet's "disallow modification" flag not being checked in all mutation methods.
  • Fixed XMLHttpRequest's response getter returning parsed JSON during the LOADING state instead of null.
  • Fixed getComputedStyle() crashing in XHTML documents when stylesheets contained at-rules such as @page or @font-face.
  • Fixed a potential hang in synchronous XMLHttpRequest caused by a race condition with the worker thread's idle timeout.

Configuration

📅 Schedule: Branch creation - "before 5am" (UTC), Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

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

This PR has been generated by Mend Renovate using a curated preset maintained by Sanity. View repository job log here

@renovate renovate bot requested a review from a team as a code owner March 19, 2026 02:37
@renovate renovate bot requested review from ryanbonial and removed request for a team March 19, 2026 02:37
@renovate renovate bot enabled auto-merge (squash) March 19, 2026 02:37
@claude
Copy link

claude bot commented Mar 19, 2026

Claude finished @renovate[bot]'s task in 1m 9s —— View job


jsdom v28 → v29 Upgrade Review

  • Identify breaking changes in jsdom v29
  • Search codebase for jsdom usages
  • Verify compatibility of each usage
  • Check peer dependencies and build tooling
  • Post findings

Summary

All usages are compatible with jsdom v29. No code changes needed.

Breaking Changes in v29

Change Impact on this repo
Node.js v22.13.0+ minimum (was v22.12.0+) None — minor patch bump
CSSOM overhaul (replaced @acemir/cssom/cssstyle) None — no CSS manipulation in this codebase
Bad port blocking per fetch spec None — http://localhost:3333/ uses a safe port
XMLHttpRequest.response fix during LOADING state None — no XHR usage in stubs
getComputedStyle() XHTML crash fix None — not used

Codebase Usage (packages/@sanity/cli-core/src/util/environment/stubs.ts)

The sole jsdom consumer creates a JSDOM instance with two options:

const dom = new JSDOM(html, {
  pretendToBeVisual: true,       // unchanged in v29
  url: 'http://localhost:3333/', // port 3333 is not a bad port
})

APIs accessed from dom.windowEventTarget, AbortSignal, document, requestIdleCallback, cancelIdleCallback, ResizeObserver, IntersectionObserver, matchMedia — all remain unchanged in v29.

The collectBrowserStubs() function dynamically enumerates all window properties, so new globals added by v29 (CSSCounterStyleRule, CSSNamespaceRule, etc.) are automatically included — a benefit, not a concern.

Verdict

Safe to merge. ✓

@socket-security
Copy link

socket-security bot commented Mar 19, 2026

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​jsdom@​29.0.07510010096100

View full report

@renovate renovate bot force-pushed the renovate/jsdom-29.x branch from ee3f1a3 to ef04b18 Compare March 19, 2026 02:48
@github-actions
Copy link

github-actions bot commented Mar 19, 2026

Coverage Delta

No covered files changed in this PR.

Overall Coverage

Metric Coverage
Statements 83.0% (±0%)
Branches 72.7% (±0%)
Functions 83.2% (±0%)
Lines 83.5% (±0%)

@renovate renovate bot force-pushed the renovate/jsdom-29.x branch 10 times, most recently from d097203 to 2374b82 Compare March 19, 2026 22:17
@renovate renovate bot force-pushed the renovate/jsdom-29.x branch from 2374b82 to f0b0f60 Compare March 20, 2026 16:44
Copy link
Member

@rexxars rexxars left a comment

Choose a reason for hiding this comment

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

Node.js v22.13.0+ is now the minimum supported v22 version (was v22.12.0+).

I wasn't aware that it was previously v22.12.0 - we should probably make sure to raise our range to match :/

@renovate renovate bot merged commit 7a4a416 into main Mar 21, 2026
43 checks passed
@renovate renovate bot deleted the renovate/jsdom-29.x branch March 21, 2026 18:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant