Skip to content

Conversation

@renovate
Copy link

@renovate renovate bot commented Feb 1, 2018

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
styled-components (source) 3.1.4 -> 3.4.10 age adoption passing confidence

Release Notes

styled-components/styled-components

v3.4.10

Compare Source

  • Added a few iframe attributes to the valid attribute list: allow, allowUserMedia, allowPaymentRequest, by @​asoltys (see #​2083 and #​2085)

v3.4.9

Compare Source

Remove the injectGlobal warning; it's not actionable since the replacement API is in v4 only, so why say anything?

v3.4.8

Compare Source

Fix the injectGlobal deprecation message being improperly guarded for production

v3.4.7

Compare Source

  • Add warning for the upcoming removal of the injectGlobal API in v4.0, by @​rainboxx (see #​1867)

  • Backport from v4: Beef up the error message that sometimes occurs when multiple versions of styled components are used together and the StyleSheet instance can't be found, by @​probablyup (see #​2012)

v3.4.6

Compare Source

Fixed an issue when streaming with very large amounts of output where sometimes styles might not make it to the client, by @​probablyup (see #​1997)

v3.4.5

Compare Source

  • Tone down the dev warnings for deprecated APIs (they were console.error, now console.warn), by @​probablyup

v3.4.4

Compare Source

Fix warning function not having a production fallback, by @​mitoyarzun (see #​1938)

v3.4.3

Compare Source

v3.4.2

Compare Source

v3.4.1

Compare Source

v3.4.0

Compare Source

v3.3.3

Compare Source

  • Fixed a regression when extending a styled(StyledComponent) introduced in 3.3.0, by @​probablyup (see #​1819)

  • Adjust how displayName is generated when not using Babel to properly preserve a displayName passed via withConfig, by @​probablyup (see #​1755)

  • [TS] Fix props being removed when indexed types are passed to WithOptionalTheme, by @​devrelm (see #​1806)

  • [TS] Allow TypeScript 2.9.1 to accept tagged template type argument, by @​Igorbek (see #​1798)

  • Add ref documentation for React.createRef(), by @​julmot (see #​1792)

v3.3.2

Lots of 🔥fixes in this release! As always, thank you contributors for your hard work 🙇


Note: v3.3.1 was skipped due to a bad deploy.

v3.3.0

Compare Source

The team is very excited to release v3.3.0, containing a number of important bugfixes and quality of life improvements to the library! This will probably be the last feature release before v4.0 (roadmap) this summer.

Thank you so much to all the people who contributed. styled-components is nothing without its community ❤️

v3.2.6

Compare Source

The primary fix in this patch release was related to a misconfiguration in the stylis rule splitter which could cause some rules to be discarded when there was no whitespace around selector operands.

  • Fix cascade: false being erroneously set on the Stylis rule splitter (see #​1677)
  • Fix typo in ComponentStyle.js comments (see #​1678)
  • Accept ref forwarding components in styled constructor (see #​1658)
  • Fix onInvalid check in validAttrs, by @​slootsantos (see #​1668)
  • Fix makeSpeedyTag's css method (see #​1663)
  • Fix ComponentStyle caching strategy to take StyleSheet cache into account, by @​darthtrevino (see #​1634)
  • Add new test-utils to simplify finding styled-components in the DOM in unit testing scenarios, by @​jamiebuilds (see #​1652)
  • Add minified commonjs and esm builds for bundle size tracking (see #​1681)

v3.2.5

Compare Source

v3.2.4: / v3.2.5

Compare Source

Make sure that you're installing v3.2.5 as v3.2.4 was missing some postinstall scripts for our OpenCollective message 😅

Deprecations

Preprocessing option in our babel plugin

The preprocess option was never here to stay and its experiment has essentially proven to be insufficient for our future goals. Check out Sweetsour/ISTF for our current effort of making styled-components more performant and adding a CSS pipeline to it: https://github.com/kitten/sweetsour

Thanks to @​Samatar26 for his PR!

Changes

Add process.env.SC_ATTR to override our style tag's marker attribute

While we're figuring out how to improve our context-drive StyleSheetManager in a stable way that works with SSR and sharded stylesheets, we would still like to provide a way for you to use styled-components that enables widgets and other use-cases where it might be necessary to prevent us from destroying your stylesheet on pages.

Specifically this affects people who are building non-SSR code that runs on pages where styled-components is already in place. In these cases our SSR rehydration would go along and happily remove another module's style tags. We haven't considered this closely as it is not a good practice in our eyes to run duplicated styled-components modules in a single app. But when you're not dealing with a single app only it might make sense.

You can now change the the style tag's styled-components attribute by bundling with the SC_ATTR environment variable. Given a setup where you can set this variable, we will now inject style tags with a different attribute, so that they're not affected by the standard SSR rehydration.

Documentation will follow soon; Thanks to @​Fer0x for this change!

v3.2.3

Compare Source

Fixes

SSR memory leaks? No more!

This release simply frees up some memory by removing cloned StyleSheets when they're not needed anymore.

v3.2.2

Compare Source

Fixes

SSR accumulating non-critical CSS

If you've noticed that v3.2 would cause your server-side rendered app to output all styles it knows of, you weren't alone!

The ServerTag was accidentally cloning itself incorrectly. This meant that the ServerStyleSheet would inherit the same server styles from the “master” StyleSheet.

We now clone the tag correctly and a test is in place to ensure this doesn't happen again, since this bug came up a couple of times in past v2 releases. Thanks to @​DeividasK for reporting this bug!

Fix at-rules nested inside style rules

Have some styles gone missing? In the newer >=3.1 versions that introduced speedy mode (i.e. insertRule support) some rules might not have been injected properly. This came down to insertRule being more strict with what we add. In development an incorrectly formatted CSS rule might not cause much trouble, but in production insertRule complains about it.

Stylis, more specifically stylis-rule-sheet, was generating invalid CSS when at-rules were nested inside style rules. For instance the following CSS would cause trouble:

/* input */
&:hover {
  @​media (min-width: 768px) { color: papayahwip; }
}

/* incorrect output */
@​media (min-width: 768px) {
  &:hover { color: papayahwip; }
}}
/* ^ note the extra closing curly brace */

/* v3.2.2 fixed output */
@​media (min-width: 768px) {
  &:hover { color: papayahwip; }
}
Fix imprecise IS_BROWSER detection

Before v3.2.2 we would check whether styled-components is running inside the browser using: typeof window !== 'undefined'. This proofed insufficient in a couple of special cases for some people, so we have now added 'HTMLElement' in window to this check.

Thanks to @​danieldunderfelt for contributing this fix!

v3.2.1

Compare Source

Fixes

Incorrect SSR React Element output

We accidentally removed dangerouslySetInnerHtml in our SSR output with just some children string. This would cause some characters to be encoded.

We have corrected this mistake and more unit tests are now in place to prevent this from happening again. Thanks to @​misund for reporting this mistake!

Support out-of-order injection for @import at-rules

@import rules must appear at the top of style sheets (i.e tags).

In older versions we used to shard our style tags into local and global ones. Because any CSS that is being passed to us is also reordered, so that @import rules appear at the top, often this would mean that a lone injectGlobal would get away with @import rules.

This wasn't sufficient as using @import in a component (obviously unsupported and not recommended) or in another consecutive injectGlobal would cause this logic to break, since @import wouldn't appear at the top of the stylesheet anymore.

This oversight was made worse by the fact that we stopped sharding local and global style tags. This would mean that @import could now show up fairly late in a stylesheet, instead of at its top.

In this version we introduce a patch that creates an additional style tag at the top of all other ones that we create, when necessary, which is going to accept all @import rules separately. So when you use injectGlobal and pass it an @import rule, it will now be stripped out of the rest of your CSS, and put into a completely isolated style tag.

v3.2.0

Compare Source

This is a small minor release that introduces a couple of minor changes, but also a complete rewrite of our StyleSheet implementation. Not only is it smaller, but it also lowers the barrier to entry for new contributors (like yourself, dear reader, hopefully!) to read and understand it, and eventually contribute great new features!

Deprecations

Stream reconciliation function consolidateStreamedStyles

If you’ve recently migrated to streamed server-side-rendered styles, then you will be familiar with our consolidateStreamedStyles function, which was an “extended rehydration” that moved all streamed styled-components style tags when called.

Due to our refactor of our StyleSheet behaviour (see below), our new rehydration implementation now takes care of this for you automatically.

This function will now output a deprecation warning when it’s being used and effectively does nothing at all. (Take a look at its source for more information)

Refactors

Rewrite and refactor StyleSheet and ServerStyleSheet

We now handle the style rules around a “style tag” based approach, which also means that our BrowserStyleSheet is a thing of the past. Depending on the environment, we will now switch between server, browser, and insertRule style tags, which all abstract their internal behaviour.

The concept of “local” vs “global” styles has been removed, in anticipation of some upcoming, future APIs, and our rehydration has been rewritten as well. You will see only a single style tag after rehydration, and now splits between style tags when injecting global styles as well. This is not a breaking change, but produces the same behaviour and specificity as it did before. (Change)

You will also notice a couple of improved and more detailed error messages—if you ever run into them that is—which will help you to understand some things that might go wrong more easily. (Change)

Style tags will now also be injected consecutively in the DOM. This means that styled-components won’t append them to the target, but will append them to its last style tag, if a first one was already injected. This should help you to predict the order of injection, when dealing with external CSS. (Change)

Misc.
  • Replace murmurhash implementation and avoid destructuring tag function arguments (see #​1516)

Added

StyleSheetManager target prop

You can now pass an element to a StyleSheetManager and all the components in its context below in the tree will add their styles to new tags in the specified target.

While this is not guaranteed to work with SSR yet, it can help you to easily add runtime-styles to a different part of the DOM. For example the shadow DOM.

Multiple instance of styled-components warning

Starting from this version, style-components will log a warning when multiple instances of it are being bundled and run on the same page. Due to our rehydration this can lead to errors, where one instance of styled-components will interfere with the other. This is why we have decided to add a small warning notifying you of this, since we don’t see the practice of adding multiple styled-components instances to a single page as a best practice.

Please note that this warning won’t show up, when older version of styled-components are present, as they don’t contain the code necessary to be detected.

StyleSheet.remove API (Internal)

This is an internal API that allows us to remove rules and components from our StyleSheets, which will come in handy for some new APIs for global styles quite soon.

Misc.
  • Add controlsList to validAttr list (see #​1537)
  • Add foreignObject svg element (see #​1544)

Fixes

Enable semicolon autocompletion in styles

We accidentally disabled semicolon autocompletion in stylis, which accidentally introduced an unnoticed breaking change in a past version a while back.

Semicolon autocompletion is now enabled and back again. Thanks to @​Blasz for reporting this mistake!

Nested media queries in insertRule aka production mode

Our version of stylis-rule-sheet was updated which fixes nested media queries which can now be used as is expected in production. (see #​1529 and #​1528)

Misc.
  • Remove type="text/css"-attribute from style tag to remove warnings from w3c validator (see #​1551)

Thanks

Thanks to the numerous contributors and maintainers who have worked towards this release. We're sorry if some names are missing, so thanks additionally goes out to everyone who’s worked hard to get v3 out!

(In no particular order)

v3.1.6

Compare Source

  • Bugfix for the last style tag sometimes being emitted multiple times during streaming (see #​1479)

  • Bugfix for speedy mode rehydration and added handling for out-of-order style injection (see #​1482)

NOTE: When calling consolidateStreamedStyles() after streaming, make sure it is called as early in the bundle as possible.

styled-components injects new CSS upon construction of new components not prerender, so consolidation must happen before any new CSS is injected on the page.

v3.1.5

Compare Source

A quick bugfix release:

  1. Apply a workaround to re-enable "speedy" mode for IE/Edge (see #​1468)
  2. Fix a memory leak in the server-side streaming logic (see #​1475)

Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 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 this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@evenchange4
Copy link
Owner

evenchange4 commented Feb 1, 2018

Deploy preview for react-progressive-bg-image ready!

Built with commit 11fc3fd

https://deploy-preview-83--react-progressive-bg-image.netlify.com

@codecov
Copy link

codecov bot commented Feb 1, 2018

Codecov Report

Merging #83 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #83   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           3      3           
  Lines          34     34           
  Branches        7      7           
=====================================
  Hits           34     34

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update aa84006...11fc3fd. Read the comment docs.

@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 9a85f92 to 180f58b Compare February 3, 2018 16:37
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.1.5 chore(deps): update dependency styled-components to v3.1.6 Feb 3, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch 3 times, most recently from 3af6455 to b8ae159 Compare February 9, 2018 02:05
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from b8ae159 to 87fc9c4 Compare March 5, 2018 16:10
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.1.6 chore(deps): update dependency styled-components to v3.2.0 Mar 5, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 87fc9c4 to 8cdbf56 Compare March 7, 2018 12:46
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.2.0 chore(deps): update dependency styled-components to v3.2.1 Mar 7, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 8cdbf56 to a9e0a22 Compare March 13, 2018 20:31
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.2.1 chore(deps): update dependency styled-components to v3.2.2 Mar 13, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from a9e0a22 to e950faa Compare March 14, 2018 23:37
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.2.2 chore(deps): update dependency styled-components to v3.2.3 Mar 14, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from e950faa to 8cb1f26 Compare March 30, 2018 15:00
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.2.3 chore(deps): update dependency styled-components to v3.2.4 Mar 30, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 8cb1f26 to a08f914 Compare March 30, 2018 16:27
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.2.4 chore(deps): update dependency styled-components to v3.2.5 Mar 30, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from a08f914 to 14f9875 Compare April 17, 2018 04:44
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.2.5 chore(deps): update dependency styled-components to v3.2.6 Apr 17, 2018
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.2.6 Update dependency styled-components to v3.2.6 May 9, 2018
@renovate renovate bot changed the title Update dependency styled-components to v3.2.6 chore(deps): update dependency styled-components to v3.2.6 May 9, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 14f9875 to 5a57d7f Compare May 25, 2018 05:12
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.2.6 chore(deps): update dependency styled-components to v3.3.0 May 25, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 5a57d7f to ab233d8 Compare June 2, 2018 04:15
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.3.0 chore(deps): update dependency styled-components to v3.3.1 Jun 2, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from ab233d8 to 059c7c8 Compare June 2, 2018 16:32
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.3.1 chore(deps): update dependency styled-components to v3.3.0 Jun 2, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 059c7c8 to 057df17 Compare June 4, 2018 06:16
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.3.0 chore(deps): update dependency styled-components to v3.3.2 Jun 4, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 057df17 to 70e5163 Compare June 20, 2018 19:42
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.3.2 chore(deps): update dependency styled-components to v3.3.3 Jun 20, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 70e5163 to bf5cf2f Compare August 2, 2018 20:14
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.3.3 chore(deps): update dependency styled-components to v3.4.0 Aug 2, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from bf5cf2f to da48a2f Compare August 5, 2018 03:18
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.4.0 chore(deps): update dependency styled-components to v3.4.1 Aug 5, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from da48a2f to 4a45d69 Compare August 7, 2018 20:03
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.4.1 chore(deps): update dependency styled-components to v3.4.2 Aug 7, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 4a45d69 to 1d1f239 Compare August 21, 2018 16:52
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.4.2 chore(deps): update dependency styled-components to v3.4.3 Aug 21, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 1d1f239 to d6d5c9e Compare August 21, 2018 18:30
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.4.3 chore(deps): update dependency styled-components to v3.4.4 Aug 21, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from d6d5c9e to 312af97 Compare August 23, 2018 16:21
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.4.4 chore(deps): update dependency styled-components to v3.4.5 Aug 23, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 312af97 to 5e85de7 Compare September 10, 2018 19:09
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.4.5 chore(deps): update dependency styled-components to v3.4.6 Sep 10, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 5e85de7 to 4e3089b Compare September 17, 2018 19:50
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.4.6 chore(deps): update dependency styled-components to v3.4.7 Sep 17, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 4e3089b to 1b67434 Compare September 17, 2018 22:38
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.4.7 chore(deps): update dependency styled-components to v3.4.8 Sep 17, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from 1b67434 to fc8e964 Compare September 18, 2018 14:44
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.4.8 chore(deps): update dependency styled-components to v3.4.9 Sep 18, 2018
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from fc8e964 to 11fc3fd Compare October 9, 2018 20:55
@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.4.9 chore(deps): update dependency styled-components to v3.4.10 Oct 9, 2018
@renovate
Copy link
Author

renovate bot commented Mar 25, 2023

Edited/Blocked Notification

Renovate will not automatically rebase this PR, because it does not recognize the last commit author and assumes somebody else may have edited the PR.

You can manually request rebase by checking the rebase/retry box above.

⚠️ Warning: custom changes will be lost.

@renovate renovate bot changed the title chore(deps): update dependency styled-components to v3.4.10 chore(deps): update dependency styled-components to v3.4.10 - abandoned Dec 8, 2024
@renovate
Copy link
Author

renovate bot commented Dec 8, 2024

Autoclosing Skipped

This PR has been flagged for autoclosing. However, it is being skipped due to the branch being already modified. Please close/delete it manually or report a bug if you think this is in error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants