Skip to content

fix(deps): update dependency styled-components to ^6.4.4 - #2409

Merged
stipsan merged 3 commits into
mainfrom
cursor/update-styled-components-6-4-4-965c
Jul 21, 2026
Merged

stipsan merged 3 commits into
mainfrom
cursor/update-styled-components-6-4-4-965c

Conversation

@stipsan

@stipsan stipsan commented Jul 21, 2026

Copy link
Copy Markdown
Member

Updates the workspace catalog entry for styled-components from ^6.4.3 to ^6.4.4 (release notes), used by packages/ui, apps/storybook, and apps/docs.

Supersedes the Renovate PR #2397, whose build check fails: 6.4.4 restructures the polymorphic call-site types (styled-components/styled-components#5768), and the flattened call signature no longer lets required style props of a styled(Box) wrapper go unchecked. Flex applies flexItemStyle without passing $flex (its public flex prop is forwarded to the inner Box, which resolves it to $flex), which now errors with TS2769 in flex.tsx. Fixed by making $flex optional on the internal ResponsiveFlexItemStyleProps — flexItemStyle already guards for the missing value at runtime, and the interface is not part of the public API.

Verified locally: pnpm lint (includes type checking; fails on main + 6.4.4 without the fix), pnpm build, pnpm test (125 unit tests), pnpm test:browser (239 storybook tests), pnpm knip, and a full sanity-ui-docs Next.js production build (the Renovate PR's ui-docs Vercel deploy also failed). Storybook demo of Flex/Box/Grid on 6.4.4:

storybook_flex_box_grid_with_styled_components_6_4_4.mp4

To show artifacts inline, enable in settings.

Open in Web Open in Cursor 

cursoragent and others added 3 commits July 21, 2026 14:57
styled-components 6.4.4 restructured its polymorphic call-site types
(styled-components/styled-components#5768): plain call sites now relate
against a single conditional signature that no longer lets required
style props of a styled(Box) wrapper go unchecked. Flex applies
flexItemStyle without passing $flex (its public flex prop is forwarded
to the inner Box, which resolves it to $flex), so the prop must be
optional. flexItemStyle already guards for the missing value at
runtime.

Co-authored-by: Cody Olsen <[email protected]>
@changeset-bot

changeset-bot Bot commented Jul 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: a1b8516

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@sanity/ui Patch

Not sure what this means? Click here to learn what changesets are.

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

@vercel

vercel Bot commented Jul 21, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
sanity-ui-storybook Ready Ready Preview, Comment Jul 21, 2026 3:17pm
ui-docs Ready Ready Preview Jul 21, 2026 3:17pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
sanity-ui-workshop Ignored Ignored Jul 21, 2026 3:17pm

Request Review

@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/​styled-components@​6.4.49510010096100

View full report

@stipsan
stipsan marked this pull request as ready for review July 21, 2026 18:05
@stipsan
stipsan merged commit 4f7947b into main Jul 21, 2026
11 checks passed
@stipsan
stipsan deleted the cursor/update-styled-components-6-4-4-965c branch July 21, 2026 18:05
@squiggler-app squiggler-app Bot mentioned this pull request Jul 21, 2026

This branch was successfully deployed

2 active deployments
Preview – ui-docs — a1b85161 Deployed Jul 21, 2026 by vercel[bot]
Preview – sanity-ui-storybook — a1b85161 Deployed Jul 21, 2026 by vercel[bot]
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.

2 participants