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

chore(deps): update dependency styled-components to v3.2.1 - autoclosed #548

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 1, 2018

This Pull Request updates dependency styled-components from v3.1.4 to v3.2.1

Release Notes

v3.1.5

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)

v3.1.6

  • 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.2.0

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!

  • [@​mdugue]
  • [@​jdrouet]
  • [@​marhalpert]
  • [@​pziemkowski]
  • [@​gribnoysup]
  • [@​marionebl]
  • [@​bteng22]
  • [@​paul-veevers]

(In no particular order)


v3.2.1

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.


Commits

v3.2.0

  • aaee314 v3.2.0-1
  • 980bfc1 Fix ServerTag#removeRules not emptying marker correctly
  • b9e8a1f Merge pull request #​1514 from styled-components/feature/delete-rule-methods
  • 2475d6b Add failing test for nested media queries
  • d2552a9 Upgrade stylis and stylis-rule-sheet
  • 48978ff Fix styles.test fixtures after stylis upgrade
  • a2bd0a8 Add CHANGELOG entry
  • 481b311 Merge pull request #​1529 from styled-components/fix/nested-media
  • 3622a82 Enable stylis' no-semicolon mode
  • 61b7764 Add CHANGELOG entry
  • 0fb244f Merge pull request #​1532 from styled-components/fix/no-semicolon-mode
  • 591817c feat(validAttr): add controlsList to validAttr list
  • 9a91bde Merge pull request #​1537 from marhalpert/controlsList-validAttr
  • 6af22b2 feat(svg): add missing foreignObject element
  • 6377d7b Merge pull request #​1544 from jdrouet/master
  • c5378d5 removed type="text/css" logic from StyleTags
  • b32994e updated Snapshots 📸
  • 8634cab adjusted CHANGELOG.md
  • f9801b0 upgrade jest-styled-components
  • 3fb3e79 Merge pull request #​1552 from MicheleBertoli/jest-styled-components
  • 2756541 reset changelog.md
  • 8306cea readded entry to CHANGELOG.md
  • 72882ab successful run of project in windows
  • ef22242 lock files added
  • 247a5fe Merge pull request #​1551 from mdugue/fix-w3-validation-warning-type-style
  • 38c6e9a removed npm lock files and changed npm to yarn
  • 727d5c8 added yarn-error.log to gitignore
  • 20614d6 deleted yarn-error.log file
  • 9cf0fe6 Merge pull request #​1553 from Kirty-Goyal/windows
  • 9fce3bf Expose secretInternals in all environments & bundles
  • 825257d Merge pull request #​1569 from styled-components/chore/expose-secrets
  • 191489b Update CHANGELOG.md (v3.2.0)

v3.2.1

  • eb85ea1 Merge pull request #​1577 from styled-components/hotfix/shard-for-import

This PR has been generated by Renovate Bot.

@renovate renovate bot requested a review from evenchange4 as a code owner February 1, 2018 07:52
@evenchange4
Copy link
Member

evenchange4 commented Feb 1, 2018

Deploy preview for mcslite failed.

Built with commit f303fb1

https://app.netlify.com/sites/mcslite/deploys/5aa21b6aa6188f3a0b6f7138

@evenchange4
Copy link
Member

evenchange4 commented Feb 1, 2018

Deploy preview for mcs-lite-ui ready!

Built with commit f303fb1

https://deploy-preview-548--mcs-lite-ui.netlify.com

@evenchange4
Copy link
Member

evenchange4 commented Feb 1, 2018

Deploy preview for mcs-lite-introduction ready!

Built with commit f303fb1

https://deploy-preview-548--mcs-lite-introduction.netlify.com

@michaelhsu-bot
Copy link
Collaborator

michaelhsu-bot commented Feb 1, 2018

Warnings
⚠️

Please add a label to your PR.

⚠️

Please assign someone to merge this PR, and optionally include people who should review.

⚠️

Changes were made to package.json, but not to licenses.csv - Perhaps you need to run $ yarn run license?

Generated by 🚫 dangerJS

@codecov
Copy link

codecov bot commented Feb 1, 2018

Codecov Report

Merging #548 into master will increase coverage by 0.19%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #548      +/-   ##
==========================================
+ Coverage    84.4%   84.59%   +0.19%     
==========================================
  Files         319      317       -2     
  Lines        2648     2642       -6     
  Branches      169      167       -2     
==========================================
  Hits         2235     2235              
+ Misses        352      348       -4     
+ Partials       61       59       -2
Impacted Files Coverage Δ
packages/mcs-lite-ui/src/InputOrder/InputOrder.js 54.54% <0%> (ø) ⬆️
...ackages/mcs-lite-ui/src/IconWarning/IconWarning.js
packages/mcs-lite-ui/src/IconWarning/index.js

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 a187ba8...f303fb1. Read the comment docs.

@renovate renovate bot force-pushed the renovate/styled-components-3.x branch 3 times, most recently from d122d43 to c0c577d Compare February 2, 2018 01:43
@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 17 times, most recently from 3966d94 to 65bed6f Compare February 8, 2018 08:55
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch 3 times, most recently from 0a9a4d6 to 290aa07 Compare February 27, 2018 03:31
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch 2 times, most recently from eb8e027 to b18dc57 Compare March 5, 2018 16:11
@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 b18dc57 to 1b1155b Compare March 7, 2018 12:48
@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 2 times, most recently from cc26ec9 to cd692c3 Compare March 9, 2018 05:20
@renovate renovate bot force-pushed the renovate/styled-components-3.x branch from cd692c3 to f303fb1 Compare March 9, 2018 05:28
@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.1 - autoclosed Mar 13, 2018
@renovate renovate bot closed this Mar 13, 2018
@renovate renovate bot deleted the renovate/styled-components-3.x branch March 13, 2018 07:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants