Skip to content

chore(deps): bump jsdom from 29.1.1 to 30.0.0 in /frontend - #1514

Closed
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bun/frontend/jsdom-30.0.0
Closed

chore(deps): bump jsdom from 29.1.1 to 30.0.0 in /frontend#1514
dependabot[bot] wants to merge 1 commit into
mainfrom
dependabot/bun/frontend/jsdom-30.0.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Jul 27, 2026

Copy link
Copy Markdown
Contributor

Bumps jsdom from 29.1.1 to 30.0.0.

Release notes

Sourced from jsdom's releases.

v30.0.0

Breaking changes:

  • Node.js minimum version raised to ^22.22.2 || ^24.15.0 || >=26.0.0.

Other changes:

  • Added CSS.escape() and CSS.supports() functions. (@​asamuzaK)
  • Added 'background-position-x' and 'background-position-y' CSS properties. (@​olagokemills)
  • Fixed getComputedStyle() to convert length values into pixels. (@​asamuzaK)
  • Fixed CSS function serialization, e.g., in the return value of getPropertyValue(). (@​asamuzaK)
  • Fixed the type of error thrown by document.evaluate() (@​dokson)
Commits
  • 20a01fc 30.0.0
  • 8c8e583 Precompute WPT expectation matches
  • f32245c Bump Node.js floor and dependencies
  • 03ef23b Add background-position longhands
  • ded056f Test CSS.escape() with numeric IDs
  • d312832 Convert CSS values to pixels for computed styles
  • 4e0ee41 Implement CSS.escape() and CSS.supports()
  • 05eb709 Fix benchmark:compare script on Windows
  • 97c1b90 Fix CSS function value serialization
  • 15642ba Add benchmark comparison script
  • Additional commits viewable in compare view

@dependabot dependabot Bot added dependencies Pull requests that update a dependency file frontend Frontend code and dependency changes labels Jul 27, 2026
Bumps [jsdom](https://github.com/jsdom/jsdom) from 29.1.1 to 30.0.0.
- [Release notes](https://github.com/jsdom/jsdom/releases)
- [Commits](jsdom/jsdom@v29.1.1...v30.0.0)

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

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot
dependabot Bot force-pushed the dependabot/bun/frontend/jsdom-30.0.0 branch from 51721ea to cd19a08 Compare July 28, 2026 06:00
@Soju06

Soju06 commented Jul 30, 2026

Copy link
Copy Markdown
Owner

CI is red on this bump and the failures are deterministic test-harness incompatibilities with jsdom 30, not app regressions — the components' inline styles are unchanged; only how jsdom serializes them changed. Two intentional jsdom 30 behavior changes are responsible:

  1. calc() simplification: jsdom 30's new CSS value pipeline simplifies calc() before serialization, so authored expressions no longer round-trip. Affected assertions (expected → what jsdom 30 now reports):

    • frontend/src/components/donut-chart.test.tsx:191calc(5 * 1.75rem)calc(8.75rem)
    • frontend/src/features/apis/components/account-cost-donut.test.tsx:96calc(5 * 1.75rem + 4 * 0rem)calc(8.75rem)
    • frontend/src/features/dashboard/components/account-cards.test.tsx:22calc(2 * 11.5rem + 1rem)calc(24rem)
    • frontend/src/features/reports/components/model-distribution-donut.test.tsx:104calc(4 * 2rem)calc(8rem)
    • frontend/src/features/reports/components/useragent-distribution-donut.test.tsx:101calc(4 * 2rem)calc(8rem)
  2. getComputedStyle() length→px conversion (jsdom 30 release note: "Fixed getComputedStyle() to convert length values into pixels"), which breaks the ch-unit expectations:

    • frontend/src/features/reports/components/model-distribution-donut.test.tsx:139-140minWidth: "7ch" no longer matches
    • frontend/src/features/reports/components/useragent-distribution-donut.test.tsx:180-181minWidth: "4ch" no longer matches

Total: 7 failed / 937 passed (job 90193268084, head cd19a08).

Since dependabot can't fix these, a maintainer needs to push a companion commit to this branch updating the 7 assertions. Suggested approach: assert on the raw inline style attribute (e.g. element.style.maxHeight or toHaveAttribute("style", expect.stringContaining("calc(5 * 1.75rem)"))) instead of toHaveStyle, which routes through the now-normalizing getComputedStyle; that keeps the tests pinned to what the component authors rather than jsdom's serializer, and makes them robust to future jsdom serialization changes. Alternatively update the expected strings to the simplified forms (calc(8.75rem), calc(24rem), calc(8rem)) — cheaper but re-breaks on the next serializer change, and the ch assertions would have to hardcode a px value that depends on jsdom's font metrics.

One more caveat before merging: jsdom 30 raises the Node.js floor to ^22.22.2 || ^24.15.0 || >=26.0.0. CI runs the suite under Bun (engines not enforced, tests executed fine), but anyone running vitest under an older Node locally will hit the engines wall — worth confirming the documented dev Node version meets the new floor.

@dependabot @github

dependabot Bot commented on behalf of github Aug 3, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by #1586.

@dependabot dependabot Bot closed this Aug 3, 2026
@dependabot
dependabot Bot deleted the dependabot/bun/frontend/jsdom-30.0.0 branch August 3, 2026 21:36
Soju06 added a commit that referenced this pull request Aug 4, 2026
Bumps jsdom from 29.1.1 to 30.0.1 in /frontend, together with the 7
test-assertion updates that the dependabot bump (#1586) cannot carry.
Supersedes dependabot's blocked bump; dependabot will auto-close/rebase
once main is on 30.0.1.

jsdom 30 intentionally changed CSS serialization (see #1514 discussion):
- calc() is simplified before serialization, even for inline styles,
  so authored expressions like calc(5 * 1.75rem) now serialize as
  calc(8.75rem)
- getComputedStyle() converts length values to pixels, so ch-unit
  expectations via toHaveStyle no longer match

The affected assertions now check the raw inline style property
(element.style.X) instead of routing through getComputedStyle:
simplified calc forms for the 5 maxHeight assertions, and authored
ch values (preserved on the inline style) for the 2 minWidth ones.
Component code is unchanged.

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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 frontend Frontend code and dependency changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant