Skip to content

chore(deps): update dependency babel-plugin-styled-components to ^2.3.0#913

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/babel-plugin-styled-components-2.x
Open

chore(deps): update dependency babel-plugin-styled-components to ^2.3.0#913
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/babel-plugin-styled-components-2.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 29, 2026

This PR contains the following updates:

Package Change Age Confidence
babel-plugin-styled-components (source) ^2.1.4^2.3.0 age confidence

Release Notes

styled-components/babel-plugin-styled-components (babel-plugin-styled-components)

v2.3.0

Compare Source

Minor Changes
  • 0c5f21d: Add a cssPropImportPath option to control which package the css-prop transform auto-imports styled from when the file has no existing styled import. Defaults to 'styled-components' (existing behavior). React Native targets can set it to 'styled-components/native' so the auto-injected import resolves to the right runtime.
  • 0c5f21d: Detect styled declarations that go through a local alias of the import, including the TypeScript theme-typing pattern const styled = baseStyled as ThemedStyledInterface<MyTheme>. After type-stripping Babel sees a plain const styled = baseStyled, and the detector now follows single-identifier alias chains so styled.div resolves back to the original import.
Patch Changes
  • 0c5f21d: Fix invalid output when a css={{ ... }} object key matches a local binding name (e.g. ({ position }) => <div css={{ position: 'absolute' }} />). The reducer no longer mis-treats non-computed property names as scope references, so plain keys stay literal while only computed [expr] keys are extracted as prop interpolations.
  • 0c5f21d: Recognize TypeScript's __importDefault interop helper alongside Babel's _interopRequireDefault. Files compiled through tsc / ts-jest (which emit var sc_1 = __importDefault(require('styled-components'))) now flow into the same detection path as Babel-compiled output, so styled declarations downstream pick up displayName and componentId as expected.

v2.2.0

Compare Source

Minor Changes
  • a40e3f7: Refresh the toolchain and fix a handful of css-prop transform bugs that had crept in under recent Babel versions.
    • When a file already imports styled and also uses one or more css={…} props, every styled component now keeps its display name and stable component id. Previously the cache that tracks the local default import could be overwritten on each css-prop usage, which silently dropped the display name and id for the surrounding styled.div declarations.
    • css={{ [foo]: bar }} with a non-primitive value no longer fails Babel's validator. Computed keys are preserved through the css-prop object rewrite.
    • Friendlier error messages when the css-prop transform encounters a JSX name shape it can't infer, instead of a confusing internal ReferenceError.
    • Long-running watch processes (Next dev, webpack-dev-server, jest watch) no longer leak import-detection state between files.
    • Removed the runtime lodash dependency. The plugin now ships with @babel/core as a declared peer.
    • Dev tooling moved to pnpm and changesets. Plugin behavior is unchanged.

Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • 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 May 29, 2026 00:15
@vercel
Copy link
Copy Markdown

vercel Bot commented May 29, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
plugins-studio Ready Ready Preview, Comment May 29, 2026 12:16am

Request Review

@renovate renovate Bot requested review from bjoerge and removed request for a team May 29, 2026 00:15
@renovate renovate Bot enabled auto-merge (squash) May 29, 2026 00:15
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 29, 2026

⚠️ No Changeset found

Latest commit: aab6c71

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@socket-security
Copy link
Copy Markdown

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

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​babel-plugin-styled-components@​2.3.0991008791100

View full report

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.

0 participants