Skip to content

Update dependency babel-plugin-styled-components to v2.3.0#2706

Merged
mergify[bot] merged 1 commit into
masterfrom
renovate/babel-plugin-styled-components-2.x
May 28, 2026
Merged

Update dependency babel-plugin-styled-components to v2.3.0#2706
mergify[bot] merged 1 commit into
masterfrom
renovate/babel-plugin-styled-components-2.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented May 28, 2026

This PR contains the following updates:

Package Change Age Confidence
babel-plugin-styled-components (source) 2.1.42.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: (in timezone Asia/Shanghai)

  • Branch creation
    • "after 2am and before 8am on friday"
  • 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 was generated by Mend Renovate. View the repository job log.

@renovate
Copy link
Copy Markdown
Contributor Author

renovate Bot commented May 28, 2026

⚠️ Artifact update problem

Renovate failed to update an artifact related to this branch. You probably do not want to merge this PR as-is.

♻ Renovate will retry this branch, including artifacts, only when one of the following happens:

  • any of the package files in this branch needs updating, or
  • the branch becomes conflicted, or
  • you click the rebase/retry checkbox if found above, or
  • you rename this PR's title to start with "rebase!" to trigger it manually

The artifact failure details are included below:

File name: package-lock.json
npm warn Unknown env config "store". This will stop working in the next major version of npm. See `npm help npmrc` for supported config options.
npm error code ERESOLVE
npm error ERESOLVE could not resolve
npm error
npm error While resolving: react-custom-scrollbars@4.2.1
npm error Found: react@18.3.1
npm error node_modules/react
npm error   react@"18.3.1" from the root project
npm error   peer react@">=16.8.4" from @ant-design/charts-util@0.0.1-alpha.7
npm error   node_modules/@ant-design/charts-util
npm error     @ant-design/charts-util@"0.0.1-alpha.7" from @ant-design/graphs@2.1.1
npm error     node_modules/@ant-design/graphs
npm error       @ant-design/graphs@"^2.1.1" from @ant-design/charts@2.6.7
npm error       node_modules/@ant-design/charts
npm error         @ant-design/charts@"2.6.7" from the root project
npm error   85 more (@ant-design/cssinjs, @ant-design/cssinjs-utils, ...)
npm error
npm error Could not resolve dependency:
npm error peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from react-custom-scrollbars@4.2.1
npm error node_modules/react-custom-scrollbars
npm error   react-custom-scrollbars@"4.2.1" from the root project
npm error
npm error Conflicting peer dependency: react@16.14.0
npm error node_modules/react
npm error   peer react@"^0.14.0 || ^15.0.0 || ^16.0.0" from react-custom-scrollbars@4.2.1
npm error   node_modules/react-custom-scrollbars
npm error     react-custom-scrollbars@"4.2.1" from the root project
npm error
npm error Fix the upstream dependency conflict, or retry this command with --force or --legacy-peer-deps to accept an incorrect (and potentially broken) dependency resolution.
npm error
npm error
npm error For a full report see:
npm error /runner/cache/others/npm/_logs/2026-05-28T19_26_11_994Z-eresolve-report.txt
npm error A complete log of this run can be found in: /runner/cache/others/npm/_logs/2026-05-28T19_26_11_994Z-debug-0.log

@mergify mergify Bot added the dependencies Pull requests that update a dependency file label May 28, 2026
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch 3 times, most recently from c90322c to fdf780b Compare May 28, 2026 19:22
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch from fdf780b to d6cc24f Compare May 28, 2026 19:26
@mergify mergify Bot merged commit e4ac9f6 into master May 28, 2026
6 of 7 checks passed
@mergify mergify Bot deleted the renovate/babel-plugin-styled-components-2.x branch May 28, 2026 19:38
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants