fix(deps): update emotion monorepo to v11 (major) #478
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:
^10.0.35->^11.0.0^10.0.27->^11.0.0^10.0.33->^11.0.0Release Notes
emotion-js/emotion (@emotion/core)
v11.0.0Compare Source
Major Changes
b8476e08#1675 Thanks @mitchellhamilton! - Rename@emotion/coreto@emotion/react. Please change any imports of@emotion/coreto import@emotion/reactor use the@emotion/pkg-renamingESLint rule from@emotion/eslint-plugin.emotion-js/emotion (@emotion/styled)
v11.8.1Compare Source
Patch Changes
39ac5b99Thanks @Andarist! - Fixed a transpilation issue that causeduseInsertionEffectto be referenced directly in the specifiers list of the import statement. This has caused build errors in the consuming tools since the import statement can only reference known exports of a module.v11.8.0Compare Source
Minor Changes
2f27156aThanks @Andarist! - Refactored code to use the upcomingReact.useInsertionEffectwhen it's available (this is a new hook that is going to be introduced in React 18). This shouldn't have any effect on existing codebases and the change should be transparent.Patch Changes
d2531639,2f27156a]:v11.6.0Compare Source
Minor Changes
eb013d25Thanks @eps1lon! - Fixed hydration mismatches ifReact.useId(an upcoming API in React 18) is used within a tree below our components.Patch Changes
9861a18b]:v11.3.0Compare Source
Patch Changes
734b36bf#2199 Thanks @FezVrasta! - Improved Flow type inference of props for inline functions passed to thestyledfactory.Updated dependencies [
36a51c27,662f0e0f,36a51c27,830dd0e6]:v11.1.5Compare Source
Patch Changes
d0293508#2240 Thanks @wolszczak96! -asprop has been removed from TypeScript declarations for composite components. This prop has not actually been handled by default bystyledfor those components - to makestyledhandle it you need to provide a customshouldForwardPropthat doesn't forward theasprop.Updated dependencies [
f3c2e81d]:v11.0.0Compare Source
Major Changes
f9feab1a#1575 Thanks @mitchellhamilton! - Removed support for@emotion/styled-basepackage. It has been moved to@emotion/styledand is available as@emotion/styled/base. This simplifies how the regular and base versions relate to each other and eliminates problems with stricter package managers when@emotion/styled-basewas not installed explicitly by a user.79036056#967 Thanks @mitchellhamilton! - Remove support for deprecatedinnerRefpropa72e6dc#1501 Thanks @JakeGinnivan! - TypeScript types have been significantly restructured. These changes:cssfunction has been restricted to prevent passing invalid typesstyled's generic parameter has been changed, if you were specifying theComponentTypeyou will need to remove that generic parameterstyledno longer takes a secondExtraPropsparameter - instead of that move it to after thestyledcall. So instead of writingstyled<typeof MyComponent, ExtraProps>(MyComponent)({})you should now be writingstyled(MyComponent)<ExtraProps>({})If you encounter build issues after upgrade, try removing any manually specified generic types and let them be inferred.
c6431074#1609 Thanks @tomsseisums! - It's now easier to provide a type forTheme. Instead of creating custom instances (like before) you can augment the builtinThemeinterface like this:105de5c8#1572 Thanks @Andarist! -[data-emotion]attribute on SSRed styled has changed. You should never rely on it though.79036056#967 Thanks @mitchellhamilton! - Use hooks internally for improved bundle size and a better tree in React DevTools9e998e37#1817 Thanks @Andarist! - The parser we use (Stylis) got upgraded. It fixes some long-standing parsing edge cases while being smaller and faster 🚀It has been completely rewritten and comes with some breaking changes. The most notable ones that might affect Emotion users are:
prefixoption. This was always limited to turning off all of some of the prefixes as all available prefixes were on by default. Theprefixoption is gone and to customize which prefixes are applied you need to fork (copy-paste) the prefixer plugin and adjust it to your needs. While this being somewhat more problematic to setup at first we believe that the vast majority of users were not customizing this anyway. By not including the possibility to customize this through an extra option the final solution is more performant because there is no extra overhead of checking if a particular property should be prefixed or not.stylisPlugins. If you plan to use customstylisPluginsand you want to have your styles prefixed automatically you must include prefixer in your customstylisPlugins. You can importprefixerfrom thestylismodule to do that.@importrules are no longer special-cased. The responsibility to put them first has been moved to the author of the styles. They also can't be nested within other rules now. It's only possible to write them at the top level of global styles.cf56694#2088 Thanks @Andarist! - UMD filenames have been changed.Minor Changes
4d3b60d0#1874 Thanks @connor-baer! - Added basic TS type support forasprop on styled components. It's possible to pass any component to it but it has no effect on other accepted props. This means that it's not 100% type-safe so use it sparingly and with care.ad77ed24#1624 Thanks @JakeGinnivan! - AddedCreateStyledoverload to handle whenshouldForwardPropis a custom type guard for intrinsic props.As an example, if you want to override the type of the
colorprop:18c0d5f4#1668 Thanks @animecyc! - CustomshouldForwardPropis being preserved now when using.withComponent. Also, when passing an additionalshouldForwardPropin.withComponent's options (like this:SomeComponent.withComponent('span', { shouldForwardProp })) it's being composed with the potentially existingshouldForwardProp.5d692a6a#1956 Thanks @eps1lon! - Upgradedcsstypedependency to its v3. This is what we use to provide TypeScript typings for object styles. The upgrade should not affect any consuming code but it's worth mentioning if any edge case scenarios arise.Patch Changes
22935470#1588 Thanks @FezVrasta! -StyledComponentFlow type is now polymorphic, that means you can now define the component prop types to get better type safety.58dc08a6#1837 Thanks @arcanis! - Fixed TS compatibility under PnP environments by making@types/reactan optional peer dependency.c672175b,923ded01,e3d7db87,8a896a31,c5b12d90,5e803106,b8476e08,debaad9a,0a4a22ff,5c55fd17,b0ad4f0c,9e998e37,c65c5d88,5c7ec859,a085003d,c7850e61,b7d21373,5d692a6a,c5b12d90,c6431074,828111cd,9e998e37,69446cb5]:Configuration
📅 Schedule: "before 3am on Monday" (UTC).
🚦 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 these updates again.
This PR has been generated by WhiteSource Renovate. View repository job log here.