Skip to content

chore(deps): update dependency @compiled/react to v2 - #799

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/compiled-react-2.x
Open

renovate[bot] wants to merge 1 commit into
mainfrom
renovate/compiled-react-2.x

Conversation

@renovate

@renovate renovate Bot commented Oct 5, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
@compiled/react (source) ^1.0.1 → ^2.0.0 age adoption passing confidence

Release Notes

atlassian-labs/compiled (@​compiled/react)

v2.0.0

Compare Source

Major Changes
  • 3a0d317: Atomic rules are now injected with sheet.insertRule() in every environment. Previously only production used the CSSOM; development and test builds appended a text node per rule, which forces the engine to reparse the whole sheet on every insertion.

    Two consequences of dev and test now behaving like production:

    • <style> elements no longer contain text. insertRule is a CSSOM-only mutation, so styleElement.textContent and document.head.innerHTML come back empty and the rules must be read off sheet.cssRules. Tests asserting on injected CSS via the DOM's text need updating; toHaveCompiledCss from @compiled/jest handles both sources as of the accompanying patch. In devtools, dev-mode <style> tags now render as empty, the same as production — inspect the element's CSSOM to see the rules.
    • Dev no longer diverges from production. The previous fork meant CSSOM-specific bugs could only surface in production builds; both paths are now identical by construction.
Patch Changes
  • efddb7e: Fix production runtime style wipe when cssMapScoped (.cc-…) rules are injected after atomic rules.

    In production, atomic rules were injected via sheet.insertRule() (CSSOM-only — textContent
    stays empty) while non-atomic cssMapScoped rules were appended via Text.appendData() on the
    SAME catch-all <style> element. When a large .cc- sheet was later injected (e.g. lazily
    mounting the editor), the browser reparsed the sheet from its now-populated text node and
    DISCARDED every previously insertRule-inserted rule — an observable global style wipe (unstyled
    UI on affected surfaces).

    Non-atomic .cc- rules now live in a dedicated 'cc' bucket with its own <style> element that
    insertRule never targets. The two insertion strategies can no longer share a DOM node, so the
    reparse-wipe is impossible by construction. Source-order cascade for cssMapScoped variants is
    preserved (append order within the cc bucket), and .cc- rules still cascade after every
    atomic bucket (the cc bucket is placed last in styleBucketOrdering).

    Regression tests in runtime/__tests__/style.test.tsx assert:

    • Atomic rules previously inserted via insertRule remain reachable via sheet.cssRules after a
      large .cc- non-atomic sheet is later injected.
    • Text.appendData never mutates a <style> element whose sheet already has
      insertRule-inserted rules.

v1.0.2

Compare Source

Patch Changes
  • 959dcbe: Fix a compatibility regression in runtime style bucketing for compound pseudo-selectors.

    1.0.1 located the pseudo via lastIndexOf(':') so collision-resistant (11-char) hashes
    bucketed correctly, but that also moved compound selectors like :visited:hover /
    :hover:focus out of the catch-all bucket into h / f / etc. Bucketing now detects the
    atomic class width from the boundary character (index 10 for the legacy 9-char hash, index
    12 for the 11-char collision-resistant hash) and reads the pseudo relative to it, keeping
    the existing colon+4 → pseudosMap mangling. Simple :hover / :visited / … still map for
    both hash lengths, while compounds stay in the catch-all bucket — matching 1.0.0 for
    legacy hashes.


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • Between 12:00 AM and 03:59 AM, only on Monday (* 0-3 * * 1)
  • Automerge
    • At any time (no schedule defined)

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

♻ Rebasing: Whenever PR becomes conflicted, 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.

@coderabbitai

coderabbitai Bot commented Oct 5, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: dd10e9d1-8e21-442d-95ab-03ebddf1ea7c

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

This branch has not been deployed

No deployments
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