Repository navigation
chore(deps-dev): bump jsdom from 30.1.3 to 31.0.1 - #438
Merged
Merged
Conversation
jsdom 31 rewrote CSS handling and now substitutes custom properties in computed styles, as browsers do. Four sidebar tests compared computed styles against the literal var(--twd-...) text and, with no theme injected, got the fallback values (rgb(0, 0, 0), 0px, 400) instead. The LogItem and TestListItem specs now inject the theme in beforeAll and assert against defaultTheme values, so they check the color actually rendered rather than the variable name. No runtime code changes. Supersedes #428, which conflicted with the lockfile on main.
Merged
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.
Supersedes #428, which had lockfile conflicts with main after #430 and #437. This bumps straight to 31.0.1, the latest release.
What broke
jsdom 31 rewrote CSS parsing and computed styles, and now substitutes custom properties in
getComputedStyle, as browsers do. Four sidebar tests compared computed styles against the literalvar(--twd-...)text. With no theme injected, the variables were undefined and resolved to fallback values:src/tests/ui/logItem.spec.tsx: assertion passed / test failed log stylessrc/tests/ui/testListItem.spec.tsx: depth indentation, log stylesThis is a test-only issue. No runtime code changes.
Fix
Both specs now call
injectTheme()inbeforeAlland assert againstdefaultThemevalues (success,error,fontWeightBold,spacingSm). They now check the color actually rendered instead of the variable name. Verified that they can fail: expectingdefaultTheme.erroron a passed log fails withrgb(34, 197, 94)vsrgb(255, 82, 82).Other breaking changes in jsdom 31
^22.22.2 || ^24.15.0 || >=26.0.0. The CI matrix runs the latest 22, 24 and 26, and jsdom is a devDependency, so the>=20engines for consumers are unaffected (node-compatcovers that).@napi-rs/canvas: not used here.JSDOMconstructor.Verification
@emnapientries dropped. The removed packages (@csstools/*,css-tree,@asamuzakjp/*) are the CSS libraries jsdom replaced with its integrated implementation.