Skip to content
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

[Snyk] Upgrade styled-components from 4.1.2 to 5.0.1 #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

snyk-bot
Copy link

@snyk-bot snyk-bot commented Mar 4, 2020

Snyk has created this PR to upgrade styled-components from 4.1.2 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.

Warning: This is a major version upgrade, and may be a breaking change.

  • The recommended version is 57 versions ahead of your current version.
  • The recommended version was released a month ago, on 2020-02-04.
Release notes
Package name: styled-components
  • 5.0.1 - 2020-02-04
    • Added useTheme hook to named exports for react native (#2982)

    • Performance enhancements

      • Refactored hashing function that is a bit faster in benchmarks (#2983)
      • Fixed a bitwise math issue that was causing SSR performance degradations due to how we allocate typed arrays under the hood (#2996)
    • Added some helpful new dev-time warnings for antipatterns

      • Recommending against usage of css @import inside createGlobalStyle and what to do instead (#2997)
      • Catching and warning against dynamic creation of styled-components inside other component render paths (#2998)
  • 5.0.1-revisedssr - 2020-02-13
  • 5.0.0 - 2020-01-13

    It's finally here!!! 🚀See the migrating to v5 FAQ page for easy upgrade instructions!

    Read the v5 release announcement!

    TL;DR:

    • 19% smaller bundle size
    • 18% faster client-side mounting
    • 17% faster updating of dynamic styles
    • 45% faster server-side rendering
    • RTL support

    ...and much more all, with no breaking changes!

    NOTE: At this time we recommend not using @import inside of createGlobalStyle. 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

      • you can now supply stylis plugins like stylis-plugin-rtl; <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

      styled.div.attrs({ role: p => p.onClick ? 'button' : '' })`
        color: red;
      `

      becomes

      styled.div.attrs(p => ({ role: p.onClick ? 'button' : '' }))`
        color: red;
      `
    • 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)

  • 5.0.0-testgrouplimit.0 - 2020-01-30
  • 5.0.0-testdeopt2 - 2020-01-24
  • 5.0.0-testdeopt - 2020-01-22
  • 5.0.0-regexrehydrate - 2019-11-12
  • 5.0.0-rc.3 - 2019-12-30

    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 the stylis-rtl plugin, please switch from stylis-rtl to stylis-plugin-rtl.

    • make useTheme cleaner (#2879) props @sayjeyhi
    • unnecessary flattening and interleave of css without interpolations @vepor
    • switch back to mainline hoist-non-react-statics (#2934) …
    • use funding field instead of post install script (#2931) props @koba04
    • fix usage of nested stylesheetmanagers in SSR
    • expose version in API (#2888) props @jamesarmenta
    • refactor stylis management (#2936)
  • 5.0.0-rc.2 - 2019-11-12

    Note: we've switched from canary to v5 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:

    • fix a few missed cases where attrs were not preferred over props (d2f4509)
    • remove the theme usage dev-time check (df36f93); this was done in master already, just forward-porting
    • aggregate classNames passed via attrs (#2859, 12a9f3c)
    • replace rehydration from CSSOM with progressive regex (#2872)
  • 5.0.0-rc.1 - 2019-10-31

    Changes from rc.0:

    • Inline mixin-deep so it is transpiled consistently for IE
  • 5.0.0-rc.0 - 2019-10-30

    We'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

      • you can now supply stylis plugins like stylis-rtl; <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

      styled.div.attrs({ role: p => p.onClick ? 'button' : '' })`
        color: red;
      `

      becomes

      styled.div.attrs(p => ({ role: p.onClick ? 'button' : '' }))`
        color: red;
      `

    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 components

    • shard 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 prop

    • make ThemeProvider error straightforward (#2787); more obvious messaging that the theme prop is required when using ThemeProvider

  • 5.0.0-fixhoist - 2019-12-22
  • 5.0.0-cgsmem - 2020-01-06
  • 5.0.0-beta.8-groupsizefix - 2019-08-22
  • 5.0.0-beta.6-ej4 - 2019-06-29
  • 5.0.0-beta.6-ej3 - 2019-06-29
  • 5.0.0-beta.6-ej2 - 2019-06-28
  • 5.0.0-beta.6-ej1 - 2019-06-28
  • 5.0.0-beta.6-ej - 2019-06-28
  • 5.0.0-beta.5-removefoldedcomponentids - 2019-06-27
  • 5.0.0-beta.5-ej2 - 2019-06-25
  • 5.0.0-beta.11-cgsmulti - 2019-10-21
  • 5.0.0-beta.10-rulefix - 2019-10-21
  • 5.0.0-beta.11 - 2019-10-21
    • Revert "Use ownerDocument instead of global document (#2726)" (#2818); unfortunately there was a bug that caused SSR rehydration failures in certain cases
  • 5.0.0-beta.10 - 2019-10-21
    • Fix GroupedTag.insertRules index drifting on failed insertions (#2798)
    • Add useTheme() hook (#2765)
  • 5.0.0-beta.9 - 2019-09-22
  • 5.0.0-beta.8 - 2019-07-01
  • 5.0.0-beta.6 - 2019-06-27
  • 5.0.0-beta.5 - 2019-06-22
  • 5.0.0-beta.4 - 2019-06-21
  • 5.0.0-beta.3 - 2019-06-18
  • 5.0.0-beta.2 - 2019-06-16
  • 5.0.0-beta.1 - 2019-06-15
  • 5.0.0-beta.0 - 2019-06-14
  • 5.0.0-alpha.2 - 2019-06-11
  • 5.0.0-alpha.1 - 2019-06-09
  • 5.0.0-alpha.0 - 2019-06-09
  • 5.0.0-5.canary-sheet - 2019-05-30
  • 5.0.0-4.canary-sheet - 2019-05-08
  • 5.0.0-3.canary-sheet - 2019-05-03
  • 5.0.0-1.canary-sheet - 2019-05-02
  • 5.0.0-0.canary-sheet - 2019-04-30
  • 4.4.1 - 2019-10-30
    • Fix styled-components's react-native import for React Native Web, by @fiberjw (see #2797)

    • Remove dev-time warning if referencing a theme prop without an outer ThemeProvider, the check for it isn't smart enough to handle cases with "or" or ternary fallbacks and creates undesirable noise in various third party integrations

  • 4.4.0 - 2019-09-23

    This is the last minor release before v5, please start using the beta and give us feedback!

    This is a minor release not a patch release due to this change: #2738. Apologies if this causes some code churn in your projects, it was a long-standing bug that needed fixing.

    • Fix to use ownerDocument instead of global document, by @yamachig (see #2721)

    • Backport fix for SSR classname mismatches in development mode for some environments like next.js (see #2701)

    • Fix attrs not properly taking precedence over props

    • Backport fix where classnames are composed in the wrong order if custom class names are passed in (see #2760)

    • Fix add check for style tag detached - sheet in the style tag is null in this case, by @newying61 (see #2707)

  • 4.4.0-reactnativewebfix - 2019-10-10
  • 4.3.2 - 2019-06-20
  • 4.3.1 - 2019-06-06
  • 4.3.1-0 - 2019-06-06
  • 4.3.0 - 2019-06-05
  • 4.2.1 - 2019-05-30
  • 4.2.0 - 2019-03-23
  • 4.1.4-alpha.6 - 2019-03-05
  • 4.1.4-alpha.5 - 2019-01-18
  • 4.1.4-alpha.4 - 2019-01-18
  • 4.1.4-alpha.3 - 2019-01-18
  • 4.1.4-alpha.2 - 2019-01-18
  • 4.1.3 - 2018-12-17
  • 4.1.2 - 2018-11-28
from styled-components GitHub release notes

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant