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

v4 final #2097

Merged
merged 228 commits into from
Oct 15, 2018
Merged

v4 final #2097

merged 228 commits into from
Oct 15, 2018

Conversation

quantizor
Copy link
Contributor

@quantizor quantizor commented Oct 15, 2018

develop -> master

quantizor and others added 30 commits August 9, 2018 12:11
* remove no-parser build

* fix primitives build output
* Update ThemeProvider to use new context API

* Fix flow

* Set theme as context

* Fix nested ThemeProviders

* Add ThemeProvider tests

* Add missing propagation test

* Improve ThemeProvider propagation test

* Rename children spy function

* Add flow types

* Upgrade withTheme to use new context

* Migrate StyledComponent to use new context api

* Add ThemeContextShape type

* Cache ThemeConsumer render function

* Upgrade enzyme and revert back tests

* Update lockfile

* Migrate StyleSheetManager

* Use StyleSheetConsumer

* Fix StyleSheetManager tests

* Update ssr snapshot

* Revert back enzyme adapter

* Remove extraneous dependency

* Cleanup context shape

* Fix tests

* Add StyleSheet type and EMPTY_OBJECT

* Update lockfile

* Fix jest/jsdom localStorage errors

* Migrate StyledNativeComponent

* Fix integration test

* Fix some primitive tests

* Fix tests

* Fix flow

* Fix flow

* Update memoize-one flow-typed

* Add StrictMode test

* Remove extraneous dependencies

* Cleanup flow definitions

* Fix import statement

* Change react peerDependency

* Rename variable

* Add changelog entry

* Cleanup import statement

* Fix errors after merge

* Refactor ThemeProvider test to use withTheme and styled
* Upgrade dependencies

* Bump travis node version
Now that it matches on word boundaries only, it isn't doing what
I had intended to remove usage of the "stream" module.
* fix benchmarks build

* rearrange some code

* cache functions & use bind

Does seem to have a small perf bonus over class binding
* fix removal of PropTypes import in production builds

Frustrating, but because rollup doesn't have an internal concept
of prod vs dev, it doesn't set NODE_ENV accordingly and babel
uses the same config for everything. So we are able to eliminate
the references to prop types, but the module import itself is not
being eliminated without this change.

* rollup cleanup

Now that we're testing on Node 8+ we don't need to use
Object.assign() anymore
* update sandbox to latest react, add webpack stuff for __VERSION__ alias

* add a new [data-styled-version] attr to styles

This will be hardcoded into the bundles at each release. Basically,
it allows multiple versions of styled components to peacefully coexist
on a page. There will still be a warning though since this isn't recommended.

* rename [data-styled-components] to [data-styled] to avoid legacy conflicts

styled components v3 and lower will still match against the newly
updated styled component versioned tags, so we'll change the primary
attribute so they're undetectable by legacy s-c

* temporarily disable jest-styled-components integration test

They'll need to adjust to the new data attribute and push out a
beta version before we can turn this back on.

* more obvious mock version in snapshots
This allows babel users to drop the element whitelist and save
some bytes.
* fix standalone browser build

something about the "umd" setting in recent versions of rollup
just doesn't work properly

* fix integration tests

* go away flow
* Implement lazy keyframes

- keyframes`` helper  now returns Keyframes model
- keyframes styles now inserting only with component rendering
- To get animation name use `.getName()` method
- some tests was changed to proper work with new `keyframes` helper

* Optimize keyframes interpolation
* add keyframes changes to CHANGELOG

* Add PR link

* adjust some wording

* Update CHANGELOG.md
They are no longer a thing in v16+
It's lighter and faster since its memoized. Saw some nice perf
gain in benchmarking.

before:

---Mount deep tree---
17.14 ±01.82 ms
(S/L) 13.06/04.08 ms

---Mount wide tree---
22.89 ±02.67 ms
(S/L) 16.91/05.98 ms

---Update dynamic styles---
23.47 ±05.14 ms
(S/L) 07.98/15.49 ms

after:

---Mount deep tree---
16.07 ±01.72 ms
(S/L) 12.03/04.05 ms

---Mount wide tree---
21.45 ±02.74 ms
(S/L) 15.59/05.85 ms

---Update dynamic styles---
22.49 ±05.28 ms
(S/L) 07.50/14.99 ms
Using the React-provided test renderer and test utilities.

I couldn't figure out how to deal with the innerRef tests yet, but
since that API is going away in one of my open PRs, I figured it
wasn't worth the time to get working.
(cherry picked from commit cf1e930)
quantizor and others added 28 commits October 8, 2018 14:50
* create macro

* add sourceType module when using babel.template

* babel.types needs to be passed down to visitors

* add tests

* add pureAnnotation visitor from babel-plugin-styled-components

* add test with require()

* export 'styled-components/macro'

* add css to macro

* add keyframes to macro

* update test snapshots

* allow to import all helpers from src/index.js

* add error when tags are not used with template literals

* add test : should allow all helpers exported from styled-components

* add injectGlobal to taggedTemplateImports

* add missing tests and refactor tests

* add typescript types

* add flow types

* replace injectGlobal by createGlobalStyle

* just use babel-plugin-styled-components and apply to the whole file

* update babel-plugin-styled-components to 1.8.0

* remove typescript files

* add comments and fix styling of code

* generate allowedImports from src/index.js

* Remove unnecessary test to check allowedImports

* move babel-plugin-styled-components to peerDependencies

* fix tests : add babel-plugin-styled-components to devDependencies

* move babel-plugin-styled-components to deps, with a lenient version

* add macro to files

* add changelog entry
* add warning when className prop is not used

* remove comment

* fix wording

* add changelog

* add tests
* fix createGlobalStyle HMR issue

* clear out the window cache when resetting styled context
Adding, e.g., className="foo   bar" caused the `classNameUseCheckInjector`
to build a selector with multiple dots (`.foo...bar`) which causes an error
in Chrome. This commit changes the classNames to be trimmed and excess spaces
removed before the selector is constructred
Latest release broke support for uppercase aria/data attrs.

This reverts commit af75481.
@quantizor quantizor merged commit 2b87a5f into master Oct 15, 2018
@quantizor quantizor deleted the develop branch October 15, 2018 20:32
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.

None yet