Commit Graph

3179 Commits

Author SHA1 Message Date
Evan Jacobs
de41aab617 ssr backward-compat fix for ServerStyleSheet (#2639)
add an alias "instance" to sheet so doing things the v4 way will
continue to work
2019-11-07 16:02:48 -05:00
Evan Jacobs
4cee509fcf update changelog from 4.x 2019-11-07 16:02:47 -05:00
Evan Jacobs
471d557869 update macro to work with revised babel plugin setup 2019-11-07 16:02:47 -05:00
Evan Jacobs
3484b8c6c1 update internally to later babel-plugin-styled-components 2019-11-07 16:02:47 -05:00
Evan Jacobs
3bc57b3a3a add @babel/traverse, update flowtypes 2019-11-07 16:02:46 -05:00
Evan Jacobs
d9a9bf0405 v5.0.0-beta.3 2019-11-07 16:02:45 -05:00
Evan Jacobs
8a1b621417 properly DCE the stream module for non-server build targets 2019-11-07 16:02:44 -05:00
Evan Jacobs
2dc0ebca6f v5.0.0-beta.2 2019-11-07 16:02:44 -05:00
Evan Jacobs
27431b9b54 fix HMR (#2623)
* fix HMR

* revise PR per Phil's recommendation
2019-11-07 16:02:44 -05:00
Evan Jacobs
9a108df855 v5.0.0-beta.1 2019-11-07 16:02:44 -05:00
Evan Jacobs
ed1ae8f84d fix inconsistency between client & server that breaks rehydration (#2621) 2019-11-07 16:02:43 -05:00
Evan Jacobs
6f1c3e9947 v5.0.0-beta.0 2019-11-07 16:02:43 -05:00
Evan Jacobs
91ede16493 v5.0.0-alpha.2 2019-11-07 16:02:43 -05:00
Evan Jacobs
d81bda75a7 trim down the bundlesize target 2019-11-07 16:02:43 -05:00
Evan Jacobs
a7b0b5d342 update prop validator 2019-11-07 16:02:42 -05:00
Evan Jacobs
bdd1c0b28a convert StyledError into function that throws to reduce code size 2019-11-07 16:02:42 -05:00
Evan Jacobs
54db964451 remove unused code path 2019-11-07 16:02:42 -05:00
Evan Jacobs
e99f924db6 attrs don't matter for the static-ness of a component's styles...
...unless the component actually has a function interpolation in
its styles
2019-11-07 16:02:41 -05:00
Evan Jacobs
799de1d652 remove deprecated functionality
1. object-form attrs
2. remove old innerRef warning
2019-11-07 16:02:38 -05:00
Evan Jacobs
880cd0600e fix #2613 2019-11-07 16:02:36 -05:00
Evan Jacobs
44e565bf5d update benchmark examples & rewrite a few with more idiomatic examples 2019-11-07 16:02:36 -05:00
Evan Jacobs
8025f704c8 update to latest s-c v4 version in benchmarks 2019-11-07 16:02:36 -05:00
Evan Jacobs
90f7134d0c README note on upgrading 2019-11-07 16:02:36 -05:00
Evan Jacobs
71086b21fc v5.0.0-alpha.1 2019-11-07 16:02:36 -05:00
Evan Jacobs
a6420bc865 v4 backward-compat fix on ServerStyleSheet.getStyleElement (#2611) 2019-11-07 16:02:35 -05:00
Evan Jacobs
50152dcd02 v5.0.0-alpha.0 2019-11-07 16:02:35 -05:00
Evan Jacobs
7170afdf8e bring forward updated 4.x changelog 2019-11-07 16:02:35 -05:00
Evan Jacobs
5b4b7a3187 revert self-reference check to avoid folding over HOCs
originally introduced in 4.x this apparently breaks rehydration / HMR
in development runtimes pretty badly; needs potentially a different
implementation and more testing
2019-11-07 16:02:35 -05:00
Evan Jacobs
97a637a038 add seal fn back to ServerStyleSheet for backward compat (#2581)
* add seal fn back to ServerStyleSheet for backward compat

* Make ServerStyleSheet sealed error more precise

- collectStyles could very well be used for multiple elements
  although that's a rare use case
- getStyleTags and getStyleElement are safe to be called again,
  unless interleaveWithNodeStream was called already
- interleaveWithNodeStream is not safe to be called again

* add tests verifying the error scenarios, allow getStyleTags during streaming
2019-11-07 16:02:34 -05:00
Evan Jacobs
590c9d6e91 peer dependency & globals adjustments for bundle size (#2588)
* add react-is to rollup globals now that it's a peerDep

(cherry picked from commit 84d973b3e1e8d16ba7529ed29966d7f0e90bcb19)

* move prop-types to peerDeps

brings our bundle size down a bit more

* upgrade rollup

* Revert "move prop-types to peerDeps"

This reverts commit 70fbda3e683a5bf7351dc450442e1812d38f7b3d.

* just remove the stylesheet manager proptypes since rollup isn't doing its job

when the TS types get updated intellisense will do its thing in
VSCode, so shouldn't be too big of a deal

* pull up changelog from 4.x
2019-11-07 16:02:34 -05:00
Evan Jacobs
7d0012779f implement defaultProps folding for v5 2019-11-07 16:02:34 -05:00
Evan Jacobs
7b32b43d67 update flow to 0.100 2019-11-07 16:02:33 -05:00
Evan Jacobs
3c9f3b1872 carry-forward #2501 2019-11-07 16:02:33 -05:00
Evan Jacobs
2847aae86c prevent folding for interim HOCs & fix subtle className composition bug (#2587)
* shush the linter

* add failing test

* prevent folding for interim HOCs

* clean up linter exception flags for legibility

* fix the className composition order of folded components

this was actually a subtle bug... the folded stuff should come first
and the uppermost should come after, and any user-supplied classes
should come last

* add self static for StyledNativeComponent
2019-11-07 16:02:31 -05:00
Evan Jacobs
96953a64c3 prevent folding for interim HOCs & fix subtle className composition bug (#2587)
* shush the linter

* add failing test

* prevent folding for interim HOCs

* clean up linter exception flags for legibility

* fix the className composition order of folded components

this was actually a subtle bug... the folded stuff should come first
and the uppermost should come after, and any user-supplied classes
should come last

* add self static for StyledNativeComponent
2019-11-07 16:02:23 -05:00
Evan Jacobs
62e35202cf generate the error map on workspace install for CI 2019-11-07 16:02:14 -05:00
Evan Jacobs
be7e4eba17 remove babel-plugin-preval and generate errormap as a build step 2019-11-07 16:02:13 -05:00
Evan Jacobs
fc20334155 make it clear not to touch the old errors.md 2019-11-07 16:02:13 -05:00
Evan Jacobs
c66fb9d643 run all tests except integration ones for now
until jest-styled-components is updated to support v5
2019-11-07 16:02:13 -05:00
Evan Jacobs
b4fb1f957d use shallowequal for equivalency checking instead (#2585)
* use shallowequal for equivalency checking instead

* fix yarn.lock
2019-11-07 16:02:13 -05:00
Evan Jacobs
b547b51cdf shave off some unnecessary bytes 2019-11-07 16:02:12 -05:00
Evan Jacobs
b65a296f1f freeze stylis customizations on initial mount of StyleSheetManager 2019-11-07 16:02:12 -05:00
Evan Jacobs
2efc501a45 fix typo 2019-11-07 16:02:12 -05:00
Evan Jacobs
cbde357e07 reorganize types to eliminate cycles 2019-11-07 16:02:12 -05:00
Evan Jacobs
d3e2a05c11 refactor StyleSheet to take a constructor object & easier reconstruction 2019-11-07 16:02:11 -05:00
Evan Jacobs
78d77062f0 add forwardedAs prop (#2573)
* implement innerAs for s-c web

* implement innerAs for s-c native

* rename innerAs -> forwardedAs

The naming aligns better with the pattern React established
with forwardRef, etc.

* remove changelog entry since it landed in 4.x
2019-11-07 16:02:10 -05:00
Evan Jacobs
a3da267840 remove more fixme 2019-11-07 16:02:09 -05:00
Evan Jacobs
c05c1cfd1f remove an allocation 2019-11-07 16:02:09 -05:00
Evan Jacobs
8cb3400c3e remove some fixmes 2019-11-07 16:02:08 -05:00
Evan Jacobs
77b8f30171 remove the injection mode attribute 2019-11-07 16:02:08 -05:00