Skip to content

Update dependency jest-styled-components to v7.4.0#313

Open
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/jest-styled-components-7.x
Open

Update dependency jest-styled-components to v7.4.0#313
renovate[bot] wants to merge 1 commit intomasterfrom
renovate/jest-styled-components-7.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate bot commented Mar 22, 2026

This PR contains the following updates:

Package Change Age Confidence
jest-styled-components 7.2.07.4.0 age confidence

Release Notes

styled-components/jest-styled-components (jest-styled-components)

v7.4.0

Compare Source

Minor Changes
  • 972060f: Stabilize keyframe names in snapshots by replacing hashed @keyframes identifiers with deterministic placeholders (k0, k1, etc.), matching the existing c0/c1 behavior for class names
  • 74fee2e: Add namespace option to toHaveStyleRule for matching rules generated with StyleSheetManager namespace. Can be set per-assertion or globally via setStyleRuleOptions({ namespace: '#app' }).
Patch Changes
  • a9cb0aa: Fix Vitest compatibility: convert vitest entrypoint to ESM and remove test framework dependency from matcherTest

v7.3.1

Compare Source

Patch Changes
  • Fix native toHaveStyleRule crash when element has no style prop (#​225, #​110)
  • Fix nested at-rules (@media inside @supports and vice versa) not found by toHaveStyleRule (#​245)
  • Fix getHTML() creating an empty ServerStyleSheet instead of reading from the global sheet (#​401)
  • Fix selector matching with spaces around CSS combinators (> ul > li > a)
  • Fix invalid CSS causing cryptic parse errors — shows the offending rule with context and caret (#​147)
  • Fix nested React Native style arrays not flattening correctly
  • Add @container and @layer at-rule support for toHaveStyleRule and the snapshot serializer
  • Add opt-in CSS parse caching via import 'jest-styled-components/cache' (#​235)
  • Normalize whitespace in value comparisons (!important, shorthand separators, commas)
  • Clearer validation messages: "Property not found" vs "Value mismatch"
  • Export disableCSSCache from jest-styled-components/cache
  • Use Set for O(1) hash lookups; serializer no longer mutates the parsed CSS AST

v7.3.0

Compare Source

Minor Changes
  • 07709eb: Security

    • Bump @adobe/css-tools to ^4.4.0, fixing CVE-2023-48631 (ReDoS) and adding @starting-style support

    Bug Fixes

    • Fix null/undefined children crash in snapshot serializer
    • Fix @media query whitespace mismatch in toHaveStyleRule
    • Normalize spaces after commas in CSS value comparison (fixes rgb() and font-family mismatches)
    • Add word boundaries to class name replacement regex to prevent partial matches
    • Fix Enzyme shallow rendering assertion for nested styled children on SC v6
    • Guard expect and beforeEach calls for Vitest/Bun non-globals mode compatibility

    Features

    • Add selector option to toHaveStyleRule for testing createGlobalStyle styles
    • Add Vitest entry point (jest-styled-components/vitest) with types
    • Add TypeScript declarations for jest-styled-components/serializer and jest-styled-components/native subpaths
    • Export resetStyleSheet for manual test setup in non-Jest environments
    • Add JSDoc comments to all type declarations

    Infrastructure

    • Adopt changesets for versioning and releases
    • Add provenance-based release workflow via GitHub Actions
    • Update GitHub Actions to v4 (checkout, setup-node, cache) and CodeQL to v3
    • Add publint to test pipeline for package validation
    • Add "type": "commonjs" to package.json

See GitHub releases.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

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 was generated by Mend Renovate. View the repository job log.

@renovate renovate bot changed the title Update dependency jest-styled-components to v7.3.0 Update dependency jest-styled-components to v7.3.1 Mar 22, 2026
@renovate renovate bot force-pushed the renovate/jest-styled-components-7.x branch from 499008e to e3df151 Compare March 22, 2026 13:03
@renovate renovate bot force-pushed the renovate/jest-styled-components-7.x branch from e3df151 to c34f146 Compare March 27, 2026 05:17
@renovate renovate bot changed the title Update dependency jest-styled-components to v7.3.1 Update dependency jest-styled-components to v7.4.0 Mar 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants