Update csstype dependency from 3.1.3 to 3.2.3
This updates the pinned csstype dependency from 3.1.3 to 3.2.3 to fix a type incompatibility with @types/react.
Problem
@types/react depends on csstype@^3.2.2, which resolves to 3.2.3. Since styled-components pins [email protected], projects using both packages end up with two different versions of csstype.
The 3.2.x release of csstype changed the type definitions for several CSS properties (e.g., textTransform, alignmentBaseline), making types from 3.1.x incompatible with types from 3.2.x.
This causes TypeScript errors when mixing types from both packages, for example when extending CSSObject from styled-components with properties typed using React.CSSProperties.
Solution
Update the pinned csstype version to 3.2.3 to align with what @types/react resolves to.
I was going to use a ^3.2.2 to match @types/react, but as the existing dependencies use specific versions, I followed the convention.
I've run the tests, built the package locally and tested it with my project and this seems to resolve the error.
Workaround
For now, I've used put this in my project to ensure the version of csstype matches the one styled-components currently depends on to prevent the errors:
"overrides": {
"csstype": "3.1.3"
},
🦋 Changeset detected
Latest commit: f9d7119d0a39af905df33576e0ab8634ef816f59
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 1 package
| Name | Type |
|---|---|
| styled-components | 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
Please could this get some attention when you have chance