This repository has been archived by the owner on Jul 1, 2020. It is now read-only.
[Snyk] Upgrade styled-components from 5.0.0-beta.6-ej4 to 5.0.1 #48
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.
Snyk has created this PR to upgrade styled-components from 5.0.0-beta.6-ej4 to 5.0.1.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.Release notes
Package name: styled-components
Added useTheme hook to named exports for react native (#2982)
Performance enhancements
Added some helpful new dev-time warnings for antipatterns
@import
insidecreateGlobalStyle
and what to do instead (#2997)It's finally here!!! 🚀See the migrating to v5 FAQ page for easy upgrade instructions!
Read the v5 release announcement!
TL;DR:
...and much more all, with no breaking changes!
NOTE: At this time we recommend not using
@import
inside ofcreateGlobalStyle
. We're working on better behavior for this functionality but it just doesn't really work at the moment and it's better if you just embed these imports in your HTML index file, etc.Changes
StyleSheetManager
enhancements<StyleSheetManager stylisPlugins={[]}>...</StyleSheetManager>
disableVendorPrefixes
removes autoprefixing if you don't need legacy browser support;<StyleSheetManager disableVendorPrefixes>...</StyleSheetManager>
disableCSSOMInjection
forces using the slower injection mode if other integrations in your runtime environment can't parse CSSOM-injected styles;<StyleSheetManager disableCSSOMInjection>...</StyleSheetManager>
Removed the "subfunction" attrs syntax that was deprecated in v4
becomes
Update css-to-react-native to v3.0.0 (#2811); the one breaking change noted is that unitless line height is no longer allowed when setting font properties
disallow /ad/i in generated class names (#2837); this change primarily helps to avoid some overly aggressive ad blockers that will mangle generated classnames containing the substring "ad"
if you use styled-components from CDN, in v5 the "react-is" dependency was added (make sure you add this to your project)
This should be the last RC before general v5 release in a week or two!
NOTE: If you've been testing this
stylisPlugins
functionality with thestylis-rtl
plugin, please switch fromstylis-rtl
tostylis-plugin-rtl
.Note: we've switched from
canary
tov5
as the target branch for the new release. It's basically the same, but fixed up so it'll merge cleanly onto master.Changes from rc.1:
Changes from rc.0:
mixin-deep
so it is transpiled consistently for IEWe're almost there! After several months of work (thank you beta testers!) this is the first v5 release candidate build.
Overall v5 changes:
Major performance and bundle size improvements over v4, see the announcement blog for more details!
StyleSheetManager
enhancements<StyleSheetManager stylisPlugins={[]}>...</StyleSheetManager>
disableVendorPrefixes
removes autoprefixing if you don't need legacy browser support;<StyleSheetManager disableVendorPrefixes>...</StyleSheetManager>
disableCSSOMInjection
forces using the slower injection mode if other integrations in your runtime environment can't parse CSSOM-injected styles;<StyleSheetManager disableCSSOMInjection>...</StyleSheetManager>
Removed the "subfunction" attrs syntax that was deprecated in v4
becomes
Changes since the last beta:
disallow /ad/i in generated class names (#2837); this change primarily helps to avoid some overly aggressive ad blockers that will mangle generated classnames containing the substring "ad"
Update css-to-react-native to v3.0.0 (#2811); the one breaking change noted is that unitless line height is no longer allowed when setting font properties
replace merge-anything with mixin-deep (#2838); saving bytes, this is used when merging
defaultProps
for extended styled componentsshard createGlobalStyle by runtime instance (#2824); cGS is implemented such that it's really meant to be used as a singleton, but it's not uncommon for people to have multiple instances of the same cGS component on the page at once. This change ensures that as instances and mounted and removed the existing global styles don't get removed as well
memoize theme (#2820); a minor performance tweak when
ThemeProvider
is given a reference-equal theme propmake ThemeProvider error straightforward (#2787); more obvious messaging that the
theme
prop is required when usingThemeProvider
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs