Skip to content

Update dependency babel-plugin-styled-components to v2#125

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

Update dependency babel-plugin-styled-components to v2#125
renovate[bot] wants to merge 1 commit into
masterfrom
renovate/babel-plugin-styled-components-2.x

Conversation

@renovate
Copy link
Copy Markdown
Contributor

@renovate renovate Bot commented Dec 3, 2023

This PR contains the following updates:

Package Change Age Confidence
babel-plugin-styled-components (source) 1.12.02.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.

v2.1.4

Compare Source

Full Changelog: styled-components/babel-plugin-styled-components@v2.1.3...v2.1.4

v2.1.3

Compare Source

What's Changed

New Contributors

Full Changelog: styled-components/babel-plugin-styled-components@v2.1.1...v2.1.3

v2.1.2

Compare Source

v2.1.1

Compare Source

What's Changed

New Contributors

Full Changelog: styled-components/babel-plugin-styled-components@v2.0.7...v2.1.1

v2.1.0

Compare Source

v2.0.7

Compare Source

What's Changed

New Contributors

Full Changelog: styled-components/babel-plugin-styled-components@v2.0.6...v2.0.7

v2.0.6

Compare Source

Revert change from 2.0.5 that lead to a major build performance regression.

Full Changelog: styled-components/babel-plugin-styled-components@v2.0.5...v2.0.6

v2.0.5

Compare Source

One more change related to babel macro; eliminates an extra injected import in some cases

Full Changelog: styled-components/babel-plugin-styled-components@v2.0.4...v2.0.5

v2.0.4

Compare Source

fix compat with styled-components babel macro

Full Changelog: styled-components/babel-plugin-styled-components@v2.0.3...v2.0.4

v2.0.3

Compare Source

What's Changed

Full Changelog: styled-components/babel-plugin-styled-components@v2.0.2...v2.0.3

v2.0.2

Compare Source

What's Changed

New Contributors

Full Changelog: styled-components/babel-plugin-styled-components@v2.0.1...v2.0.2

v2.0.1

Compare Source

What's Changed

Full Changelog: styled-components/babel-plugin-styled-components@v2.0.0...v2.0.1

v2.0.0

Compare Source

What's Changed

Full Changelog: styled-components/babel-plugin-styled-components@v1.13.3...v2.0.0

v1.13.3

Compare Source

  • when there are multiple assignments prefer the outer name (#​355) thanks @​rockwotj
  • minor dependency updates

v1.13.2

Compare Source

  • added some conditional guards to code paths that lead to errors for some consumers (0c16c1b)
  • dependency updates
  • teach babel plugin about certain spread application scenarios with "css" prop #​339
  • handle namespace import (import * as styled from 'styled-components') properly #​340

v1.13.1

Compare Source

Fix one edge case with object key interpolation from v1.13.0

v1.13.0

Compare Source

  • teach the plugin how to handle variable interpolation in object keys, e.g.

    css={{
      [theme.breakpoint.sm]: {
        color: 'red'
      } 
    }}
  • plugin now emits transient props when replacing css prop calls (cuts down on garbage in the DOM for s-c 5.1+)

  • merge withConfig arguments to allow for shouldForwardProp, thanks @​ithinkdancan #​323

  • move injected components to end of file scope, thanks @​sfishel18

  • Ensure sc- prefix is always added #​313, thanks @​chalbert

v1.12.1

Compare Source


Configuration

📅 Schedule: (UTC)

  • 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 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.

@renovate renovate Bot changed the title Update dependency babel-plugin-styled-components to v2 Update dependency babel-plugin-styled-components to v2 - autoclosed Dec 8, 2024
@renovate renovate Bot closed this Dec 8, 2024
@renovate renovate Bot deleted the renovate/babel-plugin-styled-components-2.x branch December 8, 2024 18:51
@renovate renovate Bot changed the title Update dependency babel-plugin-styled-components to v2 - autoclosed Update dependency babel-plugin-styled-components to v2 Dec 8, 2024
@renovate renovate Bot reopened this Dec 8, 2024
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch from 223cbfc to 3e1e595 Compare December 8, 2024 21:02
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch 2 times, most recently from 54199bd to aa6a1f0 Compare August 16, 2025 03:24
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch from aa6a1f0 to 4c92d79 Compare September 25, 2025 21:45
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch from 4c92d79 to 249703d Compare October 25, 2025 12:16
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch from 249703d to 0408d17 Compare January 20, 2026 15:56
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch from 0408d17 to 489351a Compare February 3, 2026 08:00
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch from 489351a to 7079f91 Compare February 12, 2026 15:15
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch from 7079f91 to a7ddf2d Compare March 27, 2026 12:38
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch from a7ddf2d to 3f66784 Compare May 12, 2026 16:56
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch from 3f66784 to 13fa7f3 Compare May 21, 2026 01:06
@renovate renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x branch from 13fa7f3 to b86f53e Compare May 21, 2026 04:44
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