-
-
Notifications
You must be signed in to change notification settings - Fork 4
⬆️ upgrade styled-components to v6.3.8
#793
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
9823c86 to
9cf566e
Compare
9cf566e to
65703a5
Compare
65703a5 to
1bf1441
Compare
|
Deployment failed with the following error: |
1bf1441 to
bc6afea
Compare
7235c55 to
d5616ea
Compare
d5616ea to
82eae3f
Compare
|
Deployment failed with the following error: |
3c55974 to
5af7735
Compare
5af7735 to
d7f3835
Compare
styled-components to v6.2.0styled-components to v6.3.1
b7768f1 to
cfd72f5
Compare
styled-components to v6.3.1styled-components to v6.3.2
cfd72f5 to
648d3ca
Compare
styled-components to v6.3.2styled-components to v6.3.3
648d3ca to
0f7b6f5
Compare
styled-components to v6.3.3styled-components to v6.3.5
0f7b6f5 to
8ff2293
Compare
styled-components to v6.3.5styled-components to v6.3.6
styled-components to v6.3.6styled-components to v6.3.8
8ff2293 to
e9b6966
Compare
e9b6966 to
2dd1c90
Compare
2dd1c90 to
4103c9d
Compare
This PR contains the following updates:
6.1.13→6.3.8Release Notes
styled-components/styled-components (styled-components)
v6.3.8Compare Source
Patch Changes
55d05c1: Make react-dom an optional peer dependency, clean up some unnecessary type peers.v6.3.7Compare Source
Patch Changes
51ffa9c: Fix createGlobalStyle compatibility with React StrictMode and RSCThis fix addresses issues where global styles would disappear or behave incorrectly in React StrictMode and RSC:
Static styles optimization: Static global styles (without props/interpolations) are now only injected once and won't be removed/re-added on every render. This prevents the style flickering that could occur during concurrent rendering.
StrictMode-aware cleanup: Style cleanup now uses
queueMicrotaskto coordinate with React's effect lifecycle. In StrictMode's simulated unmount/remount cycle, styles are preserved. On real unmount, styles are properly removed.RSC compatibility: Move
useRefinside RSC guard increateGlobalStyleand unify alluseContextcalls to use consistent!IS_RSC ?pattern.RSC inline style tag cleanup: Fix bug where server-defined
createGlobalStylerendered in client components would leave behind accumulated SSR-rendered inline<style data-styled-global>tags. The cleanup effect now removes these hoisted style tags when the component unmounts or re-renders with different CSS.These changes ensure
createGlobalStyleworks correctly with:precedenceattribute51ffa9c: Restorestyled.br.1f794b7: Add package.json "exports" field for better native ESM integration.v6.3.6Compare Source
Patch Changes
189bc17: Fix url() CSS function values being incorrectly stripped when using unquoted URLs containing//(e.g.,url(https://example.com)). The//in protocol URLs likehttps://,http://,file://, and protocol-relative URLs was incorrectly being treated as a JavaScript-style line comment.v6.3.5Compare Source
Patch Changes
7ff7002: Fix: Line comments (//) in multiline CSS declarations no longer cause parsing errors (fixes #5613)JS-style line comments (
//) placed after multiline declarations likecalc()were not being properly stripped, causing CSS parsing issues. Comments are now correctly removed anywhere in the CSS while preserving valid syntax.Example that now works:
7ff7002: Fix: Contain invalid CSS syntax to just the affected lineIn styled-components v6, invalid CSS syntax (like unbalanced braces) could cause all subsequent styles to be ignored. This fix ensures that malformed CSS only affects the specific declaration, not subsequent valid styles.
Example that now works:
v6.3.4Compare Source
Patch Changes
8e8c282: FixedcreateGlobalStyleto not useuseLayoutEffecton the server, which was causing a warning and broken styles in v6.3.x. The checktypeof React.useLayoutEffect === 'function'is not reliable for detecting server vs client environments in React 18+, so we now use the__SERVER__build constant instead.v6.3.3Compare Source
Patch Changes
6e4d1e7: fix: suppress false "created dynamically" warnings in React Server ComponentsThe dynamic creation warning check now properly detects RSC environments and skips validation when
IS_RSCis true. This eliminates false warnings for module-level styled components in server components, which were incorrectly flagged due to RSC's different module evaluation context. Module-level styled components in RSC files no longer trigger warnings since they cannot be created inside render functions by definition.v6.3.2Compare Source
Patch Changes
a4b4a6b: fix: include TypeScript declaration files in npm packageFixed Rollup TypeScript plugin configuration to override tsconfig.json's noEmit setting, ensuring TypeScript declaration files are generated during build.
a4b4a6b: fix: resolve TypeScript error blocking type declaration emissionFixed TypeScript error in StyledComponent when merging style attributes from attrs. Added explicit type cast to React.CSSProperties to safely merge CSS property objects. This error was preventing TypeScript declaration files from being generated during build.
v6.3.1Compare Source
Patch Changes
046e880: Ensure TypeScript declaration files are included in npm package, needed to tweak a Rollup setting.v6.3.0Compare Source
Minor Changes
28fd502: Add React Server Components (RSC) supportstyled-components now automatically detects RSC environments and handles CSS delivery appropriately:
'use client'directive required: Components work in RSC without any wrapper or directive<style>tags that React 19 automatically hoists and deduplicatesServerStyleSheetcontinue to work unchangedRSC best practices:
&[data-size='lg'])style, and cascade to children:ThemeProvideris a no-op in RSCTechnical details:
typeof React.createContext === 'undefined'ThemeProviderandStyleSheetManagerbecome no-ops in RSC (children pass-through)856cf06: feat: update built-in element aliases to include modern HTML and SVG elementsAdded support for modern HTML and SVG elements that were previously missing:
HTML elements:
search- HTML5 search elementslot- Web Components slot elementtemplate- HTML template elementSVG filter elements:
fe*filter primitive elements (feBlend, feColorMatrix, feComponentTransfer, etc.)clipPath,linearGradient,radialGradient- gradient and clipping elementstextPath- SVG text path elementswitch,symbol,use- SVG structural elementsThis ensures styled-components has comprehensive coverage of all styleable HTML and SVG elements supported by modern browsers and React.
Patch Changes
418adbe: fix(types): add CSS custom properties (variables) support to style propCSS custom properties (CSS variables like
--primary-color) are now fully supported in TypeScript without errors:.attrs({ style: { '--var': 'value' } })- CSS variables in attrs<Component style={{ '--var': 'value' }} />- CSS variables in component propsaef2ad6: Update shared css property handling tools to latest versions.v6.2.0Compare Source
v6.1.19Compare Source
Patch Changes
aa997d8: fix for React Native >=0.79 crashes when using unsupported web-only CSS values (e.g., fit-content, min-content, max-content). The fix emits a warning and ignores the property using those values, instead of causing crashes.v6.1.18Compare Source
Patch Changes
76b18a4: fix react 19 compatibilitybdac7af: Quickfix to support expo sdk >= 53 and react-native >=0.79.v6.1.17Compare Source
Patch Changes
47a4dcb: Fix for looseDefaultThemetype definitiona8c0f5b: fix: add info link to consolev6.1.16Compare Source
Patch Changes
246c77b: Resolve TS error related toExoticComponentWithDisplayNameAPI from React.4757191: Native typings weren't on the correct folder, which caused issues on React Native projects using this libraryv6.1.15Compare Source
Patch Changes
b9688ae: chore: update postcss to version 8.4.49 and nanoid to version 3.3.8v6.1.14Compare Source
Patch Changes
6908326: Add changesets for release management18ebf6d: Prevent styled() from injecting an undefined ref prop in React 19Configuration
📅 Schedule: Branch creation - "every weekend" (UTC), Automerge - At any time (no schedule defined).
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.