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

v11 #1600

Merged
merged 191 commits into from
Nov 12, 2020
Merged

v11 #1600

merged 191 commits into from
Nov 12, 2020

Conversation

emmatown
Copy link
Member

@emmatown emmatown commented Nov 2, 2019

IMPORTANT NOTE: This PR should not be merged right now.

Any PRs that should be in v11 should be based against this PR(the next branch). Once a PR is merged into the next branch, the Changesets release action will open PRs as it does for master doing prereleases which can be merged into this branch and will then be published to the next tag on npm.

closes #1606

@changeset-bot
Copy link

changeset-bot bot commented Nov 2, 2019

⚠️ No Changeset found

Latest commit: b99c44c

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions github-actions bot mentioned this pull request Nov 3, 2019
@emmatown emmatown added this to the v11 milestone Nov 4, 2019
* Match rules in declarations with component used as a selector

* Take specificity into account when matching styles

* add changesets

* fix flow errors
@github-actions github-actions bot mentioned this pull request Nov 4, 2019
Jake Ginnivan and others added 5 commits November 4, 2019 23:37
…ompilation (#1501)

* Restructured types to greatly reduce number of types created during compilation

BREAKING CHANGE: There are a few breaking changes, see below

* withTheme now infers types properly and may require removing the manually specified generic parameter
* The Theme generic parameter has been removed from a number of types exported from `@emotion/styled` and `@emotion/styled-base`.
* Introduced new CreateThemedStyled type which is exported from emotion-theming, use type to create your own themed `styled` export. See updated docs
* WithTheme should be imported from emotion-theming
* CreateStyledComponentExtrinsic, CreateStyledComponentIntrinsic and CreateStyledComponentBase all have been replaced with CreateStyledComponent

* Fixing tests

* Fixed a bunch of tests and improved TypeScript docs

* Updated a bunch of the TypeScript docs

* Removed WithTheme type, not sure it's usage and there is no tests

* Few small cleanups around styled-base

* Fixed tests in a few more packages

* Fixed serialise tests after changes in #1236

* Removed failing redundant test in sheet typescript tests.

It is failing with the same compilation error as the previous line, but formatting is causing the test failure

* Removed line with expected error, I am not sure the reason it should be failing.

* Need to bump the typescript version for styled-base for the union type test

* TypeScript tests passing

* Upgrade build image version to get newer version of yarn

* fix: styled component with static API

* Added changes in https://github.com/JakeGinnivan/emotion/pull/1/files to other functions with similar signatures

* fix: type issue where styled component passed in

* Add some additional tests around theming and fix them

* Restrict css function to css interpolation

* Fixed emotion-theming linting issue

* Reversed some incorrect type changes, withComponent has to include the previous components props otherwise styles on the original component may fail at runtime

* Fixed some accidently formatted package.json files

* Allowed theming of CreateStyled and StyledTags

* Restructured generic type params to make it explicit about what component props should transfer with withComponent and which shouldn't

Added tests

* Cleaned up some tests and added additional assertions

* Default the type of SpecificComponentProps in StyledComponent

* Reverted changes around ThemeProvider and added tests

* Added changeset

* Fixed ThemeProvider after revert

* Update tslint rules to fix error

* Fixed linting issues

* Fixed import path for css and clarified docs

* Added comment about fragment shorthand without babel being a typescript limitation

* Removed breaking change around some of the internal types

It's implementation detail user doesn't need to know

* Reverted changes around removing function interpolation from the  return types of function interpolation

* Renamed Omit to DistributiveOmit

To make it clear it's different to the inbuilt Omit

* Removed duplicate intersected type

* Renamed all usages of SFC to FC

* Fixed poor grammar

* Ignore lint rule rather than exporting type

* Updated generic constraints

* Reverted TypeScript version bump in create-emotion types

* Sync docs and test code

* Constrained Theme to extend {}

* Add tests for broken examples in #1298

* Fix typo

* Add test which verifies #1226 is fixed by type changes
* chore: tell Prettier we are using Flow

this gets rid of a lot of warnings and wrong auto formatting

* fix: make CreateStyled callable function polymorphic

This makes it possible to type styled functional components and enables a workaround for lack of tagged templates support of Flow

* chore: update type annotation to use new style

* fix: wrong formatting

* style: fix prettier issues

* chore: changeset

* fix: just import the @emotion/sheet type

* style: make prettier happy

* docs: added Flow types documentation page

* Update flow.mdx

* refactor: rename P to Props

# Conflicts:
#	packages/styled-base/src/utils.js
@codesandbox-ci
Copy link

codesandbox-ci bot commented Nov 5, 2019

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit b99c44c:

Sandbox Source
Emotion Configuration

emmatown and others added 3 commits November 6, 2019 08:32
* Tests are broken :( but it works

* Add displayName

* Use ref

* Remove stuff

* Update react-test-renderer

* Use useContext in more places

* Fix a Global insertion order bug

* Add a test

* Fix typo

* Remove passing the theme to the css prop, Global and ClassNames

* stuff

* stuff

* changes

* Add a test back

* Fix a thing

* Update stuff

* Update things

* Drop support for innerRef entirely

* Set correct peerDeps on react + upgrade react-related devDeps

* Fix tests

* Fix linting error

* Remove custom useContext flow types

* Fix flow error

* Fix layour effect input array to include serialized.name instead of whole serialized

* Add a changeset

* Add another changeset
@github-actions github-actions bot mentioned this pull request Nov 6, 2019
emmatown and others added 10 commits November 6, 2019 11:47
* Add missing #__PURE__ annotations

* Update nine-mugs-care.md
* Add stuff to babel plugin readme

* Refactor styled macro

* Refactor other macros

* WIP more refactoring

* Fix stuff

* WIP

* stuff

* WIP stuff

* More WIP stuff

* WIP

* Add a changeset

* Remove instances option and other things

* Fix some stuff

* A bunch of FlowFixMes

* Finish implementation and add a changeset

* Update more things

* Words

* Remove obselete snapshots

* Fix stuff

* Fix docs

* Fix things

* Fix a bug
* Change @emotion/styled-base to @emotion/styled/base

* Fix some stuff

* Fix some stuff

* Fix another thing

* Remove styled-base from CodeSandbox CI config

* Make @emotion/styled/base TS types working

* Restore flowtype tests for @emotion/styled/base

* Fix last reference to @emotion/styled-base

* fix some flow errors

* Brought back @emotion/styled-base, but throw a deprecation error at runtime

* fix styled Flow tests (#1615)

* fix flow type error

* Add changeset

* Update spotty-llamas-mate.md

* Update index.js

* Remove @emotion/styled-base from some changesets
Andarist and others added 17 commits October 18, 2020 13:00
* Upgrade chalk and escape-string-regexp

jest uses the new version of chalk without escape-string-regexp

* Remove changesets

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* Add support for the `as` prop in React Native related packages

* Do not forward the `as` prop by default

* Add changeset

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
# Conflicts:
#	.circleci/config.yml
#	babel.config.js
#	docs/css-prop.mdx
#	package.json
#	packages/babel-preset-css-prop/CHANGELOG.md
#	packages/babel-preset-css-prop/README.md
#	packages/babel-preset-css-prop/__tests__/__snapshots__/index.js.snap
#	packages/babel-preset-css-prop/__tests__/__snapshots__/options-are-used.js.snap
#	packages/babel-preset-css-prop/package.json
#	packages/babel-preset-css-prop/src/index.js
#	packages/core/CHANGELOG.md
#	packages/core/package.json
#	packages/core/src/index.js
#	packages/css/test/no-babel/index.test.js
#	packages/emotion-theming/package.json
#	packages/native/package.json
#	packages/primitives-core/package.json
#	packages/primitives/package.json
#	packages/primitives/test/emotion-primitives.test.js
#	packages/react/__tests__/automatic-dev-runtime.js
#	packages/react/__tests__/automatic-runtime.js
#	packages/react/__tests__/css.js
#	packages/react/__tests__/warnings.js
#	packages/react/jsx-dev-runtime/package.json
#	packages/react/jsx-runtime/package.json
#	packages/react/src/emotion-element.js
#	packages/react/src/jsx-dev-runtime.js
#	packages/react/src/jsx-runtime.js
#	packages/react/src/jsx.js
#	packages/styled-base/package.json
#	packages/styled/package.json
#	playgrounds/cra/package.json
#	playgrounds/razzle/package.json
#	removed-packages/jest-emotion/package.json
#	scripts/benchmarks/package.json
#	site/package.json
#	yarn.lock
# Conflicts:
#	docs/css-prop.mdx
#	packages/babel-plugin/README.md
)

* Remove `runtime` option from `@emotion/babel-preset-css-prop`

* Update .changeset/weak-pears-design.md

* Update packages/babel-preset-css-prop/src/index.js

Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
# Conflicts:
#	packages/babel-preset-css-prop/CHANGELOG.md
#	packages/babel-preset-css-prop/package.json
#	packages/babel-preset-css-prop/src/index.js
* Use experimental entrypoints in preconstruct

* Use newDistFilenames in preconstruct
@github-actions github-actions bot mentioned this pull request Nov 10, 2020
Andarist and others added 7 commits November 11, 2020 00:48
* Use `StyleSheet.create` in React Native

* Flatten the styles before passing them to `StyleSheet.create`

* Fix primitives tests

* Update snapshots

* Fix flow errors

* Add changeset

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* Emotion 11 post

* Apply suggestions from code review

* Update docs/emotion-11.mdx

* Fix docs build

* update changeset file

* Align changeset files to latest changes in the Emotion 11 post

Co-authored-by: Mitchell Hamilton <mitchell@hamil.town>
* Version Packages

* Reorder changelog entries

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
@Andarist Andarist merged commit fa97767 into master Nov 12, 2020
@Andarist Andarist deleted the next branch November 12, 2020 00:49
@ivanbanov
Copy link

ivanbanov commented Nov 12, 2020

Thank you for merging!

giphy (1)

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.

Emotion 11