Skip to content

Latest commit

 

History

History
511 lines (329 loc) · 37.9 KB

CHANGELOG.md

File metadata and controls

511 lines (329 loc) · 37.9 KB

Changelog

All notable changes to this project will be documented in this file. If a contribution does not have a mention next to it, @geelen or @mxstbr did it.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

  • Fix React.createRef() values for innerRef being ignored in React Native, by @simonbuchan (see #1718)

v3.2.6 - 2018-04-17

  • 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 - 2018-03-30

  • Deprecate experimental preprocess mode, by @Samatar26 (see #1619)
  • Added ability to override SC_ATTR via process.env.SC_ATTR (see #1632)

v3.2.3 - 2018-03-14

  • Fix SSR memory leak where StyleSheet clones are never freed (see #1612)

v3.2.2 - 2018-03-13

  • Fix ServerTag.clone() not properly cloning its names and markers (see #1605)

  • Fix nested media at-rules by upgrading to stylis@^3.5.0 and stylis-rule-sheet@^0.0.10 (see #1595)

  • Fix the IS_BROWSER check to work more reliably in projects where window may be shimmed, by @danieldunderfelt (see #1599)

v3.2.1 - 2018-03-07

  • Fix @import rules not being enforced to appear at the beginning of stylesheets (see #1577)

  • Fix StyleTags toElement outputting inline CSS which would cause URL encoding (see #1580)

v3.2.0 - 2018-03-05

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

  • Add foreignObject svg element (see #1544)

  • Add controlsList to validAttr list (see #1537)

  • Enable stylis' semicolon autocompletion which was accidentally disabled for a lot of prior releases (see #1532)

  • Fix insertRule injection (speedy mode in production) of nested media queries by upgrading stylis-rule-sheet (see #1529 and #1528)

  • Add StyleSheet.remove API method to be able to delete rules related to a component (see #1514)

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

  • Rewrite and refactor StyleSheet and ServerStyleSheet (no breaking change, see #1501)

  • Add warning if there are several instances of styled-components initialized on the page (see #1412)

  • Add target prop to StyleSheetManager component to enable specifying where style tags should render (see #1491)

v3.1.6 - 2018-02-03

  • 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)

v3.1.5 - 2018-02-01

  • Apply a workaround to re-enable "speedy" mode for IE/Edge (see #1468)

  • Fix memory leak in the server-side streaming logic (see #1475)

v3.1.4 - 2018-01-29

  • Disable "speedy" mode for IE and Edge. There seems to be some incompatibility with how the insertRule API functions in their rendering stack compared to the other vendors. (see #1465)

v3.1.3 - 2018-01-29

  • Disable "speedy" mode for non-production environments, fixes jest-styled-components compatibility (see #1460)

v3.1.1 - 2018-01-29

v3.1.0 - 2018-01-29

  • Compile out error messages for production builds (see #1445)
  • Use much faster CSS injection in the browser, by @schwers and @philpl (see #1208)
  • Add support for streaming server-side rendering, by @probablyup (see #1430)

v3.0.2 - 2018-01-22

  • Add secret internals for jest-styled-components (do not use or you will be haunted by spooky ghosts 👻) (see #1438)

v3.0.1 - 2018-01-22

  • Add support for SafeAreaView when using styled-components in a React Native project (see #1339)

  • Remove support for deprecated Navigator when using styled-components in a React Native project (see #1339)

  • Ship flat bundles for each possible entry, thanks to @Andarist (see #1362)

  • Add ESLint precommit hook, thanks to @lukebelliveau (see #1393)

  • Fixed nested themes not being republished on outer theme changes, thanks to @Andarist (see #1382)

  • Add warning if you've accidently imported 'styled-components' on React Native instead of 'styled-components/native', thanks to @tazsingh and @gribnoysup (see #1391 and #1394)

  • Fixed bug where innerRef could be passed as undefined to components when using withTheme. This could cause issues when using prop spread within the component (e.g. {...this.props}), because React will still warn you about using a non-dom prop even though it's undefined. (see #1414)

  • Expose isStyledComponent utility as a named export. This functionality is useful in some edge cases, such as knowing whether or not to use innerRef vs ref and detecting if a component class needs to be wrapped such that it can be used in a component selector. (see #1418)

  • Remove trailing commas on function arguments (not compatible with ES5 JS engines)

  • Ship source maps (see #1425)

  • Upgrade test suites to run against react v16 (see #1426)

  • Streaming rendering support (requires React 16, see #1430)

v2.4.0 - 2017-12-22

  • remove some extra information from the generated hash that can differ between build environments (see #1381)

v2.3.3 - 2017-12-20

v2.3.2 - 2017-12-19

  • Hotfix a bug in the attr filtering in v2.3.1 (see #1372)

v2.3.1 - 2017-12-19

v2.3.0 - 2017-12-15

  • Add development sandbox to repo for easier contributing, thanks to @gribnoysup (see #1257)
  • Add basic support for style objects in the Typescript definitions, thanks to @nbostrom (see #1123)
  • Fix ref warning using withTheme HOC and stateless function components, thanks to @MatthieuLemoine (see #1205)
  • Consistently escape displayNames when creating componentId, thanks to @evan-scott-zocdoc (see #1313)
  • Better issue template (see #1342)

v2.2.4 - 2017-11-29

  • Disable static styles caching when hot module replacement is enabled.
  • Bump minimum stylis version to 3.4.0, adjust the semver caret target (see #1296)

v2.2.3 - 2017-10-29

  • Fix incorrect StyledNativeComponent#componentWillReceiveProps implementation (see #1276)

v2.2.2 - 2017-10-24

  • Prevent withTheme HOC from breaking when passing a theme from defaultProps, thanks to @kutyel (see #1130)
  • Refactor out theme logic in StyledComponent's componentWillMount & componentWillReceiveProps (see #1130)
  • Add onReset to valid react props list (see #1234)
  • Add support for ServerStyleSheet PropType in both StyleSheetManager and StyledComponent (see #1245)
  • Prevent component styles from being static if attrs are dynamic (see #1219)
  • Changed 'too many classes' error to recommend attrs for frequently changed styles (see #1213)

v2.2.1 - 2017-10-04

v2.2.0 - 2017-09-27

  • Fixed downstream minification issue with replacing process (see #1150)
  • Fixed nonce missing from global styles (see #1088)
  • Improve component mount and unmount performance with changes to createBroadcast. Deprecates usage of CHANNEL as a function, will be update to CHANNEL_NEXT's propType in a future version. (see #1048)
  • Fixed comments in react-native (see #1041)
  • Add support for the __webpack_nonce__ CSP attribute (see #1022 and #1043)
  • Add react-native ImageBackground alias (see #1028)
  • Refactor variable in generateAlphabeticName.js (see #1040)
  • Enable the Node environment for SSR tests, switch some output verification to snapshot testing (see #1023)
  • Add .extend and .withComponent deterministic ID generation (see #1044)
  • Add marquee tag to domElements (see #1167)

v2.1.1 - 2017-07-03

  • Upgrade stylis to 2.3 and use constructor to fix bugs with multiple libs using stylis simultaneously (see #962)

v2.1.0 - 2017-06-15

v2.0.1 - 2017-06-07

  • Fixed extend not working with 3 or more inheritances, thanks to @brunolemos. (see #871)
  • Added a test for withComponent followed by attrs, thanks to @btmills. (see #851)
  • Fix Flow type signatures for compatibility with Flow v0.47.0 (see #840)
  • Upgraded stylis to v3.0. (see #829 and #876)
  • Remove dead code used previously for auto-prefixing. (see #881)

v2.0.0 - 2017-05-25

  • Update css-to-react-native - you'll now need to add units to your React Native styles (see css-to-react-native, code mod)
  • Update stylis to latest version (see #496).
  • Added per-component class names (see #227).
  • Added the ability to override one component's styles from another.
  • Injecting an empty class for each instance of a component in development.
  • Added attrs constructor for passing extra attributes/properties to the underlying element.
  • Added warnings for components generating a lot of classes, thanks to @vdanchenkov. (see #268)
  • Standardised styled(Comp) to work the same in all cases, rather than a special extension case where Comp is another Styled Component. Comp.extend now covers that case. (see #518).
  • Added Comp.withComponent(Other) to allow cloning of an existing SC with a new tag. (see #814.
  • Added a separate no-parser entrypoint for preprocessed CSS, which doesn't depend on stylis. The preprocessing is part of our babel plugin. (see babel-plugin-styled-components/#26)
  • Fix defaultProps used instead of ThemeProvider on first render @k15a, restored.
  • Refactor StyledComponent for performance optimization.
  • Prevent leakage of the innerRef prop to wrapped child; under the hood it is converted into a normal React ref. (see #592)
  • Pass innerRef through to wrapped Styled Components, so that it refers to the actual DOM node. (see #629)
  • Added a dedicated Server-Side-Rendering API, with optimised rehydration on the client. Keys are now sequential.
  • Add hoisting static (non-React) properties for withTheme HOC, thanks to @brunolemos. (See #712)
  • Add innerRef support to withTheme HOC. (see #710)
  • Switch to babel-preset-env. (see #717)
  • Update StyledNativeComponent to match StyledComponent implementation.
  • Fix Theme context for StyledComponent for IE <10. (see #807)
  • Restore setNativeProps in StyledNativeComponent, thanks to @MatthieuLemoine. (see #764)
  • Fix ref being passed to Stateless Functional Components in StyledNativeComponent. (see #828)
  • Add displayName to componentId when both are present (see #821)
  • Test node 8.x as well in travis (see #1153)

v1.4.6 - 2017-05-02

Added

  • Support for jsdom and other browsers that do not implement ownerNode, thanks to @zvictor

Changed

  • Upgrade babel-plugin-flow-react-proptypes to version 2.1.3, fixing prop-types warnings; thanks to @EnoahNetzach

v1.4.5 - 2017-04-14

Changed

  • Migrated from the deprecated React.PropTypes to the prop-types package, thanks to @YasserKaddour. (see #668)
  • Add FlatList, SectionList & VirtualizedList support, thanks to @Kureev(https://github.com/Kureev). (see #662)
  • Removed dependency on glamor and migrated remaining references to the internal vendored glamor module. (see #663)
  • Fix missing autoprefixing on GlobalStyle model. (see #702)
  • Better support for keyframes on older iOS/webkit browsers (see #720)

v1.4.4 — 2017-03-01

Changed

  • Improve theming support in TypeScript, thanks to @patrick91. (see #460)
  • Add TypeScript definitions for withTheme, thanks to @patrick91. (see #521)
  • Exclude test files from npm, thanks to @Amwam. (see #464)
  • Change the default displayName to styled(Component), thanks to @k15a. (see #470)

v1.4.3 - 2017-02-04

Changed

  • Improve TypeScript typings, thanks to @igorbek. (see #428 and #432)
  • Fix SSR bug introduced in v1.4.2, thanks to @xcoderzach. (see #440)
  • Fix defaultProps used instead of ThemeProvider on first render @k15a. (#450)
  • displayName will now default to Styled(Component) @k15a

v1.4.2 - 2017-01-28

Changed

  • Fix performance issue when using @font-face by creating a separate style tag for global styles, thanks to @xcoderzach. (see #415)

v1.4.1 - 2017-01-27

Changed

v1.4.0 - 2017-01-25

Added

v1.3.1 - 2017-01-18

Changed

  • Fix <Styled(undefined)> in React Developer Tools, thanks to @iamssen. (see #383)
  • Fix themes support in IE <= 10, thanks to @saschagehlich. (see #379)
  • Fixed Touchable not recognising styled components as ReactNative components, thanks to @michalkvasnicak. (see #372)

Added

  • Added styled.Button alias for ReactNative, thanks to @Ginhing. (see #322)

Changed

  • Fix regression from previous release and only delete innerRef if it is being passed down to native elements, thanks to @IljaDaderko. (see #368)
  • Fixed defaultProps theme overriding ThemeProvider theme, thanks to @diegohaz. (see #345)
  • Removed custom flowtype suppressor in favour of default $FlowFixMe @relekang. (see #335)
  • Updated all dependencies to latest semver, thanks to @amilajack. (see #324)
  • Updated all demos to link to latest version, thanks to @relekang. (see #350)
  • Converted to DangerJS, thanks to @orta. (see #169)

Changed

  • Fixed flowtype errors and added flow check to CI, thanks to @relekang. (see #319)

Added

Changed

  • Do not pass innerRef to the component, thanks @mkhazov. (see #310)
  • Fixed prop changes not updating style on react native; thanks @brunolemos. (see #311)
  • Extract DOM shorthands, thanks @philpl. (see #172)

Changed

  • Fixed theme changes in ThemeProviders not re-rendering correctly, thanks @k15a. (see #264)
  • Fixed overriding theme through props, thanks @k15a. (see #295)
  • Removed lodash dependency in favor of small utility packages to knock down bundle size by ~0.5kB

Added

  • Add // @flow to files missing them and fix ThemeProvider types, thanks to @relekang. (see #225)

Changed

  • Fixed setting the default theme via defaultProps and theme changes not re-rendering components with new styles, thanks to @michalkvasnicak. (see #253)
  • Improve ReactNative style generation performance, thanks to @sheepsteak. (see #171)

Changed

  • Bumped css-to-react-native to v1.0.3 to avoid floating points number bug.

Added

  • Expose API for Server Side rendering: styleSheet.reset() and styleSheet.getCSS(), thanks to @thisguychris, (see #214) fixes #124
  • Added support for deeply nested styles in ReactNative (e.g. transform), thanks @jacobp100. (see #139)
  • Added support for camelized style properties in ReactNative (e.g. fontWeight), thanks @jacobp100. (see #145)
  • Properly expose flow typings by adding a flow:build step and flow support docs, thanks to @ryyppy. (see #219)

Changed

v1.0.11 - 2016-11-14

Added

  • Pass props to interpolated functions in React Native, thanks to @haikyuu. (see #190)

Changed

v1.0.10 - 2016-10-28

Changed

  • Huge performance improvement by injecting styles outside of render, thanks to @JamieDixon. (see #137)

v1.0.9 - 2016-10-26

Added

Changed

  • Fixed theme prop in styledComponent and styledNativeComponent so that it will properly inherit values for theme when defaultProps are set, thanks to @bhough. (see #136)

v1.0.8 - 2016-10-18

Added

Changed

  • Fixed <ThemeProvider> component hot reloading

v1.0.7 – 2016-10-18

Added

  • Documentation about integrating with an existing CSS codebase
  • Support for CSS custom variables

Changed

  • Move react from dependencies to peer– & devDependencies, thanks to @sheepsteak! (see #93)
  • Fix cyclical dependency deadlock in .es.js bundle that forced us to revert v1.0.6, thanks to @Rich-Harris! (see #100)
  • Refactored and added to e2e test suite

v1.0.6 - 2016-10-16 REVERTED

Added

  • CHANGELOG.md for tracking changes between versions
  • Support for Internet Explorer by removing Symbol from the transpiled output
  • .es.js bundle for Webpack v2 or Rollup users to take advantage of tree shaking, thanks to @Rich-Harris! (see #96)

Changed

  • Fixed inheritance of statics (like defaultProps) with styled(StyledComponent), thanks to @diegohaz! (see #90)
  • UMD bundle is now built with Rollup, which means a 22% reduction in size and a 60% reducing in parse time, thanks to @Rich-Harris! (see #96)

v1.0.5 - 2016-10-15

Changed

  • Fixed theming on ReactNative

v1.0.4 - 2016-10-15

Changed

  • Fixed compatibility with other react-broadcast-based systems (like react-router v4)