Skip to content

Bump styled-components from 6.1.19 to 6.6.0 in /frontend - #94

Merged
kakushi-w merged 1 commit into
mainfrom
dependabot/npm_and_yarn/frontend/styled-components-6.6.0
Oct 17, 2026
Merged

kakushi-w merged 1 commit into
mainfrom
dependabot/npm_and_yarn/frontend/styled-components-6.6.0

Conversation

@dependabot

@dependabot dependabot Bot commented on behalf of github Oct 16, 2026

Copy link
Copy Markdown
Contributor

Bumps styled-components from 6.1.19 to 6.6.0.

Release notes

Sourced from styled-components's releases.

styled-components@6.6.0

Minor Changes

  • 7ce6aea: Added a StyledComponent<Target, Props> type for annotating explicitly-typed styled component exports.

    Packages that emit their own declaration files, including any project using isolatedDeclarations, must annotate every exported styled component, and there was no public type for it: consumers reached into internal paths or hand-assembled one that dropped members like a wrapped component's hoisted statics.

    StyledComponent is exported from the web and native entries. Name the target and props as you passed them to styled:

    import styled, { type StyledComponent } from 'styled-components';
    export const Card: StyledComponent<'div', { $active?: boolean }> = styled.div<{
    $active?: boolean;
    }>...;
    export const CloseButton: StyledComponent<typeof IconButton> = styled(IconButton)...;

    It resolves to the exact type styled(Target)<Props> produces, so the annotation is not lossy.

Patch Changes

  • 7afbd11: Fixed attrs no longer applying its value when a prop was explicitly passed as undefined (the 6.3.12 to 6.5.x behavior). styled.button.attrs(({ type = 'button', ...rest }) => ({ type, ...rest })) rendered without type="button" when the caller passed type={undefined}, and an object-form default such as .attrs({ type: 'button' }) was lost the same way, including through a wrapper component that spreads its own props over the styled component. attrs now always wins for the keys it returns, matching every other case where a prop is passed alongside attrs.

    Also fixed: a prop passed explicitly as undefined (and not overridden by attrs) is now forwarded to a wrapped component so that component can fall back to its own default, the pattern MUI's ButtonBase relies on (for example <Root role="button" {...props} />). Wrapped components have dropped this prop entirely since v6.0, so a component that checks 'role' in props or merges {...defaults, ...props} to detect an explicitly-passed prop may see and behave differently now that the key is present again. This only applies when wrapping another component; a DOM tag such as styled.div still drops the undefined prop entirely, since browsers have no notion of an "undefined" attribute.

    If you were relying on an explicit undefined to clear an attrs default, use the function form and check for the prop's presence instead:

    styled.a.attrs(props => ('rel' in props ? {} : { rel: 'noopener' }))``;

    Passing rel={undefined} now renders no rel attribute, and omitting the prop renders rel="noopener".

    React Native already forwarded an explicit undefined prop to a wrapped component; it now also matches web in never forwarding an undefined that attrs itself produced.

  • 209317c: Rendering styled-components on the server with the edge runtime (for example export const runtime = 'edge' in a Next.js route) now fails with a clear message that names the fix: use the Node.js runtime for routes that render styled-components. Previously the same setup ended in an obscure crash, either at next build or on the first request.

  • 3de03c2: Type-checking is faster when you annotate exported styled components with an explicit type, the pattern that packages emitting their own declaration files (including any project using isolatedDeclarations) rely on. The improvement is largest in codebases that annotate many components built on intrinsic tags such as styled.div, styled.span, and styled.button, and wrappers over polymorphic components whose props are a union.

    Nothing about the styled component's type changes for your code: props, defaultProps, propTypes, ref forwarding, and as polymorphism all behave exactly as before. This is purely a type-check speedup.

  • 7afbd11: Fixed a typo in the useTheme error message's example code (a misspelled component name in error 18), so the copy-pasted example compiles as written.

  • 7afbd11: Fixed global styles from createGlobalStyle disappearing in React Server Components: a global style rendered in a loading state (a React <Suspense> fallback) and again once the real content streamed in could vanish entirely once the fallback was replaced. The same loss could happen across a client-side navigation when a global style was rendered by both a layout and one of its pages, and the layout's copy never re-rendered.

    Each server-rendered instance of a global style now carries its own styles, so a global style shown in more than one place in a request always survives, whether the page reveals streamed content or the user navigates to a sibling route.

  • 52c5f6e: Fixed a crash ("Rendered fewer hooks than expected") and a related stale-style bug for components that call a React hook, or read any value outside their props and theme, from inside a style interpolation. This affected @mui/styled-engine-sc with MUI X DataGrid, which calls hooks within an interpolation, and was a regression introduced in 6.4.0.

    Style interpolations now run on every render, so a hook called inside one runs consistently and a value read inside one always reflects its current state.

... (truncated)

Commits
  • 689ce25 Version Packages (6.x) (#5800)
  • 209317c fix(rsc): send repeated server-component styles once, and explain edge-runtim...
  • 7afbd11 6.x maintenance: attrs and undefined props, RSC global styles, types on older...
  • 1c0e309 fix: emit RSC styles per instance so they survive Suspense reveals (#5808)
  • 52c5f6e fix: run style interpolations on every render (#5788) (#5809)
  • 3de03c2 perf(types): faster type-checking for annotated styled component exports (#5801)
  • 7ce6aea feat(types): add StyledComponent for explicit export annotations (#5799)
  • 1593023 Version Packages (6.x) (#5798)
  • 3470387 fix: support template index signatures (#5797)
  • 8ebf40a Version Packages (6.x) (#5795)
  • Additional commits viewable in compare view
Maintainer changes

This version was pushed to npm by GitHub Actions, a new releaser for styled-components since your current version.


Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [styled-components](https://github.com/styled-components/styled-components) from 6.1.19 to 6.6.0.
- [Release notes](https://github.com/styled-components/styled-components/releases)
- [Commits](https://github.com/styled-components/styled-components/compare/styled-components@6.1.19...styled-components@6.6.0)

---
updated-dependencies:
- dependency-name: styled-components
  dependency-version: 6.6.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot Bot added dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Oct 16, 2026
@kakushi-w
kakushi-w merged commit 74fb3b6 into main Oct 17, 2026
1 check passed
@dependabot
dependabot Bot deleted the dependabot/npm_and_yarn/frontend/styled-components-6.6.0 branch October 17, 2026 06:25
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 javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant