Skip to content

⬆️ upgrade babel-plugin-styled-components to v2.3.0 - #880

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

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

Conversation

@renovate

@renovate renovate Bot commented May 23, 2026 •

Copy link
Copy Markdown
Contributor

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
    • "every weekend"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Enabled.

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

@vercel

vercel Bot commented May 23, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
kitchn-docs Error Error Sep 2, 2026 11:19pm UTC
kitchn-workshop Error Error Sep 2, 2026 11:19pm UTC

@changeset-bot

changeset-bot Bot commented May 23, 2026 •

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 64cc7f4

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.

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

@renovate
renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x-lockfile branch from 7f4fc91 to 9a34c22 Compare May 28, 2026 16:38
@renovate
renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x-lockfile branch from 9a34c22 to 3da6e7c Compare June 1, 2026 16:46
@renovate
renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x-lockfile branch from 3da6e7c to ff49c98 Compare June 11, 2026 11:20
@renovate
renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x-lockfile branch from ff49c98 to 4af7723 Compare July 12, 2026 10:12
@renovate
renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x-lockfile branch from 4af7723 to c6b03ab Compare July 16, 2026 20:08
@renovate
renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x-lockfile branch from c6b03ab to 0eef2df Compare July 20, 2026 22:18
@renovate
renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x-lockfile branch from 0eef2df to bca3c29 Compare July 24, 2026 19:17
@renovate
renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x-lockfile branch from bca3c29 to 4a5cefc Compare July 30, 2026 17:58
@renovate
renovate Bot force-pushed the renovate/babel-plugin-styled-components-2.x-lockfile branch from 4a5cefc to 95d75e4 Compare July 30, 2026 18:14

This branch had an error being deployed

2 failed deployments
Preview – kitchn-workshop — 64cc7f4c Deployed Sep 2, 2026 by vercel[bot]
Preview – kitchn-docs — 64cc7f4c Deployed Sep 2, 2026 by vercel[bot]
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