fix(deps): update dependency styled-components to v6.5.0 - #1846
Open
renovate[bot] wants to merge 1 commit into
Open
fix(deps): update dependency styled-components to v6.5.0#1846renovate[bot] wants to merge 1 commit into
renovate[bot] wants to merge 1 commit into
Conversation
|
renovate
Bot
force-pushed
the
renovate/styled-components-6.x
branch
from
August 7, 2026 15:41
7a93c76 to
b803417
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
6.4.3→6.5.0Release Notes
styled-components/styled-components (styled-components)
v6.5.0Compare Source
Minor Changes
dfe4baf: React Native components now checkstyleagainst React Native's own style types. Web-only CSS such asfloat, and CSS custom properties such as--brand, were previously accepted even though React Native has never done anything with them at runtime. They now surface as a type error where you write them instead of silently doing nothing.Web components are unaffected and still accept custom properties.
dfe4baf: Declaring your ownstyleprop type now constrains the fields you name while leaving the rest of CSS alone. Previously a declaration likestyled.div<{ style?: { width: number } }>was quietly ignored, because the built-in style type was applied after your props, so any CSS value was still accepted. Nowwidthhas to be a number, whilecolor, custom properties, and everything else you did not mention keep working as before.To remove a field rather than constrain it, declare it as
never. To make your type the only thing accepted, wrap it in the newCustomStylehelper, which removes every field you did not list:The constraint holds when the component is rendered through
asorforwardedAs, so it cannot be sidestepped by rendering the same component as a different tag. Note thatCustomStyleremoves CSS custom properties too, since they are among the fields you did not list.One thing to know if you use
exactOptionalPropertyTypes: on a component that declares its ownstyle, passingstyle={undefined}explicitly is now rejected. Leaving the prop off is unaffected. Writestyle?: { width: number } | undefinedin your declaration if you need to pass it explicitly.Relatedly, reading the style type back off a component (for example with
React.ComponentProps) now reports that CSS custom properties are accepted, which matches what was already allowed when rendering.2949923: Large TypeScript projects type-check dramatically faster. On a 500-component app,tsccheck time drops to under a quarter of what 6.4.4 takes and peak memory to under a third, which resolves the out-of-memory failures some projects hit after upgrading past 6.4.2. Both are now better than 6.4.2 was, so there is no longer a reason to pin to it. Editor responsiveness improves by the same margin, and autocomplete onastargets is unchanged.Patch Changes
dfe4baf: Fixedrefbeing rejected on React Native components created with the shorthand syntax, such asstyled.TextInput. Passing a ref, or a ref callback whose parameter you have not annotated, now works the same way it does withstyled(TextInput).Also fixed a type error when a component's
attrscallback is given an explicit parameter type, as instyled.div.attrs<MyProps>(props => props).dfe4baf: Fixed components built on targets whose props cannot be inspected, such as Mantine's polymorphic components, rejectingchildrenand the target's own props once you added a prop of your own:Wrapping such a target without adding props already worked; adding one turned the permissiveness off. Your own declared props stay strictly typed either way.
v6.4.4Compare Source
Patch Changes
537ea42: Reduce TypeScript type-checking cost for styled components, most noticeablystyled(Component)wrappers and polymorphicasusage. Large codebases that saw elevatedtscmemory and type-instantiation counts get lower type-check memory and time, with no change to the emitted types or runtime behavior.Configuration
📅 Schedule: (in timezone Europe/Oslo)
🚦 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.
This PR has been generated by Mend Renovate using a preset from
. View repository job log here