diff --git a/.changeset/brave-rice-yawn.md b/.changeset/brave-rice-yawn.md
new file mode 100644
index 000000000..963f46ab9
--- /dev/null
+++ b/.changeset/brave-rice-yawn.md
@@ -0,0 +1,6 @@
+---
+'@emotion/eslint-plugin': major
+'eslint-plugin-emotion': major
+---
+
+Rename `eslint-plugin-emotion` to `@emotion/eslint-plugin`. Please replace `"plugins": ["emotion"]` with `"plugins": ["@emotion"]` and `emotion/` with `@emotion/` in your rules config in your ESLint config.
diff --git a/.changeset/clever-emus-watch.md b/.changeset/clever-emus-watch.md
index 660987951..b64492864 100644
--- a/.changeset/clever-emus-watch.md
+++ b/.changeset/clever-emus-watch.md
@@ -1,5 +1,5 @@
---
-'babel-plugin-emotion': minor
+'@emotion/babel-plugin': minor
'@emotion/babel-preset-css-prop': minor
---
diff --git a/.changeset/config.json b/.changeset/config.json
index 689f17f86..eadd77dce 100644
--- a/.changeset/config.json
+++ b/.changeset/config.json
@@ -8,6 +8,7 @@
"linked": [
[
"@emotion/core",
+ "@emotion/react",
"@emotion/styled",
"@emotion/styled-base",
"@emotion/cache",
@@ -15,14 +16,18 @@
"create-emotion",
"emotion",
"emotion-server",
+ "@emotion/server",
"create-emotion-server",
"babel-plugin-emotion",
+ "@emotion/babel-plugin",
"@emotion/babel-preset-css-prop",
"jest-emotion",
+ "@emotion/jest",
"@emotion/native",
"@emotion/primitives",
"@emotion/primitives-core",
"eslint-plugin-emotion",
+ "@emotion/eslint-plugin",
"emotion-theming"
]
],
diff --git a/.changeset/eleven-apes-cheer.md b/.changeset/eleven-apes-cheer.md
new file mode 100644
index 000000000..a0889706a
--- /dev/null
+++ b/.changeset/eleven-apes-cheer.md
@@ -0,0 +1,5 @@
+---
+'@emotion/jest': minor
+---
+
+Improve support for Enzyme's shallow rendering with the addition of the @emotion/jest/enzyme snapshot serializer
diff --git a/.changeset/flat-adults-add.md b/.changeset/flat-adults-add.md
index a837f6a63..48b3b2163 100644
--- a/.changeset/flat-adults-add.md
+++ b/.changeset/flat-adults-add.md
@@ -1,5 +1,5 @@
---
-'jest-emotion': patch
+'@emotion/jest': patch
---
Take specificity into account when matching styles
diff --git a/.changeset/four-cars-tell.md b/.changeset/four-cars-tell.md
index bd1a203ce..7294fa626 100644
--- a/.changeset/four-cars-tell.md
+++ b/.changeset/four-cars-tell.md
@@ -1,12 +1,12 @@
---
-'@emotion/core': major
+'@emotion/react': major
'@emotion/styled': major
---
Reworked TypeScript definitions so it's easier to provide a type for Theme. Instead of creating custom instances (like before) you can augment builtin Theme interface like this:
```ts
-declare module '@emotion/core' {
+declare module '@emotion/react' {
export interface Theme {
primaryColor: string
secondaryColor: string
diff --git a/.changeset/giant-oranges-impress.md b/.changeset/giant-oranges-impress.md
index f80d9a8dd..90a3adc17 100644
--- a/.changeset/giant-oranges-impress.md
+++ b/.changeset/giant-oranges-impress.md
@@ -1,5 +1,5 @@
---
-'babel-plugin-emotion': major
+'@emotion/babel-plugin': major
'@emotion/babel-preset-css-prop': major
---
diff --git a/.changeset/grumpy-news-wonder.md b/.changeset/grumpy-news-wonder.md
new file mode 100644
index 000000000..f22caaf8f
--- /dev/null
+++ b/.changeset/grumpy-news-wonder.md
@@ -0,0 +1,6 @@
+---
+'@emotion/babel-plugin': major
+'babel-plugin-emotion': major
+---
+
+Rename `babel-plugin-emotion` to `@emotion/babel-plugin`. Please replace `"plugins": ["emotion"]` with `"plugins": ["@emotion"]` in your Babel config.
diff --git a/.changeset/large-snakes-ring.md b/.changeset/large-snakes-ring.md
index 8e90494d7..d4ccc025c 100644
--- a/.changeset/large-snakes-ring.md
+++ b/.changeset/large-snakes-ring.md
@@ -1,5 +1,5 @@
---
-'babel-plugin-emotion': minor
+'@emotion/babel-plugin': minor
'@emotion/babel-preset-css-prop': minor
---
diff --git a/.changeset/lazy-elephants-stare.md b/.changeset/lazy-elephants-stare.md
index ea8a1e15a..dd2a95c2f 100644
--- a/.changeset/lazy-elephants-stare.md
+++ b/.changeset/lazy-elephants-stare.md
@@ -1,5 +1,5 @@
---
-'@emotion/core': patch
+'@emotion/react': patch
'@emotion/serialize': patch
---
diff --git a/.changeset/light-mice-relate.md b/.changeset/light-mice-relate.md
index 34ab07455..d61cb57be 100644
--- a/.changeset/light-mice-relate.md
+++ b/.changeset/light-mice-relate.md
@@ -1,5 +1,5 @@
---
-'babel-plugin-emotion': patch
+'@emotion/babel-plugin': patch
---
Avoid transpiling vanilla emotion calls in already transpiled code to avoid double labels and such
diff --git a/.changeset/long-apes-admire/changes.json b/.changeset/long-apes-admire/changes.json
index a07e1e459..7e72dcf94 100644
--- a/.changeset/long-apes-admire/changes.json
+++ b/.changeset/long-apes-admire/changes.json
@@ -13,7 +13,7 @@
"dependencies": ["@emotion/serialize"]
},
{
- "name": "@emotion/core",
+ "name": "@emotion/react",
"type": "patch",
"dependencies": [
"@emotion/css",
diff --git a/.changeset/lovely-owls-remember.md b/.changeset/lovely-owls-remember.md
index 55e45374f..9029ae977 100644
--- a/.changeset/lovely-owls-remember.md
+++ b/.changeset/lovely-owls-remember.md
@@ -1,5 +1,5 @@
---
-'@emotion/core': minor
+'@emotion/react': minor
---
Support functions in arrays passed to css prop and Global's styles prop. This allows for composition of theme-accepting functions.
diff --git a/.changeset/mean-deers-confess.md b/.changeset/mean-deers-confess.md
index f7a14ca24..d2c99fce7 100644
--- a/.changeset/mean-deers-confess.md
+++ b/.changeset/mean-deers-confess.md
@@ -1,5 +1,5 @@
---
-'jest-emotion': major
+'@emotion/jest': major
---
Added the `T` parameter to the `Matchers` interface in the TypeScript definitions to make this module compatible with `@types/jest@^24.0.20`.
diff --git a/.changeset/modern-grapes-obey.md b/.changeset/modern-grapes-obey.md
index 9577dc879..101947bfe 100644
--- a/.changeset/modern-grapes-obey.md
+++ b/.changeset/modern-grapes-obey.md
@@ -1,5 +1,5 @@
---
-'babel-plugin-emotion': major
+'@emotion/babel-plugin': major
---
Drop Babel 6 support
diff --git a/.changeset/moody-stingrays-sort.md b/.changeset/moody-stingrays-sort.md
index c36050960..a2b998262 100644
--- a/.changeset/moody-stingrays-sort.md
+++ b/.changeset/moody-stingrays-sort.md
@@ -1,5 +1,5 @@
---
-'@emotion/core': minor
+'@emotion/react': minor
---
-`Global` imported from macro entry (`@emotion/core/macro`) gets source maps generated now when inline css-less expression is used as value of the `styles` prop.
+`Global` imported from macro entry (`@emotion/react/macro`) gets source maps generated now when inline css-less expression is used as value of the `styles` prop.
diff --git a/.changeset/neat-ligers-film.md b/.changeset/neat-ligers-film.md
index dfcc34ce2..febfb48b4 100644
--- a/.changeset/neat-ligers-film.md
+++ b/.changeset/neat-ligers-film.md
@@ -1,5 +1,5 @@
---
-'babel-plugin-emotion': patch
+'@emotion/babel-plugin': patch
---
Fix issue with not updating referenced import when bailing out on already transpiled vanilla emotion nodes (a regression introduced in #1602)
diff --git a/.changeset/nervous-clouds-brush.md b/.changeset/nervous-clouds-brush.md
new file mode 100644
index 000000000..2641f4514
--- /dev/null
+++ b/.changeset/nervous-clouds-brush.md
@@ -0,0 +1,6 @@
+---
+'@emotion/react': major
+'@emotion/core': major
+---
+
+Rename `@emotion/core` to `@emotion/react`. Please change any imports of `@emotion/core` to import `@emotion/react` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`.
diff --git a/.changeset/nine-mugs-care.md b/.changeset/nine-mugs-care.md
index 39406a255..37d54a5f5 100644
--- a/.changeset/nine-mugs-care.md
+++ b/.changeset/nine-mugs-care.md
@@ -1,5 +1,5 @@
---
-'@emotion/core': patch
+'@emotion/react': patch
'@emotion/is-prop-valid': patch
'@emotion/serialize': patch
---
diff --git a/.changeset/odd-flowers-breathe.md b/.changeset/odd-flowers-breathe.md
new file mode 100644
index 000000000..b9d52adf8
--- /dev/null
+++ b/.changeset/odd-flowers-breathe.md
@@ -0,0 +1,6 @@
+---
+'@emotion/css': major
+'create-emotion': major
+---
+
+Move create `create-emotion` to `@emotion/css/create-instance`. Please change any imports of `create-emotion` to import `@emotion/css/create-instance` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`.
diff --git a/.changeset/polite-impalas-doubt.md b/.changeset/polite-impalas-doubt.md
index 5f665d514..b306d0beb 100644
--- a/.changeset/polite-impalas-doubt.md
+++ b/.changeset/polite-impalas-doubt.md
@@ -1,5 +1,5 @@
---
-'babel-plugin-emotion': major
+'@emotion/babel-plugin': major
'@emotion/babel-preset-css-prop': major
---
diff --git a/.changeset/purple-teachers-clean.md b/.changeset/purple-teachers-clean.md
new file mode 100644
index 000000000..893b3fc6b
--- /dev/null
+++ b/.changeset/purple-teachers-clean.md
@@ -0,0 +1,6 @@
+---
+'@emotion/jest': major
+'jest-emotion': major
+---
+
+Rename `jest-emotion` to `@emotion/jest`. Please replace `"snapshotSerializers": ["jest-emotion"]` with `"snapshotSerializers": ["@emotion/jest"]` if you're using the snapshot serializer. Also replace any imports of `jest-emotion` with `@emotion/jest` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`.
diff --git a/.changeset/rare-books-own.md b/.changeset/rare-books-own.md
index a687a7257..5b426e316 100644
--- a/.changeset/rare-books-own.md
+++ b/.changeset/rare-books-own.md
@@ -1,13 +1,15 @@
---
-'babel-plugin-emotion': major
+'@emotion/babel-plugin': major
'@emotion/cache': major
-'@emotion/core': major
+'@emotion/react': major
'create-emotion': major
'create-emotion-server': major
'@emotion/css': major
'emotion': major
'emotion-server': major
+'@emotion/server': major
'emotion-theming': major
+'@emotion/jest': major
'jest-emotion': major
'@emotion/native': major
'@emotion/primitives': major
diff --git a/.changeset/rare-toes-grow.md b/.changeset/rare-toes-grow.md
index c5f1d891e..f1271495e 100644
--- a/.changeset/rare-toes-grow.md
+++ b/.changeset/rare-toes-grow.md
@@ -1,5 +1,5 @@
---
-'jest-emotion': patch
+'@emotion/jest': patch
---
Match rules in declarations with component used as a selector
diff --git a/.changeset/rich-hotels-sing.md b/.changeset/rich-hotels-sing.md
index 092c446ef..44f967083 100644
--- a/.changeset/rich-hotels-sing.md
+++ b/.changeset/rich-hotels-sing.md
@@ -1,5 +1,5 @@
---
-'@emotion/core': patch
+'@emotion/react': patch
---
Fix issue with published TypeScript test files augmenting Theme interface.
diff --git a/.changeset/rotten-adults-guess.md b/.changeset/rotten-adults-guess.md
new file mode 100644
index 000000000..0f2e8256f
--- /dev/null
+++ b/.changeset/rotten-adults-guess.md
@@ -0,0 +1,6 @@
+---
+'@emotion/server': major
+'emotion-server': major
+---
+
+Rename `emotion-server` to `@emotion/server`. Please change any imports of `emotion-server` to import `@emotion/server` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`.
diff --git a/.changeset/shaggy-cheetahs-vanish.md b/.changeset/shaggy-cheetahs-vanish.md
new file mode 100644
index 000000000..b4003deb5
--- /dev/null
+++ b/.changeset/shaggy-cheetahs-vanish.md
@@ -0,0 +1,6 @@
+---
+'@emotion/css': major
+'emotion': major
+---
+
+Rename `emotion` to `@emotion/css`. Please change any imports of `emotion` to import `@emotion/css` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`.
diff --git a/.changeset/silver-bulldogs-beg.md b/.changeset/silver-bulldogs-beg.md
index 06889d664..bae2268ac 100644
--- a/.changeset/silver-bulldogs-beg.md
+++ b/.changeset/silver-bulldogs-beg.md
@@ -1,5 +1,5 @@
---
-'eslint-plugin-emotion': minor
+'@emotion/eslint-plugin': minor
---
Respect `syntax-preference` rule when using css prop.
diff --git a/.changeset/smooth-carpets-matter.md b/.changeset/smooth-carpets-matter.md
index f7d011e1c..29a9cd0dd 100644
--- a/.changeset/smooth-carpets-matter.md
+++ b/.changeset/smooth-carpets-matter.md
@@ -1,18 +1,20 @@
---
-'babel-plugin-emotion': major
-'@emotion/core': major
+'@emotion/babel-plugin': major
+'@emotion/react': major
'@emotion/css': major
---
-Removed `@emotion/css` - it's main purpose was to allow `css` to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. `@emotion/core/macro` has been added to account for this use case and appropriate changes has been made to `babel-plugin-emotion` to facilitate those changes.
+Removed default export from `@emotion/css` - it's main purpose was to allow `css` to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. `@emotion/react/macro` has been added to account for this use case and appropriate changes has been made to `@emotion/babel-plugin` to facilitate those changes.
-If you have used `@emotion/css` directly (it was always reexported from `@emotion/core`) or you have been using its macro then you should update your code like this:
+If you have used `@emotion/css` directly (it was always reexported from `@emotion/react`) or you have been using its macro then you should update your code like this:
```diff
-import css from '@emotion/css'
-+import { css } from '@emotion/core'
++import { css } from '@emotion/react'
// or
-import css from '@emotion/css/macro'
-+import { css } from '@emotion/core/macro'
++import { css } from '@emotion/react/macro'
```
+
+You can also use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin` to do this for you.
diff --git a/.changeset/soft-moose-attend.md b/.changeset/soft-moose-attend.md
new file mode 100644
index 000000000..b94c1edd9
--- /dev/null
+++ b/.changeset/soft-moose-attend.md
@@ -0,0 +1,6 @@
+---
+'@emotion/server': major
+'create-emotion-server': major
+---
+
+Move `create-emotion-server` to `@emotion/server/create-instance`. Please change any imports of `create-emotion-server` to import `@emotion/server/create-instance` or use the `@emotion/pkg-renaming` ESLint rule from `@emotion/eslint-plugin`.
diff --git a/.changeset/sour-poets-move.md b/.changeset/sour-poets-move.md
index e11178983..9382886e9 100644
--- a/.changeset/sour-poets-move.md
+++ b/.changeset/sour-poets-move.md
@@ -1,5 +1,5 @@
---
-'@emotion/core': patch
+'@emotion/react': patch
---
-Warn if @emotion/core is initialized more than once in the same development environment.
+Warn if @emotion/react is initialized more than once in the same development environment.
diff --git a/.changeset/spotty-llamas-mate.md b/.changeset/spotty-llamas-mate.md
index f78a58baa..ee3e8fe99 100644
--- a/.changeset/spotty-llamas-mate.md
+++ b/.changeset/spotty-llamas-mate.md
@@ -1,5 +1,5 @@
---
-'babel-plugin-emotion': major
+'@emotion/babel-plugin': major
'@emotion/styled-base': major
'@emotion/styled': major
---
diff --git a/.changeset/stupid-radios-draw.md b/.changeset/stupid-radios-draw.md
index 2c8893745..494b49b31 100644
--- a/.changeset/stupid-radios-draw.md
+++ b/.changeset/stupid-radios-draw.md
@@ -1,6 +1,6 @@
---
-'babel-plugin-emotion': minor
+'@emotion/babel-plugin': minor
'@emotion/babel-preset-css-prop': minor
---
-Added the `importMap` option which allows you to tell babel-plugin-emotion what imports it should look at to determine what it should transform so if you re-export Emotion's exports, you can still use the Babel transforms
+Added the `importMap` option which allows you to tell @emotion/babel-plugin what imports it should look at to determine what it should transform so if you re-export Emotion's exports, you can still use the Babel transforms
diff --git a/.changeset/two-baboons-mate.md b/.changeset/two-baboons-mate.md
index 29614302b..7f85bc1ef 100644
--- a/.changeset/two-baboons-mate.md
+++ b/.changeset/two-baboons-mate.md
@@ -1,5 +1,5 @@
---
-'@emotion/core': major
+'@emotion/react': major
'emotion-theming': major
'@emotion/native': major
'@emotion/primitives-core': major
diff --git a/.changeset/two-kiwis-give.md b/.changeset/two-kiwis-give.md
index 2f4eaa3c8..d78a9c4a2 100644
--- a/.changeset/two-kiwis-give.md
+++ b/.changeset/two-kiwis-give.md
@@ -1,5 +1,5 @@
---
-'babel-plugin-emotion': minor
+'@emotion/babel-plugin': minor
---
`Global` gets handled by the Babel plugin now - this gives inline css-less expressions source maps.
diff --git a/.changeset/violet-spiders-itch.md b/.changeset/violet-spiders-itch.md
new file mode 100644
index 000000000..ae923d112
--- /dev/null
+++ b/.changeset/violet-spiders-itch.md
@@ -0,0 +1,5 @@
+---
+'@emotion/eslint-plugin': minor
+---
+
+Add @emotion/pkg-renaming rule for Emotion 11 migration
diff --git a/.changeset/weak-islands-confess.md b/.changeset/weak-islands-confess.md
index 7442c94c9..34b866e87 100644
--- a/.changeset/weak-islands-confess.md
+++ b/.changeset/weak-islands-confess.md
@@ -1,6 +1,6 @@
---
-'@emotion/core': major
+'@emotion/react': major
'emotion-theming': major
---
-`emotion-theming` has been removed and all its exports were moved to `@emotion/core` package. Please import them like this `import { useTheme, ThemeProvider, withTheme } from '@emotion/core'` from now on.
+`emotion-theming` has been removed and all its exports were moved to `@emotion/react` package. Please import them like this `import { useTheme, ThemeProvider, withTheme } from '@emotion/react'` from now on.
diff --git a/.codesandbox/ci.json b/.codesandbox/ci.json
index 739e4819c..14352fc9f 100644
--- a/.codesandbox/ci.json
+++ b/.codesandbox/ci.json
@@ -1,14 +1,4 @@
{
- "packages": [
- "packages/babel-plugin-emotion",
- "packages/cache",
- "packages/core",
- "packages/create-emotion",
- "packages/css",
- "packages/emotion",
- "packages/emotion-theming",
- "packages/serialize",
- "packages/styled"
- ],
+ "packages": ["packages/*"],
"sandboxes": ["pk1qjqpw67"]
}
diff --git a/.github/ISSUE_TEMPLATE/--bug-report.md b/.github/ISSUE_TEMPLATE/--bug-report.md
index 2e8b9e6dc..12495f83e 100644
--- a/.github/ISSUE_TEMPLATE/--bug-report.md
+++ b/.github/ISSUE_TEMPLATE/--bug-report.md
@@ -41,7 +41,7 @@ assignees: ''
**Environment information:**
-
+
- `react` version:
-- `emotion` version:
+- `@emotion/react` version:
diff --git a/README.md b/README.md
index f5933c8ca..d68b359a9 100644
--- a/README.md
+++ b/README.md
@@ -37,12 +37,12 @@ Frequently viewed docs:
Get up and running with a single import.
```bash
-npm install --save @emotion/core
+npm install --save @emotion/react
```
```jsx
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
let SomeComponent = props => {
return (
@@ -60,7 +60,7 @@ let SomeComponent = props => {
The babel plugin is not required, but enables some optimizations and customizations that could be beneficial for your project.
-Look here 👉 _[emotion babel plugin feature table and documentation](https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-emotion)_
+Look here 👉 _[emotion babel plugin feature table and documentation](https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin)_
### Demo Sandbox
diff --git a/babel.config.js b/babel.config.js
index 95001ffae..50a4395ad 100644
--- a/babel.config.js
+++ b/babel.config.js
@@ -14,14 +14,14 @@ module.exports = api => {
((!filename.includes('no-babel') &&
needsBabelPluginEmotion(filename)) ||
filename.includes(path.join('__tests__', 'babel'))),
- plugins: ['babel-plugin-emotion']
+ plugins: ['@emotion/babel-plugin']
},
{
test: filename =>
filename &&
filename.includes('source-map') &&
needsBabelPluginEmotion(filename),
- plugins: [['babel-plugin-emotion', { sourceMap: true }]]
+ plugins: [['@emotion/babel-plugin', { sourceMap: true }]]
}
]
}
diff --git a/docs/babel-macros.mdx b/docs/babel-macros.mdx
index f2d519578..9831e1d0c 100644
--- a/docs/babel-macros.mdx
+++ b/docs/babel-macros.mdx
@@ -8,10 +8,10 @@ All of Emotion's Babel Macros are available by adding `/macro` to the end of the
```jsx
import styled from '@emotion/styled/macro'
-import { jsx, css, Global, keyframes } from '@emotion/core/macro'
-import { css, keyframes, injectGlobal } from 'emotion/macro'
+import { jsx, css, Global, keyframes } from '@emotion/react/macro'
+import { css, keyframes, injectGlobal } from '@emotion/css/macro'
```
> Note
>
-> There are some optimisations which aren't possible with Babel Macros, so if it's possible, we still recommend using babel-plugin-emotion
+> There are some optimisations which aren't possible with Babel Macros, so if it's possible, we still recommend using @emotion/babel-plugin
diff --git a/docs/babel.mdx b/docs/babel.mdx
index 4ea2e9972..a15cd4f8f 100644
--- a/docs/babel.mdx
+++ b/docs/babel.mdx
@@ -2,7 +2,7 @@
title: 'Babel Plugin'
---
-`babel-plugin-emotion` is highly recommended. All of the options that can be provided to `babel-plugin-emotion` are documented in [`babel-plugin-emotion`'s README](https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-emotion).
+`@emotion/babel-plugin` is highly recommended. All of the options that can be provided to `@emotion/babel-plugin` are documented in [`@emotion/babel-plugin`'s README](https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin).
### Install
diff --git a/docs/cache-provider.mdx b/docs/cache-provider.mdx
index 8691993bc..7f165dc1c 100644
--- a/docs/cache-provider.mdx
+++ b/docs/cache-provider.mdx
@@ -7,7 +7,7 @@ It can be useful to customize emotion's options - i.e. to add custom Stylis plug
```jsx
// @live
/** @jsx jsx */
-import { CacheProvider, jsx, css } from '@emotion/core'
+import { CacheProvider, jsx, css } from '@emotion/react'
import createCache from '@emotion/cache'
const myCache = createCache({
diff --git a/docs/class-names.mdx b/docs/class-names.mdx
index 8e60b4813..884ea69e0 100644
--- a/docs/class-names.mdx
+++ b/docs/class-names.mdx
@@ -6,7 +6,7 @@ It can be useful to create a className that is not passed to a component, for ex
```jsx
// @live
-import { ClassNames } from '@emotion/core'
+import { ClassNames } from '@emotion/react'
// this might be a component from npm that accepts a wrapperClassName prop
let SomeComponent = props => (
diff --git a/docs/composition.mdx b/docs/composition.mdx
index d0ff2d9f9..b1eef27a9 100644
--- a/docs/composition.mdx
+++ b/docs/composition.mdx
@@ -7,7 +7,7 @@ Composition is one of the most powerful and useful patterns in Emotion. You can
```jsx
// @live
/** @jsx jsx */
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
const base = css`
color: hotpink;
@@ -55,7 +55,7 @@ With Emotion though, you can create styles and combine them.
```jsx
// @live
/** @jsx jsx */
-import { css, jsx } from '@emotion/core'
+import { css, jsx } from '@emotion/react'
const danger = css`
color: red;
diff --git a/docs/css-prop.mdx b/docs/css-prop.mdx
index a2745fc5c..a0d1dd251 100644
--- a/docs/css-prop.mdx
+++ b/docs/css-prop.mdx
@@ -47,11 +47,11 @@ Similar to a comment containing linter configuration, this configures the [jsx b
> [JSX Pragma Babel Documentation](https://babeljs.io/docs/en/babel-plugin-transform-react-jsx#pragma)
-#### Import the `jsx` function from `@emotion/core`
+#### Import the `jsx` function from `@emotion/react`
```js
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
```
Note that excluding this will cause your css to render as `[Object Object]`.
@@ -67,7 +67,7 @@ The `css` prop accepts object styles directly and does not require an additional
```jsx
// @live
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
render(
Note:
>
-> **`css` from `@emotion/core` does not return the computed class name string.** The function returns an object containing the computed name and flattened styles. The returned object is understood by emotion at a low level and can be composed with other emotion based styles inside of the `css` prop, other `css` calls, or the `styled` API.
+> **`css` from `@emotion/react` does not return the computed class name string.** The function returns an object containing the computed name and flattened styles. The returned object is understood by emotion at a low level and can be composed with other emotion based styles inside of the `css` prop, other `css` calls, or the `styled` API.
You can also pass in your css as variables, which allows for composition (read more about this [here](https://emotion.sh/docs/composition)).
@@ -128,7 +128,7 @@ The `P` component in this example has its default styles overridden in the `Arti
```js
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
const P = props => (
(
diff --git a/docs/install.mdx b/docs/install.mdx
index 3bc69fda7..e5208bd84 100644
--- a/docs/install.mdx
+++ b/docs/install.mdx
@@ -2,16 +2,16 @@
title: 'Install'
---
-There are lots of ways to use Emotion, if you're using React, the easiest way to get started is to use the [`@emotion/core` package](/packages/@emotion/core). If you're not using React, you should use [the `emotion` package](#vanilla).
+There are lots of ways to use Emotion, if you're using React, the easiest way to get started is to use the [`@emotion/react` package](/packages/@emotion/react). If you're not using React, you should use [the `emotion` package](#vanilla).
```bash
-yarn add @emotion/core
+yarn add @emotion/react
```
or if you prefer npm
```bash
-npm install --save @emotion/core
+npm install --save @emotion/react
```
To use it, import what you need, for example use [the css prop](/docs/css-prop.md) to create class names with styles.
@@ -20,7 +20,7 @@ To use it, import what you need, for example use [the css prop](/docs/css-prop.m
// @live
// this comment tells babel to convert jsx to calls to a function called jsx instead of React.createElement
/** @jsx jsx */
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
const style = css`
color: hotpink;
@@ -52,7 +52,7 @@ render(
`styled` is a way to create React components that have styles attached to them.
```bash
-# assuming you already have @emotion/core installed
+# assuming you already have @emotion/react installed
yarn add @emotion/styled
```
@@ -73,7 +73,7 @@ const Button = styled.button`
render()
```
-## With [`babel-plugin-emotion`](/packages/babel-plugin-emotion)
+## With [`@emotion/babel-plugin`](/packages/@emotion/babel-plugin)
> Note:
>
@@ -82,13 +82,13 @@ render()
Emotion has an optional [Babel](https://babeljs.io/) plugin that optimizes styles by compressing and hoisting them and creates a better developer experience with source maps and labels.
```bash
-yarn add --dev babel-plugin-emotion
+yarn add --dev @emotion/babel-plugin
```
or if you prefer npm
```bash
-npm install --save-dev babel-plugin-emotion
+npm install --save-dev @emotion/babel-plugin
```
## .babelrc
@@ -97,7 +97,7 @@ _`"emotion"` must be the **first plugin** in your babel config `plugins` list._
```json
{
- "plugins": ["emotion"]
+ "plugins": ["@emotion"]
}
```
@@ -107,38 +107,23 @@ If you are using Babel's env option emotion must also be first for each environm
{
"env": {
"production": {
- "plugins": ["emotion", ...otherBabelPlugins]
+ "plugins": ["@emotion", ...otherBabelPlugins]
}
},
- "plugins": ["emotion"]
-}
-```
-
-## Recommended config
-
-```json
-{
- "env": {
- "production": {
- "plugins": ["emotion"]
- },
- "development": {
- "plugins": [["emotion", { "sourceMap": true }]]
- }
- }
+ "plugins": ["@emotion"]
}
```
# Vanilla
-If you're not using React, you can use vanilla Emotion from the `emotion` package. Most of the documentation here focuses on the React-specific version of Emotion, but most of the concepts in the React-specific version also apply to vanilla Emotion.
+If you're not using React, you can use vanilla Emotion from the `@emotion/css` package. Most of the documentation here focuses on the React-specific version of Emotion, but most of the concepts in the React-specific version also apply to vanilla Emotion.
```bash
-yarn add emotion
+yarn add @emotion/css
```
```jsx
-import { css } from 'emotion'
+import { css } from '@emotion/css'
const app = document.getElementById('root')
const myClassName = css`
diff --git a/docs/instances.mdx b/docs/instances.mdx
deleted file mode 100644
index 631ea2b5e..000000000
--- a/docs/instances.mdx
+++ /dev/null
@@ -1,7 +0,0 @@
----
-title: 'Instances'
----
-
-emotion allows creating custom instances of emotion to provide special options. Instances are created with the [`create-emotion`](https://github.com/emotion-js/emotion/tree/master/packages/create-emotion) and [`create-emotion-server`](https://github.com/emotion-js/emotion/tree/master/packages/create-emotion-server) packages which create instances of `emotion` and `emotion-server` respectively. They are documented in their own respective READMEs linked above.
-
-The instances' paths should be added as an option to `babel-plugin-emotion` [as shown in `babel-plugin-emotion`'s README](https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-emotion#instances).
diff --git a/docs/introduction.mdx b/docs/introduction.mdx
index d3287a173..c2d9f989f 100644
--- a/docs/introduction.mdx
+++ b/docs/introduction.mdx
@@ -11,12 +11,12 @@ There are two primary methods of using Emotion. The first is framework agnostic
### Framework Agnostic
```bash
-npm i emotion
+npm i @emotion/css
```
-**[`emotion` documentation](https://emotion.sh/docs/emotion)**
+**[`@emotion/css` documentation](https://emotion.sh/docs/@emotion/css)**
-The [emotion](https://www.npmjs.com/package/emotion) package is framework agnostic and the simplest way to use Emotion.
+The [@emotion/css](https://www.npmjs.com/package/@emotion/css) package is framework agnostic and the simplest way to use Emotion.
- Requires no additional setup, babel plugin, or other config changes.
@@ -30,7 +30,7 @@ The [emotion](https://www.npmjs.com/package/emotion) package is framework agnost
```jsx
// @live
-import { css, cx } from 'emotion'
+import { css, cx } from '@emotion/css'
const color = 'white'
@@ -54,10 +54,10 @@ render(
### React
```bash
-npm i @emotion/core
+npm i @emotion/react
```
-The ["@emotion/core"](https://www.npmjs.com/package/@emotion/core) package requires React and is recommended for users of that framework if possible.
+The ["@emotion/react"](https://www.npmjs.com/package/@emotion/react) package requires React and is recommended for users of that framework if possible.
- Best when using React with a build environment that can be configured.
@@ -76,13 +76,13 @@ The ["@emotion/core"](https://www.npmjs.com/package/@emotion/core) package requi
- ESLint plugins available to ensure proper patterns and configuration are set.
-**[`@emotion/core` css prop documentation](/docs/css-prop.md)**
+**[`@emotion/react` css prop documentation](/docs/css-prop.md)**
```jsx
// @live
// this comment tells babel to convert jsx to calls to a function called jsx instead of React.createElement
/** @jsx jsx */
-import { css, jsx } from '@emotion/core'
+import { css, jsx } from '@emotion/react'
const color = 'white'
@@ -104,7 +104,7 @@ render(
```
```bash
-npm i @emotion/styled @emotion/core
+npm i @emotion/styled @emotion/react
```
The [@emotion/styled](https://www.npmjs.com/package/@emotion/styled) package is for those who prefer to use the `styled.div` style API for creating components.
diff --git a/docs/keyframes.mdx b/docs/keyframes.mdx
index 49e7a951c..916267ba4 100644
--- a/docs/keyframes.mdx
+++ b/docs/keyframes.mdx
@@ -2,12 +2,12 @@
title: 'Keyframes'
---
-You can define animations using the `keyframes` helper from `@emotion/core`. `keyframes` takes in a css keyframe definition and returns an object you can use in styles. You can use strings or objects just like `css`.
+You can define animations using the `keyframes` helper from `@emotion/react`. `keyframes` takes in a css keyframe definition and returns an object you can use in styles. You can use strings or objects just like `css`.
```jsx
// @live
/** @jsx jsx */
-import { jsx, css, keyframes } from '@emotion/core'
+import { jsx, css, keyframes } from '@emotion/react'
const bounce = keyframes`
from, 20%, 53%, 80%, to {
diff --git a/docs/labels.mdx b/docs/labels.mdx
index f051613c8..f94de377e 100644
--- a/docs/labels.mdx
+++ b/docs/labels.mdx
@@ -2,12 +2,12 @@
title: 'Labels'
---
-Emotion adds a css property called `label`, the value of it is appended to the end of the class name, so it's more readable than a hash. `babel-plugin-emotion` adds these labels automatically based on the variable name and other information, so they don't need to be manually specified.
+Emotion adds a css property called `label`, the value of it is appended to the end of the class name, so it's more readable than a hash. `@emotion/babel-plugin` adds these labels automatically based on the variable name and other information, so they don't need to be manually specified.
```jsx
// @live
/** @jsx jsx */
-import { css, jsx } from '@emotion/core'
+import { css, jsx } from '@emotion/react'
let style = css`
color: hotpink;
diff --git a/docs/media-queries.mdx b/docs/media-queries.mdx
index 67ca85d04..6528d5bb6 100644
--- a/docs/media-queries.mdx
+++ b/docs/media-queries.mdx
@@ -7,7 +7,7 @@ Using media queries in emotion works just like using media queries in regular cs
```jsx
// @live
/** @jsx jsx */
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
render(
Note:
>
-> `babel-plugin-emotion` is required for source maps
+> `@emotion/babel-plugin` is required for source maps
-emotion supports source maps for styles authored in javascript.
+Emotion supports source maps for styles authored in JavaScript.
![source-map-demo](https://user-images.githubusercontent.com/662750/30778580-78fbeae4-a096-11e7-82e1-120b6984e875.gif)
Required For Source Maps:
-1. `babel-plugin-emotion` must be in your Babel setup. [[documentation]](./install.md)
+1. `@emotion/babel-plugin` must be in your Babel setup. [[documentation]](./install.md)
2. `process.env.NODE_ENV` must be any value except `"production"`
> Note:
>
-> Source maps are on by default in babel-plugin-emotion but they will be removed in production builds
+> Source maps are on by default in @emotion/babel-plugin but they will be removed in production builds
diff --git a/docs/ssr.mdx b/docs/ssr.mdx
index 56e470066..e0a6b1811 100644
--- a/docs/ssr.mdx
+++ b/docs/ssr.mdx
@@ -6,7 +6,7 @@ Server side rendering in Emotion 10 has two approaches, each with their own trad
## Default Approach
-Server side rendering works out of the box in Emotion 10 and above if you're only using `@emotion/core` and `@emotion/styled`. This means you can call React's [`renderToString`](https://reactjs.org/docs/react-dom-server.html#rendertostring) or [`renderToNodeStream`](https://reactjs.org/docs/react-dom-server.html#rendertonodestream) methods directly without any extra configuration.
+Server side rendering works out of the box in Emotion 10 and above if you're only using `@emotion/react` and `@emotion/styled`. This means you can call React's [`renderToString`](https://reactjs.org/docs/react-dom-server.html#rendertostring) or [`renderToNodeStream`](https://reactjs.org/docs/react-dom-server.html#rendertonodestream) methods directly without any extra configuration.
```jsx
import { renderToString } from 'react-dom/server'
@@ -36,9 +36,9 @@ You can also use the advanced integration, it requires more work but does not ha
### On server
```jsx
-import { CacheProvider } from '@emotion/core'
+import { CacheProvider } from '@emotion/react'
import { renderToString } from 'react-dom/server'
-import createEmotionServer from 'create-emotion-server'
+import createEmotionServer from '@emotion/server/create-instance'
import createCache from '@emotion/cache'
const cache = createCache()
@@ -97,7 +97,7 @@ This returns a string of html that inlines the critical css required right befor
```jsx
import { renderToString } from 'react-dom/server'
-import { renderStylesToString } from 'emotion-server'
+import { renderStylesToString } from '@emotion/server'
import App from './App'
const html = renderStylesToString(renderToString())
@@ -109,7 +109,7 @@ This returns a [Node Stream Writable](https://nodejs.org/api/stream.html#stream_
```jsx
import { renderToNodeStream } from 'react-dom/server'
-import { renderStylesToNodeStream } from 'emotion-server'
+import { renderStylesToNodeStream } from '@emotion/server'
import App from './App'
const stream = renderToNodeStream().pipe(renderStylesToNodeStream())
@@ -121,7 +121,7 @@ This returns an object with the properties `html`, `ids` and `css`. It removes u
```jsx
import { renderToString } from 'react-dom/server'
-import { extractCritical } from 'emotion-server'
+import { extractCritical } from '@emotion/server'
import App from './App'
const { html, ids, css } = extractCritical(renderToString())
@@ -132,7 +132,7 @@ const { html, ids, css } = extractCritical(renderToString())
`hydrate` should be called on the client with the `ids` that `extractCritical` returns. If you don't call it then emotion will reinsert all the rules. `hydrate` is **only** required for `extractCritical`, **not** for `renderStylesToString` or `renderStylesToNodeStream`, hydration occurs automatically with `renderStylesToString` and `renderStylesToNodeStream`.
```jsx
-import { hydrate } from 'emotion'
+import { hydrate } from '@emotion/css'
hydrate(ids)
```
@@ -192,7 +192,7 @@ export const myCache = createMyCache()
gatsby-ssr.js
```jsx
-import { CacheProvider } from '@emotion/core'
+import { CacheProvider } from '@emotion/react'
import { createMyCache } from './create-emotion-cache'
@@ -204,7 +204,7 @@ export const wrapRootElement = ({ element }) => (
gatsby-browser.js
```jsx
-import { CacheProvider } from '@emotion/core'
+import { CacheProvider } from '@emotion/react'
import { myCache } from './create-emotion-cache'
@@ -215,7 +215,7 @@ export const wrapRootElement = ({ element }) => (
> Note:
>
-> While Emotion 10 and above supports SSR out of the box, it's still recommended to use gatsby-plugin-emotion as gatsby-plugin-emotion will enable babel-plugin-emotion and other potential future optimisations.
+> While Emotion 10 and above supports SSR out of the box, it's still recommended to use gatsby-plugin-emotion as gatsby-plugin-emotion will enable @emotion/babel-plugin and other potential future optimisations.
## Puppeteer
@@ -242,7 +242,7 @@ if (root.hasChildNodes()) {
disable-speedy.js
```js
-import { sheet } from 'emotion'
+import { sheet } from '@emotion/css'
// Check if the root node has any children to detect if the app has been preprendered
// speedy is disabled when the app is being prerendered so that styles render into the DOM
diff --git a/docs/styled.mdx b/docs/styled.mdx
index 9c9c49ddd..0035bf950 100644
--- a/docs/styled.mdx
+++ b/docs/styled.mdx
@@ -183,7 +183,7 @@ You can create dynamic styles that are based on props and use them in styles.
```jsx
// @live
import styled from '@emotion/styled'
-import { css } from '@emotion/core'
+import { css } from '@emotion/react'
const dynamicStyle = props =>
css`
diff --git a/docs/testing.mdx b/docs/testing.mdx
index 2e33dc0ac..8842df9c7 100644
--- a/docs/testing.mdx
+++ b/docs/testing.mdx
@@ -6,46 +6,63 @@ Adding [snapshot tests with Jest](https://facebook.github.io/jest/docs/en/snapsh
By diffing the serialized value of your React tree Jest can show you what changed in your app and allow you to fix it or update the snapshot.
-By default snapshots with emotion show generated class names. Adding [jest-emotion](https://github.com/emotion-js/emotion/tree/master/packages/jest-emotion) allows you to output the actual styles being applied.
+By default snapshots with emotion show generated class names. Adding [@emotion/jest](https://github.com/emotion-js/emotion/tree/master/packages/jest) allows you to output the actual styles being applied.
### Installation
```bash
-npm install --save-dev jest-emotion
+npm install --save-dev @emotion/jest
```
-Add the snapshot serializer in your [`setupTestFrameworkScriptFile`](http://facebook.github.io/jest/docs/en/configuration.html#setuptestframeworkscriptfile-string) _or_ at the top of your test file.
+Add the snapshot serializer to the [`snapshotSerializers`](http://facebook.github.io/jest/docs/en/configuration.html#setuptestframeworkscriptfile-string) option
+
+When using Enzyme, it's recommended to add the combined enzyme and emotion serializer to support shallow rendering to your Jest config
+
+```json
+{
+ "snapshotSerializers": ["@emotion/jest"]
+}
+```
+
+Or use `expect.addSnapshotSerializer` to add it.
-When using Enzyme, it's recommended to use the combined enzyme and emotion serializer to support shallow rendering:
```javascript
-import { createSerializer } from 'jest-emotion/enzyme' // also adds the enzyme-to-json serializer
+import serializer from '@emotion/jest/enzyme' // also adds the enzyme-to-json serializer
-expect.addSnapshotSerializer(createSerializer())
+expect.addSnapshotSerializer(serializer)
```
-Otherwise, use standard `createSerializer` method.
+If you're not using Enzyme, add the snapshot serializer to your Jest config
+
+```json
+{
+ "snapshotSerializers": ["@emotion/jest"]
+}
+```
+
+Or use `expect.addSnapshotSerializer` to add it.
```javascript
-import { createSerializer } from 'jest-emotion'
+import serializer from '@emotion/jest'
expect.addSnapshotSerializer(createSerializer())
```
+
+
### Writing a test
-Writing a test with `jest-emotion` involves creating a snapshot from the `react-test-renderer` or `enzyme-to-json`'s resulting JSON.
+Writing a test with `@emotion/jest` involves creating a snapshot from the `react-test-renderer` or `enzyme-to-json`'s resulting JSON.
```jsx
import React from 'react'
-import serializer from 'jest-emotion'
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import renderer from 'react-test-renderer'
-expect.addSnapshotSerializer(serializer)
const Button = props => (
```
@@ -47,7 +47,7 @@ import { jsx } from '@emotion/core'
As a result you may be not able to use react fragment shorthand syntax - `<>>`, but still you can use ``.
This is a limitation of the TypeScript compiler not being able to independently specify jsx pragma and jsxFrag pragma.
-You can still use the css helper and pass the className yourself (ensure you are importing from the `@emotion` package, not `@emotion/core`).
+You can still use the css helper and pass the className yourself (ensure you are importing from the `@emotion` package, not `@emotion/react`).
```tsx
import { css } from '@emotion'
@@ -253,7 +253,7 @@ You can define a theme type by extending our type declarations via your own decl
_emotion.d.ts_
```typescript
-declare module '@emotion/core' {
+declare module '@emotion/react' {
export interface Theme {
color: {
primary: string
@@ -266,7 +266,7 @@ declare module '@emotion/core' {
// You are also able to use a 3rd party theme this way:
import { MuiTheme } from 'material-ui'
-declare module '@emotion/core' {
+declare module '@emotion/react' {
export interface Theme extends MuiTheme {}
}
```
@@ -290,7 +290,7 @@ If you were previously relying on `theme` being an `any` type, you have to resto
_emotion.d.ts_
```ts
-declare module '@emotion/core' {
+declare module '@emotion/react' {
export interface Theme extends Record {}
}
```
diff --git a/docs/with-props.mdx b/docs/with-props.mdx
index b8fc9f639..cb760e2ff 100644
--- a/docs/with-props.mdx
+++ b/docs/with-props.mdx
@@ -9,7 +9,7 @@ Note that if css is passed down via props, it will take precedence over the css
```jsx
// @live
/** @jsx jsx */
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
const pinkInput = css`
background-color: pink;
diff --git a/jest.config.js b/jest.config.js
index a32ee0f44..081b19bf4 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -16,6 +16,6 @@ module.exports = {
setupFilesAfterEnv: ['/test/testSetup.js'],
coveragePathIgnorePatterns: [
'/node_modules/',
- '/packages/babel-plugin-emotion/test/util.js'
+ '/packages/babel-plugin/test/util.js'
]
}
diff --git a/jest.dist.js b/jest.dist.js
index 1fb335798..a34e1460e 100644
--- a/jest.dist.js
+++ b/jest.dist.js
@@ -1,10 +1,7 @@
const baseConfig = require('./jest.config.js')
module.exports = Object.assign({}, baseConfig, {
- transformIgnorePatterns: ['dist', 'node_modules'],
- testPathIgnorePatterns: baseConfig.testPathIgnorePatterns.concat(
- 'babel-plugin-emotion'
- )
+ transformIgnorePatterns: ['dist', 'node_modules']
})
delete module.exports.moduleNameMapper
diff --git a/package.json b/package.json
index 78c2438de..e48110058 100644
--- a/package.json
+++ b/package.json
@@ -58,7 +58,8 @@
],
"plugins": [
"prettier",
- "flowtype"
+ "flowtype",
+ "@emotion"
],
"parser": "babel-eslint",
"rules": {
@@ -78,7 +79,8 @@
"react/jsx-handler-names": 0,
"react/no-unused-prop-types": 0,
"react/prop-types": 0,
- "standard/computed-property-even-spacing": 0
+ "standard/computed-property-even-spacing": 0,
+ "@emotion/pkg-renaming": 2
},
"env": {
"browser": true
@@ -120,7 +122,8 @@
"packages/*",
"site",
"scripts/*",
- "playgrounds/*"
+ "playgrounds/*",
+ "removed-packages/*"
],
"nohoist": [
"**/dtslint"
@@ -128,7 +131,8 @@
},
"preconstruct": {
"packages": [
- "packages/*"
+ "packages/*",
+ "removed-packages/*"
],
"globals": {
"react": "React"
@@ -184,13 +188,13 @@
"@manypkg/cli": "^0.5.2",
"@mdx-js/mdx": "^1.1.0",
"@mdx-js/react": "^1.0.27",
- "@preconstruct/cli": "^1.1.1",
+ "@preconstruct/cli": "^1.1.3",
"@testing-library/react": "^9.3.2",
"@types/jest": "^24.0.22",
"@types/node": "^10.11.4",
"@types/react": "^16.9.11",
"babel-check-duplicated-nodes": "^1.0.0",
- "babel-eslint": "^8.2.3",
+ "babel-eslint": "^10.0.3",
"babel-flow-types": "^1.2.3",
"babel-jest": "^24.9.0",
"babel-plugin-add-basic-constructor-for-react-components": "^0.1.0",
@@ -208,7 +212,7 @@
"enzyme": "^3.7.0",
"enzyme-adapter-react-16": "^1.6.0",
"enzyme-to-json": "^3.2.1",
- "eslint": "^6.7.1",
+ "eslint": "^6.7.2",
"eslint-config-prettier": "^6.7.0",
"eslint-config-react": "^1.1.7",
"eslint-config-standard": "^14.1.0",
diff --git a/packages/babel-plugin-emotion/__tests__/css-macro/__fixtures__/label-1.js b/packages/babel-plugin-emotion/__tests__/css-macro/__fixtures__/label-1.js
deleted file mode 100644
index 4d4405d01..000000000
--- a/packages/babel-plugin-emotion/__tests__/css-macro/__fixtures__/label-1.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import { css } from '@emotion/core/macro'
-
-const thing = css`
- color: hotpink;
-`
diff --git a/packages/babel-plugin-emotion/__tests__/css-macro/__fixtures__/no-actual-import.js b/packages/babel-plugin-emotion/__tests__/css-macro/__fixtures__/no-actual-import.js
deleted file mode 100644
index f3ff8ada8..000000000
--- a/packages/babel-plugin-emotion/__tests__/css-macro/__fixtures__/no-actual-import.js
+++ /dev/null
@@ -1 +0,0 @@
-import '@emotion/core/macro'
diff --git a/packages/babel-plugin-emotion/__tests__/css-macro/__fixtures__/other-imports.js b/packages/babel-plugin-emotion/__tests__/css-macro/__fixtures__/other-imports.js
deleted file mode 100644
index f60087ae1..000000000
--- a/packages/babel-plugin-emotion/__tests__/css-macro/__fixtures__/other-imports.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import { nonExistantImport } from '@emotion/core/macro'
-
-nonExistantImport()
diff --git a/packages/babel-plugin-emotion/__tests__/css-macro/index.js b/packages/babel-plugin-emotion/__tests__/css-macro/index.js
deleted file mode 100644
index 0d5b80aae..000000000
--- a/packages/babel-plugin-emotion/__tests__/css-macro/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// @flow
-import babelTester from 'babel-tester'
-
-babelTester('@emotion/core - css macro', __dirname)
diff --git a/packages/babel-plugin-emotion/__tests__/global-macro/index.js b/packages/babel-plugin-emotion/__tests__/global-macro/index.js
deleted file mode 100644
index d03d8fcf6..000000000
--- a/packages/babel-plugin-emotion/__tests__/global-macro/index.js
+++ /dev/null
@@ -1,4 +0,0 @@
-// @flow
-import babelTester from 'babel-tester'
-
-babelTester('@emotion/core - Global macro', __dirname)
diff --git a/packages/babel-plugin-emotion/__tests__/index.js b/packages/babel-plugin-emotion/__tests__/index.js
deleted file mode 100644
index 1148021bd..000000000
--- a/packages/babel-plugin-emotion/__tests__/index.js
+++ /dev/null
@@ -1,6 +0,0 @@
-import babelTester from 'babel-tester'
-import plugin from 'babel-plugin-emotion'
-
-babelTester('babel-plugin-emotion', __dirname, {
- plugins: [plugin]
-})
diff --git a/packages/babel-plugin-emotion/__tests__/source-maps/__fixtures__/css-object.js b/packages/babel-plugin-emotion/__tests__/source-maps/__fixtures__/css-object.js
deleted file mode 100644
index e8f8b1ec2..000000000
--- a/packages/babel-plugin-emotion/__tests__/source-maps/__fixtures__/css-object.js
+++ /dev/null
@@ -1,3 +0,0 @@
-import { css } from '@emotion/core'
-
-css({ color: 'hotpink' })
diff --git a/packages/babel-plugin-emotion/__tests__/source-maps/__fixtures__/css-string.js b/packages/babel-plugin-emotion/__tests__/source-maps/__fixtures__/css-string.js
deleted file mode 100644
index 6ed1542a7..000000000
--- a/packages/babel-plugin-emotion/__tests__/source-maps/__fixtures__/css-string.js
+++ /dev/null
@@ -1,5 +0,0 @@
-import { css } from '@emotion/core'
-
-css`
- color: hotpink;
-`
diff --git a/packages/babel-plugin-jsx-pragmatic/__tests__/__snapshots__/index.js.snap b/packages/babel-plugin-jsx-pragmatic/__tests__/__snapshots__/index.js.snap
index 8a22e108f..97c159000 100644
--- a/packages/babel-plugin-jsx-pragmatic/__tests__/__snapshots__/index.js.snap
+++ b/packages/babel-plugin-jsx-pragmatic/__tests__/__snapshots__/index.js.snap
@@ -20,7 +20,7 @@ import 'react-app-polyfill/stable';
import React from 'react';
import ReactDOM from 'react-dom';
import App from './App';
-import { jsx as ___EmotionJSX } from \\"@emotion/core\\";
+import { jsx as ___EmotionJSX } from \\"@emotion/react\\";
ReactDOM.render(, document.getElementById('root'));"
`;
@@ -33,7 +33,7 @@ const F = () => <>>
↓ ↓ ↓ ↓ ↓ ↓
import * as React from 'react';
-import { jsx as ___EmotionJSX } from \\"@emotion/core\\";
+import { jsx as ___EmotionJSX } from \\"@emotion/react\\";
const F = () => <>>;"
`;
@@ -47,7 +47,7 @@ const P = () =>
↓ ↓ ↓ ↓ ↓ ↓
import * as React from 'react';
-import { jsx as ___EmotionJSX } from \\"@emotion/core\\";
+import { jsx as ___EmotionJSX } from \\"@emotion/react\\";
const P = () => ;"
`;
diff --git a/packages/babel-plugin-jsx-pragmatic/__tests__/index.js b/packages/babel-plugin-jsx-pragmatic/__tests__/index.js
index 0cd05c4b8..4aee36786 100644
--- a/packages/babel-plugin-jsx-pragmatic/__tests__/index.js
+++ b/packages/babel-plugin-jsx-pragmatic/__tests__/index.js
@@ -8,7 +8,7 @@ babelTester('@emotion/babel-plugin-jsx-pragmatic', __dirname, {
jsxPragmatic,
{
export: 'jsx',
- module: '@emotion/core',
+ module: '@emotion/react',
import: '___EmotionJSX'
}
]
diff --git a/packages/babel-plugin/CHANGELOG.md b/packages/babel-plugin/CHANGELOG.md
new file mode 100644
index 000000000..6c5ca8716
--- /dev/null
+++ b/packages/babel-plugin/CHANGELOG.md
@@ -0,0 +1,135 @@
+# @emotion/babel-plugin
+
+## 11.0.0-next.6
+
+### Major Changes
+
+- [`843bfb11`](https://github.com/emotion-js/emotion/commit/843bfb1153ee0dbe33d005fdd5c5be185daa5c41) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - Removed `@emotion/css` - it's main purpose was to allow `css` to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. `@emotion/core/macro` has been added to account for this use case and appropriate changes has been made to `babel-plugin-emotion` to facilitate those changes.
+
+ If you have used `@emotion/css` directly (it was always reexported from `@emotion/core`) or you have been using its macro then you should update your code like this:
+
+ ```diff
+ -import css from '@emotion/css'
+ +import { css } from '@emotion/core'
+
+ // or
+ -import css from '@emotion/css/macro'
+ +import { css } from '@emotion/core/macro'
+ ```
+
+### Minor Changes
+
+- [`0a4a22ff`](https://github.com/emotion-js/emotion/commit/0a4a22ffcfaa49d09a88856ef2d51e0d53e31b6d) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - Allow `labelFormat` option to be a function.
+
+* [`828111cd`](https://github.com/emotion-js/emotion/commit/828111cd32d3fe8c984231201e518d1b6000bffd) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - `Global` gets handled by the Babel plugin now - this gives inline css-less expressions source maps.
+
+## 11.0.0-next.4
+
+### Major Changes
+
+- [`c65c5d88`](https://github.com/emotion-js/emotion/commit/c65c5d887002d76557eaefcb98091d795b13f9a9) [#973](https://github.com/emotion-js/emotion/pull/973) Thanks [@Andarist](https://github.com/Andarist)! - Drop Babel 6 support
+
+## 11.0.0-next.3
+
+### Major Changes
+
+- [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1) [#1220](https://github.com/emotion-js/emotion/pull/1220) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Removed support for the `instances` option, any usage of it should be replaced with the `importMap` option
+
+* [`f9feab1a`](https://github.com/emotion-js/emotion/commit/f9feab1a5d1ca88e53c3f7a063be5d5871cc93e8) [#1575](https://github.com/emotion-js/emotion/pull/1575) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Removed support for `@emotion/styled-base` package. It has been moved to `@emotion/styled` and is available as `@emotion/styled/base`. This simplifies how the regular and base versions relate to each other and eliminates problems with stricter package managers when `@emotion/styled-base` was not installed explicitly by a user.
+
+### Minor Changes
+
+- [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1) [#1220](https://github.com/emotion-js/emotion/pull/1220) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Added the `importMap` option which allows you to tell babel-plugin-emotion what imports it should look at to determine what it should transform so if you re-export Emotion's exports, you can still use the Babel transforms
+
+### Patch Changes
+
+- [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1) [#1220](https://github.com/emotion-js/emotion/pull/1220) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Fix issue with not updating referenced import when bailing out on already transpiled vanilla emotion nodes (a regression introduced in #1602)
+- Updated dependencies [[`8a896a31`](https://github.com/emotion-js/emotion/commit/8a896a31434a1d2f69e1f1467c446c884c929387), [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85)]:
+ - @emotion/serialize@0.11.15-next.1
+
+## 11.0.0-next.1
+
+### Patch Changes
+
+- Updated dependencies [[`1eaa3a38`](https://github.com/emotion-js/emotion/commit/1eaa3a389876d4a623ce66735dc6db093cb2a8e6)]:
+ - @emotion/serialize@1.0.0-next.0
+
+## 11.0.0-next.0
+
+### Major Changes
+
+- [`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Ensure packages are major bumped so that pre-release versions of the linked packages are consistent in the major number
+
+### Patch Changes
+
+- [`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - Avoid transpiling vanilla emotion calls in already transpiled code to avoid double labels and such
+
+## 10.0.23
+
+### Patch Changes
+
+- [`3927293d`](https://github.com/emotion-js/emotion/commit/3927293d0b9d96b4a7c00196e8430728759b1161) [#1569](https://github.com/emotion-js/emotion/pull/1569) Thanks [@Andarist](https://github.com/Andarist)! - Add dev hint about css object (generated by Babel) being stringified by accident
+
+* [`b3a0f148`](https://github.com/emotion-js/emotion/commit/b3a0f1484f2efcc78b447639ff2e0bc0f29915ae) [#1574](https://github.com/emotion-js/emotion/pull/1574) Thanks [@Andarist](https://github.com/Andarist)! - Fix babel plugin crashing when called programmatically without providing a filename
+
+* Updated dependencies [[`a55f3d49`](https://github.com/emotion-js/emotion/commit/a55f3d49c2febdf7eb1bede3f12da13c3efa1399), [`ca95f385`](https://github.com/emotion-js/emotion/commit/ca95f385f7ce3da6d53de1a652b3b219f11434c4)]:
+ - @emotion/serialize@0.11.14
+
+## 10.0.22
+
+### Patch Changes
+
+- [`1bb3efe3`](https://github.com/emotion-js/emotion/commit/1bb3efe399ddf0f3332187f3c751fbba9326d02c) [#1554](https://github.com/emotion-js/emotion/pull/1554) Thanks [@Andarist](https://github.com/Andarist)! - Prepend appended label string with semicolon to avoid problems with declaration blocks without a final semicolon
+
+- Updated dependencies [[`4fc5657a`](https://github.com/emotion-js/emotion/commit/4fc5657ac8d0002322321cfbfc254b7196d27387), [`10211951`](https://github.com/emotion-js/emotion/commit/10211951051729b149930a8646de14bae9ae1bbc), [`57a767ea`](https://github.com/emotion-js/emotion/commit/57a767ea3dd18eefbbdc7269cc13128caad65286)]:
+ - @emotion/serialize@0.11.12
+
+## 10.0.21
+
+### Patch Changes
+
+- [0eafebb5](https://github.com/emotion-js/emotion/commit/0eafebb5119212897f81084f63a807c02b0012fc) [#1538](https://github.com/emotion-js/emotion/pull/1538) Thanks [@Andarist](https://github.com/Andarist)! - Push source maps & labels to cooked/raw arrays in TS-transpiled tagged template expressions
+
+## 10.0.20
+
+### Patch Changes
+
+- [1b3791d4](https://github.com/emotion-js/emotion/commit/1b3791d4c458838a097c815a38108c9719023b92) [#1526](https://github.com/emotion-js/emotion/pull/1526) Thanks [@ahutchings](https://github.com/ahutchings)! - Fix `autoLabel` crash on `css` used in expression assigned to an object pattern
+
+## 10.0.19
+
+- Updated dependencies [c81c0033]:
+ - @emotion/serialize@0.11.11
+ - @emotion/hash@0.7.3
+ - @emotion/memoize@0.7.3
+
+## 10.0.17
+
+### Patch Changes
+
+- [b22b4ca4](https://github.com/emotion-js/emotion/commit/b22b4ca460ec66ea313dd9ea9556bd7a2d04798c) [#1485](https://github.com/emotion-js/emotion/pull/1485) Thanks [@JSteunou](https://github.com/JSteunou)! - Fix `autoLabel` crash on `css` used as a computed key of an object
+
+## 10.0.16
+
+### Patch Changes
+
+- [1ea9b3a6](https://github.com/emotion-js/emotion/commit/1ea9b3a6) - Fix an inconsistency with Babel config ordering in the README
+
+## 10.0.15
+
+### Patch Changes
+
+- [4a3b18a2](https://github.com/emotion-js/emotion/commit/4a3b18a2) [#1451](https://github.com/emotion-js/emotion/pull/1451) Thanks [@Andarist](https://github.com/Andarist)! - Fixed issue with auto-labelling crashing on \$ at runtime
+- [284f8fa](https://github.com/emotion-js/emotion/commit/284f8fa9e0d2926fa26346e63519f8db24e22cc7) [#1336](https://github.com/emotion-js/emotion/pull/1336) Thanks [@Zenwolf](https://github.com/Zenwolf)! - Keep CSS comments that include `@`
+
+## 10.0.14
+
+### Patch Changes
+
+- [c0eb604d](https://github.com/emotion-js/emotion/commit/c0eb604d) [#1419](https://github.com/emotion-js/emotion/pull/1419) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Update build tool
+
+## 10.0.13
+
+### Patch Changes
+
+- [7bad392c](https://github.com/emotion-js/emotion/commit/7bad392c) [#1387](https://github.com/emotion-js/emotion/pull/1387) Thanks [@mherodev](https://github.com/mherodev)! - Added object property auto label support for babel-plugin-emotion
diff --git a/packages/babel-plugin-emotion/README.md b/packages/babel-plugin/README.md
similarity index 83%
rename from packages/babel-plugin-emotion/README.md
rename to packages/babel-plugin/README.md
index 7fef05cbb..465498841 100644
--- a/packages/babel-plugin-emotion/README.md
+++ b/packages/babel-plugin/README.md
@@ -1,9 +1,9 @@
-# babel-plugin-emotion
+# @emotion/babel-plugin
> Babel plugin for the minification and optimization of emotion styles.
-`babel-plugin-emotion` is highly recommended, but not required in version 8 and
-above of `emotion`.
+`@emotion/babel-plugin` is highly recommended, but not required in version 8 and
+above of Emotion.
## Features
@@ -97,13 +97,13 @@ const myStyles = /* #__PURE__ */ css(
## Installation
```bash
-yarn add --dev babel-plugin-emotion
+yarn add --dev @emotion/babel-plugin
```
or if you prefer npm
```bash
-npm install --save-dev babel-plugin-emotion
+npm install --save-dev @emotion/babel-plugin
```
## Usage
@@ -116,7 +116,7 @@ Without options:
```json
{
- "plugins": ["emotion"]
+ "plugins": ["@emotion"]
}
```
@@ -128,7 +128,7 @@ _Defaults Shown_
{
"plugins": [
[
- "emotion",
+ "@emotion",
{
// sourceMap is on by default but source maps are dead code eliminated in production
"sourceMap": true,
@@ -147,21 +147,21 @@ Recommended Setup
```json
{
- "plugins": ["emotion"]
+ "plugins": ["@emotion"]
}
```
### Via CLI
```bash
-babel --plugins babel-plugin-emotion script.js
+babel --plugins @emotion/babel-plugin script.js
```
### Via Node API
```javascript
require('@babel/core').transform('code', {
- plugins: ['babel-plugin-emotion']
+ plugins: ['@emotion/babel-plugin']
})
```
@@ -179,7 +179,7 @@ This option enables the following:
> Note:
>
-> Source maps are on by default in babel-plugin-emotion but they will be removed in production builds
+> Source maps are on by default in @emotion/babel-plugin but they will be removed in production builds
### `autoLabel`
@@ -295,11 +295,11 @@ const H1 = /*#__PURE__*/ styled('h1', {
`boolean`, defaults to `true`.
-This option assumes that you are using something to make `@emotion/core`'s `jsx` function work for all jsx. If you are not doing so and you do not want such optimizations to occur, disable this option.
+This option assumes that you are using something to make `@emotion/react`'s `jsx` function work for all jsx. If you are not doing so and you do not want such optimizations to occur, disable this option.
### `importMap`
-This option allows you to tell babel-plugin-emotion what imports it should look at to determine what it should transform so if you re-export Emotion's exports, you can still use the Babel transforms
+This option allows you to tell @emotion/babel-plugin what imports it should look at to determine what it should transform so if you re-export Emotion's exports, you can still use the Babel transforms
An example config:
@@ -313,10 +313,10 @@ An example config:
},
"some-package": {
"someExport": {
- "canonicalImport": ["@emotion/core", "css"]
+ "canonicalImport": ["@emotion/react", "css"]
},
"thisIsTheJsxExport": {
- "canonicalImport": ["@emotion/core", "jsx"]
+ "canonicalImport": ["@emotion/react", "jsx"]
}
}
}
@@ -324,10 +324,16 @@ An example config:
## Babel Macros
-Instead of using `babel-plugin-emotion`, you can use emotion with [`babel-plugin-macros`](https://github.com/kentcdodds/babel-plugin-macros). Add `babel-plugin-macros` to your babel config (which is included in Create React App 2.0) and use the imports/packages shown below.
+Instead of using `@emotion/babel-plugin`, you can use emotion with [`babel-plugin-macros`](https://github.com/kentcdodds/babel-plugin-macros). Add `babel-plugin-macros` to your babel config (which is included in Create React App 2.0) and use the imports/packages shown below.
```jsx
-import { css, keyframes, injectGlobal, flush, hydrate } from 'emotion/macro'
-import { jsx, css, Global, keyframes } from '@emotion/core/macro'
+import {
+ css,
+ keyframes,
+ injectGlobal,
+ flush,
+ hydrate
+} from '@emotion/css/macro'
+import { jsx, css, Global, keyframes } from '@emotion/react/macro'
import styled from '@emotion/styled/macro'
```
diff --git a/packages/babel-plugin-emotion/__tests__/__fixtures__/core-with-css-import-dynamic.js b/packages/babel-plugin/__tests__/__fixtures__/core-with-css-import-dynamic.js
similarity index 74%
rename from packages/babel-plugin-emotion/__tests__/__fixtures__/core-with-css-import-dynamic.js
rename to packages/babel-plugin/__tests__/__fixtures__/core-with-css-import-dynamic.js
index ad5a30281..40d67d268 100644
--- a/packages/babel-plugin-emotion/__tests__/__fixtures__/core-with-css-import-dynamic.js
+++ b/packages/babel-plugin/__tests__/__fixtures__/core-with-css-import-dynamic.js
@@ -1,5 +1,5 @@
/** @jsx jsx */
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
const SomeComponent = props => (
(
({ backgroundColor: theme.bgColor })
const css2 = theme => ({ padding: theme.spacing.small })
diff --git a/packages/babel-plugin-emotion/__tests__/__fixtures__/does-not-change-other-props.js b/packages/babel-plugin/__tests__/__fixtures__/does-not-change-other-props.js
similarity index 64%
rename from packages/babel-plugin-emotion/__tests__/__fixtures__/does-not-change-other-props.js
rename to packages/babel-plugin/__tests__/__fixtures__/does-not-change-other-props.js
index 4254a9197..f1ddffede 100644
--- a/packages/babel-plugin-emotion/__tests__/__fixtures__/does-not-change-other-props.js
+++ b/packages/babel-plugin/__tests__/__fixtures__/does-not-change-other-props.js
@@ -1,4 +1,4 @@
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
const Svg =
diff --git a/packages/babel-plugin-emotion/__tests__/__fixtures__/dynamic.js b/packages/babel-plugin/__tests__/__fixtures__/dynamic.js
similarity index 71%
rename from packages/babel-plugin-emotion/__tests__/__fixtures__/dynamic.js
rename to packages/babel-plugin/__tests__/__fixtures__/dynamic.js
index 46ea8509d..4fbfb6cff 100644
--- a/packages/babel-plugin-emotion/__tests__/__fixtures__/dynamic.js
+++ b/packages/babel-plugin/__tests__/__fixtures__/dynamic.js
@@ -1,4 +1,4 @@
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
const SomeComponent = props =>
diff --git a/packages/babel-plugin-emotion/__tests__/__fixtures__/function-declaration.js b/packages/babel-plugin/__tests__/__fixtures__/function-declaration.js
similarity index 79%
rename from packages/babel-plugin-emotion/__tests__/__fixtures__/function-declaration.js
rename to packages/babel-plugin/__tests__/__fixtures__/function-declaration.js
index e25abcf14..b2f0327c2 100644
--- a/packages/babel-plugin-emotion/__tests__/__fixtures__/function-declaration.js
+++ b/packages/babel-plugin/__tests__/__fixtures__/function-declaration.js
@@ -1,6 +1,6 @@
// @flow
import * as React from 'react'
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
function Logo(props) {
return (
diff --git a/packages/babel-plugin-emotion/__tests__/__fixtures__/import-namespace-does-not-throw.js b/packages/babel-plugin/__tests__/__fixtures__/import-namespace-does-not-throw.js
similarity index 68%
rename from packages/babel-plugin-emotion/__tests__/__fixtures__/import-namespace-does-not-throw.js
rename to packages/babel-plugin/__tests__/__fixtures__/import-namespace-does-not-throw.js
index 90b486d2c..a1deabc1a 100644
--- a/packages/babel-plugin-emotion/__tests__/__fixtures__/import-namespace-does-not-throw.js
+++ b/packages/babel-plugin/__tests__/__fixtures__/import-namespace-does-not-throw.js
@@ -1,2 +1,2 @@
-import * as emotionCore from '@emotion/core'
+import * as emotionCore from '@emotion/react'
// could probably support this for real but it's pretty rare so I'm not gonna spend time on it now
diff --git a/packages/babel-plugin-emotion/__tests__/__fixtures__/jsx-hoist.js b/packages/babel-plugin/__tests__/__fixtures__/jsx-hoist.js
similarity index 76%
rename from packages/babel-plugin-emotion/__tests__/__fixtures__/jsx-hoist.js
rename to packages/babel-plugin/__tests__/__fixtures__/jsx-hoist.js
index 6ffa1a99b..47fda3f15 100644
--- a/packages/babel-plugin-emotion/__tests__/__fixtures__/jsx-hoist.js
+++ b/packages/babel-plugin/__tests__/__fixtures__/jsx-hoist.js
@@ -1,5 +1,5 @@
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
const SomeComponent = props => (
(
{
return (
diff --git a/packages/babel-plugin-emotion/__tests__/__snapshots__/css-requires-options.js.snap b/packages/babel-plugin/__tests__/__snapshots__/css-requires-options.js.snap
similarity index 74%
rename from packages/babel-plugin-emotion/__tests__/__snapshots__/css-requires-options.js.snap
rename to packages/babel-plugin/__tests__/__snapshots__/css-requires-options.js.snap
index 36bd9e6db..9c00a5a9b 100644
--- a/packages/babel-plugin-emotion/__tests__/__snapshots__/css-requires-options.js.snap
+++ b/packages/babel-plugin/__tests__/__snapshots__/css-requires-options.js.snap
@@ -11,9 +11,7 @@ exports[`babel css inline autoLabel set to always - complex expression 1`] = `
import { css } from 'emotion';
import fooStyles from './foo';
-let cls =
-/*#__PURE__*/
-css(fooStyles, \\";label:cls\\" + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnZW1vdGlvbidcbiAgICBpbXBvcnQgZm9vU3R5bGVzIGZyb20gJy4vZm9vJ1xuICAgIGxldCBjbHMgPSBjc3MoZm9vU3R5bGVzKVxuICAgICJdfQ== */\\"));"
+let cls = css(fooStyles);"
`;
exports[`babel css inline autoLabel set to always - complex expression, last arg string 1`] = `
@@ -27,9 +25,7 @@ exports[`babel css inline autoLabel set to always - complex expression, last arg
import { css } from 'emotion';
import fooStyles from './foo';
-let cls =
-/*#__PURE__*/
-css(fooStyles, \\"color: hotpink;;label:cls\\" + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnZW1vdGlvbidcbiAgICBpbXBvcnQgZm9vU3R5bGVzIGZyb20gJy4vZm9vJ1xuICAgIGxldCBjbHMgPSBjc3MoZm9vU3R5bGVzLCAnY29sb3I6IGhvdHBpbms7JylcbiAgICAiXX0= */\\"));"
+let cls = css(fooStyles, 'color: hotpink;');"
`;
exports[`babel css inline autoLabel set to always 1`] = `
@@ -40,19 +36,9 @@ exports[`babel css inline autoLabel set to always 1`] = `
↓ ↓ ↓ ↓ ↓ ↓
-function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-
import { css } from 'emotion';
-let cls =
-/*#__PURE__*/
-css(process.env.NODE_ENV === \\"production\\" ? {
- name: \\"6kh100-cls\\",
- styles: \\"color:hotpink;label:cls;\\"
-} : {
- name: \\"6kh100-cls\\",
- styles: \\"color:hotpink;label:cls;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnZW1vdGlvbidcbiAgICBsZXQgY2xzID0gY3NzKHtjb2xvcjonaG90cGluayd9KVxuICAgICJdfQ== */\\",
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
+let cls = css({
+ color: 'hotpink'
});"
`;
@@ -67,9 +53,7 @@ exports[`babel css inline autoLabel set to never - complex expression 1`] = `
import { css } from 'emotion';
import fooStyles from './foo';
-let cls =
-/*#__PURE__*/
-css(fooStyles, process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnZW1vdGlvbidcbiAgICBpbXBvcnQgZm9vU3R5bGVzIGZyb20gJy4vZm9vJ1xuICAgIGxldCBjbHMgPSBjc3MoZm9vU3R5bGVzKVxuICAgICJdfQ== */\\");"
+let cls = css(fooStyles);"
`;
exports[`babel css inline autoLabel set to never 1`] = `
@@ -80,19 +64,9 @@ exports[`babel css inline autoLabel set to never 1`] = `
↓ ↓ ↓ ↓ ↓ ↓
-function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-
import { css } from 'emotion';
-let cls =
-/*#__PURE__*/
-css(process.env.NODE_ENV === \\"production\\" ? {
- name: \\"3sn2xs\\",
- styles: \\"color:hotpink\\"
-} : {
- name: \\"3sn2xs\\",
- styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnZW1vdGlvbidcbiAgICBsZXQgY2xzID0gY3NzKHtjb2xvcjonaG90cGluayd9KVxuICAgICJdfQ== */\\",
- toString: _EMOTION_STRINGIFIED_CSS_ERROR__
+let cls = css({
+ color: 'hotpink'
});"
`;
@@ -164,7 +138,7 @@ _keyframes(process.env.NODE_ENV === \\"production\\" ? {
exports[`babel css inline label format function 1`] = `
"
- import { css } from 'emotion'
+ import { css } from '@emotion/css'
let cls = css({color:'hotpink'})
@@ -172,7 +146,7 @@ exports[`babel css inline label format function 1`] = `
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from 'emotion';
+import { css } from '@emotion/css';
let cls =
/*#__PURE__*/
css(process.env.NODE_ENV === \\"production\\" ? {
@@ -181,14 +155,14 @@ css(process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"wiafqk-CLS_CSS-REQUIRES-OPTIONS\\",
styles: \\"color:hotpink;label:CLS_CSS-REQUIRES-OPTIONS;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnZW1vdGlvbidcbiAgICBsZXQgY2xzID0gY3NzKHtjb2xvcjonaG90cGluayd9KVxuICAgICJdfQ== */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY3NzJ1xuICAgIGxldCBjbHMgPSBjc3Moe2NvbG9yOidob3RwaW5rJ30pXG4gICAgIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});"
`;
exports[`babel css inline label format with dirname, filename, and local 1`] = `
"
- import { css } from 'emotion'
+ import { css } from '@emotion/css'
let cls = css({color:'hotpink'})
@@ -196,7 +170,7 @@ exports[`babel css inline label format with dirname, filename, and local 1`] = `
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from 'emotion';
+import { css } from '@emotion/css';
let cls =
/*#__PURE__*/
css(process.env.NODE_ENV === \\"production\\" ? {
@@ -205,14 +179,14 @@ css(process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"1azqn5t-my-css-__tests__-css-requires-options-cls\\",
styles: \\"color:hotpink;label:my-css-__tests__-css-requires-options-cls;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnZW1vdGlvbidcbiAgICBsZXQgY2xzID0gY3NzKHtjb2xvcjonaG90cGluayd9KVxuICAgICJdfQ== */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY3NzJ1xuICAgIGxldCBjbHMgPSBjc3Moe2NvbG9yOidob3RwaW5rJ30pXG4gICAgIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});"
`;
exports[`babel css inline label format with filename and local 1`] = `
"
- import { css } from 'emotion'
+ import { css } from '@emotion/css'
let cls = css({color:'hotpink'})
@@ -220,7 +194,7 @@ exports[`babel css inline label format with filename and local 1`] = `
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from 'emotion';
+import { css } from '@emotion/css';
let cls =
/*#__PURE__*/
css(process.env.NODE_ENV === \\"production\\" ? {
@@ -229,14 +203,14 @@ css(process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"12j84ju-my-css-css-requires-options-cls\\",
styles: \\"color:hotpink;label:my-css-css-requires-options-cls;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnZW1vdGlvbidcbiAgICBsZXQgY2xzID0gY3NzKHtjb2xvcjonaG90cGluayd9KVxuICAgICJdfQ== */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY3NzJ1xuICAgIGxldCBjbHMgPSBjc3Moe2NvbG9yOidob3RwaW5rJ30pXG4gICAgIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});"
`;
exports[`babel css inline label format with filename that is index and local 1`] = `
"
- import { css } from 'emotion'
+ import { css } from '@emotion/css'
let cls = css({color:'hotpink'})
@@ -244,7 +218,7 @@ exports[`babel css inline label format with filename that is index and local 1`]
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from 'emotion';
+import { css } from '@emotion/css';
let cls =
/*#__PURE__*/
css(process.env.NODE_ENV === \\"production\\" ? {
@@ -253,14 +227,14 @@ css(process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"1uf5d32-my-css-some-directory-cls\\",
styles: \\"color:hotpink;label:my-css-some-directory-cls;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnZW1vdGlvbidcbiAgICBsZXQgY2xzID0gY3NzKHtjb2xvcjonaG90cGluayd9KVxuICAgICJdfQ== */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluZGV4LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImluZGV4LmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY3NzJ1xuICAgIGxldCBjbHMgPSBjc3Moe2NvbG9yOidob3RwaW5rJ30pXG4gICAgIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});"
`;
exports[`babel css inline label format with only local 1`] = `
"
- import { css } from 'emotion'
+ import { css } from '@emotion/css'
let cls = css({color:'hotpink'})
@@ -268,7 +242,7 @@ exports[`babel css inline label format with only local 1`] = `
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from 'emotion';
+import { css } from '@emotion/css';
let cls =
/*#__PURE__*/
css(process.env.NODE_ENV === \\"production\\" ? {
@@ -277,7 +251,7 @@ css(process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"1xiywpm-my-css-cls\\",
styles: \\"color:hotpink;label:my-css-cls;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnZW1vdGlvbidcbiAgICBsZXQgY2xzID0gY3NzKHtjb2xvcjonaG90cGluayd9KVxuICAgICJdfQ== */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVjIiwiZmlsZSI6ImNzcy1yZXF1aXJlcy1vcHRpb25zLmpzIiwic291cmNlc0NvbnRlbnQiOlsiXG4gICAgaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY3NzJ1xuICAgIGxldCBjbHMgPSBjc3Moe2NvbG9yOidob3RwaW5rJ30pXG4gICAgIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
});"
`;
@@ -286,7 +260,7 @@ exports[`babel css inline label on code transpiled by TS 1`] = `
"
import { __makeTemplateObject } from 'tslib'
- import { css } from '@emotion/core'
+ import { css } from '@emotion/react'
var templateObject_1
@@ -302,7 +276,7 @@ exports[`babel css inline label on code transpiled by TS 1`] = `
↓ ↓ ↓ ↓ ↓ ↓
import { __makeTemplateObject } from 'tslib';
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
var templateObject_1;
const someVar =
/*#__PURE__*/
diff --git a/packages/babel-plugin-emotion/__tests__/__snapshots__/css.js.snap b/packages/babel-plugin/__tests__/__snapshots__/css.js.snap
similarity index 74%
rename from packages/babel-plugin-emotion/__tests__/__snapshots__/css.js.snap
rename to packages/babel-plugin/__tests__/__snapshots__/css.js.snap
index c45061893..0905085ed 100644
--- a/packages/babel-plugin-emotion/__tests__/__snapshots__/css.js.snap
+++ b/packages/babel-plugin/__tests__/__snapshots__/css.js.snap
@@ -2,7 +2,7 @@
exports[`emotion-babel-plugin css actual-expected-usage 1`] = `
"/** @jsx jsx */
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
const SomeComponent = () => (
(
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
/** @jsx jsx */
-import { jsx, css } from '@emotion/core';
+import { jsx, css } from '@emotion/react';
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -26,7 +26,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"1wl9j1m-SomeComponent\\",
styles: \\"color:hotpink;label:SomeComponent;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFjdHVhbC1leHBlY3RlZC11c2FnZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLWSIsImZpbGUiOiJhY3R1YWwtZXhwZWN0ZWQtdXNhZ2UuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCwgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSdcblxuY29uc3QgU29tZUNvbXBvbmVudCA9ICgpID0+IChcbiAgPGRpdlxuICAgIGNzcz17Y3NzYFxuICAgICAgY29sb3I6IGhvdHBpbms7XG4gICAgYH1cbiAgLz5cbilcbiJdfQ== */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFjdHVhbC1leHBlY3RlZC11c2FnZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLWSIsImZpbGUiOiJhY3R1YWwtZXhwZWN0ZWQtdXNhZ2UuanMiLCJzb3VyY2VzQ29udGVudCI6WyIvKiogQGpzeCBqc3ggKi9cbmltcG9ydCB7IGpzeCwgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmNvbnN0IFNvbWVDb21wb25lbnQgPSAoKSA9PiAoXG4gIDxkaXZcbiAgICBjc3M9e2Nzc2BcbiAgICAgIGNvbG9yOiBob3RwaW5rO1xuICAgIGB9XG4gIC8+XG4pXG4iXX0= */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
@@ -34,7 +34,7 @@ const SomeComponent = () => ;"
`;
exports[`emotion-babel-plugin css basic 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
function doThing() {
return css\`
@@ -47,7 +47,7 @@ function doThing() {
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"zjik7\\",
@@ -55,7 +55,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"zjik7\\",
styles: \\"display:flex\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2ljLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdZIiwiZmlsZSI6ImJhc2ljLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSdcblxuZnVuY3Rpb24gZG9UaGluZygpIHtcbiAgcmV0dXJuIGNzc2BcbiAgICBkaXNwbGF5OiBmbGV4O1xuICBgXG59XG4iXX0= */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2ljLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUdZIiwiZmlsZSI6ImJhc2ljLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmZ1bmN0aW9uIGRvVGhpbmcoKSB7XG4gIHJldHVybiBjc3NgXG4gICAgZGlzcGxheTogZmxleDtcbiAgYFxufVxuIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
@@ -65,7 +65,7 @@ function doThing() {
`;
exports[`emotion-babel-plugin css call-expression 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
function doThing() {
return css({ color: 'hotpink' })
@@ -76,7 +76,7 @@ function doThing() {
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -84,7 +84,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhbGwtZXhwcmVzc2lvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHUyIsImZpbGUiOiJjYWxsLWV4cHJlc3Npb24uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuXG5mdW5jdGlvbiBkb1RoaW5nKCkge1xuICByZXR1cm4gY3NzKHsgY29sb3I6ICdob3RwaW5rJyB9KVxufVxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhbGwtZXhwcmVzc2lvbi5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHUyIsImZpbGUiOiJjYWxsLWV4cHJlc3Npb24uanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuZnVuY3Rpb24gZG9UaGluZygpIHtcbiAgcmV0dXJuIGNzcyh7IGNvbG9yOiAnaG90cGluaycgfSlcbn1cbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
@@ -94,7 +94,7 @@ function doThing() {
`;
exports[`emotion-babel-plugin css call-inside-call 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
const thing = css\`
display: flex;
@@ -110,7 +110,7 @@ const thing = css\`
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
const thing =
/*#__PURE__*/
css(\\"display:flex;&:hover{\\", process.env.NODE_ENV === \\"production\\" ? {
@@ -119,13 +119,13 @@ css(\\"display:flex;&:hover{\\", process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"1hi0qos-thing\\",
styles: \\"color:hotpink;label:thing;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhbGwtaW5zaWRlLWNhbGwuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS1MiLCJmaWxlIjoiY2FsbC1pbnNpZGUtY2FsbC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnXG5cbmNvbnN0IHRoaW5nID0gY3NzYFxuICBkaXNwbGF5OiBmbGV4O1xuICAmOmhvdmVyIHtcbiAgICAke2Nzc2BcbiAgICAgIGNvbG9yOiBob3RwaW5rO1xuICAgIGB9O1xuICB9XG5gXG4iXX0= */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhbGwtaW5zaWRlLWNhbGwuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS1MiLCJmaWxlIjoiY2FsbC1pbnNpZGUtY2FsbC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5jb25zdCB0aGluZyA9IGNzc2BcbiAgZGlzcGxheTogZmxleDtcbiAgJjpob3ZlciB7XG4gICAgJHtjc3NgXG4gICAgICBjb2xvcjogaG90cGluaztcbiAgICBgfTtcbiAgfVxuYFxuIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
-}, \\";}\\" + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:thing\\"), process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhbGwtaW5zaWRlLWNhbGwuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRWlCIiwiZmlsZSI6ImNhbGwtaW5zaWRlLWNhbGwuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuXG5jb25zdCB0aGluZyA9IGNzc2BcbiAgZGlzcGxheTogZmxleDtcbiAgJjpob3ZlciB7XG4gICAgJHtjc3NgXG4gICAgICBjb2xvcjogaG90cGluaztcbiAgICBgfTtcbiAgfVxuYFxuIl19 */\\");"
+}, \\";}\\" + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:thing\\"), process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNhbGwtaW5zaWRlLWNhbGwuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRWlCIiwiZmlsZSI6ImNhbGwtaW5zaWRlLWNhbGwuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuY29uc3QgdGhpbmcgPSBjc3NgXG4gIGRpc3BsYXk6IGZsZXg7XG4gICY6aG92ZXIge1xuICAgICR7Y3NzYFxuICAgICAgY29sb3I6IGhvdHBpbms7XG4gICAgYH07XG4gIH1cbmBcbiJdfQ== */\\");"
`;
exports[`emotion-babel-plugin css comment-with-interpolation 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
css\`
// color: \${'green'};
@@ -152,14 +152,14 @@ css\`
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\"
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQtd2l0aC1pbnRlcnBvbGF0aW9uLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVHIiwiZmlsZSI6ImNvbW1lbnQtd2l0aC1pbnRlcnBvbGF0aW9uLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSdcblxuY3NzYFxuICAvLyBjb2xvcjogJHsnZ3JlZW4nfTtcbiAgLypcblxuICBzb21ldGhpbmc6ICR7J3NvbWV0aGluZyd9O1xuXG4gICovXG4gIGNvbG9yOiBob3RwaW5rO1xuYFxuXG5jc3NgXG4gIC8vIGNvbG9yOiAkeydncmVlbid9O1xuICAvKlxuXG4gIHNvbWV0aGluZzogJHsnc29tZXRoaW5nJ307XG5cbiAgKi9cbiAgY29sb3I6ICR7J2hvdHBpbmsnfTtcbmBcbiJdfQ== */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQtd2l0aC1pbnRlcnBvbGF0aW9uLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVHIiwiZmlsZSI6ImNvbW1lbnQtd2l0aC1pbnRlcnBvbGF0aW9uLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmNzc2BcbiAgLy8gY29sb3I6ICR7J2dyZWVuJ307XG4gIC8qXG5cbiAgc29tZXRoaW5nOiAkeydzb21ldGhpbmcnfTtcblxuICAqL1xuICBjb2xvcjogaG90cGluaztcbmBcblxuY3NzYFxuICAvLyBjb2xvcjogJHsnZ3JlZW4nfTtcbiAgLypcblxuICBzb21ldGhpbmc6ICR7J3NvbWV0aGluZyd9O1xuXG4gICovXG4gIGNvbG9yOiAkeydob3RwaW5rJ307XG5gXG4iXX0= */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
process.env.NODE_ENV === \\"production\\" ? {
@@ -168,13 +168,13 @@ process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQtd2l0aC1pbnRlcnBvbGF0aW9uLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVlHIiwiZmlsZSI6ImNvbW1lbnQtd2l0aC1pbnRlcnBvbGF0aW9uLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSdcblxuY3NzYFxuICAvLyBjb2xvcjogJHsnZ3JlZW4nfTtcbiAgLypcblxuICBzb21ldGhpbmc6ICR7J3NvbWV0aGluZyd9O1xuXG4gICovXG4gIGNvbG9yOiBob3RwaW5rO1xuYFxuXG5jc3NgXG4gIC8vIGNvbG9yOiAkeydncmVlbid9O1xuICAvKlxuXG4gIHNvbWV0aGluZzogJHsnc29tZXRoaW5nJ307XG5cbiAgKi9cbiAgY29sb3I6ICR7J2hvdHBpbmsnfTtcbmBcbiJdfQ== */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbW1lbnQtd2l0aC1pbnRlcnBvbGF0aW9uLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQVlHIiwiZmlsZSI6ImNvbW1lbnQtd2l0aC1pbnRlcnBvbGF0aW9uLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmNzc2BcbiAgLy8gY29sb3I6ICR7J2dyZWVuJ307XG4gIC8qXG5cbiAgc29tZXRoaW5nOiAkeydzb21ldGhpbmcnfTtcblxuICAqL1xuICBjb2xvcjogaG90cGluaztcbmBcblxuY3NzYFxuICAvLyBjb2xvcjogJHsnZ3JlZW4nfTtcbiAgLypcblxuICBzb21ldGhpbmc6ICR7J3NvbWV0aGluZyd9O1xuXG4gICovXG4gIGNvbG9yOiAkeydob3RwaW5rJ307XG5gXG4iXX0= */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};"
`;
exports[`emotion-babel-plugin css impure 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
function thing() {}
@@ -187,20 +187,20 @@ function doThing() {
↓ ↓ ↓ ↓ ↓ ↓
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
function thing() {}
function doThing() {
return (
/*#__PURE__*/
- css(\\"display:\\", thing(), \\";\\" + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImltcHVyZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLWSIsImZpbGUiOiJpbXB1cmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuXG5mdW5jdGlvbiB0aGluZygpIHt9XG5cbmZ1bmN0aW9uIGRvVGhpbmcoKSB7XG4gIHJldHVybiBjc3NgXG4gICAgZGlzcGxheTogJHt0aGluZygpfTtcbiAgYFxufVxuIl19 */\\"))
+ css(\\"display:\\", thing(), \\";\\" + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImltcHVyZS5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFLWSIsImZpbGUiOiJpbXB1cmUuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuZnVuY3Rpb24gdGhpbmcoKSB7fVxuXG5mdW5jdGlvbiBkb1RoaW5nKCkge1xuICByZXR1cm4gY3NzYFxuICAgIGRpc3BsYXk6ICR7dGhpbmcoKX07XG4gIGBcbn1cbiJdfQ== */\\"))
);
}"
`;
exports[`emotion-babel-plugin css inside-anonymous-arrow-function 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
export default () => {
css\`
@@ -213,7 +213,7 @@ export default () => {
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -221,7 +221,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc2lkZS1hbm9ueW1vdXMtYXJyb3ctZnVuY3Rpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0siLCJmaWxlIjoiaW5zaWRlLWFub255bW91cy1hcnJvdy1mdW5jdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnXG5cbmV4cG9ydCBkZWZhdWx0ICgpID0+IHtcbiAgY3NzYFxuICAgIGNvbG9yOiBob3RwaW5rO1xuICBgXG59XG4iXX0= */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc2lkZS1hbm9ueW1vdXMtYXJyb3ctZnVuY3Rpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0siLCJmaWxlIjoiaW5zaWRlLWFub255bW91cy1hcnJvdy1mdW5jdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5leHBvcnQgZGVmYXVsdCAoKSA9PiB7XG4gIGNzc2BcbiAgICBjb2xvcjogaG90cGluaztcbiAgYFxufVxuIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
@@ -231,7 +231,7 @@ export default (() => {
`;
exports[`emotion-babel-plugin css inside-anonymous-function 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
export default () => {
css\`
@@ -244,7 +244,7 @@ export default () => {
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -252,7 +252,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc2lkZS1hbm9ueW1vdXMtZnVuY3Rpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0siLCJmaWxlIjoiaW5zaWRlLWFub255bW91cy1mdW5jdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnXG5cbmV4cG9ydCBkZWZhdWx0ICgpID0+IHtcbiAgY3NzYFxuICAgIGNvbG9yOiBob3RwaW5rO1xuICBgXG59XG4iXX0= */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc2lkZS1hbm9ueW1vdXMtZnVuY3Rpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0siLCJmaWxlIjoiaW5zaWRlLWFub255bW91cy1mdW5jdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5leHBvcnQgZGVmYXVsdCAoKSA9PiB7XG4gIGNzc2BcbiAgICBjb2xvcjogaG90cGluaztcbiAgYFxufVxuIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
@@ -264,7 +264,7 @@ export default (() => {
exports[`emotion-babel-plugin css inside-class 1`] = `
"/** @jsx jsx */
import { Component } from 'react'
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
class SomeComponent extends Component {
render() {
@@ -285,7 +285,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to string
/** @jsx jsx */
import { Component } from 'react';
-import { jsx, css } from '@emotion/core';
+import { jsx, css } from '@emotion/react';
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -293,7 +293,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"1wl9j1m-SomeComponent\\",
styles: \\"color:hotpink;label:SomeComponent;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc2lkZS1jbGFzcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRZ0IiLCJmaWxlIjoiaW5zaWRlLWNsYXNzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBDb21wb25lbnQgfSBmcm9tICdyZWFjdCdcbmltcG9ydCB7IGpzeCwgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSdcblxuY2xhc3MgU29tZUNvbXBvbmVudCBleHRlbmRzIENvbXBvbmVudCB7XG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gKFxuICAgICAgPGRpdlxuICAgICAgICBjc3M9e2Nzc2BcbiAgICAgICAgICBjb2xvcjogaG90cGluaztcbiAgICAgICAgYH1cbiAgICAgIC8+XG4gICAgKVxuICB9XG59XG4iXX0= */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc2lkZS1jbGFzcy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFRZ0IiLCJmaWxlIjoiaW5zaWRlLWNsYXNzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBDb21wb25lbnQgfSBmcm9tICdyZWFjdCdcbmltcG9ydCB7IGpzeCwgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmNsYXNzIFNvbWVDb21wb25lbnQgZXh0ZW5kcyBDb21wb25lbnQge1xuICByZW5kZXIoKSB7XG4gICAgcmV0dXJuIChcbiAgICAgIDxkaXZcbiAgICAgICAgY3NzPXtjc3NgXG4gICAgICAgICAgY29sb3I6IGhvdHBpbms7XG4gICAgICAgIGB9XG4gICAgICAvPlxuICAgIClcbiAgfVxufVxuIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
@@ -306,7 +306,7 @@ class SomeComponent extends Component {
`;
exports[`emotion-babel-plugin css inside-non-pascal-case-arrow-function 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
let something = () => {
css\`
@@ -319,7 +319,7 @@ let something = () => {
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -327,7 +327,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc2lkZS1ub24tcGFzY2FsLWNhc2UtYXJyb3ctZnVuY3Rpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0siLCJmaWxlIjoiaW5zaWRlLW5vbi1wYXNjYWwtY2FzZS1hcnJvdy1mdW5jdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnXG5cbmxldCBzb21ldGhpbmcgPSAoKSA9PiB7XG4gIGNzc2BcbiAgICBjb2xvcjogaG90cGluaztcbiAgYFxufVxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImluc2lkZS1ub24tcGFzY2FsLWNhc2UtYXJyb3ctZnVuY3Rpb24uanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR0siLCJmaWxlIjoiaW5zaWRlLW5vbi1wYXNjYWwtY2FzZS1hcnJvdy1mdW5jdGlvbi5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5sZXQgc29tZXRoaW5nID0gKCkgPT4ge1xuICBjc3NgXG4gICAgY29sb3I6IGhvdHBpbms7XG4gIGBcbn1cbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
@@ -337,7 +337,7 @@ let something = () => {
`;
exports[`emotion-babel-plugin css label-1 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
const thing = css\`
color: hotpink;
@@ -348,20 +348,20 @@ const thing = css\`
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
const thing = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\"
} : {
name: \\"1hi0qos-thing\\",
styles: \\"color:hotpink;label:thing;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLTEuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRWlCIiwiZmlsZSI6ImxhYmVsLTEuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuXG5jb25zdCB0aGluZyA9IGNzc2BcbiAgY29sb3I6IGhvdHBpbms7XG5gXG4iXX0= */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLTEuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBRWlCIiwiZmlsZSI6ImxhYmVsLTEuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuY29uc3QgdGhpbmcgPSBjc3NgXG4gIGNvbG9yOiBob3RwaW5rO1xuYFxuIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};"
`;
exports[`emotion-babel-plugin css label-no-final-semi 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
// prettier-ignore
const thing = css\`
@@ -373,7 +373,7 @@ const thing = css\`
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core'; // prettier-ignore
+import { css } from '@emotion/react'; // prettier-ignore
const thing = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -381,13 +381,13 @@ const thing = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"1hi0qos-thing\\",
styles: \\"color:hotpink;label:thing;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLW5vLWZpbmFsLXNlbWkuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR2lCIiwiZmlsZSI6ImxhYmVsLW5vLWZpbmFsLXNlbWkuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuXG4vLyBwcmV0dGllci1pZ25vcmVcbmNvbnN0IHRoaW5nID0gY3NzYFxuICBjb2xvcjogaG90cGlua1xuYFxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLW5vLWZpbmFsLXNlbWkuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBR2lCIiwiZmlsZSI6ImxhYmVsLW5vLWZpbmFsLXNlbWkuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuLy8gcHJldHRpZXItaWdub3JlXG5jb25zdCB0aGluZyA9IGNzc2BcbiAgY29sb3I6IGhvdHBpbmtcbmBcbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};"
`;
exports[`emotion-babel-plugin css label-object 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
const thing = {
thisShouldBeTheLabel: css\`
@@ -404,7 +404,7 @@ const thing = {
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
const thing = {
thisShouldBeTheLabel: process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -412,7 +412,7 @@ const thing = {
} : {
name: \\"xjpive-thisShouldBeTheLabel\\",
styles: \\"color:hotpink;label:thisShouldBeTheLabel;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLW9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHMkIiLCJmaWxlIjoibGFiZWwtb2JqZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSdcblxuY29uc3QgdGhpbmcgPSB7XG4gIHRoaXNTaG91bGRCZVRoZUxhYmVsOiBjc3NgXG4gICAgY29sb3I6IGhvdHBpbms7XG4gIGAsXG4gIC8vIHByZXR0aWVyLWlnbm9yZVxuICAnc2hvdWxkQmVBbm90aGVyTGFiZWwnOmNzc2BcbiAgICBjb2xvcjpncmVlbjtcbiAgYFxufVxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLW9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHMkIiLCJmaWxlIjoibGFiZWwtb2JqZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmNvbnN0IHRoaW5nID0ge1xuICB0aGlzU2hvdWxkQmVUaGVMYWJlbDogY3NzYFxuICAgIGNvbG9yOiBob3RwaW5rO1xuICBgLFxuICAvLyBwcmV0dGllci1pZ25vcmVcbiAgJ3Nob3VsZEJlQW5vdGhlckxhYmVsJzpjc3NgXG4gICAgY29sb3I6Z3JlZW47XG4gIGBcbn1cbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
},
// prettier-ignore
@@ -422,14 +422,14 @@ const thing = {
} : {
name: \\"lgalrw-shouldBeAnotherLabel\\",
styles: \\"color:green;label:shouldBeAnotherLabel;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLW9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPNEIiLCJmaWxlIjoibGFiZWwtb2JqZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSdcblxuY29uc3QgdGhpbmcgPSB7XG4gIHRoaXNTaG91bGRCZVRoZUxhYmVsOiBjc3NgXG4gICAgY29sb3I6IGhvdHBpbms7XG4gIGAsXG4gIC8vIHByZXR0aWVyLWlnbm9yZVxuICAnc2hvdWxkQmVBbm90aGVyTGFiZWwnOmNzc2BcbiAgICBjb2xvcjpncmVlbjtcbiAgYFxufVxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLW9iamVjdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFPNEIiLCJmaWxlIjoibGFiZWwtb2JqZWN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmNvbnN0IHRoaW5nID0ge1xuICB0aGlzU2hvdWxkQmVUaGVMYWJlbDogY3NzYFxuICAgIGNvbG9yOiBob3RwaW5rO1xuICBgLFxuICAvLyBwcmV0dGllci1pZ25vcmVcbiAgJ3Nob3VsZEJlQW5vdGhlckxhYmVsJzpjc3NgXG4gICAgY29sb3I6Z3JlZW47XG4gIGBcbn1cbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
}
};"
`;
exports[`emotion-babel-plugin css label-transpiled-by-ts 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
import { __makeTemplateObject } from 'tslib'
var templateObject_1
@@ -445,16 +445,16 @@ const someVar = css(
↓ ↓ ↓ ↓ ↓ ↓
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
import { __makeTemplateObject } from 'tslib';
var templateObject_1;
const someVar =
/*#__PURE__*/
-css(templateObject_1 || (templateObject_1 = __makeTemplateObject(['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:someVar\\") + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2dCIiwiZmlsZSI6ImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tICd0c2xpYidcblxudmFyIHRlbXBsYXRlT2JqZWN0XzFcblxuY29uc3Qgc29tZVZhciA9IGNzcyhcbiAgdGVtcGxhdGVPYmplY3RfMSB8fFxuICAgICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoXG4gICAgICBbJ1xcbiAgY29sb3I6IGhvdHBpbms7XFxuJ10sXG4gICAgICBbJ1xcbiAgY29sb3I6IGhvdHBpbms7XFxuJ11cbiAgICApKVxuKVxuIl19 */\\")], ['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:someVar\\") + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2dCIiwiZmlsZSI6ImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuaW1wb3J0IHsgX19tYWtlVGVtcGxhdGVPYmplY3QgfSBmcm9tICd0c2xpYidcblxudmFyIHRlbXBsYXRlT2JqZWN0XzFcblxuY29uc3Qgc29tZVZhciA9IGNzcyhcbiAgdGVtcGxhdGVPYmplY3RfMSB8fFxuICAgICh0ZW1wbGF0ZU9iamVjdF8xID0gX19tYWtlVGVtcGxhdGVPYmplY3QoXG4gICAgICBbJ1xcbiAgY29sb3I6IGhvdHBpbms7XFxuJ10sXG4gICAgICBbJ1xcbiAgY29sb3I6IGhvdHBpbms7XFxuJ11cbiAgICApKVxuKVxuIl19 */\\")])));"
+css(templateObject_1 || (templateObject_1 = __makeTemplateObject(['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:someVar\\") + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2dCIiwiZmlsZSI6ImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IF9fbWFrZVRlbXBsYXRlT2JqZWN0IH0gZnJvbSAndHNsaWInXG5cbnZhciB0ZW1wbGF0ZU9iamVjdF8xXG5cbmNvbnN0IHNvbWVWYXIgPSBjc3MoXG4gIHRlbXBsYXRlT2JqZWN0XzEgfHxcbiAgICAodGVtcGxhdGVPYmplY3RfMSA9IF9fbWFrZVRlbXBsYXRlT2JqZWN0KFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddLFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddXG4gICAgKSlcbilcbiJdfQ== */\\")], ['\\\\n color: hotpink;\\\\n' + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:someVar\\") + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS2dCIiwiZmlsZSI6ImxhYmVsLXRyYW5zcGlsZWQtYnktdHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcbmltcG9ydCB7IF9fbWFrZVRlbXBsYXRlT2JqZWN0IH0gZnJvbSAndHNsaWInXG5cbnZhciB0ZW1wbGF0ZU9iamVjdF8xXG5cbmNvbnN0IHNvbWVWYXIgPSBjc3MoXG4gIHRlbXBsYXRlT2JqZWN0XzEgfHxcbiAgICAodGVtcGxhdGVPYmplY3RfMSA9IF9fbWFrZVRlbXBsYXRlT2JqZWN0KFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddLFxuICAgICAgWydcXG4gIGNvbG9yOiBob3RwaW5rO1xcbiddXG4gICAgKSlcbilcbiJdfQ== */\\")])));"
`;
exports[`emotion-babel-plugin css multiple-calls 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
const thing = css\`
color: hotpink;
@@ -469,14 +469,14 @@ const otherThing = css\`
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
const thing = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\"
} : {
name: \\"1hi0qos-thing\\",
styles: \\"color:hotpink;label:thing;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm11bHRpcGxlLWNhbGxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVpQiIsImZpbGUiOiJtdWx0aXBsZS1jYWxscy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnXG5cbmNvbnN0IHRoaW5nID0gY3NzYFxuICBjb2xvcjogaG90cGluaztcbmBcblxuY29uc3Qgb3RoZXJUaGluZyA9IGNzc2BcbiAgY29sb3I6IGdyZWVuO1xuYFxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm11bHRpcGxlLWNhbGxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVpQiIsImZpbGUiOiJtdWx0aXBsZS1jYWxscy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5jb25zdCB0aGluZyA9IGNzc2BcbiAgY29sb3I6IGhvdHBpbms7XG5gXG5cbmNvbnN0IG90aGVyVGhpbmcgPSBjc3NgXG4gIGNvbG9yOiBncmVlbjtcbmBcbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
const otherThing = process.env.NODE_ENV === \\"production\\" ? {
@@ -485,22 +485,22 @@ const otherThing = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"onvdw0-otherThing\\",
styles: \\"color:green;label:otherThing;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm11bHRpcGxlLWNhbGxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU1zQiIsImZpbGUiOiJtdWx0aXBsZS1jYWxscy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnXG5cbmNvbnN0IHRoaW5nID0gY3NzYFxuICBjb2xvcjogaG90cGluaztcbmBcblxuY29uc3Qgb3RoZXJUaGluZyA9IGNzc2BcbiAgY29sb3I6IGdyZWVuO1xuYFxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm11bHRpcGxlLWNhbGxzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQU1zQiIsImZpbGUiOiJtdWx0aXBsZS1jYWxscy5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5jb25zdCB0aGluZyA9IGNzc2BcbiAgY29sb3I6IGhvdHBpbms7XG5gXG5cbmNvbnN0IG90aGVyVGhpbmcgPSBjc3NgXG4gIGNvbG9yOiBncmVlbjtcbmBcbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};"
`;
exports[`emotion-babel-plugin css no-actual-import 1`] = `
-"import '@emotion/core'
+"import '@emotion/react'
↓ ↓ ↓ ↓ ↓ ↓
-import '@emotion/core';"
+import '@emotion/react';"
`;
exports[`emotion-babel-plugin css object-dynamic-property 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
function doThing() {
return {
@@ -513,7 +513,7 @@ function doThing() {
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -521,7 +521,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9iamVjdC1keW5hbWljLXByb3BlcnR5LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlLIiwiZmlsZSI6Im9iamVjdC1keW5hbWljLXByb3BlcnR5LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSdcblxuZnVuY3Rpb24gZG9UaGluZygpIHtcbiAgcmV0dXJuIHtcbiAgICBbY3NzKHsgY29sb3I6ICdob3RwaW5rJyB9KV06ICdjb2xkYmx1ZSdcbiAgfVxufVxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9iamVjdC1keW5hbWljLXByb3BlcnR5LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlLIiwiZmlsZSI6Im9iamVjdC1keW5hbWljLXByb3BlcnR5LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmZ1bmN0aW9uIGRvVGhpbmcoKSB7XG4gIHJldHVybiB7XG4gICAgW2Nzcyh7IGNvbG9yOiAnaG90cGluaycgfSldOiAnY29sZGJsdWUnXG4gIH1cbn1cbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
@@ -533,8 +533,8 @@ function doThing() {
`;
exports[`emotion-babel-plugin css object-pattern-variable-declarator 1`] = `
-"import { css } from '@emotion/core'
-import { extractCritical } from 'emotion-server'
+"import { css } from '@emotion/react'
+import { extractCritical } from '@emotion/server'
import React from 'react'
import { renderToString } from 'react-dom/server'
@@ -553,8 +553,8 @@ const { css: styles } = extractCritical(
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
-import { extractCritical } from 'emotion-server';
+import { css } from '@emotion/react';
+import { extractCritical } from '@emotion/server';
import React from 'react';
import { renderToString } from 'react-dom/server';
const {
@@ -565,25 +565,25 @@ const {
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9iamVjdC1wYXR0ZXJuLXZhcmlhYmxlLWRlY2xhcmF0b3IuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUWMiLCJmaWxlIjoib2JqZWN0LXBhdHRlcm4tdmFyaWFibGUtZGVjbGFyYXRvci5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnXG5pbXBvcnQgeyBleHRyYWN0Q3JpdGljYWwgfSBmcm9tICdlbW90aW9uLXNlcnZlcidcbmltcG9ydCBSZWFjdCBmcm9tICdyZWFjdCdcbmltcG9ydCB7IHJlbmRlclRvU3RyaW5nIH0gZnJvbSAncmVhY3QtZG9tL3NlcnZlcidcblxuY29uc3QgeyBjc3M6IHN0eWxlcyB9ID0gZXh0cmFjdENyaXRpY2FsKFxuICByZW5kZXJUb1N0cmluZyhcbiAgICA8ZGl2XG4gICAgICBjc3M9e2Nzc2BcbiAgICAgICAgY29sb3I6IGhvdHBpbms7XG4gICAgICBgfVxuICAgIC8+XG4gIClcbilcbiJdfQ== */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIm9iamVjdC1wYXR0ZXJuLXZhcmlhYmxlLWRlY2xhcmF0b3IuanMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBUWMiLCJmaWxlIjoib2JqZWN0LXBhdHRlcm4tdmFyaWFibGUtZGVjbGFyYXRvci5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuaW1wb3J0IHsgZXh0cmFjdENyaXRpY2FsIH0gZnJvbSAnQGVtb3Rpb24vc2VydmVyJ1xuaW1wb3J0IFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgcmVuZGVyVG9TdHJpbmcgfSBmcm9tICdyZWFjdC1kb20vc2VydmVyJ1xuXG5jb25zdCB7IGNzczogc3R5bGVzIH0gPSBleHRyYWN0Q3JpdGljYWwoXG4gIHJlbmRlclRvU3RyaW5nKFxuICAgIDxkaXZcbiAgICAgIGNzcz17Y3NzYFxuICAgICAgICBjb2xvcjogaG90cGluaztcbiAgICAgIGB9XG4gICAgLz5cbiAgKVxuKVxuIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
}} />));"
`;
exports[`emotion-babel-plugin css other-imports 1`] = `
-"import { nonExistantImport } from '@emotion/core'
+"import { nonExistantImport } from '@emotion/react'
nonExistantImport()
↓ ↓ ↓ ↓ ↓ ↓
-import { nonExistantImport } from '@emotion/core';
+import { nonExistantImport } from '@emotion/react';
nonExistantImport();"
`;
exports[`emotion-babel-plugin css remove-block-comments 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
css\`
/* color:green;
@@ -597,20 +597,20 @@ ddjfwjkng
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\"
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlbW92ZS1ibG9jay1jb21tZW50cy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFRyIsImZpbGUiOiJyZW1vdmUtYmxvY2stY29tbWVudHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuXG5jc3NgXG4gIC8qIGNvbG9yOmdyZWVuO1xuZGRqZndqa25nXG4gICovXG4gIGNvbG9yOiBob3RwaW5rO1xuYFxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlbW92ZS1ibG9jay1jb21tZW50cy5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFRyIsImZpbGUiOiJyZW1vdmUtYmxvY2stY29tbWVudHMuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuY3NzYFxuICAvKiBjb2xvcjpncmVlbjtcbmRkamZ3amtuZ1xuICAqL1xuICBjb2xvcjogaG90cGluaztcbmBcbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};"
`;
exports[`emotion-babel-plugin css remove-line-comments 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
css\`
// color: green;
@@ -622,20 +622,20 @@ css\`
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\"
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlbW92ZS1saW5lLWNvbW1lbnRzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVHIiwiZmlsZSI6InJlbW92ZS1saW5lLWNvbW1lbnRzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSdcblxuY3NzYFxuICAvLyBjb2xvcjogZ3JlZW47XG4gIGNvbG9yOiBob3RwaW5rO1xuYFxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInJlbW92ZS1saW5lLWNvbW1lbnRzLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUVHIiwiZmlsZSI6InJlbW92ZS1saW5lLWNvbW1lbnRzLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmNzc2BcbiAgLy8gY29sb3I6IGdyZWVuO1xuICBjb2xvcjogaG90cGluaztcbmBcbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};"
`;
exports[`emotion-babel-plugin css tagged-template-args-forwarded 1`] = `
-"import { css } from '@emotion/core'
+"import { css } from '@emotion/react'
function media(...args) {
return css\`
@@ -652,18 +652,18 @@ const test = css\`
↓ ↓ ↓ ↓ ↓ ↓
-import { css } from '@emotion/core';
+import { css } from '@emotion/react';
function media(...args) {
return (
/*#__PURE__*/
css(\\"@media (min-width:100px){\\",
/*#__PURE__*/
- css(...args), \\";}\\" + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRhZ2dlZC10ZW1wbGF0ZS1hcmdzLWZvcndhcmRlZC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHWSIsImZpbGUiOiJ0YWdnZWQtdGVtcGxhdGUtYXJncy1mb3J3YXJkZWQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuXG5mdW5jdGlvbiBtZWRpYSguLi5hcmdzKSB7XG4gIHJldHVybiBjc3NgXG4gICAgQG1lZGlhIChtaW4td2lkdGg6IDEwMHB4KSB7XG4gICAgICAke2NzcyguLi5hcmdzKX07XG4gICAgfVxuICBgXG59XG5cbmNvbnN0IHRlc3QgPSBjc3NgXG4gICR7bWVkaWFgY29sb3I6IHJlZDtgfTtcbmBcbiJdfQ== */\\"))
+ css(...args), \\";}\\" + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRhZ2dlZC10ZW1wbGF0ZS1hcmdzLWZvcndhcmRlZC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHWSIsImZpbGUiOiJ0YWdnZWQtdGVtcGxhdGUtYXJncy1mb3J3YXJkZWQuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgeyBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuZnVuY3Rpb24gbWVkaWEoLi4uYXJncykge1xuICByZXR1cm4gY3NzYFxuICAgIEBtZWRpYSAobWluLXdpZHRoOiAxMDBweCkge1xuICAgICAgJHtjc3MoLi4uYXJncyl9O1xuICAgIH1cbiAgYFxufVxuXG5jb25zdCB0ZXN0ID0gY3NzYFxuICAke21lZGlhYGNvbG9yOiByZWQ7YH07XG5gXG4iXX0= */\\"))
);
}
const test =
/*#__PURE__*/
-css(media\`color: red;\`, \\";\\" + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:test\\"), process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRhZ2dlZC10ZW1wbGF0ZS1hcmdzLWZvcndhcmRlZC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVZ0IiLCJmaWxlIjoidGFnZ2VkLXRlbXBsYXRlLWFyZ3MtZm9yd2FyZGVkLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vY29yZSdcblxuZnVuY3Rpb24gbWVkaWEoLi4uYXJncykge1xuICByZXR1cm4gY3NzYFxuICAgIEBtZWRpYSAobWluLXdpZHRoOiAxMDBweCkge1xuICAgICAgJHtjc3MoLi4uYXJncyl9O1xuICAgIH1cbiAgYFxufVxuXG5jb25zdCB0ZXN0ID0gY3NzYFxuICAke21lZGlhYGNvbG9yOiByZWQ7YH07XG5gXG4iXX0= */\\");"
+css(media\`color: red;\`, \\";\\" + (process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\";label:test\\"), process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInRhZ2dlZC10ZW1wbGF0ZS1hcmdzLWZvcndhcmRlZC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFVZ0IiLCJmaWxlIjoidGFnZ2VkLXRlbXBsYXRlLWFyZ3MtZm9yd2FyZGVkLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmZ1bmN0aW9uIG1lZGlhKC4uLmFyZ3MpIHtcbiAgcmV0dXJuIGNzc2BcbiAgICBAbWVkaWEgKG1pbi13aWR0aDogMTAwcHgpIHtcbiAgICAgICR7Y3NzKC4uLmFyZ3MpfTtcbiAgICB9XG4gIGBcbn1cblxuY29uc3QgdGVzdCA9IGNzc2BcbiAgJHttZWRpYWBjb2xvcjogcmVkO2B9O1xuYFxuIl19 */\\");"
`;
diff --git a/packages/babel-plugin-emotion/__tests__/__snapshots__/global-requires-options.js.snap b/packages/babel-plugin/__tests__/__snapshots__/global-requires-options.js.snap
similarity index 82%
rename from packages/babel-plugin-emotion/__tests__/__snapshots__/global-requires-options.js.snap
rename to packages/babel-plugin/__tests__/__snapshots__/global-requires-options.js.snap
index c0fcf5905..cfdca2628 100644
--- a/packages/babel-plugin-emotion/__tests__/__snapshots__/global-requires-options.js.snap
+++ b/packages/babel-plugin/__tests__/__snapshots__/global-requires-options.js.snap
@@ -3,7 +3,7 @@
exports[`Global inline source maps can be disabled 1`] = `
"
import * as React from 'react'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
export default () =>
@@ -11,7 +11,7 @@ export default () =>
↓ ↓ ↓ ↓ ↓ ↓
import * as React from 'react';
-import { Global } from '@emotion/core';
+import { Global } from '@emotion/react';
var _ref = {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\"
diff --git a/packages/babel-plugin-emotion/__tests__/__snapshots__/global.js.snap b/packages/babel-plugin/__tests__/__snapshots__/global.js.snap
similarity index 74%
rename from packages/babel-plugin-emotion/__tests__/__snapshots__/global.js.snap
rename to packages/babel-plugin/__tests__/__snapshots__/global.js.snap
index 1ee3f9fb4..bcb82ca88 100644
--- a/packages/babel-plugin-emotion/__tests__/__snapshots__/global.js.snap
+++ b/packages/babel-plugin/__tests__/__snapshots__/global.js.snap
@@ -2,7 +2,7 @@
exports[`emotion-babel-plugin Global basic-array 1`] = `
"import * as React from 'react'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
export default () => (
@@ -14,7 +14,7 @@ export default () => (
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
import * as React from 'react';
-import { Global } from '@emotion/core';
+import { Global } from '@emotion/react';
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"9aoaei\\",
@@ -22,7 +22,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"9aoaei\\",
styles: \\"color:hotpink;background-color:#fff\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2ljLWFycmF5LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlVIiwiZmlsZSI6ImJhc2ljLWFycmF5LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgUmVhY3QgZnJvbSAncmVhY3QnXG5pbXBvcnQgeyBHbG9iYWwgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuXG5leHBvcnQgZGVmYXVsdCAoKSA9PiAoXG4gIDxHbG9iYWwgc3R5bGVzPXtbeyBjb2xvcjogJ2hvdHBpbmsnIH0sIHsgYmFja2dyb3VuZENvbG9yOiAnI2ZmZicgfV19IC8+XG4pXG4iXX0= */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2ljLWFycmF5LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlVIiwiZmlsZSI6ImJhc2ljLWFycmF5LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgUmVhY3QgZnJvbSAncmVhY3QnXG5pbXBvcnQgeyBHbG9iYWwgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuZXhwb3J0IGRlZmF1bHQgKCkgPT4gKFxuICA8R2xvYmFsIHN0eWxlcz17W3sgY29sb3I6ICdob3RwaW5rJyB9LCB7IGJhY2tncm91bmRDb2xvcjogJyNmZmYnIH1dfSAvPlxuKVxuIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
@@ -31,7 +31,7 @@ export default (() => );"
exports[`emotion-babel-plugin Global basic-obj 1`] = `
"import * as React from 'react'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
export default () =>
@@ -41,7 +41,7 @@ export default () =>
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
import * as React from 'react';
-import { Global } from '@emotion/core';
+import { Global } from '@emotion/react';
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -49,7 +49,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2ljLW9iai5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHNkIiLCJmaWxlIjoiYmFzaWMtb2JqLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgUmVhY3QgZnJvbSAncmVhY3QnXG5pbXBvcnQgeyBHbG9iYWwgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuXG5leHBvcnQgZGVmYXVsdCAoKSA9PiA8R2xvYmFsIHN0eWxlcz17eyBjb2xvcjogJ2hvdHBpbmsnIH19IC8+XG4iXX0= */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImJhc2ljLW9iai5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFHNkIiLCJmaWxlIjoiYmFzaWMtb2JqLmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICogYXMgUmVhY3QgZnJvbSAncmVhY3QnXG5pbXBvcnQgeyBHbG9iYWwgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuZXhwb3J0IGRlZmF1bHQgKCkgPT4gPEdsb2JhbCBzdHlsZXM9e3sgY29sb3I6ICdob3RwaW5rJyB9fSAvPlxuIl19 */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
@@ -58,7 +58,7 @@ export default (() => );"
exports[`emotion-babel-plugin Global complex-array 1`] = `
"import * as React from 'react'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
const getBgColor = () => ({ backgroundColor: '#fff' })
@@ -68,18 +68,18 @@ export default () =>
↓ ↓ ↓ ↓ ↓ ↓
import * as React from 'react';
-import { Global } from '@emotion/core';
+import { Global } from '@emotion/react';
const getBgColor = () => ({
backgroundColor: '#fff'
});
-export default (() => );"
+export default (() => );"
`;
exports[`emotion-babel-plugin Global complex-obj 1`] = `
"import * as React from 'react'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
const getBgColor = () => ({ backgroundColor: '#fff' })
@@ -88,9 +88,9 @@ export default () =>
↓ ↓ ↓ ↓ ↓ ↓
-import { css as _css } from \\"@emotion/core\\";
+import { css as _css } from \\"@emotion/react\\";
import * as React from 'react';
-import { Global } from '@emotion/core';
+import { Global } from '@emotion/react';
const getBgColor = () => ({
backgroundColor: '#fff'
@@ -101,12 +101,12 @@ export default (() => );"
+}, process.env.NODE_ENV === \\"production\\" ? \\"\\" : \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvbXBsZXgtb2JqLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUs2QiIsImZpbGUiOiJjb21wbGV4LW9iai5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgR2xvYmFsIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5cbmNvbnN0IGdldEJnQ29sb3IgPSAoKSA9PiAoeyBiYWNrZ3JvdW5kQ29sb3I6ICcjZmZmJyB9KVxuXG5leHBvcnQgZGVmYXVsdCAoKSA9PiA8R2xvYmFsIHN0eWxlcz17eyBjb2xvcjogJ2hvdHBpbmsnLCAuLi5nZXRCZ0NvbG9yKCkgfX0gLz5cbiJdfQ== */\\")} />);"
`;
exports[`emotion-babel-plugin Global css-used-as-value 1`] = `
"import * as React from 'react'
-import { Global, css } from '@emotion/core'
+import { Global, css } from '@emotion/react'
// this gets ignored by Global macro, but it tests that this combination doesn't crash or something
export default () =>
@@ -117,7 +117,7 @@ export default () =>
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
import * as React from 'react';
-import { Global, css } from '@emotion/core'; // this gets ignored by Global macro, but it tests that this combination doesn't crash or something
+import { Global, css } from '@emotion/react'; // this gets ignored by Global macro, but it tests that this combination doesn't crash or something
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -125,7 +125,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy11c2VkLWFzLXZhbHVlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlxQyIsImZpbGUiOiJjc3MtdXNlZC1hcy12YWx1ZS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgR2xvYmFsLCBjc3MgfSBmcm9tICdAZW1vdGlvbi9jb3JlJ1xuXG4vLyB0aGlzIGdldHMgaWdub3JlZCBieSBHbG9iYWwgbWFjcm8sIGJ1dCBpdCB0ZXN0cyB0aGF0IHRoaXMgY29tYmluYXRpb24gZG9lc24ndCBjcmFzaCBvciBzb21ldGhpbmdcbmV4cG9ydCBkZWZhdWx0ICgpID0+IDxHbG9iYWwgc3R5bGVzPXtjc3MoeyBjb2xvcjogJ2hvdHBpbmsnIH0pfSAvPlxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNzcy11c2VkLWFzLXZhbHVlLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlxQyIsImZpbGUiOiJjc3MtdXNlZC1hcy12YWx1ZS5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAqIGFzIFJlYWN0IGZyb20gJ3JlYWN0J1xuaW1wb3J0IHsgR2xvYmFsLCBjc3MgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuLy8gdGhpcyBnZXRzIGlnbm9yZWQgYnkgR2xvYmFsIG1hY3JvLCBidXQgaXQgdGVzdHMgdGhhdCB0aGlzIGNvbWJpbmF0aW9uIGRvZXNuJ3QgY3Jhc2ggb3Igc29tZXRoaW5nXG5leHBvcnQgZGVmYXVsdCAoKSA9PiA8R2xvYmFsIHN0eWxlcz17Y3NzKHsgY29sb3I6ICdob3RwaW5rJyB9KX0gLz5cbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
@@ -134,7 +134,7 @@ export default (() => );"
exports[`emotion-babel-plugin Global no-jsx 1`] = `
"import * as React from 'react'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
const foo = Global
@@ -142,13 +142,13 @@ const foo = Global
↓ ↓ ↓ ↓ ↓ ↓
import * as React from 'react';
-import { Global } from '@emotion/core';
+import { Global } from '@emotion/react';
const foo = Global;"
`;
exports[`emotion-babel-plugin Global no-styles-prop 1`] = `
"import * as React from 'react'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
export default () =>
@@ -156,14 +156,14 @@ export default () =>
↓ ↓ ↓ ↓ ↓ ↓
import * as React from 'react';
-import { Global } from '@emotion/core';
+import { Global } from '@emotion/react';
export default (() => );"
`;
exports[`emotion-babel-plugin Global spread-styles 1`] = `
"/* eslint-disable */
import * as React from 'react'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
export default () =>
@@ -172,14 +172,14 @@ export default () =>
/* eslint-disable */
import * as React from 'react';
-import { Global } from '@emotion/core';
+import { Global } from '@emotion/react';
export default (() => );"
`;
exports[`emotion-babel-plugin Global with-closing-element 1`] = `
"/* eslint-disable */
import * as React from 'react'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
// prettier-ignore
export default () =>
@@ -191,7 +191,7 @@ function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to string
/* eslint-disable */
import * as React from 'react';
-import { Global } from '@emotion/core'; // prettier-ignore
+import { Global } from '@emotion/react'; // prettier-ignore
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -199,7 +199,7 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"3sn2xs\\",
styles: \\"color:hotpink\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpdGgtY2xvc2luZy1lbGVtZW50LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUs2QiIsImZpbGUiOiJ3aXRoLWNsb3NpbmctZWxlbWVudC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgKiBhcyBSZWFjdCBmcm9tICdyZWFjdCdcbmltcG9ydCB7IEdsb2JhbCB9IGZyb20gJ0BlbW90aW9uL2NvcmUnXG5cbi8vIHByZXR0aWVyLWlnbm9yZVxuZXhwb3J0IGRlZmF1bHQgKCkgPT4gPEdsb2JhbCBzdHlsZXM9e3sgY29sb3I6ICdob3RwaW5rJyB9fT48L0dsb2JhbD5cbiJdfQ== */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndpdGgtY2xvc2luZy1lbGVtZW50LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUs2QiIsImZpbGUiOiJ3aXRoLWNsb3NpbmctZWxlbWVudC5qcyIsInNvdXJjZXNDb250ZW50IjpbIi8qIGVzbGludC1kaXNhYmxlICovXG5pbXBvcnQgKiBhcyBSZWFjdCBmcm9tICdyZWFjdCdcbmltcG9ydCB7IEdsb2JhbCB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG4vLyBwcmV0dGllci1pZ25vcmVcbmV4cG9ydCBkZWZhdWx0ICgpID0+IDxHbG9iYWwgc3R5bGVzPXt7IGNvbG9yOiAnaG90cGluaycgfX0+PC9HbG9iYWw+XG4iXX0= */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
diff --git a/packages/babel-plugin-emotion/__tests__/__snapshots__/index.js.snap b/packages/babel-plugin/__tests__/__snapshots__/index.js.snap
similarity index 70%
rename from packages/babel-plugin-emotion/__tests__/__snapshots__/index.js.snap
rename to packages/babel-plugin/__tests__/__snapshots__/index.js.snap
index 9b197ca5f..1401aeaa7 100644
--- a/packages/babel-plugin-emotion/__tests__/__snapshots__/index.js.snap
+++ b/packages/babel-plugin/__tests__/__snapshots__/index.js.snap
@@ -1,8 +1,8 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`babel-plugin-emotion core-with-css-import 1`] = `
+exports[`@emotion/babel-plugin core-with-css-import 1`] = `
"/** @jsx jsx */
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
const SomeComponent = props => (
(
function _EMOTION_STRINGIFIED_CSS_ERROR__() { return \\"You have tried to stringify object returned from \`css\` function. It isn't supposed to be used directly (e.g. as value of the \`className\` prop), but rather handed to emotion so it can handle it (e.g. as value of \`css\` prop).\\"; }
/** @jsx jsx */
-import { jsx, css } from '@emotion/core';
+import { jsx, css } from '@emotion/react';
var _ref = process.env.NODE_ENV === \\"production\\" ? {
name: \\"3sn2xs\\",
@@ -27,16 +27,16 @@ var _ref = process.env.NODE_ENV === \\"production\\" ? {
} : {
name: \\"1wl9j1m-SomeComponent\\",
styles: \\"color:hotpink;label:SomeComponent;\\",
- map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvcmUtd2l0aC1jc3MtaW1wb3J0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUtZIiwiZmlsZSI6ImNvcmUtd2l0aC1jc3MtaW1wb3J0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBqc3gsIGNzcyB9IGZyb20gJ0BlbW90aW9uL2NvcmUnXG5cbmNvbnN0IFNvbWVDb21wb25lbnQgPSBwcm9wcyA9PiAoXG4gIDxkaXZcbiAgICBjc3M9e2Nzc2BcbiAgICAgIGNvbG9yOiBob3RwaW5rO1xuICAgIGB9XG4gICAgey4uLnByb3BzfVxuICAvPlxuKVxuIl19 */\\",
+ map: \\"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImNvcmUtd2l0aC1jc3MtaW1wb3J0LmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUtZIiwiZmlsZSI6ImNvcmUtd2l0aC1jc3MtaW1wb3J0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiLyoqIEBqc3gganN4ICovXG5pbXBvcnQgeyBqc3gsIGNzcyB9IGZyb20gJ0BlbW90aW9uL3JlYWN0J1xuXG5jb25zdCBTb21lQ29tcG9uZW50ID0gcHJvcHMgPT4gKFxuICA8ZGl2XG4gICAgY3NzPXtjc3NgXG4gICAgICBjb2xvcjogaG90cGluaztcbiAgICBgfVxuICAgIHsuLi5wcm9wc31cbiAgLz5cbilcbiJdfQ== */\\",
toString: _EMOTION_STRINGIFIED_CSS_ERROR__
};
const SomeComponent = props => ;"
`;
-exports[`babel-plugin-emotion core-with-css-import-dynamic 1`] = `
+exports[`@emotion/babel-plugin core-with-css-import-dynamic 1`] = `
"/** @jsx jsx */
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
const SomeComponent = props => (
- )
- .toJSON()
- expect(tree).toMatchSnapshot()
- })
- test('null rule', () => {
- const cls1 = differentCss()
-
- const tree = renderer.create().toJSON()
- expect(tree).toMatchSnapshot()
- })
- test('css variables', () => {
- const cls1 = differentCss`
- --some-var: 1px;
- width: var(--some-var);
- `
- const tree = renderer.create().toJSON()
- expect(tree).toMatchSnapshot()
- })
-
- test('null value', () => {
- const cls1 = differentCss(null)
- const cls2 = differentCss`
- ${null};
- `
- expect(renderer.create().toJSON()).toMatchSnapshot()
- expect(renderer.create().toJSON()).toMatchSnapshot()
- })
-
- test('flushes correctly', () => {
- const cls1 = differentCss`
- display: flex;
- `
- const tree = renderer.create().toJSON()
- expect(tree).toMatchSnapshot()
- flush()
- const tree2 = renderer.create().toJSON()
- expect(tree2).toMatchSnapshot()
- })
- test('media query specificity', () => {
- flush()
- const cls = differentCss`
- width: 32px;
- height: 32px;
- border-radius: 50%;
-
- @media (min-width: 420px) {
- width: 96px;
- height: 96px;
- }
- `
-
- const tree = renderer.create().toJSON()
- expect(sheet).toMatchSnapshot()
- expect(tree).toMatchSnapshot()
- flush()
- })
- test('weakmap', () => {
- const styles = { display: 'flex' }
- const cls1 = differentCss(styles)
- const cls2 = differentCss(styles)
- const tree1 = renderer.create().toJSON()
- expect(tree1).toMatchSnapshot()
- const tree2 = renderer.create().toJSON()
- expect(tree2).toMatchSnapshot()
- })
-
- test('manually use label property', () => {
- flush()
- const cls1 = differentCss`
- color: hotpink;
- label: wow;
- `
- const tree = renderer.create().toJSON()
- expect(tree).toMatchSnapshot()
- expect(sheet).toMatchSnapshot()
- })
- test('sets correct nonce value', () => {
- flush()
- differentCss`
- color: hotpink;
- `
- differentCss`
- color: yellow;
- `
- expect(sheet.tags).toHaveLength(2)
-
- expect(sheet.tags[0].getAttribute('nonce')).toBe('some-nonce')
- expect(sheet.tags[1].getAttribute('nonce')).toBe('some-nonce')
- })
-})
diff --git a/packages/create-emotion/test/emotion-instance.js b/packages/create-emotion/test/emotion-instance.js
deleted file mode 100644
index c2ea0a34b..000000000
--- a/packages/create-emotion/test/emotion-instance.js
+++ /dev/null
@@ -1,52 +0,0 @@
-// @flow
-import createEmotion from 'create-emotion'
-import createEmotionServer from 'create-emotion-server'
-import { transform } from 'cssjanus'
-
-function stylisPlugin(context, content) {
- if (context === 2) {
- return transform(content)
- }
-}
-
-export let container
-
-if (typeof document !== 'undefined') {
- container = document.createElement('div')
- // $FlowFixMe
- document.head.appendChild(container)
-}
-
-const emotion = createEmotion({
- stylisPlugins: stylisPlugin,
- prefix: (key, value) => {
- if (key === 'display' && value === 'flex') {
- return false
- }
- return true
- },
- nonce: 'some-nonce',
- key: 'some-key',
- container
-})
-
-export const {
- flush,
- hydrate,
- cx,
- merge,
- getRegisteredStyles,
- injectGlobal,
- keyframes,
- css,
- sheet,
- cache
-} = emotion
-
-export const {
- extractCritical,
- renderStylesToString,
- renderStylesToNodeStream
-} = createEmotionServer(cache)
-
-export { default } from '@emotion/styled'
diff --git a/packages/create-emotion/test/inline.test.js b/packages/create-emotion/test/inline.test.js
deleted file mode 100644
index a85bda807..000000000
--- a/packages/create-emotion/test/inline.test.js
+++ /dev/null
@@ -1,76 +0,0 @@
-/**
- * @jest-environment node
- * @flow
- */
-import {
- getComponents,
- getInjectedRules,
- createBigComponent,
- getCssFromChunks,
- setHtml
-} from '../../emotion-server/test/util'
-import { JSDOM } from 'jsdom'
-
-let React
-let renderToString
-let emotion
-let emotionServer
-let reactEmotion
-
-const resetAllModules = () => {
- jest.resetModules()
- React = require('react')
- renderToString = require('react-dom/server').renderToString
- emotion = require('./emotion-instance')
- emotionServer = require('./emotion-instance')
- reactEmotion = require('./emotion-instance')
-}
-
-describe('renderStylesToString', () => {
- beforeEach(resetAllModules)
-
- test('renders styles with ids', () => {
- const { Page1, Page2 } = getComponents(emotion, reactEmotion)
- expect(
- emotionServer.renderStylesToString(renderToString())
- ).toMatchSnapshot()
- expect(
- emotionServer.renderStylesToString(renderToString())
- ).toMatchSnapshot()
- })
- test('renders large recursive component', () => {
- const BigComponent = createBigComponent(emotion)
- expect(
- emotionServer.renderStylesToString(
- renderToString()
- )
- ).toMatchSnapshot()
- })
-})
-describe('hydration', () => {
- beforeEach(resetAllModules)
-
- afterAll(() => {
- global.document = undefined
- global.window = undefined
- })
-
- test('only inserts rules that are not in the critical css', () => {
- const { Page1 } = getComponents(emotion, reactEmotion)
- const html = emotionServer.renderStylesToString(renderToString())
- expect(html).toMatchSnapshot()
- const { window } = new JSDOM(html)
- global.document = window.document
- global.window = window
- setHtml(html, document)
-
- resetAllModules()
-
- expect(emotion.cache.registered).toEqual({})
-
- const { Page1: NewPage1 } = getComponents(emotion, reactEmotion)
- renderToString()
- expect(getInjectedRules()).toMatchSnapshot()
- expect(getCssFromChunks(emotion, document)).toMatchSnapshot()
- })
-})
diff --git a/packages/create-emotion/test/instance.test.js b/packages/create-emotion/test/instance.test.js
deleted file mode 100644
index 22ae98a77..000000000
--- a/packages/create-emotion/test/instance.test.js
+++ /dev/null
@@ -1,21 +0,0 @@
-// @flow
-import createEmotion from 'create-emotion'
-import { container, css, sheet } from './emotion-instance'
-
-describe('general instance tests', () => {
- test('inserts style tags into container', () => {
- css`
- display: flex;
- `
- sheet.tags.forEach(tag => {
- expect(tag.getAttribute('data-emotion')).toBe('some-key')
- expect(tag.getAttribute('nonce')).toBe('some-nonce')
- expect(tag.parentNode).toBe(container)
- })
- })
- test('throws with invalid key', () => {
- expect(() => {
- createEmotion({ key: 'css1' })
- }).toThrowErrorMatchingSnapshot()
- })
-})
diff --git a/packages/create-emotion/test/stream.test.js b/packages/create-emotion/test/stream.test.js
deleted file mode 100644
index 27935abc0..000000000
--- a/packages/create-emotion/test/stream.test.js
+++ /dev/null
@@ -1,72 +0,0 @@
-/**
- * @jest-environment node
- * @flow
- */
-import { JSDOM } from 'jsdom'
-
-let React
-let renderToString
-let emotion
-let emotionServer
-let reactEmotion
-let util
-
-const resetAllModules = () => {
- jest.resetModules()
- React = require('react')
- renderToString = require('react-dom/server').renderToString
- emotion = require('./emotion-instance')
- emotionServer = require('./emotion-instance')
- reactEmotion = require('./emotion-instance')
- util = require('../../emotion-server/test/util')
-}
-
-describe('renderStylesToNodeStream', () => {
- beforeEach(resetAllModules)
-
- test('renders styles with ids', async () => {
- const { Page1, Page2 } = util.getComponents(emotion, reactEmotion)
- expect(
- await util.renderToStringWithStream(, emotionServer)
- ).toMatchSnapshot()
- expect(
- await util.renderToStringWithStream(, emotionServer)
- ).toMatchSnapshot()
- })
- test('renders large recursive component', async () => {
- const BigComponent = util.createBigComponent(emotion)
- expect(
- await util.renderToStringWithStream(
- ,
- emotionServer
- )
- ).toMatchSnapshot()
- })
-})
-describe('hydration', () => {
- beforeEach(resetAllModules)
-
- afterAll(() => {
- global.document = undefined
- global.window = undefined
- })
-
- test('only inserts rules that are not in the critical css', async () => {
- const { Page1 } = util.getComponents(emotion, reactEmotion)
- const html = await util.renderToStringWithStream(, emotionServer)
- expect(html).toMatchSnapshot()
- const { window } = new JSDOM(html)
- global.document = window.document
- global.window = window
- util.setHtml(html, document)
-
- resetAllModules()
-
- expect(emotion.cache.registered).toEqual({})
-
- const { Page1: NewPage1 } = util.getComponents(emotion, reactEmotion)
- renderToString()
- expect(util.getInjectedRules()).toMatchSnapshot()
- expect(util.getCssFromChunks(emotion, document)).toMatchSnapshot()
- })
-})
diff --git a/packages/create-emotion/types/tslint.json b/packages/create-emotion/types/tslint.json
deleted file mode 100644
index bf69b48bd..000000000
--- a/packages/create-emotion/types/tslint.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "extends": "dtslint/dtslint.json",
- "rules": {
- "array-type": [true, "generic"],
- "import-spacing": false,
- "semicolon": false,
- "whitespace": [
- true,
- "check-branch",
- "check-decl",
- "check-operator",
- "check-module",
- "check-rest-spread",
- "check-type",
- "check-typecast",
- "check-type-operator",
- "check-preblock"
- ],
- "no-null-undefined-union": false
- }
-}
\ No newline at end of file
diff --git a/packages/css/CHANGELOG.md b/packages/css/CHANGELOG.md
index ce4d14566..e90151354 100644
--- a/packages/css/CHANGELOG.md
+++ b/packages/css/CHANGELOG.md
@@ -1,71 +1,4 @@
-# @emotion/css
-
-## 11.0.0-next.6
-
-### Major Changes
-
-- [`843bfb11`](https://github.com/emotion-js/emotion/commit/843bfb1153ee0dbe33d005fdd5c5be185daa5c41) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - Removed `@emotion/css` - it's main purpose was to allow `css` to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. `@emotion/core/macro` has been added to account for this use case and appropriate changes has been made to `babel-plugin-emotion` to facilitate those changes.
-
- If you have used `@emotion/css` directly (it was always reexported from `@emotion/core`) or you have been using its macro then you should update your code like this:
-
- ```diff
- -import css from '@emotion/css'
- +import { css } from '@emotion/core'
-
- // or
- -import css from '@emotion/css/macro'
- +import { css } from '@emotion/core/macro'
- ```
-
-## 11.0.0-next.3
-
-### Patch Changes
-
-- Updated dependencies [[`8a896a31`](https://github.com/emotion-js/emotion/commit/8a896a31434a1d2f69e1f1467c446c884c929387), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1), [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85), [`f9feab1a`](https://github.com/emotion-js/emotion/commit/f9feab1a5d1ca88e53c3f7a063be5d5871cc93e8), [`c5b12d90`](https://github.com/emotion-js/emotion/commit/c5b12d90316477e95ce3680a3c745cde328a14c1)]:
- - @emotion/serialize@0.11.15-next.1
- - babel-plugin-emotion@11.0.0-next.3
-
-## 11.0.0-next.1
-
-### Major Changes
-
-- [`1eaa3a38`](https://github.com/emotion-js/emotion/commit/1eaa3a389876d4a623ce66735dc6db093cb2a8e6) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - TypeScript types have been restructured. These changes:
-
- - Reduce build times when using emotion
- - In many cases remove the need for manually specifying generic parameters for your emotion components.
-
- If you encounter build issues after upgrade, try removing any manually specified generic types and let them be inferred. Otherwise refer to the breaking changes list below.
-
- ## Improvements
-
- - useTheme added to EmotionTheming interface and can now create your own closed variation of withTheme. More information in the docs under the theming section.
- - Union types as props are better supported and should be inferred properly
- - Build times should be reduced significantly in larger projects.
-
- ## Breaking changes
-
- - withTheme can now have the Theme type specified when calling it. For example `withTheme(MyComponent)`
-
- **Breaking change:** Generic argument changed, if you were specifying the ComponentType you will need to remove the generic parameter. Recommend following example setup in the TypeScript docs under theming section
-
- - `css` function has been restricted to prevent passing of invalid types
- - `CreateStyled` functions no longer take a second `ExtraProps` argument. Instead move it to after the create styled call. For example
-
- `styled(MyComponent)({})`
- to
- `styled(MyComponent)({})`
-
- - `StyledComponent` type no longer supports the third generic `Theme` parameter. Instead add the `theme` prop to the first `Props` argument. For example:
-
- `StyledComponent`
- to
- `StyledComponent`
-
-### Patch Changes
-
-- Updated dependencies [[`1eaa3a38`](https://github.com/emotion-js/emotion/commit/1eaa3a389876d4a623ce66735dc6db093cb2a8e6)]:
- - @emotion/serialize@1.0.0-next.0
- - babel-plugin-emotion@11.0.0-next.1
+# emotion
## 11.0.0-next.0
@@ -77,25 +10,25 @@
- Updated dependencies [[`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0), [`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555)]:
- babel-plugin-emotion@11.0.0-next.0
+ - create-emotion@11.0.0-next.0
-## 10.0.22
+## 10.0.23
### Patch Changes
-- [`11bea3a8`](https://github.com/emotion-js/emotion/commit/11bea3a89f38f9052c692c3df050ad802b6b954c) [#1562](https://github.com/emotion-js/emotion/pull/1562) Thanks [@FezVrasta](https://github.com/FezVrasta)! - Export Flow type definitions for @emotion/styled/macro and @emotion/css/macro
+- [`1ae94891`](https://github.com/emotion-js/emotion/commit/1ae948917326e2bc2bc978c59d04cb2695c72e38) [#1583](https://github.com/emotion-js/emotion/pull/1583) Thanks [@Andarist](https://github.com/Andarist)! - Export TS & Flow types for emotion/macro
-- Updated dependencies [[`4fc5657a`](https://github.com/emotion-js/emotion/commit/4fc5657ac8d0002322321cfbfc254b7196d27387), [`10211951`](https://github.com/emotion-js/emotion/commit/10211951051729b149930a8646de14bae9ae1bbc), [`57a767ea`](https://github.com/emotion-js/emotion/commit/57a767ea3dd18eefbbdc7269cc13128caad65286), [`1bb3efe3`](https://github.com/emotion-js/emotion/commit/1bb3efe399ddf0f3332187f3c751fbba9326d02c)]:
- - @emotion/serialize@0.11.12
- - babel-plugin-emotion@10.0.22
+- Updated dependencies [[`3927293d`](https://github.com/emotion-js/emotion/commit/3927293d0b9d96b4a7c00196e8430728759b1161), [`b3a0f148`](https://github.com/emotion-js/emotion/commit/b3a0f1484f2efcc78b447639ff2e0bc0f29915ae)]:
+ - babel-plugin-emotion@10.0.23
-## 10.0.14
+## 10.0.17
### Patch Changes
-- [c0eb604d](https://github.com/emotion-js/emotion/commit/c0eb604d) [#1419](https://github.com/emotion-js/emotion/pull/1419) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Update build tool
+- [66cda641](https://github.com/emotion-js/emotion/commit/66cda64128631790b81e3c9df273a972358ea593) [#1478](https://github.com/emotion-js/emotion/pull/1478) Thanks [@Andarist](https://github.com/Andarist)! - Add warnings about using illegal escape sequences
-## 10.0.12
+## 10.0.14
### Patch Changes
-- [49ce3041](https://github.com/emotion-js/emotion/commit/49ce3041) [#1351](https://github.com/emotion-js/emotion/pull/1351) Thanks [@ivandotv](https://github.com/ivandotv)! - Create module definition file for css macro
+- [c0eb604d](https://github.com/emotion-js/emotion/commit/c0eb604d) [#1419](https://github.com/emotion-js/emotion/pull/1419) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Update build tool
diff --git a/packages/emotion/README.md b/packages/css/README.md
similarity index 63%
rename from packages/emotion/README.md
rename to packages/css/README.md
index ee9ec153c..8a9e165e7 100644
--- a/packages/emotion/README.md
+++ b/packages/css/README.md
@@ -1,6 +1,6 @@
-# emotion
+# @emotion/css
-The [emotion](https://www.npmjs.com/package/emotion) package is framework agnostic and the simplest way to use Emotion.
+The [@emotion/css](https://www.npmjs.com/package/@emotion/css) package is framework agnostic and the simplest way to use Emotion.
## Table of Contents
@@ -10,19 +10,20 @@ The [emotion](https://www.npmjs.com/package/emotion) package is framework agnost
- [Global Styles — `injectGlobal`](#global-styles)
- [Animation Keyframes — `keyframes`](#animation-keyframes)
- [Composing Class Names — `cx`](#cx)
-- [Server Side Rendering](/docs/ssr.mdx#api)
-- [Babel Plugin](https://github.com/emotion-js/emotion/tree/master/packages/babel-plugin-emotion)
+- [Custom Instances](#custom-instances)
+- [Server Side Rendering](https://emotion.sh/docs/ssr#api)
+- [Babel Plugin](https://emotion.sh/docs/@emotion/babel-plugin)
## Quick Start
Get up and running with a single import.
```bash
-npm install --save emotion
+npm install --save @emotion/css
```
```javascript
-import { css } from 'emotion'
+import { css } from '@emotion/css'
const app = document.getElementById('root')
const myStyle = css`
@@ -41,7 +42,7 @@ The `css` function accepts styles as a template literal, object, or array of obj
```jsx
// @live
-import { css } from 'emotion'
+import { css } from '@emotion/css'
const color = 'darkgreen'
@@ -63,7 +64,7 @@ render(
```jsx
// @live
-import { css } from 'emotion'
+import { css } from '@emotion/css'
const color = 'darkgreen'
@@ -85,7 +86,7 @@ render(
```jsx
// @live
-import { css } from 'emotion'
+import { css } from '@emotion/css'
const color = 'darkgreen'
const isDanger = true
@@ -114,7 +115,7 @@ render(
`injectGlobal` injects styles into the global scope and is useful for applications such as css resets or font faces.
```jsx
-import { injectGlobal } from 'emotion'
+import { injectGlobal } from '@emotion/css'
injectGlobal`
* {
@@ -143,7 +144,7 @@ injectGlobal`
```jsx
// @live
-import { css, keyframes } from 'emotion'
+import { css, keyframes } from '@emotion/css'
const bounce = keyframes`
from, 20%, 53%, 80%, to {
@@ -181,7 +182,7 @@ render(
```jsx
// @live
-import { css, keyframes } from 'emotion'
+import { css, keyframes } from '@emotion/css'
const bounce = keyframes({
'from, 20%, 53%, 80%, to': {
@@ -212,14 +213,14 @@ render(
)
```
-## cx
+### cx
`cx` is emotion's version of the popular [`classnames` library](https://github.com/JedWatson/classnames). The key advantage of `cx` is that it detects emotion generated class names ensuring styles are overwritten in the correct order. Emotion generated styles are applied from left to right. Subsequent styles overwrite property values of previous styles.
**Combining class names**
```jsx
-import { cx, css } from 'emotion'
+import { cx, css } from '@emotion/css'
const cls1 = css`
font-size: 20px;
@@ -269,3 +270,76 @@ const cls1 = css`
className={cx(cls1, 'profile')}
/>
```
+
+## Custom Instances
+
+With `@emotion/css/create-instance`, you can provide custom options to Emotion's cache.
+
+The main `@emotion/css` entrypoint can be thought of as a call to `@emotion/css/create-instance` with sensible defaults for most applications.
+
+```javascript
+import createEmotion from '@emotion/css/create-instance'
+
+export const {
+ flush,
+ hydrate,
+ cx,
+ merge,
+ getRegisteredStyles,
+ injectGlobal,
+ keyframes,
+ css,
+ sheet,
+ cache
+} = createEmotion()
+```
+
+### Upside
+
+- Calling it directly will allow for some low level customization.
+
+- Create custom names for emotion APIs to help with migration from other, similar libraries.
+
+- Could set custom `key` to something other than `css`
+
+### Downside
+
+- Introduces some amount of complexity to your application that can vary depending on developer experience.
+
+- Required to keep up with changes in the repo and API at a lower level than if using `@emotion/css` directly
+
+### Primary use cases
+
+- Using emotion in embedded contexts such as an ``
+
+- Setting a [nonce](/packages/cache#nonce-string) on any `` tag emotion creates for security purposes
+
+- Use emotion with a container different than `document.head` for style elements
+
+- Using emotion with custom stylis plugins
+
+## Multiple instances in a single app example
+
+```jsx
+import createEmotion from '@emotion/css/create-instance'
+
+export const {
+ flush,
+ hydrate,
+ cx,
+ merge,
+ getRegisteredStyles,
+ injectGlobal,
+ keyframes,
+ css,
+ sheet,
+ cache
+} = createEmotion({
+ // The key option is required when there will be multiple instances in a single app
+ key: 'some-key'
+})
+```
+
+## Options
+
+`createEmotion` accepts the same options as [createCache](/packages/cache#options) from `@emotion/cache`.
diff --git a/packages/css/create-instance/package.json b/packages/css/create-instance/package.json
new file mode 100644
index 000000000..5de05ffda
--- /dev/null
+++ b/packages/css/create-instance/package.json
@@ -0,0 +1,10 @@
+{
+ "main": "dist/css.cjs.js",
+ "module": "dist/css.esm.js",
+ "umd:main": "dist/css.umd.min.js",
+ "types": "../types/create-instance",
+ "preconstruct": {
+ "source": "../src/create-instance",
+ "umdName": "createEmotion"
+ }
+}
diff --git a/packages/css/macro.d.ts b/packages/css/macro.d.ts
new file mode 100644
index 000000000..345f223e5
--- /dev/null
+++ b/packages/css/macro.d.ts
@@ -0,0 +1 @@
+export * from '@emotion/css'
diff --git a/packages/css/macro.js b/packages/css/macro.js
new file mode 100644
index 000000000..fd6bd88ce
--- /dev/null
+++ b/packages/css/macro.js
@@ -0,0 +1 @@
+module.exports = require('@emotion/babel-plugin').macros.vanillaEmotion
diff --git a/packages/core/macro.js.flow b/packages/css/macro.js.flow
similarity index 100%
rename from packages/core/macro.js.flow
rename to packages/css/macro.js.flow
diff --git a/packages/css/package.json b/packages/css/package.json
index bf2621b37..e7ce49607 100644
--- a/packages/css/package.json
+++ b/packages/css/package.json
@@ -1,15 +1,65 @@
{
"name": "@emotion/css",
"version": "11.0.0-next.6",
- "description": "a function to serialize css and object styless",
+ "description": "The Next Generation of CSS-in-JS.",
"main": "dist/css.cjs.js",
- "license": "MIT",
- "repository": "https://github.com/emotion-js/emotion/tree/master/packages/css",
+ "module": "dist/css.esm.js",
+ "types": "types/index.d.ts",
+ "files": [
+ "src",
+ "dist",
+ "types",
+ "macro.js",
+ "macro.d.ts",
+ "macro.js.flow",
+ "create-instance"
+ ],
"scripts": {
- "test:typescript": "exit 0"
+ "test:typescript": "dtslint types"
+ },
+ "dependencies": {
+ "@emotion/babel-plugin": "^11.0.0-next.0",
+ "@emotion/cache": "^11.0.0-next.6",
+ "@emotion/serialize": "^0.12.0-next.3",
+ "@emotion/sheet": "0.10.0-next.0",
+ "@emotion/utils": "0.11.2"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
},
- "publishConfig": {
- "access": "public"
+ "peerDependenciesMeta": {
+ "@babel/core": {
+ "optional": true
+ }
+ },
+ "devDependencies": {
+ "@babel/core": "^7.7.2",
+ "@emotion/stylis": "0.8.4",
+ "babel-plugin-transform-define": "^1.3.0",
+ "dtslint": "^0.3.0",
+ "stylis": "3.5.4",
+ "stylis-rule-sheet": "^0.0.10"
+ },
+ "author": "Kye Hohenberger",
+ "homepage": "https://emotion.sh",
+ "license": "MIT",
+ "repository": "https://github.com/emotion-js/emotion/tree/master/packages/emotion",
+ "keywords": [
+ "styles",
+ "emotion",
+ "react",
+ "css",
+ "css-in-js"
+ ],
+ "bugs": {
+ "url": "https://github.com/emotion-js/emotion/issues"
},
- "files": ["dist"]
+ "umd:main": "dist/css.umd.min.js",
+ "preconstruct": {
+ "umdName": "emotion",
+ "entrypoints": [
+ ".",
+ "create-instance"
+ ]
+ }
}
diff --git a/packages/create-emotion/src/index.js b/packages/css/src/create-instance.js
similarity index 100%
rename from packages/create-emotion/src/index.js
rename to packages/css/src/create-instance.js
diff --git a/packages/css/src/index.js b/packages/css/src/index.js
index 5ff74784b..9bd2e2592 100644
--- a/packages/css/src/index.js
+++ b/packages/css/src/index.js
@@ -1,3 +1,15 @@
-throw new Error(
- "`@emotion/css` package has been replaced with the `css` export from `@emotion/core`. Please import it like this `import { css } from '@emotion/core'`."
-)
+// @flow
+import createEmotion from './create-instance'
+
+export const {
+ flush,
+ hydrate,
+ cx,
+ merge,
+ getRegisteredStyles,
+ injectGlobal,
+ keyframes,
+ css,
+ sheet,
+ cache
+} = createEmotion()
diff --git a/packages/emotion/test/__snapshots__/component-selector.test.js.snap b/packages/css/test/__snapshots__/component-selector.test.js.snap
similarity index 100%
rename from packages/emotion/test/__snapshots__/component-selector.test.js.snap
rename to packages/css/test/__snapshots__/component-selector.test.js.snap
diff --git a/packages/emotion/test/__snapshots__/css.test.js.snap b/packages/css/test/__snapshots__/css.test.js.snap
similarity index 100%
rename from packages/emotion/test/__snapshots__/css.test.js.snap
rename to packages/css/test/__snapshots__/css.test.js.snap
diff --git a/packages/emotion/test/__snapshots__/cx.test.js.snap b/packages/css/test/__snapshots__/cx.test.js.snap
similarity index 100%
rename from packages/emotion/test/__snapshots__/cx.test.js.snap
rename to packages/css/test/__snapshots__/cx.test.js.snap
diff --git a/packages/emotion/test/__snapshots__/inject-global.test.js.snap b/packages/css/test/__snapshots__/inject-global.test.js.snap
similarity index 100%
rename from packages/emotion/test/__snapshots__/inject-global.test.js.snap
rename to packages/css/test/__snapshots__/inject-global.test.js.snap
diff --git a/packages/emotion/test/__snapshots__/insertion.test.js.snap b/packages/css/test/__snapshots__/insertion.test.js.snap
similarity index 100%
rename from packages/emotion/test/__snapshots__/insertion.test.js.snap
rename to packages/css/test/__snapshots__/insertion.test.js.snap
diff --git a/packages/emotion/test/__snapshots__/keyframes.test.js.snap b/packages/css/test/__snapshots__/keyframes.test.js.snap
similarity index 100%
rename from packages/emotion/test/__snapshots__/keyframes.test.js.snap
rename to packages/css/test/__snapshots__/keyframes.test.js.snap
diff --git a/packages/emotion/test/__snapshots__/label-pattern.test.js.snap b/packages/css/test/__snapshots__/label-pattern.test.js.snap
similarity index 100%
rename from packages/emotion/test/__snapshots__/label-pattern.test.js.snap
rename to packages/css/test/__snapshots__/label-pattern.test.js.snap
diff --git a/packages/emotion/test/__snapshots__/selectivity.test.js.snap b/packages/css/test/__snapshots__/selectivity.test.js.snap
similarity index 100%
rename from packages/emotion/test/__snapshots__/selectivity.test.js.snap
rename to packages/css/test/__snapshots__/selectivity.test.js.snap
diff --git a/packages/emotion/test/__snapshots__/sheet.dom.test.js.snap b/packages/css/test/__snapshots__/sheet.dom.test.js.snap
similarity index 100%
rename from packages/emotion/test/__snapshots__/sheet.dom.test.js.snap
rename to packages/css/test/__snapshots__/sheet.dom.test.js.snap
diff --git a/packages/emotion/test/__snapshots__/warnings.test.js.snap b/packages/css/test/__snapshots__/warnings.test.js.snap
similarity index 100%
rename from packages/emotion/test/__snapshots__/warnings.test.js.snap
rename to packages/css/test/__snapshots__/warnings.test.js.snap
diff --git a/packages/emotion/test/component-selector.test.js b/packages/css/test/component-selector.test.js
similarity index 94%
rename from packages/emotion/test/component-selector.test.js
rename to packages/css/test/component-selector.test.js
index c3be66c95..ce5bbbada 100644
--- a/packages/emotion/test/component-selector.test.js
+++ b/packages/css/test/component-selector.test.js
@@ -2,7 +2,7 @@ import 'test-utils/legacy-env'
import React from 'react'
import styled from '@emotion/styled'
import renderer from 'react-test-renderer'
-import { css } from 'emotion'
+import { css } from '@emotion/css'
describe('component selector', () => {
test('should be converted to use the emotion target className', () => {
diff --git a/packages/emotion/test/css.test.js b/packages/css/test/css.test.js
similarity index 99%
rename from packages/emotion/test/css.test.js
rename to packages/css/test/css.test.js
index c09b468f8..7ef0dc454 100644
--- a/packages/emotion/test/css.test.js
+++ b/packages/css/test/css.test.js
@@ -2,7 +2,7 @@
import 'test-utils/legacy-env'
import React from 'react'
import renderer from 'react-test-renderer'
-import { css, flush, sheet } from 'emotion'
+import { css, flush, sheet } from '@emotion/css'
describe('css', () => {
test('float property', () => {
diff --git a/packages/emotion/test/cx.test.js b/packages/css/test/cx.test.js
similarity index 98%
rename from packages/emotion/test/cx.test.js
rename to packages/css/test/cx.test.js
index ba814b0cf..fc074cbba 100644
--- a/packages/emotion/test/cx.test.js
+++ b/packages/css/test/cx.test.js
@@ -2,7 +2,7 @@
import 'test-utils/legacy-env'
import React from 'react'
import renderer from 'react-test-renderer'
-import { css, cx } from 'emotion'
+import { css, cx } from '@emotion/css'
describe('cx', () => {
test('merge 2', () => {
diff --git a/packages/emotion/test/inject-global.test.js b/packages/css/test/inject-global.test.js
similarity index 95%
rename from packages/emotion/test/inject-global.test.js
rename to packages/css/test/inject-global.test.js
index bc3b779a1..212c4937d 100644
--- a/packages/emotion/test/inject-global.test.js
+++ b/packages/css/test/inject-global.test.js
@@ -1,6 +1,6 @@
// @flow
import 'test-utils/legacy-env'
-import { injectGlobal, sheet, flush, css } from 'emotion'
+import { injectGlobal, sheet, flush, css } from '@emotion/css'
describe('injectGlobal', () => {
afterEach(() => {
diff --git a/packages/emotion/test/insertion.test.js b/packages/css/test/insertion.test.js
similarity index 100%
rename from packages/emotion/test/insertion.test.js
rename to packages/css/test/insertion.test.js
diff --git a/packages/emotion/test/keyframes.test.js b/packages/css/test/keyframes.test.js
similarity index 96%
rename from packages/emotion/test/keyframes.test.js
rename to packages/css/test/keyframes.test.js
index 48ee1352a..fc2a5b062 100644
--- a/packages/emotion/test/keyframes.test.js
+++ b/packages/css/test/keyframes.test.js
@@ -2,7 +2,7 @@
import 'test-utils/legacy-env'
import React from 'react'
import renderer from 'react-test-renderer'
-import { keyframes, flush, css } from 'emotion'
+import { keyframes, flush, css } from '@emotion/css'
describe('keyframes', () => {
afterEach(() => {
diff --git a/packages/emotion/test/label-pattern.test.js b/packages/css/test/label-pattern.test.js
similarity index 93%
rename from packages/emotion/test/label-pattern.test.js
rename to packages/css/test/label-pattern.test.js
index 42d612e39..92bf2203e 100644
--- a/packages/emotion/test/label-pattern.test.js
+++ b/packages/css/test/label-pattern.test.js
@@ -2,7 +2,7 @@ import 'test-utils/legacy-env'
import React from 'react'
import styled from '@emotion/styled'
import renderer from 'react-test-renderer'
-import { flush } from 'emotion'
+import { flush } from '@emotion/css'
describe('label pattern', () => {
afterEach(() => flush())
diff --git a/packages/emotion/test/no-babel/__snapshots__/index.test.js.snap b/packages/css/test/no-babel/__snapshots__/index.test.js.snap
similarity index 87%
rename from packages/emotion/test/no-babel/__snapshots__/index.test.js.snap
rename to packages/css/test/no-babel/__snapshots__/index.test.js.snap
index 3167ff6ca..9155fb853 100644
--- a/packages/emotion/test/no-babel/__snapshots__/index.test.js.snap
+++ b/packages/css/test/no-babel/__snapshots__/index.test.js.snap
@@ -12,9 +12,9 @@ exports[`css @supports 1`] = `
/>
`;
-exports[`css component as selectors (object syntax) 1`] = `"Component selectors can only be used in conjunction with babel-plugin-emotion."`;
+exports[`css component as selectors (object syntax) 1`] = `"Component selectors can only be used in conjunction with @emotion/babel-plugin."`;
-exports[`css component selectors without target 1`] = `"Component selectors can only be used in conjunction with babel-plugin-emotion."`;
+exports[`css component selectors without target 1`] = `"Component selectors can only be used in conjunction with @emotion/babel-plugin."`;
exports[`css composition 1`] = `
.emotion-0 {
@@ -231,8 +231,3 @@ exports[`css random expressions undefined return 1`] = `
hello world
`;
-
-exports[`css styled throws a nice error when using the styled shorthand without babel-plugin-emotion 1`] = `
-"You're trying to use the styled shorthand without babel-plugin-emotion.
-Please install and setup babel-plugin-emotion or use the function call syntax(\`styled('div')\` instead of \`styled.div\`)"
-`;
diff --git a/packages/emotion/test/no-babel/index.test.js b/packages/css/test/no-babel/index.test.js
similarity index 95%
rename from packages/emotion/test/no-babel/index.test.js
rename to packages/css/test/no-babel/index.test.js
index 6bb6b9867..f56530e43 100644
--- a/packages/emotion/test/no-babel/index.test.js
+++ b/packages/css/test/no-babel/index.test.js
@@ -2,7 +2,7 @@
import 'test-utils/legacy-env'
import React from 'react'
import renderer from 'react-test-renderer'
-import { css } from 'emotion'
+import { css } from '@emotion/css'
import styled from '@emotion/styled'
describe('css', () => {
@@ -226,12 +226,6 @@ describe('css', () => {
styled('div')().toString()
}).not.toThrow()
})
- // skip it until we decide if we want to include the tag list in react-emotion
- test.skip('styled throws a nice error when using the styled shorthand without babel-plugin-emotion', () => {
- expect(() => {
- styled.div``
- }).toThrowErrorMatchingSnapshot()
- })
test('styled does not throw an error when certain properties are accessed', () => {
expect(() => {
/* eslint-disable no-unused-expressions */
diff --git a/packages/emotion/test/no-babel/warnings.test.js b/packages/css/test/no-babel/warnings.test.js
similarity index 97%
rename from packages/emotion/test/no-babel/warnings.test.js
rename to packages/css/test/no-babel/warnings.test.js
index 189007c79..22df9d49a 100644
--- a/packages/emotion/test/no-babel/warnings.test.js
+++ b/packages/css/test/no-babel/warnings.test.js
@@ -1,6 +1,6 @@
// @flow
import 'test-utils/legacy-env'
-import { css } from 'emotion'
+import { css } from '@emotion/css'
// $FlowFixMe
console.error = jest.fn()
diff --git a/packages/emotion/test/selectivity.test.js b/packages/css/test/selectivity.test.js
similarity index 97%
rename from packages/emotion/test/selectivity.test.js
rename to packages/css/test/selectivity.test.js
index 095cc2c74..44865f514 100644
--- a/packages/emotion/test/selectivity.test.js
+++ b/packages/css/test/selectivity.test.js
@@ -1,6 +1,6 @@
// @flow
import 'test-utils/legacy-env'
-import { css, sheet, flush } from 'emotion'
+import { css, sheet, flush } from '@emotion/css'
describe('css', () => {
afterEach(() => flush())
diff --git a/packages/emotion/test/sheet.dom.test.js b/packages/css/test/sheet.dom.test.js
similarity index 96%
rename from packages/emotion/test/sheet.dom.test.js
rename to packages/css/test/sheet.dom.test.js
index 55ec1dd5a..b2699d203 100644
--- a/packages/emotion/test/sheet.dom.test.js
+++ b/packages/css/test/sheet.dom.test.js
@@ -1,5 +1,5 @@
// @flow
-import { sheet } from 'emotion'
+import { sheet } from '@emotion/css'
describe('sheet', () => {
beforeEach(() => {
diff --git a/packages/emotion/test/source-map/.babelrc b/packages/css/test/source-map/.babelrc
similarity index 100%
rename from packages/emotion/test/source-map/.babelrc
rename to packages/css/test/source-map/.babelrc
diff --git a/packages/css/test/source-map/__snapshots__/source-map.test.js.snap b/packages/css/test/source-map/__snapshots__/source-map.test.js.snap
new file mode 100644
index 000000000..02b093aac
--- /dev/null
+++ b/packages/css/test/source-map/__snapshots__/source-map.test.js.snap
@@ -0,0 +1,61 @@
+// Jest Snapshot v1, https://goo.gl/fbAQLP
+
+exports[`css css without newline or semicolon 1`] = `
+".css-6kh100-cls {
+ color: hotpink;
+}
+
+/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtRG1CIiwiZmlsZSI6InNvdXJjZS1tYXAudGVzdC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAndGVzdC11dGlscy9sZWdhY3ktZW52J1xuaW1wb3J0IHsgY3NzLCBzaGVldCwgZmx1c2ggfSBmcm9tICdAZW1vdGlvbi9jc3MnXG5cbmdsb2JhbC5zaG91bGRLZWVwU291cmNlTWFwcyA9IHRydWVcblxuZGVzY3JpYmUoJ2NzcycsICgpID0+IHtcbiAgYWZ0ZXJFYWNoKCgpID0+IGZsdXNoKCkpXG4gIHRlc3QoJ3NvdXJjZS1tYXAgbmVzdGVkIHN0eWxlcycsICgpID0+IHtcbiAgICBjb25zdCBtcSA9IFtcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA0MjBweCknLFxuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDY0MHB4KScsXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogOTYwcHgpJ1xuICAgIF1cblxuICAgIGNzcyh7XG4gICAgICBjb2xvcjogJ2JsdWUnLFxuICAgICAgJyY6aG92ZXInOiB7XG4gICAgICAgICcmIC5uYW1lJzoge1xuICAgICAgICAgIGNvbG9yOiAnYW1ldGh5c3QnLFxuICAgICAgICAgICcmOmZvY3VzJzoge1xuICAgICAgICAgICAgY29sb3I6ICdidXJseXdvb2QnLFxuICAgICAgICAgICAgW21xWzBdXToge1xuICAgICAgICAgICAgICBjb2xvcjogJ3JlYmVjY2FwdXJwbGUnXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBjb2xvcjogJ2dyZWVuJ1xuICAgICAgfVxuICAgIH0pXG4gICAgZXhwZWN0KHNoZWV0KS50b01hdGNoU25hcHNob3QoKVxuICB9KVxuXG4gIHRlc3QoJ3NvdXJjZS1tYXAgbmVzdGVkIG1lZGlhIHF1ZXJpZXMnLCAoKSA9PiB7XG4gICAgY3NzYFxuICAgICAgQG1lZGlhIChtYXgtd2lkdGg6IDYwMHB4KSB7XG4gICAgICAgIGgxIHtcbiAgICAgICAgICBmb250LXNpemU6IDEuNHJlbTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBAbWVkaWEgKG1heC13aWR0aDogNDAwcHgpLCAobWF4LWhlaWdodDogNDIwcHgpIHtcbiAgICAgICAgaDEge1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS4xcmVtO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgYFxuXG4gICAgZXhwZWN0KHNoZWV0KS50b01hdGNoU25hcHNob3QoKVxuICB9KVxuICB0ZXN0KCdjc3Mgd2l0aG91dCBuZXdsaW5lIG9yIHNlbWljb2xvbicsICgpID0+IHtcbiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmVcbiAgICBjb25zdCBjbHMgPSBjc3NgXG4gICAgICBjb2xvcjogaG90cGluaztcbiAgICBgXG4gICAgZXhwZWN0KHNoZWV0KS50b01hdGNoU25hcHNob3QoKVxuICB9KVxufSlcbiJdfQ== */"
+`;
+
+exports[`css source-map nested media queries 1`] = `
+"@media (max-width:600px) {
+ .css-acogag h1 {
+ font-size: 1.4rem;
+ }
+}
+
+/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ08iLCJmaWxlIjoic291cmNlLW1hcC50ZXN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICd0ZXN0LXV0aWxzL2xlZ2FjeS1lbnYnXG5pbXBvcnQgeyBjc3MsIHNoZWV0LCBmbHVzaCB9IGZyb20gJ0BlbW90aW9uL2NzcydcblxuZ2xvYmFsLnNob3VsZEtlZXBTb3VyY2VNYXBzID0gdHJ1ZVxuXG5kZXNjcmliZSgnY3NzJywgKCkgPT4ge1xuICBhZnRlckVhY2goKCkgPT4gZmx1c2goKSlcbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgc3R5bGVzJywgKCkgPT4ge1xuICAgIGNvbnN0IG1xID0gW1xuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDQyMHB4KScsXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNjQwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA5NjBweCknXG4gICAgXVxuXG4gICAgY3NzKHtcbiAgICAgIGNvbG9yOiAnYmx1ZScsXG4gICAgICAnJjpob3Zlcic6IHtcbiAgICAgICAgJyYgLm5hbWUnOiB7XG4gICAgICAgICAgY29sb3I6ICdhbWV0aHlzdCcsXG4gICAgICAgICAgJyY6Zm9jdXMnOiB7XG4gICAgICAgICAgICBjb2xvcjogJ2J1cmx5d29vZCcsXG4gICAgICAgICAgICBbbXFbMF1dOiB7XG4gICAgICAgICAgICAgIGNvbG9yOiAncmViZWNjYXB1cnBsZSdcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNvbG9yOiAnZ3JlZW4nXG4gICAgICB9XG4gICAgfSlcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG5cbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgbWVkaWEgcXVlcmllcycsICgpID0+IHtcbiAgICBjc3NgXG4gICAgICBAbWVkaWEgKG1heC13aWR0aDogNjAwcHgpIHtcbiAgICAgICAgaDEge1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS40cmVtO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA0MDBweCksIChtYXgtaGVpZ2h0OiA0MjBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjFyZW07XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICBgXG5cbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG4gIHRlc3QoJ2NzcyB3aXRob3V0IG5ld2xpbmUgb3Igc2VtaWNvbG9uJywgKCkgPT4ge1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZVxuICAgIGNvbnN0IGNscyA9IGNzc2BcbiAgICAgIGNvbG9yOiBob3RwaW5rO1xuICAgIGBcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG59KVxuIl19 */
+
+@media (max-width:400px),(max-height:420px) {
+ .css-acogag h1 {
+ font-size: 1.1rem;
+ }
+}
+
+/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ08iLCJmaWxlIjoic291cmNlLW1hcC50ZXN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICd0ZXN0LXV0aWxzL2xlZ2FjeS1lbnYnXG5pbXBvcnQgeyBjc3MsIHNoZWV0LCBmbHVzaCB9IGZyb20gJ0BlbW90aW9uL2NzcydcblxuZ2xvYmFsLnNob3VsZEtlZXBTb3VyY2VNYXBzID0gdHJ1ZVxuXG5kZXNjcmliZSgnY3NzJywgKCkgPT4ge1xuICBhZnRlckVhY2goKCkgPT4gZmx1c2goKSlcbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgc3R5bGVzJywgKCkgPT4ge1xuICAgIGNvbnN0IG1xID0gW1xuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDQyMHB4KScsXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNjQwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA5NjBweCknXG4gICAgXVxuXG4gICAgY3NzKHtcbiAgICAgIGNvbG9yOiAnYmx1ZScsXG4gICAgICAnJjpob3Zlcic6IHtcbiAgICAgICAgJyYgLm5hbWUnOiB7XG4gICAgICAgICAgY29sb3I6ICdhbWV0aHlzdCcsXG4gICAgICAgICAgJyY6Zm9jdXMnOiB7XG4gICAgICAgICAgICBjb2xvcjogJ2J1cmx5d29vZCcsXG4gICAgICAgICAgICBbbXFbMF1dOiB7XG4gICAgICAgICAgICAgIGNvbG9yOiAncmViZWNjYXB1cnBsZSdcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNvbG9yOiAnZ3JlZW4nXG4gICAgICB9XG4gICAgfSlcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG5cbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgbWVkaWEgcXVlcmllcycsICgpID0+IHtcbiAgICBjc3NgXG4gICAgICBAbWVkaWEgKG1heC13aWR0aDogNjAwcHgpIHtcbiAgICAgICAgaDEge1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS40cmVtO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA0MDBweCksIChtYXgtaGVpZ2h0OiA0MjBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjFyZW07XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICBgXG5cbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG4gIHRlc3QoJ2NzcyB3aXRob3V0IG5ld2xpbmUgb3Igc2VtaWNvbG9uJywgKCkgPT4ge1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZVxuICAgIGNvbnN0IGNscyA9IGNzc2BcbiAgICAgIGNvbG9yOiBob3RwaW5rO1xuICAgIGBcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG59KVxuIl19 */"
+`;
+
+exports[`css source-map nested styles 1`] = `
+".css-s7aswl {
+ color: blue;
+}
+
+/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjSSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ3Rlc3QtdXRpbHMvbGVnYWN5LWVudidcbmltcG9ydCB7IGNzcywgc2hlZXQsIGZsdXNoIH0gZnJvbSAnQGVtb3Rpb24vY3NzJ1xuXG5nbG9iYWwuc2hvdWxkS2VlcFNvdXJjZU1hcHMgPSB0cnVlXG5cbmRlc2NyaWJlKCdjc3MnLCAoKSA9PiB7XG4gIGFmdGVyRWFjaCgoKSA9PiBmbHVzaCgpKVxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBzdHlsZXMnLCAoKSA9PiB7XG4gICAgY29uc3QgbXEgPSBbXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNDIwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA2NDBweCknLFxuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDk2MHB4KSdcbiAgICBdXG5cbiAgICBjc3Moe1xuICAgICAgY29sb3I6ICdibHVlJyxcbiAgICAgICcmOmhvdmVyJzoge1xuICAgICAgICAnJiAubmFtZSc6IHtcbiAgICAgICAgICBjb2xvcjogJ2FtZXRoeXN0JyxcbiAgICAgICAgICAnJjpmb2N1cyc6IHtcbiAgICAgICAgICAgIGNvbG9yOiAnYnVybHl3b29kJyxcbiAgICAgICAgICAgIFttcVswXV06IHtcbiAgICAgICAgICAgICAgY29sb3I6ICdyZWJlY2NhcHVycGxlJ1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgY29sb3I6ICdncmVlbidcbiAgICAgIH1cbiAgICB9KVxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcblxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBtZWRpYSBxdWVyaWVzJywgKCkgPT4ge1xuICAgIGNzc2BcbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA2MDBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjRyZW07XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgQG1lZGlhIChtYXgtd2lkdGg6IDQwMHB4KSwgKG1heC1oZWlnaHQ6IDQyMHB4KSB7XG4gICAgICAgIGgxIHtcbiAgICAgICAgICBmb250LXNpemU6IDEuMXJlbTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIGBcblxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbiAgdGVzdCgnY3NzIHdpdGhvdXQgbmV3bGluZSBvciBzZW1pY29sb24nLCAoKSA9PiB7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lXG4gICAgY29uc3QgY2xzID0gY3NzYFxuICAgICAgY29sb3I6IGhvdHBpbms7XG4gICAgYFxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbn0pXG4iXX0= */
+
+.css-s7aswl:hover {
+ color: green;
+}
+
+/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjSSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ3Rlc3QtdXRpbHMvbGVnYWN5LWVudidcbmltcG9ydCB7IGNzcywgc2hlZXQsIGZsdXNoIH0gZnJvbSAnQGVtb3Rpb24vY3NzJ1xuXG5nbG9iYWwuc2hvdWxkS2VlcFNvdXJjZU1hcHMgPSB0cnVlXG5cbmRlc2NyaWJlKCdjc3MnLCAoKSA9PiB7XG4gIGFmdGVyRWFjaCgoKSA9PiBmbHVzaCgpKVxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBzdHlsZXMnLCAoKSA9PiB7XG4gICAgY29uc3QgbXEgPSBbXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNDIwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA2NDBweCknLFxuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDk2MHB4KSdcbiAgICBdXG5cbiAgICBjc3Moe1xuICAgICAgY29sb3I6ICdibHVlJyxcbiAgICAgICcmOmhvdmVyJzoge1xuICAgICAgICAnJiAubmFtZSc6IHtcbiAgICAgICAgICBjb2xvcjogJ2FtZXRoeXN0JyxcbiAgICAgICAgICAnJjpmb2N1cyc6IHtcbiAgICAgICAgICAgIGNvbG9yOiAnYnVybHl3b29kJyxcbiAgICAgICAgICAgIFttcVswXV06IHtcbiAgICAgICAgICAgICAgY29sb3I6ICdyZWJlY2NhcHVycGxlJ1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgY29sb3I6ICdncmVlbidcbiAgICAgIH1cbiAgICB9KVxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcblxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBtZWRpYSBxdWVyaWVzJywgKCkgPT4ge1xuICAgIGNzc2BcbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA2MDBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjRyZW07XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgQG1lZGlhIChtYXgtd2lkdGg6IDQwMHB4KSwgKG1heC1oZWlnaHQ6IDQyMHB4KSB7XG4gICAgICAgIGgxIHtcbiAgICAgICAgICBmb250LXNpemU6IDEuMXJlbTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIGBcblxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbiAgdGVzdCgnY3NzIHdpdGhvdXQgbmV3bGluZSBvciBzZW1pY29sb24nLCAoKSA9PiB7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lXG4gICAgY29uc3QgY2xzID0gY3NzYFxuICAgICAgY29sb3I6IGhvdHBpbms7XG4gICAgYFxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbn0pXG4iXX0= */
+
+.css-s7aswl:hover .name {
+ color: amethyst;
+}
+
+/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjSSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ3Rlc3QtdXRpbHMvbGVnYWN5LWVudidcbmltcG9ydCB7IGNzcywgc2hlZXQsIGZsdXNoIH0gZnJvbSAnQGVtb3Rpb24vY3NzJ1xuXG5nbG9iYWwuc2hvdWxkS2VlcFNvdXJjZU1hcHMgPSB0cnVlXG5cbmRlc2NyaWJlKCdjc3MnLCAoKSA9PiB7XG4gIGFmdGVyRWFjaCgoKSA9PiBmbHVzaCgpKVxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBzdHlsZXMnLCAoKSA9PiB7XG4gICAgY29uc3QgbXEgPSBbXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNDIwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA2NDBweCknLFxuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDk2MHB4KSdcbiAgICBdXG5cbiAgICBjc3Moe1xuICAgICAgY29sb3I6ICdibHVlJyxcbiAgICAgICcmOmhvdmVyJzoge1xuICAgICAgICAnJiAubmFtZSc6IHtcbiAgICAgICAgICBjb2xvcjogJ2FtZXRoeXN0JyxcbiAgICAgICAgICAnJjpmb2N1cyc6IHtcbiAgICAgICAgICAgIGNvbG9yOiAnYnVybHl3b29kJyxcbiAgICAgICAgICAgIFttcVswXV06IHtcbiAgICAgICAgICAgICAgY29sb3I6ICdyZWJlY2NhcHVycGxlJ1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgY29sb3I6ICdncmVlbidcbiAgICAgIH1cbiAgICB9KVxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcblxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBtZWRpYSBxdWVyaWVzJywgKCkgPT4ge1xuICAgIGNzc2BcbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA2MDBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjRyZW07XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgQG1lZGlhIChtYXgtd2lkdGg6IDQwMHB4KSwgKG1heC1oZWlnaHQ6IDQyMHB4KSB7XG4gICAgICAgIGgxIHtcbiAgICAgICAgICBmb250LXNpemU6IDEuMXJlbTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIGBcblxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbiAgdGVzdCgnY3NzIHdpdGhvdXQgbmV3bGluZSBvciBzZW1pY29sb24nLCAoKSA9PiB7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lXG4gICAgY29uc3QgY2xzID0gY3NzYFxuICAgICAgY29sb3I6IGhvdHBpbms7XG4gICAgYFxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbn0pXG4iXX0= */
+
+.css-s7aswl:hover .name:focus {
+ color: burlywood;
+}
+
+/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjSSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ3Rlc3QtdXRpbHMvbGVnYWN5LWVudidcbmltcG9ydCB7IGNzcywgc2hlZXQsIGZsdXNoIH0gZnJvbSAnQGVtb3Rpb24vY3NzJ1xuXG5nbG9iYWwuc2hvdWxkS2VlcFNvdXJjZU1hcHMgPSB0cnVlXG5cbmRlc2NyaWJlKCdjc3MnLCAoKSA9PiB7XG4gIGFmdGVyRWFjaCgoKSA9PiBmbHVzaCgpKVxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBzdHlsZXMnLCAoKSA9PiB7XG4gICAgY29uc3QgbXEgPSBbXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNDIwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA2NDBweCknLFxuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDk2MHB4KSdcbiAgICBdXG5cbiAgICBjc3Moe1xuICAgICAgY29sb3I6ICdibHVlJyxcbiAgICAgICcmOmhvdmVyJzoge1xuICAgICAgICAnJiAubmFtZSc6IHtcbiAgICAgICAgICBjb2xvcjogJ2FtZXRoeXN0JyxcbiAgICAgICAgICAnJjpmb2N1cyc6IHtcbiAgICAgICAgICAgIGNvbG9yOiAnYnVybHl3b29kJyxcbiAgICAgICAgICAgIFttcVswXV06IHtcbiAgICAgICAgICAgICAgY29sb3I6ICdyZWJlY2NhcHVycGxlJ1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgY29sb3I6ICdncmVlbidcbiAgICAgIH1cbiAgICB9KVxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcblxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBtZWRpYSBxdWVyaWVzJywgKCkgPT4ge1xuICAgIGNzc2BcbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA2MDBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjRyZW07XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgQG1lZGlhIChtYXgtd2lkdGg6IDQwMHB4KSwgKG1heC1oZWlnaHQ6IDQyMHB4KSB7XG4gICAgICAgIGgxIHtcbiAgICAgICAgICBmb250LXNpemU6IDEuMXJlbTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIGBcblxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbiAgdGVzdCgnY3NzIHdpdGhvdXQgbmV3bGluZSBvciBzZW1pY29sb24nLCAoKSA9PiB7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lXG4gICAgY29uc3QgY2xzID0gY3NzYFxuICAgICAgY29sb3I6IGhvdHBpbms7XG4gICAgYFxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbn0pXG4iXX0= */
+
+@media (min-width:420px) {
+ .css-s7aswl:hover .name:focus {
+ color: rebeccapurple;
+ }
+}
+
+/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjSSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ3Rlc3QtdXRpbHMvbGVnYWN5LWVudidcbmltcG9ydCB7IGNzcywgc2hlZXQsIGZsdXNoIH0gZnJvbSAnQGVtb3Rpb24vY3NzJ1xuXG5nbG9iYWwuc2hvdWxkS2VlcFNvdXJjZU1hcHMgPSB0cnVlXG5cbmRlc2NyaWJlKCdjc3MnLCAoKSA9PiB7XG4gIGFmdGVyRWFjaCgoKSA9PiBmbHVzaCgpKVxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBzdHlsZXMnLCAoKSA9PiB7XG4gICAgY29uc3QgbXEgPSBbXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNDIwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA2NDBweCknLFxuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDk2MHB4KSdcbiAgICBdXG5cbiAgICBjc3Moe1xuICAgICAgY29sb3I6ICdibHVlJyxcbiAgICAgICcmOmhvdmVyJzoge1xuICAgICAgICAnJiAubmFtZSc6IHtcbiAgICAgICAgICBjb2xvcjogJ2FtZXRoeXN0JyxcbiAgICAgICAgICAnJjpmb2N1cyc6IHtcbiAgICAgICAgICAgIGNvbG9yOiAnYnVybHl3b29kJyxcbiAgICAgICAgICAgIFttcVswXV06IHtcbiAgICAgICAgICAgICAgY29sb3I6ICdyZWJlY2NhcHVycGxlJ1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgY29sb3I6ICdncmVlbidcbiAgICAgIH1cbiAgICB9KVxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcblxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBtZWRpYSBxdWVyaWVzJywgKCkgPT4ge1xuICAgIGNzc2BcbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA2MDBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjRyZW07XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgQG1lZGlhIChtYXgtd2lkdGg6IDQwMHB4KSwgKG1heC1oZWlnaHQ6IDQyMHB4KSB7XG4gICAgICAgIGgxIHtcbiAgICAgICAgICBmb250LXNpemU6IDEuMXJlbTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIGBcblxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbiAgdGVzdCgnY3NzIHdpdGhvdXQgbmV3bGluZSBvciBzZW1pY29sb24nLCAoKSA9PiB7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lXG4gICAgY29uc3QgY2xzID0gY3NzYFxuICAgICAgY29sb3I6IGhvdHBpbms7XG4gICAgYFxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbn0pXG4iXX0= */"
+`;
diff --git a/packages/emotion/test/source-map/source-map.test.js b/packages/css/test/source-map/source-map.test.js
similarity index 95%
rename from packages/emotion/test/source-map/source-map.test.js
rename to packages/css/test/source-map/source-map.test.js
index 4d71b4f3e..3f4ef6511 100644
--- a/packages/emotion/test/source-map/source-map.test.js
+++ b/packages/css/test/source-map/source-map.test.js
@@ -1,5 +1,5 @@
import 'test-utils/legacy-env'
-import { css, sheet, flush } from 'emotion'
+import { css, sheet, flush } from '@emotion/css'
global.shouldKeepSourceMaps = true
diff --git a/packages/emotion/test/warnings.test.js b/packages/css/test/warnings.test.js
similarity index 98%
rename from packages/emotion/test/warnings.test.js
rename to packages/css/test/warnings.test.js
index e17fb5a98..9596cb547 100644
--- a/packages/emotion/test/warnings.test.js
+++ b/packages/css/test/warnings.test.js
@@ -1,6 +1,6 @@
// @flow
import 'test-utils/legacy-env'
-import { css } from 'emotion'
+import { css } from '@emotion/css'
import * as React from 'react'
import renderer from 'react-test-renderer'
diff --git a/packages/create-emotion/types/index.d.ts b/packages/css/types/create-instance.d.ts
similarity index 100%
rename from packages/create-emotion/types/index.d.ts
rename to packages/css/types/create-instance.d.ts
diff --git a/packages/emotion/types/index.d.ts b/packages/css/types/index.d.ts
similarity index 90%
rename from packages/emotion/types/index.d.ts
rename to packages/css/types/index.d.ts
index 348736c6a..9664bcb3a 100644
--- a/packages/emotion/types/index.d.ts
+++ b/packages/css/types/index.d.ts
@@ -1,7 +1,7 @@
// Definitions by: Junyoung Clare Jang
// TypeScript Version: 2.8
-import { Emotion } from 'create-emotion'
+import { Emotion } from './create-instance'
export {
ArrayClassNamesArg,
@@ -12,7 +12,7 @@ export {
CSSInterpolation,
CSSObject,
StyleSheet
-} from 'create-emotion'
+} from './create-instance'
export const flush: Emotion['flush']
export const hydrate: Emotion['hydrate']
diff --git a/packages/create-emotion/types/tests.ts b/packages/css/types/tests-create-instance.ts
similarity index 97%
rename from packages/create-emotion/types/tests.ts
rename to packages/css/types/tests-create-instance.ts
index a6002a171..739c0071b 100644
--- a/packages/create-emotion/types/tests.ts
+++ b/packages/css/types/tests-create-instance.ts
@@ -1,4 +1,4 @@
-import createEmotion from 'create-emotion'
+import createEmotion from '@emotion/css/create-instance'
// $ExpectType Emotion
const emotion0 = createEmotion()
diff --git a/packages/emotion/types/tests.ts b/packages/css/types/tests.ts
similarity index 98%
rename from packages/emotion/types/tests.ts
rename to packages/css/types/tests.ts
index c82d50c6c..109161b91 100644
--- a/packages/emotion/types/tests.ts
+++ b/packages/css/types/tests.ts
@@ -9,7 +9,7 @@ import {
keyframes,
sheet,
cache
-} from 'emotion'
+} from '@emotion/css'
flush()
diff --git a/packages/core/types/tsconfig.json b/packages/css/types/tsconfig.json
similarity index 100%
rename from packages/core/types/tsconfig.json
rename to packages/css/types/tsconfig.json
diff --git a/packages/css/types/tslint.json b/packages/css/types/tslint.json
new file mode 100644
index 000000000..7f3fd538e
--- /dev/null
+++ b/packages/css/types/tslint.json
@@ -0,0 +1,23 @@
+{
+ "extends": "dtslint/dtslint.json",
+ "rules": {
+ "array-type": [true, "generic"],
+ "import-spacing": false,
+ "file-name-casing": false,
+ "no-default-import": false,
+ "no-null-undefined-union": false,
+ "semicolon": false,
+ "whitespace": [
+ true,
+ "check-branch",
+ "check-decl",
+ "check-operator",
+ "check-module",
+ "check-rest-spread",
+ "check-type",
+ "check-typecast",
+ "check-type-operator",
+ "check-preblock"
+ ]
+ }
+}
diff --git a/packages/emotion-server/README.md b/packages/emotion-server/README.md
deleted file mode 100644
index 83f38c174..000000000
--- a/packages/emotion-server/README.md
+++ /dev/null
@@ -1,11 +0,0 @@
-# emotion-server
-
-> Extract and inline critical css with emotion.
-
-`emotion-server` provides three APIs for doing server-side rendering with emotion to extract critical css, inline critical css in html to a string and inline critical css in html to a stream.
-
-[`emotion-server`'s APIs are documented here.](https://emotion.sh/docs/ssr)
-
-```bash
-npm install --save emotion emotion-server
-```
diff --git a/packages/emotion-server/types/tsconfig.json b/packages/emotion-server/types/tsconfig.json
deleted file mode 100644
index 838017f13..000000000
--- a/packages/emotion-server/types/tsconfig.json
+++ /dev/null
@@ -1,26 +0,0 @@
-{
- "compilerOptions": {
- "baseUrl": "../",
- "forceConsistentCasingInFileNames": true,
- "jsx": "react",
- "lib": [
- "es6"
- ],
- "module": "commonjs",
- "noEmit": true,
- "noImplicitAny": true,
- "noImplicitThis": true,
- "strict": true,
- "strictNullChecks": true,
- "strictFunctionTypes": true,
- "target": "es5",
- "typeRoots": [
- "../"
- ],
- "types": []
- },
- "include": [
- "./*.ts",
- "./*.tsx"
- ]
-}
diff --git a/packages/emotion-server/types/tslint.json b/packages/emotion-server/types/tslint.json
deleted file mode 100644
index 2028bec7b..000000000
--- a/packages/emotion-server/types/tslint.json
+++ /dev/null
@@ -1,7 +0,0 @@
-{
- "extends": "dtslint/dtslint.json",
- "rules": {
- "array-type": [true, "generic"],
- "semicolon": false
- }
-}
diff --git a/packages/emotion-theming/src/index.js b/packages/emotion-theming/src/index.js
deleted file mode 100644
index 987d8d15b..000000000
--- a/packages/emotion-theming/src/index.js
+++ /dev/null
@@ -1,3 +0,0 @@
-throw new Error(
- "`emotion-theming` has been removed and all its exports were moved to `@emotion/core` package. Please import them like this `import { useTheme, ThemeProvider, withTheme } from '@emotion/core'`."
-)
diff --git a/packages/emotion/macro.d.ts b/packages/emotion/macro.d.ts
deleted file mode 100644
index c7c3ab45c..000000000
--- a/packages/emotion/macro.d.ts
+++ /dev/null
@@ -1,3 +0,0 @@
-declare module 'emotion/macro' {
- export * from 'emotion'
-}
diff --git a/packages/emotion/macro.js b/packages/emotion/macro.js
deleted file mode 100644
index 78d6f08ac..000000000
--- a/packages/emotion/macro.js
+++ /dev/null
@@ -1 +0,0 @@
-module.exports = require('babel-plugin-emotion').macros.vanillaEmotion
diff --git a/packages/emotion/src/index.js b/packages/emotion/src/index.js
deleted file mode 100644
index 1f7bfb0e2..000000000
--- a/packages/emotion/src/index.js
+++ /dev/null
@@ -1,15 +0,0 @@
-// @flow
-import createEmotion from 'create-emotion'
-
-export const {
- flush,
- hydrate,
- cx,
- merge,
- getRegisteredStyles,
- injectGlobal,
- keyframes,
- css,
- sheet,
- cache
-} = createEmotion()
diff --git a/packages/emotion/test/source-map/__snapshots__/source-map.test.js.snap b/packages/emotion/test/source-map/__snapshots__/source-map.test.js.snap
deleted file mode 100644
index 48b9a7969..000000000
--- a/packages/emotion/test/source-map/__snapshots__/source-map.test.js.snap
+++ /dev/null
@@ -1,61 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`css css without newline or semicolon 1`] = `
-".css-6kh100-cls {
- color: hotpink;
-}
-
-/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFtRG1CIiwiZmlsZSI6InNvdXJjZS1tYXAudGVzdC5qcyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCAndGVzdC11dGlscy9sZWdhY3ktZW52J1xuaW1wb3J0IHsgY3NzLCBzaGVldCwgZmx1c2ggfSBmcm9tICdlbW90aW9uJ1xuXG5nbG9iYWwuc2hvdWxkS2VlcFNvdXJjZU1hcHMgPSB0cnVlXG5cbmRlc2NyaWJlKCdjc3MnLCAoKSA9PiB7XG4gIGFmdGVyRWFjaCgoKSA9PiBmbHVzaCgpKVxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBzdHlsZXMnLCAoKSA9PiB7XG4gICAgY29uc3QgbXEgPSBbXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNDIwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA2NDBweCknLFxuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDk2MHB4KSdcbiAgICBdXG5cbiAgICBjc3Moe1xuICAgICAgY29sb3I6ICdibHVlJyxcbiAgICAgICcmOmhvdmVyJzoge1xuICAgICAgICAnJiAubmFtZSc6IHtcbiAgICAgICAgICBjb2xvcjogJ2FtZXRoeXN0JyxcbiAgICAgICAgICAnJjpmb2N1cyc6IHtcbiAgICAgICAgICAgIGNvbG9yOiAnYnVybHl3b29kJyxcbiAgICAgICAgICAgIFttcVswXV06IHtcbiAgICAgICAgICAgICAgY29sb3I6ICdyZWJlY2NhcHVycGxlJ1xuICAgICAgICAgICAgfVxuICAgICAgICAgIH1cbiAgICAgICAgfSxcbiAgICAgICAgY29sb3I6ICdncmVlbidcbiAgICAgIH1cbiAgICB9KVxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcblxuICB0ZXN0KCdzb3VyY2UtbWFwIG5lc3RlZCBtZWRpYSBxdWVyaWVzJywgKCkgPT4ge1xuICAgIGNzc2BcbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA2MDBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjRyZW07XG4gICAgICAgIH1cbiAgICAgIH1cblxuICAgICAgQG1lZGlhIChtYXgtd2lkdGg6IDQwMHB4KSwgKG1heC1oZWlnaHQ6IDQyMHB4KSB7XG4gICAgICAgIGgxIHtcbiAgICAgICAgICBmb250LXNpemU6IDEuMXJlbTtcbiAgICAgICAgfVxuICAgICAgfVxuICAgIGBcblxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbiAgdGVzdCgnY3NzIHdpdGhvdXQgbmV3bGluZSBvciBzZW1pY29sb24nLCAoKSA9PiB7XG4gICAgLy8gZXNsaW50LWRpc2FibGUtbmV4dC1saW5lXG4gICAgY29uc3QgY2xzID0gY3NzYFxuICAgICAgY29sb3I6IGhvdHBpbms7XG4gICAgYFxuICAgIGV4cGVjdChzaGVldCkudG9NYXRjaFNuYXBzaG90KClcbiAgfSlcbn0pXG4iXX0= */"
-`;
-
-exports[`css source-map nested media queries 1`] = `
-"@media (max-width:600px) {
- .css-acogag h1 {
- font-size: 1.4rem;
- }
-}
-
-/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ08iLCJmaWxlIjoic291cmNlLW1hcC50ZXN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICd0ZXN0LXV0aWxzL2xlZ2FjeS1lbnYnXG5pbXBvcnQgeyBjc3MsIHNoZWV0LCBmbHVzaCB9IGZyb20gJ2Vtb3Rpb24nXG5cbmdsb2JhbC5zaG91bGRLZWVwU291cmNlTWFwcyA9IHRydWVcblxuZGVzY3JpYmUoJ2NzcycsICgpID0+IHtcbiAgYWZ0ZXJFYWNoKCgpID0+IGZsdXNoKCkpXG4gIHRlc3QoJ3NvdXJjZS1tYXAgbmVzdGVkIHN0eWxlcycsICgpID0+IHtcbiAgICBjb25zdCBtcSA9IFtcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA0MjBweCknLFxuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDY0MHB4KScsXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogOTYwcHgpJ1xuICAgIF1cblxuICAgIGNzcyh7XG4gICAgICBjb2xvcjogJ2JsdWUnLFxuICAgICAgJyY6aG92ZXInOiB7XG4gICAgICAgICcmIC5uYW1lJzoge1xuICAgICAgICAgIGNvbG9yOiAnYW1ldGh5c3QnLFxuICAgICAgICAgICcmOmZvY3VzJzoge1xuICAgICAgICAgICAgY29sb3I6ICdidXJseXdvb2QnLFxuICAgICAgICAgICAgW21xWzBdXToge1xuICAgICAgICAgICAgICBjb2xvcjogJ3JlYmVjY2FwdXJwbGUnXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBjb2xvcjogJ2dyZWVuJ1xuICAgICAgfVxuICAgIH0pXG4gICAgZXhwZWN0KHNoZWV0KS50b01hdGNoU25hcHNob3QoKVxuICB9KVxuXG4gIHRlc3QoJ3NvdXJjZS1tYXAgbmVzdGVkIG1lZGlhIHF1ZXJpZXMnLCAoKSA9PiB7XG4gICAgY3NzYFxuICAgICAgQG1lZGlhIChtYXgtd2lkdGg6IDYwMHB4KSB7XG4gICAgICAgIGgxIHtcbiAgICAgICAgICBmb250LXNpemU6IDEuNHJlbTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBAbWVkaWEgKG1heC13aWR0aDogNDAwcHgpLCAobWF4LWhlaWdodDogNDIwcHgpIHtcbiAgICAgICAgaDEge1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS4xcmVtO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgYFxuXG4gICAgZXhwZWN0KHNoZWV0KS50b01hdGNoU25hcHNob3QoKVxuICB9KVxuICB0ZXN0KCdjc3Mgd2l0aG91dCBuZXdsaW5lIG9yIHNlbWljb2xvbicsICgpID0+IHtcbiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmVcbiAgICBjb25zdCBjbHMgPSBjc3NgXG4gICAgICBjb2xvcjogaG90cGluaztcbiAgICBgXG4gICAgZXhwZWN0KHNoZWV0KS50b01hdGNoU25hcHNob3QoKVxuICB9KVxufSlcbiJdfQ== */
-
-@media (max-width:400px),(max-height:420px) {
- .css-acogag h1 {
- font-size: 1.1rem;
- }
-}
-
-/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFpQ08iLCJmaWxlIjoic291cmNlLW1hcC50ZXN0LmpzIiwic291cmNlc0NvbnRlbnQiOlsiaW1wb3J0ICd0ZXN0LXV0aWxzL2xlZ2FjeS1lbnYnXG5pbXBvcnQgeyBjc3MsIHNoZWV0LCBmbHVzaCB9IGZyb20gJ2Vtb3Rpb24nXG5cbmdsb2JhbC5zaG91bGRLZWVwU291cmNlTWFwcyA9IHRydWVcblxuZGVzY3JpYmUoJ2NzcycsICgpID0+IHtcbiAgYWZ0ZXJFYWNoKCgpID0+IGZsdXNoKCkpXG4gIHRlc3QoJ3NvdXJjZS1tYXAgbmVzdGVkIHN0eWxlcycsICgpID0+IHtcbiAgICBjb25zdCBtcSA9IFtcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA0MjBweCknLFxuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDY0MHB4KScsXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogOTYwcHgpJ1xuICAgIF1cblxuICAgIGNzcyh7XG4gICAgICBjb2xvcjogJ2JsdWUnLFxuICAgICAgJyY6aG92ZXInOiB7XG4gICAgICAgICcmIC5uYW1lJzoge1xuICAgICAgICAgIGNvbG9yOiAnYW1ldGh5c3QnLFxuICAgICAgICAgICcmOmZvY3VzJzoge1xuICAgICAgICAgICAgY29sb3I6ICdidXJseXdvb2QnLFxuICAgICAgICAgICAgW21xWzBdXToge1xuICAgICAgICAgICAgICBjb2xvcjogJ3JlYmVjY2FwdXJwbGUnXG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuICAgICAgICB9LFxuICAgICAgICBjb2xvcjogJ2dyZWVuJ1xuICAgICAgfVxuICAgIH0pXG4gICAgZXhwZWN0KHNoZWV0KS50b01hdGNoU25hcHNob3QoKVxuICB9KVxuXG4gIHRlc3QoJ3NvdXJjZS1tYXAgbmVzdGVkIG1lZGlhIHF1ZXJpZXMnLCAoKSA9PiB7XG4gICAgY3NzYFxuICAgICAgQG1lZGlhIChtYXgtd2lkdGg6IDYwMHB4KSB7XG4gICAgICAgIGgxIHtcbiAgICAgICAgICBmb250LXNpemU6IDEuNHJlbTtcbiAgICAgICAgfVxuICAgICAgfVxuXG4gICAgICBAbWVkaWEgKG1heC13aWR0aDogNDAwcHgpLCAobWF4LWhlaWdodDogNDIwcHgpIHtcbiAgICAgICAgaDEge1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS4xcmVtO1xuICAgICAgICB9XG4gICAgICB9XG4gICAgYFxuXG4gICAgZXhwZWN0KHNoZWV0KS50b01hdGNoU25hcHNob3QoKVxuICB9KVxuICB0ZXN0KCdjc3Mgd2l0aG91dCBuZXdsaW5lIG9yIHNlbWljb2xvbicsICgpID0+IHtcbiAgICAvLyBlc2xpbnQtZGlzYWJsZS1uZXh0LWxpbmVcbiAgICBjb25zdCBjbHMgPSBjc3NgXG4gICAgICBjb2xvcjogaG90cGluaztcbiAgICBgXG4gICAgZXhwZWN0KHNoZWV0KS50b01hdGNoU25hcHNob3QoKVxuICB9KVxufSlcbiJdfQ== */"
-`;
-
-exports[`css source-map nested styles 1`] = `
-".css-s7aswl {
- color: blue;
-}
-
-/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjSSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ3Rlc3QtdXRpbHMvbGVnYWN5LWVudidcbmltcG9ydCB7IGNzcywgc2hlZXQsIGZsdXNoIH0gZnJvbSAnZW1vdGlvbidcblxuZ2xvYmFsLnNob3VsZEtlZXBTb3VyY2VNYXBzID0gdHJ1ZVxuXG5kZXNjcmliZSgnY3NzJywgKCkgPT4ge1xuICBhZnRlckVhY2goKCkgPT4gZmx1c2goKSlcbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgc3R5bGVzJywgKCkgPT4ge1xuICAgIGNvbnN0IG1xID0gW1xuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDQyMHB4KScsXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNjQwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA5NjBweCknXG4gICAgXVxuXG4gICAgY3NzKHtcbiAgICAgIGNvbG9yOiAnYmx1ZScsXG4gICAgICAnJjpob3Zlcic6IHtcbiAgICAgICAgJyYgLm5hbWUnOiB7XG4gICAgICAgICAgY29sb3I6ICdhbWV0aHlzdCcsXG4gICAgICAgICAgJyY6Zm9jdXMnOiB7XG4gICAgICAgICAgICBjb2xvcjogJ2J1cmx5d29vZCcsXG4gICAgICAgICAgICBbbXFbMF1dOiB7XG4gICAgICAgICAgICAgIGNvbG9yOiAncmViZWNjYXB1cnBsZSdcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNvbG9yOiAnZ3JlZW4nXG4gICAgICB9XG4gICAgfSlcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG5cbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgbWVkaWEgcXVlcmllcycsICgpID0+IHtcbiAgICBjc3NgXG4gICAgICBAbWVkaWEgKG1heC13aWR0aDogNjAwcHgpIHtcbiAgICAgICAgaDEge1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS40cmVtO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA0MDBweCksIChtYXgtaGVpZ2h0OiA0MjBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjFyZW07XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICBgXG5cbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG4gIHRlc3QoJ2NzcyB3aXRob3V0IG5ld2xpbmUgb3Igc2VtaWNvbG9uJywgKCkgPT4ge1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZVxuICAgIGNvbnN0IGNscyA9IGNzc2BcbiAgICAgIGNvbG9yOiBob3RwaW5rO1xuICAgIGBcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG59KVxuIl19 */
-
-.css-s7aswl:hover {
- color: green;
-}
-
-/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjSSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ3Rlc3QtdXRpbHMvbGVnYWN5LWVudidcbmltcG9ydCB7IGNzcywgc2hlZXQsIGZsdXNoIH0gZnJvbSAnZW1vdGlvbidcblxuZ2xvYmFsLnNob3VsZEtlZXBTb3VyY2VNYXBzID0gdHJ1ZVxuXG5kZXNjcmliZSgnY3NzJywgKCkgPT4ge1xuICBhZnRlckVhY2goKCkgPT4gZmx1c2goKSlcbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgc3R5bGVzJywgKCkgPT4ge1xuICAgIGNvbnN0IG1xID0gW1xuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDQyMHB4KScsXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNjQwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA5NjBweCknXG4gICAgXVxuXG4gICAgY3NzKHtcbiAgICAgIGNvbG9yOiAnYmx1ZScsXG4gICAgICAnJjpob3Zlcic6IHtcbiAgICAgICAgJyYgLm5hbWUnOiB7XG4gICAgICAgICAgY29sb3I6ICdhbWV0aHlzdCcsXG4gICAgICAgICAgJyY6Zm9jdXMnOiB7XG4gICAgICAgICAgICBjb2xvcjogJ2J1cmx5d29vZCcsXG4gICAgICAgICAgICBbbXFbMF1dOiB7XG4gICAgICAgICAgICAgIGNvbG9yOiAncmViZWNjYXB1cnBsZSdcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNvbG9yOiAnZ3JlZW4nXG4gICAgICB9XG4gICAgfSlcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG5cbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgbWVkaWEgcXVlcmllcycsICgpID0+IHtcbiAgICBjc3NgXG4gICAgICBAbWVkaWEgKG1heC13aWR0aDogNjAwcHgpIHtcbiAgICAgICAgaDEge1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS40cmVtO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA0MDBweCksIChtYXgtaGVpZ2h0OiA0MjBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjFyZW07XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICBgXG5cbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG4gIHRlc3QoJ2NzcyB3aXRob3V0IG5ld2xpbmUgb3Igc2VtaWNvbG9uJywgKCkgPT4ge1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZVxuICAgIGNvbnN0IGNscyA9IGNzc2BcbiAgICAgIGNvbG9yOiBob3RwaW5rO1xuICAgIGBcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG59KVxuIl19 */
-
-.css-s7aswl:hover .name {
- color: amethyst;
-}
-
-/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjSSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ3Rlc3QtdXRpbHMvbGVnYWN5LWVudidcbmltcG9ydCB7IGNzcywgc2hlZXQsIGZsdXNoIH0gZnJvbSAnZW1vdGlvbidcblxuZ2xvYmFsLnNob3VsZEtlZXBTb3VyY2VNYXBzID0gdHJ1ZVxuXG5kZXNjcmliZSgnY3NzJywgKCkgPT4ge1xuICBhZnRlckVhY2goKCkgPT4gZmx1c2goKSlcbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgc3R5bGVzJywgKCkgPT4ge1xuICAgIGNvbnN0IG1xID0gW1xuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDQyMHB4KScsXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNjQwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA5NjBweCknXG4gICAgXVxuXG4gICAgY3NzKHtcbiAgICAgIGNvbG9yOiAnYmx1ZScsXG4gICAgICAnJjpob3Zlcic6IHtcbiAgICAgICAgJyYgLm5hbWUnOiB7XG4gICAgICAgICAgY29sb3I6ICdhbWV0aHlzdCcsXG4gICAgICAgICAgJyY6Zm9jdXMnOiB7XG4gICAgICAgICAgICBjb2xvcjogJ2J1cmx5d29vZCcsXG4gICAgICAgICAgICBbbXFbMF1dOiB7XG4gICAgICAgICAgICAgIGNvbG9yOiAncmViZWNjYXB1cnBsZSdcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNvbG9yOiAnZ3JlZW4nXG4gICAgICB9XG4gICAgfSlcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG5cbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgbWVkaWEgcXVlcmllcycsICgpID0+IHtcbiAgICBjc3NgXG4gICAgICBAbWVkaWEgKG1heC13aWR0aDogNjAwcHgpIHtcbiAgICAgICAgaDEge1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS40cmVtO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA0MDBweCksIChtYXgtaGVpZ2h0OiA0MjBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjFyZW07XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICBgXG5cbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG4gIHRlc3QoJ2NzcyB3aXRob3V0IG5ld2xpbmUgb3Igc2VtaWNvbG9uJywgKCkgPT4ge1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZVxuICAgIGNvbnN0IGNscyA9IGNzc2BcbiAgICAgIGNvbG9yOiBob3RwaW5rO1xuICAgIGBcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG59KVxuIl19 */
-
-.css-s7aswl:hover .name:focus {
- color: burlywood;
-}
-
-/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjSSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ3Rlc3QtdXRpbHMvbGVnYWN5LWVudidcbmltcG9ydCB7IGNzcywgc2hlZXQsIGZsdXNoIH0gZnJvbSAnZW1vdGlvbidcblxuZ2xvYmFsLnNob3VsZEtlZXBTb3VyY2VNYXBzID0gdHJ1ZVxuXG5kZXNjcmliZSgnY3NzJywgKCkgPT4ge1xuICBhZnRlckVhY2goKCkgPT4gZmx1c2goKSlcbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgc3R5bGVzJywgKCkgPT4ge1xuICAgIGNvbnN0IG1xID0gW1xuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDQyMHB4KScsXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNjQwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA5NjBweCknXG4gICAgXVxuXG4gICAgY3NzKHtcbiAgICAgIGNvbG9yOiAnYmx1ZScsXG4gICAgICAnJjpob3Zlcic6IHtcbiAgICAgICAgJyYgLm5hbWUnOiB7XG4gICAgICAgICAgY29sb3I6ICdhbWV0aHlzdCcsXG4gICAgICAgICAgJyY6Zm9jdXMnOiB7XG4gICAgICAgICAgICBjb2xvcjogJ2J1cmx5d29vZCcsXG4gICAgICAgICAgICBbbXFbMF1dOiB7XG4gICAgICAgICAgICAgIGNvbG9yOiAncmViZWNjYXB1cnBsZSdcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNvbG9yOiAnZ3JlZW4nXG4gICAgICB9XG4gICAgfSlcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG5cbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgbWVkaWEgcXVlcmllcycsICgpID0+IHtcbiAgICBjc3NgXG4gICAgICBAbWVkaWEgKG1heC13aWR0aDogNjAwcHgpIHtcbiAgICAgICAgaDEge1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS40cmVtO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA0MDBweCksIChtYXgtaGVpZ2h0OiA0MjBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjFyZW07XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICBgXG5cbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG4gIHRlc3QoJ2NzcyB3aXRob3V0IG5ld2xpbmUgb3Igc2VtaWNvbG9uJywgKCkgPT4ge1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZVxuICAgIGNvbnN0IGNscyA9IGNzc2BcbiAgICAgIGNvbG9yOiBob3RwaW5rO1xuICAgIGBcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG59KVxuIl19 */
-
-@media (min-width:420px) {
- .css-s7aswl:hover .name:focus {
- color: rebeccapurple;
- }
-}
-
-/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInNvdXJjZS1tYXAudGVzdC5qcyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFjSSIsImZpbGUiOiJzb3VyY2UtbWFwLnRlc3QuanMiLCJzb3VyY2VzQ29udGVudCI6WyJpbXBvcnQgJ3Rlc3QtdXRpbHMvbGVnYWN5LWVudidcbmltcG9ydCB7IGNzcywgc2hlZXQsIGZsdXNoIH0gZnJvbSAnZW1vdGlvbidcblxuZ2xvYmFsLnNob3VsZEtlZXBTb3VyY2VNYXBzID0gdHJ1ZVxuXG5kZXNjcmliZSgnY3NzJywgKCkgPT4ge1xuICBhZnRlckVhY2goKCkgPT4gZmx1c2goKSlcbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgc3R5bGVzJywgKCkgPT4ge1xuICAgIGNvbnN0IG1xID0gW1xuICAgICAgJ0BtZWRpYShtaW4td2lkdGg6IDQyMHB4KScsXG4gICAgICAnQG1lZGlhKG1pbi13aWR0aDogNjQwcHgpJyxcbiAgICAgICdAbWVkaWEobWluLXdpZHRoOiA5NjBweCknXG4gICAgXVxuXG4gICAgY3NzKHtcbiAgICAgIGNvbG9yOiAnYmx1ZScsXG4gICAgICAnJjpob3Zlcic6IHtcbiAgICAgICAgJyYgLm5hbWUnOiB7XG4gICAgICAgICAgY29sb3I6ICdhbWV0aHlzdCcsXG4gICAgICAgICAgJyY6Zm9jdXMnOiB7XG4gICAgICAgICAgICBjb2xvcjogJ2J1cmx5d29vZCcsXG4gICAgICAgICAgICBbbXFbMF1dOiB7XG4gICAgICAgICAgICAgIGNvbG9yOiAncmViZWNjYXB1cnBsZSdcbiAgICAgICAgICAgIH1cbiAgICAgICAgICB9XG4gICAgICAgIH0sXG4gICAgICAgIGNvbG9yOiAnZ3JlZW4nXG4gICAgICB9XG4gICAgfSlcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG5cbiAgdGVzdCgnc291cmNlLW1hcCBuZXN0ZWQgbWVkaWEgcXVlcmllcycsICgpID0+IHtcbiAgICBjc3NgXG4gICAgICBAbWVkaWEgKG1heC13aWR0aDogNjAwcHgpIHtcbiAgICAgICAgaDEge1xuICAgICAgICAgIGZvbnQtc2l6ZTogMS40cmVtO1xuICAgICAgICB9XG4gICAgICB9XG5cbiAgICAgIEBtZWRpYSAobWF4LXdpZHRoOiA0MDBweCksIChtYXgtaGVpZ2h0OiA0MjBweCkge1xuICAgICAgICBoMSB7XG4gICAgICAgICAgZm9udC1zaXplOiAxLjFyZW07XG4gICAgICAgIH1cbiAgICAgIH1cbiAgICBgXG5cbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG4gIHRlc3QoJ2NzcyB3aXRob3V0IG5ld2xpbmUgb3Igc2VtaWNvbG9uJywgKCkgPT4ge1xuICAgIC8vIGVzbGludC1kaXNhYmxlLW5leHQtbGluZVxuICAgIGNvbnN0IGNscyA9IGNzc2BcbiAgICAgIGNvbG9yOiBob3RwaW5rO1xuICAgIGBcbiAgICBleHBlY3Qoc2hlZXQpLnRvTWF0Y2hTbmFwc2hvdCgpXG4gIH0pXG59KVxuIl19 */"
-`;
diff --git a/packages/emotion/types/tsconfig.json b/packages/emotion/types/tsconfig.json
deleted file mode 100644
index ea6734342..000000000
--- a/packages/emotion/types/tsconfig.json
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "compilerOptions": {
- "baseUrl": "../",
- "forceConsistentCasingInFileNames": true,
- "jsx": "react",
- "lib": [
- "es6",
- "dom"
- ],
- "module": "commonjs",
- "noEmit": true,
- "noImplicitAny": true,
- "noImplicitThis": true,
- "strict": true,
- "strictNullChecks": true,
- "strictFunctionTypes": true,
- "target": "es5",
- "typeRoots": [
- "../"
- ],
- "types": []
- },
- "include": [
- "./*.ts",
- "./*.tsx"
- ]
-}
diff --git a/packages/emotion/types/tslint.json b/packages/emotion/types/tslint.json
deleted file mode 100644
index 5bf1b9014..000000000
--- a/packages/emotion/types/tslint.json
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "extends": "dtslint/dtslint.json",
- "rules": {
- "array-type": [true, "generic"],
- "import-spacing": false,
- "semicolon": false,
- "whitespace": [
- true,
- "check-branch",
- "check-decl",
- "check-operator",
- "check-module",
- "check-rest-spread",
- "check-type",
- "check-typecast",
- "check-type-operator",
- "check-preblock"
- ]
- }
-}
diff --git a/packages/eslint-plugin-emotion/README.md b/packages/eslint-plugin-emotion/README.md
deleted file mode 100644
index be5a8de12..000000000
--- a/packages/eslint-plugin-emotion/README.md
+++ /dev/null
@@ -1,66 +0,0 @@
-# eslint-plugin-emotion
-
-> ESLint rules for emotion
-
-## Installation
-
-You'll first need to install [ESLint](http://eslint.org):
-
-```
-$ npm i eslint --save-dev
-```
-
-Next, install `eslint-plugin-emotion`:
-
-```
-$ npm install eslint-plugin-emotion --save-dev
-```
-
-**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `eslint-plugin-emotion` globally.
-
-## Usage
-
-Add `emotion` to the plugins section of your `.eslintrc` configuration file. You can omit the `eslint-plugin-` prefix:
-
-```json
-{
- "plugins": ["emotion"]
-}
-```
-
-Then configure the rules you want to use under the rules section.
-
-```json
-{
- "rules": {
- "emotion/jsx-import": "error"
- }
-}
-```
-
-## Emotion 10 codemods
-
-The Emotion 10 codemods are contained in this package. To use them, enable the rules shown below. Keeping these rules after migrating is also useful to have `jsx` from `@emotion/core` automatically imported when the css prop is used and other such things. You may also want to not enable certain rules while you are migrating or forever, such the `no-vanilla` rule.
-
-```json
-{
- "rules": {
- "emotion/jsx-import": "error",
- "emotion/no-vanilla": "error",
- "emotion/import-from-emotion": "error",
- "emotion/styled-import": "error"
- }
-}
-```
-
-> **Note:**
->
-> These rules assume you are using React, if you are not using React, you should keep using the `emotion` package.
-
-## Supported Rules
-
-- [jsx-import](https://github.com/emotion-js/emotion/blob/master/packages/eslint-plugin-emotion/docs/rules/jsx-import.md)
-- [styled-import](https://github.com/emotion-js/emotion/blob/master/packages/eslint-plugin-emotion/docs/rules/styled-import.md)
-- [import-from-emotion](https://github.com/emotion-js/emotion/blob/master/packages/eslint-plugin-emotion/docs/rules/import-from-emotion.md)
-- [no-vanilla](https://github.com/emotion-js/emotion/blob/master/packages/eslint-plugin-emotion/docs/rules/no-vanilla.md)
-- [syntax-preference](https://github.com/emotion-js/emotion/blob/master/packages/eslint-plugin-emotion/docs/rules/syntax-preference.md)
diff --git a/packages/eslint-plugin/CHANGELOG.md b/packages/eslint-plugin/CHANGELOG.md
new file mode 100644
index 000000000..727c57b89
--- /dev/null
+++ b/packages/eslint-plugin/CHANGELOG.md
@@ -0,0 +1,8 @@
+# @emotion/eslint-plugin
+
+## 10.0.14
+
+### Patch Changes
+
+- [c0eb604d](https://github.com/emotion-js/emotion/commit/c0eb604d) [#1419](https://github.com/emotion-js/emotion/pull/1419) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Update build tool
+ - [4ae88942](https://github.com/emotion-js/emotion/commit/4ae88942) [#1402](https://github.com/emotion-js/emotion/pull/1402) Thanks [@ahutchings](https://github.com/ahutchings)! - jsx-import rule: Add jsx specifier to existing import from @emotion/core when auto-fixing
diff --git a/packages/eslint-plugin/README.md b/packages/eslint-plugin/README.md
new file mode 100644
index 000000000..f64e9d602
--- /dev/null
+++ b/packages/eslint-plugin/README.md
@@ -0,0 +1,78 @@
+# @emotion/eslint-plugin
+
+> ESLint rules for emotion
+
+## Installation
+
+You'll first need to install [ESLint](http://eslint.org):
+
+```
+$ npm i eslint --save-dev
+```
+
+Next, install `@emotion/eslint-plugin`:
+
+```
+$ npm install @emotion/eslint-plugin --save-dev
+```
+
+**Note:** If you installed ESLint globally (using the `-g` flag) then you must also install `@emotion/eslint-plugin` globally.
+
+## Usage
+
+Add `@emotion` to the plugins section of your `.eslintrc` configuration file. You can omit `/eslint-plugin`:
+
+```json
+{
+ "plugins": ["@emotion"]
+}
+```
+
+Then configure the rules you want to use under the rules section.
+
+```json
+{
+ "rules": {
+ "@emotion/jsx-import": "error"
+ }
+}
+```
+
+## Emotion 11 codemod
+
+The Emotion 10 codemods are contained in this package. To use them, enable the rule shown below.
+
+```json
+{
+ "rules": {
+ "@emotion/pkg-renaming": "error"
+ }
+}
+```
+
+## Emotion 10 codemods
+
+The Emotion 10 codemods are contained in this package. To use them, enable the rules shown below. Keeping these rules after migrating is also useful to have `jsx` from `@emotion/react` automatically imported when the css prop is used and other such things. You may also want to not enable certain rules while you are migrating or forever, such the `no-vanilla` rule.
+
+```json
+{
+ "rules": {
+ "@emotion/jsx-import": "error",
+ "@emotion/no-vanilla": "error",
+ "@emotion/import-from-emotion": "error",
+ "@emotion/styled-import": "error"
+ }
+}
+```
+
+> **Note:**
+>
+> These rules assume you are using React, if you are not using React, you should keep using the `emotion` package.
+
+## Supported Rules
+
+- [jsx-import](https://github.com/emotion-js/emotion/blob/master/packages/eslint-plugin/docs/rules/jsx-import.md)
+- [styled-import](https://github.com/emotion-js/emotion/blob/master/packages/eslint-plugin/docs/rules/styled-import.md)
+- [import-from-emotion](https://github.com/emotion-js/emotion/blob/master/packages/eslint-plugin/docs/rules/import-from-emotion.md)
+- [no-vanilla](https://github.com/emotion-js/emotion/blob/master/packages/eslint-plugin/docs/rules/no-vanilla.md)
+- [syntax-preference](https://github.com/emotion-js/emotion/blob/master/packages/eslint-plugin/docs/rules/syntax-preference.md)
diff --git a/packages/eslint-plugin-emotion/docs/rules/import-from-emotion.md b/packages/eslint-plugin/docs/rules/import-from-emotion.md
similarity index 100%
rename from packages/eslint-plugin-emotion/docs/rules/import-from-emotion.md
rename to packages/eslint-plugin/docs/rules/import-from-emotion.md
diff --git a/packages/eslint-plugin-emotion/docs/rules/jsx-import.md b/packages/eslint-plugin/docs/rules/jsx-import.md
similarity index 61%
rename from packages/eslint-plugin-emotion/docs/rules/jsx-import.md
rename to packages/eslint-plugin/docs/rules/jsx-import.md
index f3531fd44..6a59337b8 100644
--- a/packages/eslint-plugin-emotion/docs/rules/jsx-import.md
+++ b/packages/eslint-plugin/docs/rules/jsx-import.md
@@ -1,8 +1,8 @@
-# Ensure jsx from @emotion/core is imported (jsx-import)
+# Ensure jsx from @emotion/react is imported (jsx-import)
## Rule Details
-This rule ensures that `jsx` from `@emotion/core is imported`. This rule can usually be auto-fixed so you should not usually have to do anything yourself.
+This rule ensures that `jsx` from `@emotion/react is imported`. This rule can usually be auto-fixed so you should not usually have to do anything yourself.
Examples of **incorrect** code for this rule.
@@ -20,7 +20,7 @@ Examples of **correct** code for this rule.
```js
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
let element = (
Styles should be written using strings.
```
-Examples of **incorrect** code for this rule, when `emotion/syntax-preference: [2, "object"]`:
+Examples of **incorrect** code for this rule, when `@emotion/syntax-preference: [2, "object"]`:
```js
const H1 = styled.h1`
diff --git a/packages/eslint-plugin/package.json b/packages/eslint-plugin/package.json
new file mode 100644
index 000000000..f1f7e18c9
--- /dev/null
+++ b/packages/eslint-plugin/package.json
@@ -0,0 +1,26 @@
+{
+ "name": "@emotion/eslint-plugin",
+ "version": "10.0.14",
+ "description": "ESLint rules for emotion",
+ "scripts": {
+ "test:typescript": "exit 0"
+ },
+ "keywords": [
+ "eslint",
+ "eslintplugin",
+ "eslint-plugin",
+ "emotion"
+ ],
+ "author": "alex-pex ",
+ "main": "dist/eslint-plugin.cjs.js",
+ "engines": {
+ "node": ">=6"
+ },
+ "license": "MIT",
+ "peerDependencies": {
+ "eslint": "6"
+ },
+ "devDependencies": {
+ "eslint": "^6.7.2"
+ }
+}
diff --git a/packages/eslint-plugin-emotion/src/index.js b/packages/eslint-plugin/src/index.js
similarity index 80%
rename from packages/eslint-plugin-emotion/src/index.js
rename to packages/eslint-plugin/src/index.js
index b2474b1ca..e626a190c 100644
--- a/packages/eslint-plugin-emotion/src/index.js
+++ b/packages/eslint-plugin/src/index.js
@@ -5,11 +5,13 @@ import noVanilla from './rules/no-vanilla'
import syntaxPreference from './rules/syntax-preference'
import styledImport from './rules/styled-import'
import jsxImport from './rules/jsx-import'
+import pkgRenaming from './rules/pkg-renaming'
export let rules = {
'import-from-emotion': importFromEmotion,
'no-vanilla': noVanilla,
'syntax-preference': syntaxPreference,
'styled-import': styledImport,
- 'jsx-import': jsxImport
+ 'jsx-import': jsxImport,
+ 'pkg-renaming': pkgRenaming
}
diff --git a/packages/eslint-plugin-emotion/src/rules/import-from-emotion.js b/packages/eslint-plugin/src/rules/import-from-emotion.js
similarity index 100%
rename from packages/eslint-plugin-emotion/src/rules/import-from-emotion.js
rename to packages/eslint-plugin/src/rules/import-from-emotion.js
diff --git a/packages/eslint-plugin-emotion/src/rules/jsx-import.js b/packages/eslint-plugin/src/rules/jsx-import.js
similarity index 94%
rename from packages/eslint-plugin-emotion/src/rules/jsx-import.js
rename to packages/eslint-plugin/src/rules/jsx-import.js
index c30e2d34a..1618e7bb2 100644
--- a/packages/eslint-plugin-emotion/src/rules/jsx-import.js
+++ b/packages/eslint-plugin/src/rules/jsx-import.js
@@ -22,7 +22,8 @@ export default {
sourceCode.ast.body.forEach(x => {
if (
x.type === 'ImportDeclaration' &&
- x.source.value === '@emotion/core'
+ (x.source.value === '@emotion/react' ||
+ x.source.value === '@emotion/core')
) {
emotionCoreNode = x
@@ -59,7 +60,7 @@ export default {
context.report({
node,
message:
- 'The css prop can only be used if jsx from @emotion/core is imported and it is set as the jsx pragma',
+ 'The css prop can only be used if jsx from @emotion/react is imported and it is set as the jsx pragma',
fix(fixer) {
if (hasJsxImport) {
return fixer.insertTextBefore(
@@ -83,12 +84,12 @@ export default {
return fixer.insertTextBefore(
sourceCode.ast.body[0],
- `import { jsx } from '@emotion/core'\n`
+ `import { jsx } from '@emotion/react'\n`
)
}
return fixer.insertTextBefore(
sourceCode.ast.body[0],
- `/** @jsx jsx */\nimport { jsx } from '@emotion/core'\n`
+ `/** @jsx jsx */\nimport { jsx } from '@emotion/react'\n`
)
}
})
diff --git a/packages/eslint-plugin-emotion/src/rules/no-vanilla.js b/packages/eslint-plugin/src/rules/no-vanilla.js
similarity index 84%
rename from packages/eslint-plugin-emotion/src/rules/no-vanilla.js
rename to packages/eslint-plugin/src/rules/no-vanilla.js
index a8bc30f46..793819576 100644
--- a/packages/eslint-plugin-emotion/src/rules/no-vanilla.js
+++ b/packages/eslint-plugin/src/rules/no-vanilla.js
@@ -5,7 +5,7 @@ export default {
create(context) {
return {
ImportDeclaration(node) {
- if (node.source.value === 'emotion') {
+ if (node.source.value === '@emotion/css') {
context.report({
node: node.source,
message: `Vanilla emotion should not be used`
diff --git a/packages/eslint-plugin/src/rules/pkg-renaming.js b/packages/eslint-plugin/src/rules/pkg-renaming.js
new file mode 100644
index 000000000..b7f614cb7
--- /dev/null
+++ b/packages/eslint-plugin/src/rules/pkg-renaming.js
@@ -0,0 +1,69 @@
+let simpleMappings = {
+ '@emotion/core': '@emotion/react',
+ emotion: '@emotion/css',
+ 'emotion/macro': '@emotion/css/macro',
+ '@emotion/styled-base': '@emotion/styled/base',
+ 'jest-emotion': '@emotion/jest',
+ 'babel-plugin-emotion': '@emotion/babel-plugin',
+ 'eslint-plugin-emotion': '@emotion/eslint-plugin',
+ 'create-emotion-server': '@emotion/server/create-instance',
+ 'create-emotion': '@emotion/css/create-instance',
+ 'emotion-server': '@emotion/server'
+}
+
+export default {
+ meta: {
+ fixable: 'code'
+ },
+ create(context) {
+ return {
+ ImportDeclaration(node) {
+ let maybeMapping = simpleMappings[node.source.value]
+ if (maybeMapping !== undefined) {
+ context.report({
+ node: node.source,
+ message: `${JSON.stringify(
+ node.source.value
+ )} has been renamed to ${JSON.stringify(
+ maybeMapping
+ )}, please import it from ${JSON.stringify(maybeMapping)} instead`,
+ fix: fixer => fixer.replaceText(node.source, `'${maybeMapping}'`)
+ })
+ }
+ if (
+ (node.source.value === '@emotion/css' ||
+ node.source.value === '@emotion/css/macro') &&
+ node.specifiers.length === 1 &&
+ node.specifiers[0].type === 'ImportDefaultSpecifier'
+ ) {
+ let replacement =
+ node.source.value === '@emotion/css'
+ ? '@emotion/react'
+ : '@emotion/react/macro'
+ context.report({
+ node: node.source,
+ message: `The default export of "${
+ node.source.value
+ }" in Emotion 10 has been moved to a named export, \`css\`, from "${replacement}" in Emotion 11, please import it from "${replacement}"`,
+ fix: fixer =>
+ fixer.replaceText(
+ node,
+ `import { css${
+ node.specifiers[0].local.name === 'css'
+ ? ''
+ : ` as ${node.specifiers[0].local.name}`
+ } } from '${replacement}'`
+ )
+ })
+ }
+ if (node.source.value === 'emotion-theming') {
+ context.report({
+ node: node.source,
+ message: `"emotion-theming" has been moved into "@emotion/react", please import its exports from "@emotion/react"`,
+ fix: fixer => fixer.replaceText(node.source, `'@emotion/react'`)
+ })
+ }
+ }
+ }
+ }
+}
diff --git a/packages/eslint-plugin-emotion/src/rules/styled-import.js b/packages/eslint-plugin/src/rules/styled-import.js
similarity index 100%
rename from packages/eslint-plugin-emotion/src/rules/styled-import.js
rename to packages/eslint-plugin/src/rules/styled-import.js
diff --git a/packages/eslint-plugin-emotion/src/rules/syntax-preference.js b/packages/eslint-plugin/src/rules/syntax-preference.js
similarity index 100%
rename from packages/eslint-plugin-emotion/src/rules/syntax-preference.js
rename to packages/eslint-plugin/src/rules/syntax-preference.js
diff --git a/packages/eslint-plugin-emotion/test/rules/import-from-emotion.test.js b/packages/eslint-plugin/test/rules/import-from-emotion.test.js
similarity index 95%
rename from packages/eslint-plugin-emotion/test/rules/import-from-emotion.test.js
rename to packages/eslint-plugin/test/rules/import-from-emotion.test.js
index 12143ab3a..b28f99730 100644
--- a/packages/eslint-plugin-emotion/test/rules/import-from-emotion.test.js
+++ b/packages/eslint-plugin/test/rules/import-from-emotion.test.js
@@ -3,7 +3,7 @@
*/
import { RuleTester } from 'eslint'
-import { rules as emotionRules } from 'eslint-plugin-emotion'
+import { rules as emotionRules } from '@emotion/eslint-plugin'
const rule = emotionRules['import-from-emotion']
diff --git a/packages/eslint-plugin-emotion/test/rules/jsx-import.test.js b/packages/eslint-plugin/test/rules/jsx-import.test.js
similarity index 75%
rename from packages/eslint-plugin-emotion/test/rules/jsx-import.test.js
rename to packages/eslint-plugin/test/rules/jsx-import.test.js
index dd5a36889..6e198e56a 100644
--- a/packages/eslint-plugin-emotion/test/rules/jsx-import.test.js
+++ b/packages/eslint-plugin/test/rules/jsx-import.test.js
@@ -3,7 +3,7 @@
*/
import { RuleTester } from 'eslint'
-import { rules as emotionRules } from 'eslint-plugin-emotion'
+import { rules as emotionRules } from '@emotion/eslint-plugin'
const rule = emotionRules['jsx-import']
@@ -24,7 +24,7 @@ ruleTester.run('emotion jsx', rule, {
{
code: `
// @jsx jsx
- import { jsx } from '@emotion/core'
+ import { jsx } from '@emotion/react'
let ele =
`
@@ -46,65 +46,65 @@ let ele =
errors: [
{
message:
- 'The css prop can only be used if jsx from @emotion/core is imported and it is set as the jsx pragma'
+ 'The css prop can only be used if jsx from @emotion/react is imported and it is set as the jsx pragma'
}
],
output: `
// @jsx jsx
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
let ele =
`.trim()
},
{
code: `
// @jsx jsx
-import { css } from '@emotion/core'
+import { css } from '@emotion/react'
let ele =
`.trim(),
errors: [
{
message:
- 'The css prop can only be used if jsx from @emotion/core is imported and it is set as the jsx pragma'
+ 'The css prop can only be used if jsx from @emotion/react is imported and it is set as the jsx pragma'
}
],
output: `
// @jsx jsx
-import { css, jsx } from '@emotion/core'
+import { css, jsx } from '@emotion/react'
let ele =
`.trim()
},
{
code: `
// @jsx jsx
-import DefaultExport from '@emotion/core'
+import DefaultExport from '@emotion/react'
let ele =
`.trim(),
errors: [
{
message:
- 'The css prop can only be used if jsx from @emotion/core is imported and it is set as the jsx pragma'
+ 'The css prop can only be used if jsx from @emotion/react is imported and it is set as the jsx pragma'
}
],
output: `
// @jsx jsx
-import DefaultExport, { jsx } from '@emotion/core'
+import DefaultExport, { jsx } from '@emotion/react'
let ele =
`.trim()
},
{
code: `
-import * as Emotion from '@emotion/core'
+import * as Emotion from '@emotion/react'
let ele =
`.trim(),
errors: [
{
message:
- 'The css prop can only be used if jsx from @emotion/core is imported and it is set as the jsx pragma'
+ 'The css prop can only be used if jsx from @emotion/react is imported and it is set as the jsx pragma'
}
],
output: `
/** @jsx Emotion.jsx */
-import * as Emotion from '@emotion/core'
+import * as Emotion from '@emotion/react'
let ele =
`.trim()
},
@@ -115,51 +115,51 @@ let ele =
errors: [
{
message:
- 'The css prop can only be used if jsx from @emotion/core is imported and it is set as the jsx pragma'
+ 'The css prop can only be used if jsx from @emotion/react is imported and it is set as the jsx pragma'
}
],
output: `
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
let ele =
`.trim()
},
{
code: `
-import {jsx} from '@emotion/core'
+import {jsx} from '@emotion/react'
let ele =
`.trim(),
errors: [
{
message:
- 'The css prop can only be used if jsx from @emotion/core is imported and it is set as the jsx pragma'
+ 'The css prop can only be used if jsx from @emotion/react is imported and it is set as the jsx pragma'
}
],
output: `
/** @jsx jsx */
-import {jsx} from '@emotion/core'
+import {jsx} from '@emotion/react'
let ele =
`.trim()
},
{
code: `
-import {jsx} from '@emotion/core'
+import {jsx} from '@emotion/react'
let ele =
let ele2 =
`.trim(),
errors: [
{
message:
- 'The css prop can only be used if jsx from @emotion/core is imported and it is set as the jsx pragma'
+ 'The css prop can only be used if jsx from @emotion/react is imported and it is set as the jsx pragma'
},
{
message:
- 'The css prop can only be used if jsx from @emotion/core is imported and it is set as the jsx pragma'
+ 'The css prop can only be used if jsx from @emotion/react is imported and it is set as the jsx pragma'
}
],
output: `
/** @jsx jsx */
-import {jsx} from '@emotion/core'
+import {jsx} from '@emotion/react'
let ele =
let ele2 =
@@ -168,7 +168,7 @@ let ele2 =
{
code: `
/** @jsx jsx */
- import {jsx} from '@emotion/core'
+ import {jsx} from '@emotion/react'
let ele =
`.trim(),
errors: [
@@ -179,14 +179,14 @@ let ele2 =
],
output: `
/** @jsx jsx */
- import {jsx, css} from '@emotion/core'
+ import {jsx, css} from '@emotion/react'
let ele =
`.trim()
},
{
code: `
/** @jsx jsx */
- import {jsx} from '@emotion/core'
+ import {jsx} from '@emotion/react'
let css = 'something'
let ele =
`.trim(),
@@ -198,7 +198,7 @@ let ele2 =
],
output: `
/** @jsx jsx */
- import {jsx, css as _css} from '@emotion/core'
+ import {jsx, css as _css} from '@emotion/react'
let css = 'something'
let ele =
`.trim()
@@ -206,7 +206,7 @@ let ele2 =
{
code: `
/** @jsx jsx */
- import {jsx, css} from '@emotion/core'
+ import {jsx, css} from '@emotion/react'
let ele =
`.trim(),
errors: [
@@ -217,7 +217,7 @@ let ele2 =
],
output: `
/** @jsx jsx */
- import {jsx, css} from '@emotion/core'
+ import {jsx, css} from '@emotion/react'
let ele =
`.trim()
}
diff --git a/packages/eslint-plugin-emotion/test/rules/no-vanilla.test.js b/packages/eslint-plugin/test/rules/no-vanilla.test.js
similarity index 72%
rename from packages/eslint-plugin-emotion/test/rules/no-vanilla.test.js
rename to packages/eslint-plugin/test/rules/no-vanilla.test.js
index 94da15fed..cb7715643 100644
--- a/packages/eslint-plugin-emotion/test/rules/no-vanilla.test.js
+++ b/packages/eslint-plugin/test/rules/no-vanilla.test.js
@@ -3,7 +3,7 @@
*/
import { RuleTester } from 'eslint'
-import { rules as emotionRules } from 'eslint-plugin-emotion'
+import { rules as emotionRules } from '@emotion/eslint-plugin'
const rule = emotionRules['no-vanilla']
@@ -20,10 +20,10 @@ RuleTester.setDefaultConfig({
const ruleTester = new RuleTester()
ruleTester.run('no-vanilla', rule, {
- valid: [{ code: `import { css } from '@emotion/core'` }],
+ valid: [{ code: `import { css } from '@emotion/react'` }],
invalid: [
{
- code: `import { css } from 'emotion'`,
+ code: `import { css } from '@emotion/css'`,
errors: [
{
message: `Vanilla emotion should not be used`
diff --git a/packages/eslint-plugin/test/rules/pkg-renaming.test.js b/packages/eslint-plugin/test/rules/pkg-renaming.test.js
new file mode 100644
index 000000000..0377b13ee
--- /dev/null
+++ b/packages/eslint-plugin/test/rules/pkg-renaming.test.js
@@ -0,0 +1,81 @@
+/**
+ * @jest-environment node
+ */
+
+const { RuleTester } = require('eslint')
+const rule = require('@emotion/eslint-plugin').rules['pkg-renaming']
+
+RuleTester.setDefaultConfig({
+ parserOptions: {
+ ecmaVersion: 2018,
+ sourceType: 'module',
+ ecmaFeatures: {
+ jsx: true
+ }
+ }
+})
+
+const ruleTester = new RuleTester()
+
+ruleTester.run('pkg-renaming', rule, {
+ valid: [
+ {
+ code: `
+ import { css } from '@emotion/css'
+ `
+ }
+ ],
+
+ invalid: [
+ {
+ code: `import { css } from 'emotion'`,
+ errors: [
+ {
+ message:
+ '"emotion" has been renamed to "@emotion/css", please import it from "@emotion/css" instead'
+ }
+ ],
+ output: `import { css } from '@emotion/css'`
+ },
+ {
+ code: `import { css } from '@emotion/core'`,
+ errors: [
+ {
+ message:
+ '"@emotion/core" has been renamed to "@emotion/react", please import it from "@emotion/react" instead'
+ }
+ ],
+ output: `import { css } from '@emotion/react'`
+ },
+ {
+ code: `import css from '@emotion/css'`,
+ errors: [
+ {
+ message:
+ 'The default export of "@emotion/css" in Emotion 10 has been moved to a named export, `css`, from "@emotion/react" in Emotion 11, please import it from "@emotion/react"'
+ }
+ ],
+ output: `import { css } from '@emotion/react'`
+ },
+ {
+ code: `import css from '@emotion/css/macro'`,
+ errors: [
+ {
+ message:
+ 'The default export of "@emotion/css/macro" in Emotion 10 has been moved to a named export, `css`, from "@emotion/react/macro" in Emotion 11, please import it from "@emotion/react/macro"'
+ }
+ ],
+ output: `import { css } from '@emotion/react/macro'`
+ },
+ {
+ code: `import {ThemeProvider, withTheme} from 'emotion-theming'`,
+ errors: [
+ {
+ message:
+ '"emotion-theming" has been moved into "@emotion/react", please import its exports from "@emotion/react"'
+ }
+ ],
+ output: `import {ThemeProvider, withTheme} from '@emotion/react'`
+ }
+ ]
+})
diff --git a/packages/eslint-plugin-emotion/test/rules/styled-import.test.js b/packages/eslint-plugin/test/rules/styled-import.test.js
similarity index 91%
rename from packages/eslint-plugin-emotion/test/rules/styled-import.test.js
rename to packages/eslint-plugin/test/rules/styled-import.test.js
index 83c453936..4909d2dc7 100644
--- a/packages/eslint-plugin-emotion/test/rules/styled-import.test.js
+++ b/packages/eslint-plugin/test/rules/styled-import.test.js
@@ -3,7 +3,7 @@
*/
import { RuleTester } from 'eslint'
-import { rules as emotionRules } from 'eslint-plugin-emotion'
+import { rules as emotionRules } from '@emotion/eslint-plugin'
const rule = emotionRules['styled-import']
diff --git a/packages/eslint-plugin-emotion/test/rules/syntax-preference.test.js b/packages/eslint-plugin/test/rules/syntax-preference.test.js
similarity index 98%
rename from packages/eslint-plugin-emotion/test/rules/syntax-preference.test.js
rename to packages/eslint-plugin/test/rules/syntax-preference.test.js
index a9d788d13..a94c080f0 100644
--- a/packages/eslint-plugin-emotion/test/rules/syntax-preference.test.js
+++ b/packages/eslint-plugin/test/rules/syntax-preference.test.js
@@ -9,7 +9,7 @@
// ------------------------------------------------------------------------------
import { RuleTester } from 'eslint'
-import { rules as emotionRules } from 'eslint-plugin-emotion'
+import { rules as emotionRules } from '@emotion/eslint-plugin'
const rule = emotionRules['syntax-preference']
diff --git a/packages/jest-emotion/CHANGELOG.md b/packages/jest/CHANGELOG.md
similarity index 99%
rename from packages/jest-emotion/CHANGELOG.md
rename to packages/jest/CHANGELOG.md
index 449a1baf2..2db377767 100644
--- a/packages/jest-emotion/CHANGELOG.md
+++ b/packages/jest/CHANGELOG.md
@@ -1,4 +1,4 @@
-# jest-emotion
+# @emotion/jest
## 11.0.0-next.7
diff --git a/packages/jest-emotion/README.md b/packages/jest/README.md
similarity index 72%
rename from packages/jest-emotion/README.md
rename to packages/jest/README.md
index 8715788d7..1de2cc81b 100644
--- a/packages/jest-emotion/README.md
+++ b/packages/jest/README.md
@@ -1,11 +1,11 @@
-# jest-emotion
+# @emotion/jest
> Jest testing utilities for emotion
# Installation
```bash
-npm install --save-dev jest-emotion
+npm install --save-dev @emotion/jest
```
# Snapshot Serializer
@@ -16,28 +16,28 @@ The easiest way to test React components with emotion is with the snapshot seria
// jest.config.js
module.exports = {
// ... other config
- snapshotSerializers: ['jest-emotion']
+ snapshotSerializers: [
+ '@emotion/jest' /* if needed other snapshotSerializers should go here */
+ ]
}
```
-To assist with shallow rendering, there's a custom enzyme snapshot serializer, that includes the `enzyme-to-json`
-serializer, which is available by importing `jest-emotion/enzyme`. If you already have the `enzyme-to-json` serializer
-added to `snapshotSerializers`, it will need to be removed to allow this to work.
+To assist with shallow rendering, there's a custom enzyme snapshot serializer, that includes the `enzyme-to-json` serializer, which is available by importing `@emotion/jest/enzyme`. If you already have the `enzyme-to-json` serializer added to `snapshotSerializers`, it will need to be removed to allow this to work.
```js
// jest.config.js
module.exports = {
// ... other config
- snapshotSerializers: ['jest-emotion/enzyme']
+ snapshotSerializers: ['@emotion/jest/enzyme']
}
```
-Or you can customize the serializer via the `createSerializer` method like so: (the example below is with react-test-renderer but jest-emotion also works with enzyme and react-testing-library)
+Or you can add the serializer via the `expect.addSnapshotSerializer` method like so: (the example below is with react-test-renderer but @emotion/jest also works with enzyme and react-testing-library)
```jsx
import React from 'react'
import renderer from 'react-test-renderer'
-import serializer from 'jest-emotion'
+import serializer from '@emotion/jest'
import styled from '@emotion/styled'
expect.addSnapshotSerializer(serializer)
@@ -59,7 +59,7 @@ Refer to the [testing doc](https://github.com/emotion-js/emotion/blob/master/doc
### `classNameReplacer`
-jest-emotion's snapshot serializer replaces the hashes in class names with an index so that things like whitespace changes won't break snapshots. It optionally accepts a custom class name replacer, it defaults to the below.
+@emotion/jest's snapshot serializer replaces the hashes in class names with an index so that things like whitespace changes won't break snapshots. It optionally accepts a custom class name replacer, it defaults to the below.
```jsx
function classNameReplacer(className, index) {
@@ -68,7 +68,7 @@ function classNameReplacer(className, index) {
```
```jsx
-import { createSerializer } from 'jest-emotion'
+import { createSerializer } from '@emotion/jest'
expect.addSnapshotSerializer(
createSerializer({
@@ -81,12 +81,12 @@ expect.addSnapshotSerializer(
### `DOMElements`
-jest-emotion's snapshot serializer inserts styles and replaces class names in both React and DOM elements. If you would like to disable this behavior for DOM elements, you can do so by passing `{ DOMElements: false }`. For example:
+@emotion/jest's snapshot serializer inserts styles and replaces class names in both React and DOM elements. If you would like to disable this behavior for DOM elements, you can do so by passing `{ DOMElements: false }`. For example:
```jsx
-import { createSerializer } from 'jest-emotion'
+import { createSerializer } from '@emotion/jest'
-// configures jest-emotion to ignore DOM elements
+// configures @emotion/jest to ignore DOM elements
expect.addSnapshotSerializer(createSerializer({ DOMElements: false }))
```
@@ -99,10 +99,10 @@ To make more explicit assertions when testing your styled components you can use
```jsx
import React from 'react'
import renderer from 'react-test-renderer'
-import { matchers } from 'jest-emotion'
+import { matchers } from '@emotion/jest'
import styled from '@emotion/styled'
-// Add the custom matchers provided by 'jest-emotion'
+// Add the custom matchers provided by '@emotion/jest'
expect.extend(matchers)
test('renders with correct styles', () => {
@@ -171,10 +171,10 @@ Use `media` and `target` options to assert on rules within media queries and to
```jsx
import React from 'react'
import renderer from 'react-test-renderer'
-import { matchers } from 'jest-emotion'
+import { matchers } from '@emotion/jest'
import styled from '@emotion/styled'
-// Add the custom matchers provided by 'jest-emotion'
+// Add the custom matchers provided by '@emotion/jest'
expect.extend(matchers)
test('renders with correct link styles', () => {
diff --git a/packages/jest-emotion/enzyme/index.js b/packages/jest/enzyme/index.js
similarity index 100%
rename from packages/jest-emotion/enzyme/index.js
rename to packages/jest/enzyme/index.js
diff --git a/packages/jest-emotion/enzyme/package.json b/packages/jest/enzyme/package.json
similarity index 53%
rename from packages/jest-emotion/enzyme/package.json
rename to packages/jest/enzyme/package.json
index 3d1b6c5d6..feef70a86 100644
--- a/packages/jest-emotion/enzyme/package.json
+++ b/packages/jest/enzyme/package.json
@@ -1,6 +1,6 @@
{
- "main": "dist/jest-emotion.cjs.js",
- "module": "dist/jest-emotion.esm.js",
+ "main": "dist/jest.cjs.js",
+ "module": "dist/jest.esm.js",
"types": "../types/enzyme",
"preconstruct": {
"source": "../src/enzyme"
diff --git a/packages/jest-emotion/enzyme/types/index.d.ts b/packages/jest/enzyme/types/index.d.ts
similarity index 100%
rename from packages/jest-emotion/enzyme/types/index.d.ts
rename to packages/jest/enzyme/types/index.d.ts
diff --git a/packages/jest-emotion/package.json b/packages/jest/package.json
similarity index 87%
rename from packages/jest-emotion/package.json
rename to packages/jest/package.json
index 6eb909314..9f39969a0 100644
--- a/packages/jest-emotion/package.json
+++ b/packages/jest/package.json
@@ -1,9 +1,9 @@
{
- "name": "jest-emotion",
+ "name": "@emotion/jest",
"version": "11.0.0-next.7",
"description": "Jest utilities for emotion",
- "main": "dist/jest-emotion.cjs.js",
- "module": "dist/jest-emotion.esm.js",
+ "main": "dist/jest.cjs.js",
+ "module": "dist/jest.esm.js",
"types": "types/index.d.ts",
"files": [
"src",
@@ -31,9 +31,9 @@
}
},
"devDependencies": {
- "@emotion/core": "^11.0.0-next.7",
+ "@emotion/css": "^11.0.0-next.0",
+ "@emotion/react": "^11.0.0-next.7",
"dtslint": "^0.3.0",
- "emotion": "^11.0.0-next.0",
"enzyme-to-json": "^3.2.1",
"preact": "^8.2.9",
"preact-render-to-json": "^3.6.6",
diff --git a/packages/jest-emotion/serializer.js b/packages/jest/serializer.js
similarity index 100%
rename from packages/jest-emotion/serializer.js
rename to packages/jest/serializer.js
diff --git a/packages/jest-emotion/src/enzyme.js b/packages/jest/src/enzyme.js
similarity index 100%
rename from packages/jest-emotion/src/enzyme.js
rename to packages/jest/src/enzyme.js
diff --git a/packages/jest-emotion/src/index.js b/packages/jest/src/index.js
similarity index 100%
rename from packages/jest-emotion/src/index.js
rename to packages/jest/src/index.js
diff --git a/packages/jest-emotion/src/matchers.js b/packages/jest/src/matchers.js
similarity index 100%
rename from packages/jest-emotion/src/matchers.js
rename to packages/jest/src/matchers.js
diff --git a/packages/jest-emotion/src/replace-class-names.js b/packages/jest/src/replace-class-names.js
similarity index 100%
rename from packages/jest-emotion/src/replace-class-names.js
rename to packages/jest/src/replace-class-names.js
diff --git a/packages/jest-emotion/src/serializer.js b/packages/jest/src/serializer.js
similarity index 100%
rename from packages/jest-emotion/src/serializer.js
rename to packages/jest/src/serializer.js
diff --git a/packages/jest-emotion/src/utils.js b/packages/jest/src/utils.js
similarity index 100%
rename from packages/jest-emotion/src/utils.js
rename to packages/jest/src/utils.js
diff --git a/packages/jest-emotion/test/__snapshots__/matchers.test.js.snap b/packages/jest/test/__snapshots__/matchers.test.js.snap
similarity index 100%
rename from packages/jest-emotion/test/__snapshots__/matchers.test.js.snap
rename to packages/jest/test/__snapshots__/matchers.test.js.snap
diff --git a/packages/jest-emotion/test/__snapshots__/preact.test.js.snap b/packages/jest/test/__snapshots__/preact.test.js.snap
similarity index 100%
rename from packages/jest-emotion/test/__snapshots__/preact.test.js.snap
rename to packages/jest/test/__snapshots__/preact.test.js.snap
diff --git a/packages/jest-emotion/test/__snapshots__/printer.test.js.snap b/packages/jest/test/__snapshots__/printer.test.js.snap
similarity index 100%
rename from packages/jest-emotion/test/__snapshots__/printer.test.js.snap
rename to packages/jest/test/__snapshots__/printer.test.js.snap
diff --git a/packages/jest-emotion/test/__snapshots__/react-enzyme.test.js.snap b/packages/jest/test/__snapshots__/react-enzyme.test.js.snap
similarity index 100%
rename from packages/jest-emotion/test/__snapshots__/react-enzyme.test.js.snap
rename to packages/jest/test/__snapshots__/react-enzyme.test.js.snap
diff --git a/packages/jest-emotion/test/matchers.test.js b/packages/jest/test/matchers.test.js
similarity index 99%
rename from packages/jest-emotion/test/matchers.test.js
rename to packages/jest/test/matchers.test.js
index 03489af1a..3e3665e30 100644
--- a/packages/jest-emotion/test/matchers.test.js
+++ b/packages/jest/test/matchers.test.js
@@ -2,9 +2,9 @@ import 'test-utils/legacy-env'
import renderer from 'react-test-renderer'
/** @jsx jsx */
import * as enzyme from 'enzyme'
-import { css, jsx } from '@emotion/core'
+import { css, jsx } from '@emotion/react'
import styled from '@emotion/styled'
-import { matchers } from 'jest-emotion'
+import { matchers } from '@emotion/jest'
const { toHaveStyleRule } = matchers
diff --git a/packages/jest-emotion/test/preact.test.js b/packages/jest/test/preact.test.js
similarity index 92%
rename from packages/jest-emotion/test/preact.test.js
rename to packages/jest/test/preact.test.js
index 96fe5d41e..5bf325043 100644
--- a/packages/jest-emotion/test/preact.test.js
+++ b/packages/jest/test/preact.test.js
@@ -4,8 +4,8 @@ import 'test-utils/legacy-env'
import { h } from 'preact'
import render from 'preact-render-to-json'
import prettyFormat from 'pretty-format'
-import * as emotion from 'emotion'
-import * as emotionPlugin from 'jest-emotion'
+import * as emotion from '@emotion/css'
+import * as emotionPlugin from '@emotion/jest'
const { ReactElement, ReactTestComponent, DOMElement } = prettyFormat.plugins
describe('jest-emotion with preact', () => {
diff --git a/packages/jest-emotion/test/printer.test.js b/packages/jest/test/printer.test.js
similarity index 97%
rename from packages/jest-emotion/test/printer.test.js
rename to packages/jest/test/printer.test.js
index 821cab61c..0399a08f1 100644
--- a/packages/jest-emotion/test/printer.test.js
+++ b/packages/jest/test/printer.test.js
@@ -5,9 +5,9 @@ import 'test-utils/legacy-env'
import renderer from 'react-test-renderer'
import prettyFormat from 'pretty-format'
/** @jsx jsx */
-import { css, jsx, CacheProvider } from '@emotion/core'
+import { css, jsx, CacheProvider } from '@emotion/react'
import createCache from '@emotion/cache'
-import { createSerializer } from 'jest-emotion'
+import { createSerializer } from '@emotion/jest'
import { ignoreConsoleErrors } from 'test-utils'
let emotionPlugin = createSerializer()
diff --git a/packages/jest-emotion/test/react-enzyme.test.js b/packages/jest/test/react-enzyme.test.js
similarity index 97%
rename from packages/jest-emotion/test/react-enzyme.test.js
rename to packages/jest/test/react-enzyme.test.js
index 5f6b4cccb..9d18307c1 100644
--- a/packages/jest-emotion/test/react-enzyme.test.js
+++ b/packages/jest/test/react-enzyme.test.js
@@ -3,12 +3,12 @@ import 'test-utils/enzyme-env'
import jestInCase from 'jest-in-case'
import * as enzyme from 'enzyme'
-import { jsx, ThemeProvider } from '@emotion/core'
+import { jsx, ThemeProvider } from '@emotion/react'
import styled from '@emotion/styled'
import React from 'react'
import toJson from 'enzyme-to-json'
-import serializer from 'jest-emotion/enzyme'
+import serializer from '@emotion/jest/enzyme'
expect.addSnapshotSerializer(serializer)
diff --git a/packages/jest-emotion/types/index.d.ts b/packages/jest/types/index.d.ts
similarity index 100%
rename from packages/jest-emotion/types/index.d.ts
rename to packages/jest/types/index.d.ts
diff --git a/packages/jest-emotion/types/test.ts b/packages/jest/types/test.ts
similarity index 97%
rename from packages/jest-emotion/types/test.ts
rename to packages/jest/types/test.ts
index 0e85725f6..8d03e8c01 100644
--- a/packages/jest-emotion/types/test.ts
+++ b/packages/jest/types/test.ts
@@ -4,7 +4,7 @@ import serializer, {
createSerializer,
print,
test
-} from 'jest-emotion'
+} from '@emotion/jest'
createSerializer()
createSerializer({})
diff --git a/packages/jest-emotion/types/tsconfig.json b/packages/jest/types/tsconfig.json
similarity index 100%
rename from packages/jest-emotion/types/tsconfig.json
rename to packages/jest/types/tsconfig.json
diff --git a/packages/jest-emotion/types/tslint.json b/packages/jest/types/tslint.json
similarity index 100%
rename from packages/jest-emotion/types/tslint.json
rename to packages/jest/types/tslint.json
diff --git a/packages/native/README.md b/packages/native/README.md
index 7fe72dfb7..6b5a6060b 100644
--- a/packages/native/README.md
+++ b/packages/native/README.md
@@ -5,13 +5,13 @@
## Install
```
-npm install @emotion/core @emotion/native
+npm install @emotion/react @emotion/native
```
or if you use yarn
```
-yarn add @emotion/core @emotion/native
+yarn add @emotion/react @emotion/native
```
This package also depends on `react`, `react-native` and `prop-types` so make sure you've them installed.
@@ -69,12 +69,12 @@ AppRegistry.registerComponent('ExampleApp', () => App)
## Theming
-Use `@emotion/core` for theming support.
+Use `@emotion/react` for theming support.
```js
import React from 'react'
import styled, { css } from '@emotion/native'
-import { ThemeProvider } from '@emotion/core'
+import { ThemeProvider } from '@emotion/react'
const theme = {
color: 'hotpink',
diff --git a/packages/native/macro.js b/packages/native/macro.js
index b320afc0a..be5eb73c0 100644
--- a/packages/native/macro.js
+++ b/packages/native/macro.js
@@ -1 +1 @@
-module.exports = require('babel-plugin-emotion').macros.nativeStyled
+module.exports = require('@emotion/babel-plugin').macros.nativeStyled
diff --git a/packages/native/test/__snapshots__/native-styled.test.js.snap b/packages/native/test/__snapshots__/native-styled.test.js.snap
index dfdcd44c3..10c1d6904 100644
--- a/packages/native/test/__snapshots__/native-styled.test.js.snap
+++ b/packages/native/test/__snapshots__/native-styled.test.js.snap
@@ -125,7 +125,7 @@ exports[`Emotion native styled should work with StyleSheet.create API 1`] = `
`;
-exports[`Emotion native styled should work with theming from @emotion/core 1`] = `
+exports[`Emotion native styled should work with theming from @emotion/react 1`] = `
{
expect(tree).toMatchSnapshot()
})
- it('should work with theming from @emotion/core', () => {
+ it('should work with theming from @emotion/react', () => {
const Text = styled.Text`
color: ${props => props.theme.backgroundColor};
`
diff --git a/packages/native/types/base.d.ts b/packages/native/types/base.d.ts
index 01f49e87c..5b71dda3b 100644
--- a/packages/native/types/base.d.ts
+++ b/packages/native/types/base.d.ts
@@ -7,7 +7,7 @@ import {
NamedExoticComponent,
PropsWithChildren
} from 'react'
-import { Theme } from '@emotion/core'
+import { Theme } from '@emotion/react'
import * as RN from 'react-native'
type ReactNative = typeof RN
diff --git a/packages/native/types/index.d.ts b/packages/native/types/index.d.ts
index 06174c001..ebf3552b0 100644
--- a/packages/native/types/index.d.ts
+++ b/packages/native/types/index.d.ts
@@ -1,7 +1,7 @@
// Definitions by: Pat Sissons
// TypeScript Version: 3.4
-import { Theme } from '@emotion/core'
+import { Theme } from '@emotion/react'
import {
CreateStyled as BaseCreateStyled,
diff --git a/packages/native/types/tests.tsx b/packages/native/types/tests.tsx
index 7333f85f3..387c26ff3 100644
--- a/packages/native/types/tests.tsx
+++ b/packages/native/types/tests.tsx
@@ -9,7 +9,7 @@ import {
} from 'react-native'
import styled, { css, ReactNativeStyle } from '@emotion/native'
-declare module '@emotion/core' {
+declare module '@emotion/react' {
// tslint:disable-next-line: strict-export-declare-modifiers
export interface Theme {
color: {
diff --git a/packages/primitives-core/package.json b/packages/primitives-core/package.json
index 1d217dafb..4c62ee944 100644
--- a/packages/primitives-core/package.json
+++ b/packages/primitives-core/package.json
@@ -16,11 +16,11 @@
"css-to-react-native": "^2.2.1"
},
"peerDependencies": {
- "@emotion/core": "^11.0.0-next.9",
+ "@emotion/react": "^11.0.0-next.7",
"react": ">=16.8.0"
},
"devDependencies": {
- "@emotion/core": "^11.0.0-next.9",
+ "@emotion/react": "^11.0.0-next.7",
"react": "^16.11.0"
},
"homepage": "https://emotion.sh",
diff --git a/packages/primitives-core/src/styled.js b/packages/primitives-core/src/styled.js
index 8abade0e2..20085f7f9 100644
--- a/packages/primitives-core/src/styled.js
+++ b/packages/primitives-core/src/styled.js
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react'
import { interleave } from './utils'
-import { ThemeContext } from '@emotion/core'
+import { ThemeContext } from '@emotion/react'
import { createCss } from './css'
let testOmitPropsOnComponent = prop => prop !== 'theme'
diff --git a/packages/primitives/README.md b/packages/primitives/README.md
index 0c0f4e217..0a93d3529 100644
--- a/packages/primitives/README.md
+++ b/packages/primitives/README.md
@@ -26,7 +26,7 @@ This package also depends on `react`, `react-primitives` and `prop-types` so mak
import React from 'react'
import styled, { css } from '@emotion/primitives'
-import { ThemeProvider } from '@emotion/core'
+import { ThemeProvider } from '@emotion/react'
const theme = {
color: 'hotpink',
diff --git a/packages/primitives/macro.js b/packages/primitives/macro.js
index 9edd387e1..d3f98a68e 100644
--- a/packages/primitives/macro.js
+++ b/packages/primitives/macro.js
@@ -1 +1 @@
-module.exports = require('babel-plugin-emotion').macros.primitivesStyled
+module.exports = require('@emotion/babel-plugin').macros.primitivesStyled
diff --git a/packages/primitives/package.json b/packages/primitives/package.json
index ecb2381e6..aff25e1a8 100644
--- a/packages/primitives/package.json
+++ b/packages/primitives/package.json
@@ -12,9 +12,9 @@
"macro.js"
],
"dependencies": {
+ "@emotion/babel-plugin": "^11.0.0-next.6",
"@emotion/is-prop-valid": "0.9.0-next.1",
- "@emotion/primitives-core": "11.0.0-next.9",
- "babel-plugin-emotion": "^11.0.0-next.8"
+ "@emotion/primitives-core": "11.0.0-next.9"
},
"peerDependencies": {
"@babel/core": "^7.0.0",
diff --git a/packages/primitives/test/__snapshots__/emotion-primitives.test.js.snap b/packages/primitives/test/__snapshots__/emotion-primitives.test.js.snap
index f37244d71..7030c6abf 100644
--- a/packages/primitives/test/__snapshots__/emotion-primitives.test.js.snap
+++ b/packages/primitives/test/__snapshots__/emotion-primitives.test.js.snap
@@ -144,7 +144,7 @@ exports[`Emotion primitives should work with StyleSheet.create API 1`] = `
`;
-exports[`Emotion primitives should work with theming from @emotion/core 1`] = `
+exports[`Emotion primitives should work with theming from @emotion/react 1`] = `
{
expect(tree).toMatchSnapshot()
})
- it('should work with theming from @emotion/core', () => {
+ it('should work with theming from @emotion/react', () => {
const Text = styled.Text`
color: ${props => props.theme.backgroundColor};
`
diff --git a/packages/react/CHANGELOG.md b/packages/react/CHANGELOG.md
new file mode 100644
index 000000000..a878fcd37
--- /dev/null
+++ b/packages/react/CHANGELOG.md
@@ -0,0 +1,162 @@
+# @emotion/react
+
+## 11.0.0-next.7
+
+### Patch Changes
+
+- [`5c55fd17`](https://github.com/emotion-js/emotion/commit/5c55fd17dcaec84d1f5d5d13ae90dd336d7e4403) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - Fix to what location generated source maps are pointing in case of composed styles.
+- Updated dependencies [[`5c55fd17`](https://github.com/emotion-js/emotion/commit/5c55fd17dcaec84d1f5d5d13ae90dd336d7e4403), [`729ef9d8`](https://github.com/emotion-js/emotion/commit/729ef9d8408af82c7a63effc1b8728f79c66bed1)]:
+ - @emotion/serialize@0.11.15-next.2
+ - @emotion/styled@11.0.0-next.7
+
+## 11.0.0-next.6
+
+### Major Changes
+
+- [`843bfb11`](https://github.com/emotion-js/emotion/commit/843bfb1153ee0dbe33d005fdd5c5be185daa5c41) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - Removed `@emotion/css` - it's main purpose was to allow `css` to be a Babel macro, but since babel-plugin-macros allows us to keep imports nowadays this is no longer needed. `@emotion/core/macro` has been added to account for this use case and appropriate changes has been made to `babel-plugin-emotion` to facilitate those changes.
+
+ If you have used `@emotion/css` directly (it was always reexported from `@emotion/core`) or you have been using its macro then you should update your code like this:
+
+ ```diff
+ -import css from '@emotion/css'
+ +import { css } from '@emotion/core'
+
+ // or
+ -import css from '@emotion/css/macro'
+ +import { css } from '@emotion/core/macro'
+ ```
+
+- [`cbb8b796`](https://github.com/emotion-js/emotion/commit/cbb8b7965c2923cf1922d724de556374323bff61) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - `emotion-theming` has been removed and all its exports were moved to `@emotion/core` package. Please import them like this `import { useTheme, ThemeProvider, withTheme } from '@emotion/core'` from now on.
+
+### Minor Changes
+
+- [`828111cd`](https://github.com/emotion-js/emotion/commit/828111cd32d3fe8c984231201e518d1b6000bffd) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - `Global` imported from macro entry (`@emotion/core/macro`) gets source maps generated now when inline css-less expression is used as value of the `styles` prop.
+
+### Patch Changes
+
+- Updated dependencies [[`923ded01`](https://github.com/emotion-js/emotion/commit/923ded01e2399a242206d590f6646f13aba110e4), [`4a891bf6`](https://github.com/emotion-js/emotion/commit/4a891bf6a30e3bb37f8f32031fa75a571c637d9c), [`843bfb11`](https://github.com/emotion-js/emotion/commit/843bfb1153ee0dbe33d005fdd5c5be185daa5c41)]:
+ - @emotion/styled@11.0.0-next.6
+ - @emotion/cache@11.0.0-next.6
+ - @emotion/sheet@0.10.0-next.0
+ - @emotion/css@11.0.0-next.6
+
+## 11.0.0-next.5
+
+### Patch Changes
+
+- Updated dependencies [[`ad77ed24`](https://github.com/emotion-js/emotion/commit/ad77ed24b4bfe62d6c80f0498cd7e76863e2f28e), [`99c6b7e2`](https://github.com/emotion-js/emotion/commit/99c6b7e2f65fb7eddb2863b393e2110dbc4810d8)]:
+ - @emotion/styled@11.0.0-next.5
+ - emotion-theming@11.0.0-next.5
+
+## 11.0.0-next.4
+
+### Patch Changes
+
+- Updated dependencies [[`e6e079c3`](https://github.com/emotion-js/emotion/commit/e6e079c35074f027ac0586792e4f19595ac18c55)]:
+ - @emotion/styled@11.0.0-next.4
+ - emotion-theming@11.0.0-next.4
+
+## 11.0.0-next.3
+
+### Patch Changes
+
+- [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@Andarist](https://github.com/Andarist)! - Add missing `#__PURE__` annotations
+- Updated dependencies [[`8a896a31`](https://github.com/emotion-js/emotion/commit/8a896a31434a1d2f69e1f1467c446c884c929387), [`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85), [`f9feab1a`](https://github.com/emotion-js/emotion/commit/f9feab1a5d1ca88e53c3f7a063be5d5871cc93e8)]:
+ - @emotion/serialize@0.11.15-next.1
+ - @emotion/styled@11.0.0-next.3
+ - @emotion/css@11.0.0-next.3
+ - emotion-theming@11.0.0-next.3
+
+## 11.0.0-next.2
+
+### Major Changes
+
+- [`79036056`](https://github.com/emotion-js/emotion/commit/79036056808eefc81a77225254f7c25c2ff9d967) [#967](https://github.com/emotion-js/emotion/pull/967) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Use hooks internally for improved bundle size and a better tree in React DevTools
+
+### Patch Changes
+
+- Updated dependencies [[`79036056`](https://github.com/emotion-js/emotion/commit/79036056808eefc81a77225254f7c25c2ff9d967), [`79036056`](https://github.com/emotion-js/emotion/commit/79036056808eefc81a77225254f7c25c2ff9d967)]:
+ - @emotion/styled@11.0.0-next.2
+ - emotion-theming@11.0.0-next.2
+
+## 11.0.0-next.1
+
+### Patch Changes
+
+- Updated dependencies [[`1eaa3a38`](https://github.com/emotion-js/emotion/commit/1eaa3a389876d4a623ce66735dc6db093cb2a8e6), [`22935470`](https://github.com/emotion-js/emotion/commit/2293547000ce78d044d054d17564f6c2aa670687)]:
+ - @emotion/css@11.0.0-next.1
+ - emotion-theming@11.0.0-next.1
+ - @emotion/serialize@1.0.0-next.0
+ - @emotion/styled@11.0.0-next.1
+
+## 11.0.0-next.0
+
+### Major Changes
+
+- [`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Ensure packages are major bumped so that pre-release versions of the linked packages are consistent in the major number
+
+### Patch Changes
+
+- Updated dependencies [[`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555)]:
+ - @emotion/cache@11.0.0-next.0
+ - @emotion/css@11.0.0-next.0
+ - emotion@11.0.0-next.0
+ - emotion-server@11.0.0-next.0
+ - emotion-theming@11.0.0-next.0
+ - @emotion/styled@11.0.0-next.0
+
+## 10.0.22
+
+### Patch Changes
+
+- [`4fc5657a`](https://github.com/emotion-js/emotion/commit/4fc5657ac8d0002322321cfbfc254b7196d27387) [#1219](https://github.com/emotion-js/emotion/pull/1219) Thanks [@Andarist](https://github.com/Andarist)! - Add dev hint about css object being stringified by accident
+
+* [`2fc75f26`](https://github.com/emotion-js/emotion/commit/2fc75f266b23cf48fb842953bc47eebcb5241cbd) [#1548](https://github.com/emotion-js/emotion/pull/1548) Thanks [@Andarist](https://github.com/Andarist)! - Accept objects as `className` in jsx-created components (they are stringified) to match React behavior
+
+- [`10211951`](https://github.com/emotion-js/emotion/commit/10211951051729b149930a8646de14bae9ae1bbc) [#1553](https://github.com/emotion-js/emotion/pull/1553) Thanks [@Andarist](https://github.com/Andarist)! - Add dev warning about keyframes being interpolated into plain strings.
+
+* [`57a767ea`](https://github.com/emotion-js/emotion/commit/57a767ea3dd18eefbbdc7269cc13128caad65286) [#1560](https://github.com/emotion-js/emotion/pull/1560) Thanks [@Andarist](https://github.com/Andarist)! - Fix composition of styles without a final semicolon in a declaration block
+
+* Updated dependencies [[`4fc5657a`](https://github.com/emotion-js/emotion/commit/4fc5657ac8d0002322321cfbfc254b7196d27387), [`10211951`](https://github.com/emotion-js/emotion/commit/10211951051729b149930a8646de14bae9ae1bbc), [`57a767ea`](https://github.com/emotion-js/emotion/commit/57a767ea3dd18eefbbdc7269cc13128caad65286), [`c3f0bc10`](https://github.com/emotion-js/emotion/commit/c3f0bc101833fff1ee4e27c7a730b821a7df4a15), [`11bea3a8`](https://github.com/emotion-js/emotion/commit/11bea3a89f38f9052c692c3df050ad802b6b954c)]:
+ - @emotion/serialize@0.11.12
+ - @emotion/styled@10.0.22
+ - @emotion/css@10.0.22
+
+## 10.0.21
+
+### Patch Changes
+
+- [7855db4a](https://github.com/emotion-js/emotion/commit/7855db4ae379f212e7b972b9108419154e17ed45) [#1537](https://github.com/emotion-js/emotion/pull/1537) Thanks [@Andarist](https://github.com/Andarist)! - Add missing `/* #__PURE__ */` annotation to creation of EmotionCssPropInternal
+
+## 10.0.20
+
+### Patch Changes
+
+- [38bb2b19](https://github.com/emotion-js/emotion/commit/38bb2b19d4ff1552116829e068664516d167a3f8) [#1530](https://github.com/emotion-js/emotion/pull/1530) Thanks [@Andarist](https://github.com/Andarist)! - Fix class not being applied when putting nil as css prop value on wrapper component
+
+## 10.0.17
+
+### Patch Changes
+
+- [66cda641](https://github.com/emotion-js/emotion/commit/66cda64128631790b81e3c9df273a972358ea593) [#1478](https://github.com/emotion-js/emotion/pull/1478) Thanks [@Andarist](https://github.com/Andarist)! - Add warnings about using illegal escape sequences
+ - [10514a86](https://github.com/emotion-js/emotion/commit/10514a8635dcaa55b85c7bff90e2a9e14d1ba61f) [#1482](https://github.com/emotion-js/emotion/pull/1482) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Remove react native bundles in favour of different isBrowser detection
+ - [66cda641](https://github.com/emotion-js/emotion/commit/66cda64128631790b81e3c9df273a972358ea593) [#1478](https://github.com/emotion-js/emotion/pull/1478) Thanks [@Andarist](https://github.com/Andarist)! - Update Babel dependencies
+
+## 10.0.16
+
+### Patch Changes
+
+- [47262b64](https://github.com/emotion-js/emotion/commit/47262b64) - Fix labels from stack traces in some cases
+
+## 10.0.15
+
+### Patch Changes
+
+- [188dc0e7](https://github.com/emotion-js/emotion/commit/188dc0e7) [#1443](https://github.com/emotion-js/emotion/pull/1443) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Extract styles rather than inline them in compat mode with the Global component
+ - [4a3b18a2](https://github.com/emotion-js/emotion/commit/4a3b18a2) [#1451](https://github.com/emotion-js/emotion/pull/1451) Thanks [@Andarist](https://github.com/Andarist)! - Fixed issue with auto-labelling crashing on \$ at runtime
+
+## 10.0.14
+
+### Patch Changes
+
+- [c0eb604d](https://github.com/emotion-js/emotion/commit/c0eb604d) [#1419](https://github.com/emotion-js/emotion/pull/1419) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Update build tool
diff --git a/packages/core/README.md b/packages/react/README.md
similarity index 85%
rename from packages/core/README.md
rename to packages/react/README.md
index bea228ebc..86fc82dbe 100644
--- a/packages/core/README.md
+++ b/packages/react/README.md
@@ -1,18 +1,18 @@
-# @emotion/core
+# @emotion/react
> Simple styling in React.
## Install
```bash
-yarn add @emotion/core
+yarn add @emotion/react
```
## Usage
```jsx
/** @jsx jsx */
-import { jsx, css, Global, ClassNames } from '@emotion/core'
+import { jsx, css, Global, ClassNames } from '@emotion/react'
render(
diff --git a/packages/core/__tests__/__snapshots__/at-import.js.snap b/packages/react/__tests__/__snapshots__/at-import.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/at-import.js.snap
rename to packages/react/__tests__/__snapshots__/at-import.js.snap
diff --git a/packages/core/__tests__/__snapshots__/class-names.js.snap b/packages/react/__tests__/__snapshots__/class-names.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/class-names.js.snap
rename to packages/react/__tests__/__snapshots__/class-names.js.snap
diff --git a/packages/core/__tests__/__snapshots__/css-cache-hash.js.snap b/packages/react/__tests__/__snapshots__/css-cache-hash.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/css-cache-hash.js.snap
rename to packages/react/__tests__/__snapshots__/css-cache-hash.js.snap
diff --git a/packages/core/__tests__/__snapshots__/css.js.snap b/packages/react/__tests__/__snapshots__/css.js.snap
similarity index 97%
rename from packages/core/__tests__/__snapshots__/css.js.snap
rename to packages/react/__tests__/__snapshots__/css.js.snap
index 7fd299c6b..ff7d89ba9 100644
--- a/packages/core/__tests__/__snapshots__/css.js.snap
+++ b/packages/react/__tests__/__snapshots__/css.js.snap
@@ -159,7 +159,7 @@ exports[`overwrite styles from parent 1`] = `
`;
exports[`string as css prop throws 1`] = `
-"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/core' like this: css\`
+"Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css\`
color: hotpink;
\`"
`;
diff --git a/packages/core/__tests__/__snapshots__/global-with-theme.js.snap b/packages/react/__tests__/__snapshots__/global-with-theme.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/global-with-theme.js.snap
rename to packages/react/__tests__/__snapshots__/global-with-theme.js.snap
diff --git a/packages/core/__tests__/__snapshots__/global.js.snap b/packages/react/__tests__/__snapshots__/global.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/global.js.snap
rename to packages/react/__tests__/__snapshots__/global.js.snap
diff --git a/packages/core/__tests__/__snapshots__/globals-are-the-worst.js.snap b/packages/react/__tests__/__snapshots__/globals-are-the-worst.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/globals-are-the-worst.js.snap
rename to packages/react/__tests__/__snapshots__/globals-are-the-worst.js.snap
diff --git a/packages/core/__tests__/__snapshots__/keyframes.js.snap b/packages/react/__tests__/__snapshots__/keyframes.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/keyframes.js.snap
rename to packages/react/__tests__/__snapshots__/keyframes.js.snap
diff --git a/packages/core/__tests__/__snapshots__/legacy-class-name.js.snap b/packages/react/__tests__/__snapshots__/legacy-class-name.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/legacy-class-name.js.snap
rename to packages/react/__tests__/__snapshots__/legacy-class-name.js.snap
diff --git a/packages/core/__tests__/__snapshots__/server.js.snap b/packages/react/__tests__/__snapshots__/server.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/server.js.snap
rename to packages/react/__tests__/__snapshots__/server.js.snap
diff --git a/packages/core/__tests__/__snapshots__/theme-provider.dom.js.snap b/packages/react/__tests__/__snapshots__/theme-provider.dom.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/theme-provider.dom.js.snap
rename to packages/react/__tests__/__snapshots__/theme-provider.dom.js.snap
diff --git a/packages/core/__tests__/__snapshots__/theme-provider.js.snap b/packages/react/__tests__/__snapshots__/theme-provider.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/theme-provider.js.snap
rename to packages/react/__tests__/__snapshots__/theme-provider.js.snap
diff --git a/packages/core/__tests__/__snapshots__/use-theme.js.snap b/packages/react/__tests__/__snapshots__/use-theme.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/use-theme.js.snap
rename to packages/react/__tests__/__snapshots__/use-theme.js.snap
diff --git a/packages/core/__tests__/__snapshots__/warnings.js.snap b/packages/react/__tests__/__snapshots__/warnings.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/warnings.js.snap
rename to packages/react/__tests__/__snapshots__/warnings.js.snap
diff --git a/packages/core/__tests__/__snapshots__/with-theme.js.snap b/packages/react/__tests__/__snapshots__/with-theme.js.snap
similarity index 100%
rename from packages/core/__tests__/__snapshots__/with-theme.js.snap
rename to packages/react/__tests__/__snapshots__/with-theme.js.snap
diff --git a/packages/core/__tests__/at-import.js b/packages/react/__tests__/at-import.js
similarity index 93%
rename from packages/core/__tests__/at-import.js
rename to packages/react/__tests__/at-import.js
index 4ed589932..2e7190379 100644
--- a/packages/core/__tests__/at-import.js
+++ b/packages/react/__tests__/at-import.js
@@ -2,9 +2,9 @@
import 'test-utils/prod-mode'
import * as React from 'react'
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import { render, unmountComponentAtNode } from 'react-dom'
-import { Global, css } from '@emotion/core'
+import { Global, css } from '@emotion/react'
beforeEach(() => {
// $FlowFixMe
diff --git a/packages/core/__tests__/babel/__snapshots__/css.js.snap b/packages/react/__tests__/babel/__snapshots__/css.js.snap
similarity index 100%
rename from packages/core/__tests__/babel/__snapshots__/css.js.snap
rename to packages/react/__tests__/babel/__snapshots__/css.js.snap
diff --git a/packages/core/__tests__/babel/__snapshots__/source-map-server.js.snap b/packages/react/__tests__/babel/__snapshots__/source-map-server.js.snap
similarity index 51%
rename from packages/core/__tests__/babel/__snapshots__/source-map-server.js.snap
rename to packages/react/__tests__/babel/__snapshots__/source-map-server.js.snap
index ee54647e0..32c4a5f1e 100644
--- a/packages/core/__tests__/babel/__snapshots__/source-map-server.js.snap
+++ b/packages/react/__tests__/babel/__snapshots__/source-map-server.js.snap
@@ -1,3 +1,3 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP
-exports[`basic 1`] = `"
some hotpink text
"`;
+exports[`basic 1`] = `"
some hotpink text
"`;
diff --git a/packages/core/__tests__/babel/css.js b/packages/react/__tests__/babel/css.js
similarity index 91%
rename from packages/core/__tests__/babel/css.js
rename to packages/react/__tests__/babel/css.js
index f850b446e..e89d6f27a 100644
--- a/packages/core/__tests__/babel/css.js
+++ b/packages/react/__tests__/babel/css.js
@@ -1,6 +1,6 @@
/** @jsx jsx */
import 'test-utils/next-env'
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
import renderer from 'react-test-renderer'
test('tagged template args forwarded', () => {
diff --git a/packages/core/__tests__/babel/source-map-server.js b/packages/react/__tests__/babel/source-map-server.js
similarity index 91%
rename from packages/core/__tests__/babel/source-map-server.js
rename to packages/react/__tests__/babel/source-map-server.js
index 373e6422f..60ecf1857 100644
--- a/packages/core/__tests__/babel/source-map-server.js
+++ b/packages/react/__tests__/babel/source-map-server.js
@@ -3,7 +3,7 @@
*/
// @flow
import 'test-utils/dev-mode'
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import { renderToString } from 'react-dom/server'
test('basic', () => {
diff --git a/packages/core/__tests__/class-names.js b/packages/react/__tests__/class-names.js
similarity index 96%
rename from packages/core/__tests__/class-names.js
rename to packages/react/__tests__/class-names.js
index 4d39f13d8..d165f3b59 100644
--- a/packages/core/__tests__/class-names.js
+++ b/packages/react/__tests__/class-names.js
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react'
import 'test-utils/next-env'
-import { ClassNames, ThemeProvider } from '@emotion/core'
+import { ClassNames, ThemeProvider } from '@emotion/react'
import renderer from 'react-test-renderer'
test('css', () => {
diff --git a/packages/core/__tests__/clone-element.js b/packages/react/__tests__/clone-element.js
similarity index 91%
rename from packages/core/__tests__/clone-element.js
rename to packages/react/__tests__/clone-element.js
index 837b54fcc..dedd52c62 100644
--- a/packages/core/__tests__/clone-element.js
+++ b/packages/react/__tests__/clone-element.js
@@ -1,6 +1,6 @@
// @flow
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import * as React from 'react'
import { render, cleanup } from '@testing-library/react'
diff --git a/packages/core/__tests__/compat/__snapshots__/browser.js.snap b/packages/react/__tests__/compat/__snapshots__/browser.js.snap
similarity index 100%
rename from packages/core/__tests__/compat/__snapshots__/browser.js.snap
rename to packages/react/__tests__/compat/__snapshots__/browser.js.snap
diff --git a/packages/core/__tests__/compat/__snapshots__/server.js.snap b/packages/react/__tests__/compat/__snapshots__/server.js.snap
similarity index 100%
rename from packages/core/__tests__/compat/__snapshots__/server.js.snap
rename to packages/react/__tests__/compat/__snapshots__/server.js.snap
diff --git a/packages/core/__tests__/compat/browser.js b/packages/react/__tests__/compat/browser.js
similarity index 85%
rename from packages/core/__tests__/compat/browser.js
rename to packages/react/__tests__/compat/browser.js
index bb70f247c..a6c8c02d4 100644
--- a/packages/core/__tests__/compat/browser.js
+++ b/packages/react/__tests__/compat/browser.js
@@ -2,9 +2,9 @@
/** @jsx jsx */
import 'test-utils/dev-mode'
import { throwIfFalsy } from 'test-utils'
-import { jsx, CacheProvider } from '@emotion/core'
+import { jsx, CacheProvider } from '@emotion/react'
import { render } from 'react-dom'
-import { css, cache } from 'emotion'
+import { css, cache } from '@emotion/css'
test('composition works from old emotion css calls', cb => {
const cls = css`
diff --git a/packages/core/__tests__/compat/server.js b/packages/react/__tests__/compat/server.js
similarity index 84%
rename from packages/core/__tests__/compat/server.js
rename to packages/react/__tests__/compat/server.js
index 0939fb63d..ad9661d03 100644
--- a/packages/core/__tests__/compat/server.js
+++ b/packages/react/__tests__/compat/server.js
@@ -2,10 +2,10 @@
* @jest-environment node
* @flow
*/
-import { jsx, Global } from '@emotion/core'
-import createEmotionServer from 'create-emotion-server'
+import { jsx, Global } from '@emotion/react'
+import createEmotionServer from '@emotion/server/create-instance'
import createCache from '@emotion/cache'
-import { CacheProvider } from '@emotion/core'
+import { CacheProvider } from '@emotion/react'
import { renderToString } from 'react-dom/server'
test('it works', () => {
diff --git a/packages/core/__tests__/css-cache-hash.js b/packages/react/__tests__/css-cache-hash.js
similarity index 93%
rename from packages/core/__tests__/css-cache-hash.js
rename to packages/react/__tests__/css-cache-hash.js
index 0456e5e36..5e1a4fd55 100644
--- a/packages/core/__tests__/css-cache-hash.js
+++ b/packages/react/__tests__/css-cache-hash.js
@@ -1,7 +1,7 @@
// @flow
/** @jsx jsx */
import 'test-utils/next-env'
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
import { serializeStyles } from '@emotion/serialize'
import * as renderer from 'react-test-renderer'
const utils = require('@emotion/utils')
diff --git a/packages/core/__tests__/css.js b/packages/react/__tests__/css.js
similarity index 99%
rename from packages/core/__tests__/css.js
rename to packages/react/__tests__/css.js
index 9b5a2ce92..007f2189c 100644
--- a/packages/core/__tests__/css.js
+++ b/packages/react/__tests__/css.js
@@ -2,7 +2,7 @@
/** @jsx jsx */
import 'test-utils/next-env'
import * as React from 'react'
-import { jsx, css, CacheProvider, ThemeProvider } from '@emotion/core'
+import { jsx, css, CacheProvider, ThemeProvider } from '@emotion/react'
import { render } from '@testing-library/react'
import renderer from 'react-test-renderer'
import createCache from '@emotion/cache'
diff --git a/packages/core/__tests__/custom-cache.js b/packages/react/__tests__/custom-cache.js
similarity index 90%
rename from packages/core/__tests__/custom-cache.js
rename to packages/react/__tests__/custom-cache.js
index 492b1b4e7..b2ed3cb01 100644
--- a/packages/core/__tests__/custom-cache.js
+++ b/packages/react/__tests__/custom-cache.js
@@ -2,7 +2,7 @@
/** @jsx jsx */
import 'test-utils/next-env'
import createCache from '@emotion/cache'
-import { jsx, CacheProvider } from '@emotion/core'
+import { jsx, CacheProvider } from '@emotion/react'
import renderer from 'react-test-renderer'
function render(ele) {
diff --git a/packages/core/__tests__/global-insertion-after-others.js b/packages/react/__tests__/global-insertion-after-others.js
similarity index 94%
rename from packages/core/__tests__/global-insertion-after-others.js
rename to packages/react/__tests__/global-insertion-after-others.js
index b87819d6d..5704a1d3e 100644
--- a/packages/core/__tests__/global-insertion-after-others.js
+++ b/packages/react/__tests__/global-insertion-after-others.js
@@ -1,5 +1,5 @@
/** @jsx jsx */
-import { jsx, Global } from '@emotion/core'
+import { jsx, Global } from '@emotion/react'
import { render } from '@testing-library/react'
let getDataAttributes = () =>
diff --git a/packages/core/__tests__/global-with-theme.js b/packages/react/__tests__/global-with-theme.js
similarity index 95%
rename from packages/core/__tests__/global-with-theme.js
rename to packages/react/__tests__/global-with-theme.js
index 62cc5d874..f8b66b430 100644
--- a/packages/core/__tests__/global-with-theme.js
+++ b/packages/react/__tests__/global-with-theme.js
@@ -2,7 +2,7 @@
import 'test-utils/dev-mode'
import * as React from 'react'
import { render, unmountComponentAtNode } from 'react-dom'
-import { Global, ThemeProvider } from '@emotion/core'
+import { Global, ThemeProvider } from '@emotion/react'
beforeEach(() => {
// $FlowFixMe
diff --git a/packages/core/__tests__/global.js b/packages/react/__tests__/global.js
similarity index 99%
rename from packages/core/__tests__/global.js
rename to packages/react/__tests__/global.js
index ef3bc8fdd..a2760ece3 100644
--- a/packages/core/__tests__/global.js
+++ b/packages/react/__tests__/global.js
@@ -2,7 +2,7 @@
import 'test-utils/dev-mode'
import * as React from 'react'
import { render, unmountComponentAtNode } from 'react-dom'
-import { Global, keyframes, css, CacheProvider } from '@emotion/core'
+import { Global, keyframes, css, CacheProvider } from '@emotion/react'
import createCache from '@emotion/cache'
beforeEach(() => {
diff --git a/packages/core/__tests__/globals-are-the-worst.js b/packages/react/__tests__/globals-are-the-worst.js
similarity index 96%
rename from packages/core/__tests__/globals-are-the-worst.js
rename to packages/react/__tests__/globals-are-the-worst.js
index 65c4f6e28..2d40fa367 100644
--- a/packages/core/__tests__/globals-are-the-worst.js
+++ b/packages/react/__tests__/globals-are-the-worst.js
@@ -3,7 +3,7 @@ import 'test-utils/dev-mode'
import { throwIfFalsy } from 'test-utils'
import * as React from 'react'
import { render } from 'react-dom'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
import styled from '@emotion/styled'
test('specificity with globals', () => {
diff --git a/packages/core/__tests__/import-prod.js b/packages/react/__tests__/import-prod.js
similarity index 94%
rename from packages/core/__tests__/import-prod.js
rename to packages/react/__tests__/import-prod.js
index 1528aecac..7d00f4f49 100644
--- a/packages/core/__tests__/import-prod.js
+++ b/packages/react/__tests__/import-prod.js
@@ -1,13 +1,13 @@
// @flow
import 'test-utils/prod-mode'
import * as React from 'react'
-import { css, Global } from '@emotion/core'
+import { css, Global } from '@emotion/react'
import styled from '@emotion/styled'
import { render } from '@testing-library/react'
import * as cssParser from 'css'
// using styled instead of the css prop because there was a really weird flow error
-// when using `jsx` from @emotion/core and Global
+// when using `jsx` from @emotion/react and Global
let Comp = styled.div({ color: 'hotpink' })
expect.addSnapshotSerializer({
diff --git a/packages/core/__tests__/keyframes.js b/packages/react/__tests__/keyframes.js
similarity index 98%
rename from packages/core/__tests__/keyframes.js
rename to packages/react/__tests__/keyframes.js
index 2866edcbb..3f08d9a08 100644
--- a/packages/core/__tests__/keyframes.js
+++ b/packages/react/__tests__/keyframes.js
@@ -1,12 +1,12 @@
// @flow
/** @jsx jsx */
import 'test-utils/next-env'
-import { jsx, css, keyframes } from '@emotion/core'
+import { jsx, css, keyframes } from '@emotion/react'
import { safeQuerySelector, throwIfFalsy } from 'test-utils'
import cases from 'jest-in-case'
import * as renderer from 'react-test-renderer'
import createCache from '@emotion/cache'
-import { CacheProvider } from '@emotion/core'
+import { CacheProvider } from '@emotion/react'
cases(
'keyframes',
diff --git a/packages/core/__tests__/legacy-class-name.js b/packages/react/__tests__/legacy-class-name.js
similarity index 93%
rename from packages/core/__tests__/legacy-class-name.js
rename to packages/react/__tests__/legacy-class-name.js
index 5df773493..dd1d13dbf 100644
--- a/packages/core/__tests__/legacy-class-name.js
+++ b/packages/react/__tests__/legacy-class-name.js
@@ -1,7 +1,7 @@
// @flow
/** @jsx jsx */
import 'test-utils/next-env'
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
import renderer from 'react-test-renderer'
test('string className', () => {
diff --git a/packages/core/__tests__/prod.js b/packages/react/__tests__/prod.js
similarity index 92%
rename from packages/core/__tests__/prod.js
rename to packages/react/__tests__/prod.js
index 5fe2172ef..462b2b0f3 100644
--- a/packages/core/__tests__/prod.js
+++ b/packages/react/__tests__/prod.js
@@ -1,6 +1,6 @@
import 'test-utils/prod-mode'
/** @jsx jsx */
-import { css, jsx } from '@emotion/core'
+import { css, jsx } from '@emotion/react'
import renderer from 'react-test-renderer'
test('css works', () => {
diff --git a/packages/core/__tests__/ref.js b/packages/react/__tests__/ref.js
similarity index 90%
rename from packages/core/__tests__/ref.js
rename to packages/react/__tests__/ref.js
index 243a589bd..bb9766602 100644
--- a/packages/core/__tests__/ref.js
+++ b/packages/react/__tests__/ref.js
@@ -1,6 +1,6 @@
// @flow
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import * as React from 'react'
import { render, cleanup } from '@testing-library/react'
diff --git a/packages/core/__tests__/server.js b/packages/react/__tests__/server.js
similarity index 98%
rename from packages/core/__tests__/server.js
rename to packages/react/__tests__/server.js
index 5231ae6c3..83f5e3936 100644
--- a/packages/core/__tests__/server.js
+++ b/packages/react/__tests__/server.js
@@ -12,12 +12,12 @@ import {
keyframes,
CacheProvider,
ClassNames
-} from '@emotion/core'
+} from '@emotion/react'
import styled from '@emotion/styled'
import createCache from '@emotion/cache'
import { renderToString } from 'react-dom/server'
import HTMLSerializer from 'jest-serializer-html'
-import createEmotionServer from 'create-emotion-server'
+import createEmotionServer from '@emotion/server/create-instance'
expect.addSnapshotSerializer(HTMLSerializer)
diff --git a/packages/core/__tests__/theme-provider.dom.js b/packages/react/__tests__/theme-provider.dom.js
similarity index 95%
rename from packages/core/__tests__/theme-provider.dom.js
rename to packages/react/__tests__/theme-provider.dom.js
index e4efee51f..ef0a6deda 100644
--- a/packages/core/__tests__/theme-provider.dom.js
+++ b/packages/react/__tests__/theme-provider.dom.js
@@ -4,7 +4,7 @@ import 'test-utils/next-env'
import 'test-utils/dev-mode'
import { throwIfFalsy, safeQuerySelector } from 'test-utils'
import * as React from 'react'
-import { jsx, ThemeProvider } from '@emotion/core'
+import { jsx, ThemeProvider } from '@emotion/react'
import { render } from 'react-dom'
test('provider with theme value that changes', () => {
diff --git a/packages/core/__tests__/theme-provider.js b/packages/react/__tests__/theme-provider.js
similarity index 97%
rename from packages/core/__tests__/theme-provider.js
rename to packages/react/__tests__/theme-provider.js
index 111fa244b..d9a06c079 100644
--- a/packages/core/__tests__/theme-provider.js
+++ b/packages/react/__tests__/theme-provider.js
@@ -2,7 +2,7 @@
/** @jsx jsx */
import 'test-utils/next-env'
import { ignoreConsoleErrors } from 'test-utils'
-import { jsx, ThemeProvider } from '@emotion/core'
+import { jsx, ThemeProvider } from '@emotion/react'
import renderer from 'react-test-renderer'
import cases from 'jest-in-case'
diff --git a/packages/core/__tests__/use-theme.js b/packages/react/__tests__/use-theme.js
similarity index 96%
rename from packages/core/__tests__/use-theme.js
rename to packages/react/__tests__/use-theme.js
index 3c2defca0..cbf5d8ca7 100644
--- a/packages/core/__tests__/use-theme.js
+++ b/packages/react/__tests__/use-theme.js
@@ -2,7 +2,7 @@
/** @jsx jsx */
import 'test-utils/next-env'
import * as renderer from 'react-test-renderer'
-import { jsx, useTheme, ThemeProvider } from '@emotion/core'
+import { jsx, useTheme, ThemeProvider } from '@emotion/react'
test('useTheme works', () => {
function TestComponent(props) {
diff --git a/packages/core/__tests__/warnings.js b/packages/react/__tests__/warnings.js
similarity index 99%
rename from packages/core/__tests__/warnings.js
rename to packages/react/__tests__/warnings.js
index 32a6759af..7f2a04a9e 100644
--- a/packages/core/__tests__/warnings.js
+++ b/packages/react/__tests__/warnings.js
@@ -1,7 +1,7 @@
// @flow
/** @jsx jsx */
import 'test-utils/next-env'
-import { jsx, css, Global, keyframes } from '@emotion/core'
+import { jsx, css, Global, keyframes } from '@emotion/react'
import renderer from 'react-test-renderer'
import { render } from '@testing-library/react'
diff --git a/packages/core/__tests__/with-theme.js b/packages/react/__tests__/with-theme.js
similarity index 96%
rename from packages/core/__tests__/with-theme.js
rename to packages/react/__tests__/with-theme.js
index cec6da5c7..4512dc47e 100644
--- a/packages/core/__tests__/with-theme.js
+++ b/packages/react/__tests__/with-theme.js
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react'
import * as renderer from 'react-test-renderer'
-import { withTheme, ThemeProvider } from '@emotion/core'
+import { withTheme, ThemeProvider } from '@emotion/react'
test('withTheme works', () => {
class SomeComponent extends React.Component<{ theme: Object }> {
diff --git a/packages/react/macro.d.ts b/packages/react/macro.d.ts
new file mode 100644
index 000000000..1bfc2853d
--- /dev/null
+++ b/packages/react/macro.d.ts
@@ -0,0 +1 @@
+export * from '@emotion/react'
diff --git a/packages/react/macro.js b/packages/react/macro.js
new file mode 100644
index 000000000..028081666
--- /dev/null
+++ b/packages/react/macro.js
@@ -0,0 +1 @@
+module.exports = require('@emotion/babel-plugin').macros.core
diff --git a/packages/emotion/macro.js.flow b/packages/react/macro.js.flow
similarity index 100%
rename from packages/emotion/macro.js.flow
rename to packages/react/macro.js.flow
diff --git a/packages/core/package.json b/packages/react/package.json
similarity index 73%
rename from packages/core/package.json
rename to packages/react/package.json
index d975347ca..2687fa26a 100644
--- a/packages/core/package.json
+++ b/packages/react/package.json
@@ -1,11 +1,11 @@
{
- "name": "@emotion/core",
- "version": "11.0.0-next.9",
- "main": "dist/core.cjs.js",
- "module": "dist/core.esm.js",
+ "name": "@emotion/react",
+ "version": "11.0.0-next.7",
+ "main": "dist/react.cjs.js",
+ "module": "dist/react.esm.js",
"browser": {
- "./dist/core.cjs.js": "./dist/core.browser.cjs.js",
- "./dist/core.esm.js": "./dist/core.browser.esm.js"
+ "./dist/react.cjs.js": "./dist/react.browser.cjs.js",
+ "./dist/react.esm.js": "./dist/react.browser.esm.js"
},
"types": "types/index.d.ts",
"files": [
@@ -24,7 +24,6 @@
"dependencies": {
"@babel/runtime": "^7.7.2",
"@emotion/cache": "^11.0.0-next.6",
- "@emotion/css": "^11.0.0-next.6",
"@emotion/serialize": "^0.12.0-next.3",
"@emotion/sheet": "0.10.0-next.0",
"@emotion/utils": "0.11.2",
@@ -42,11 +41,11 @@
},
"devDependencies": {
"@babel/core": "^7.7.2",
- "@emotion/styled": "^11.0.0-next.9",
+ "@emotion/css": "^11.0.0-next.0",
+ "@emotion/server": "^11.0.0-next.0",
+ "@emotion/styled": "^11.0.0-next.7",
"@types/react": "^16.9.11",
"dtslint": "^0.3.0",
- "emotion": "^11.0.0-next.8",
- "emotion-server": "^11.0.0-next.8",
"html-tag-names": "^1.1.2",
"react": "^16.11.0",
"svg-tag-names": "^1.1.1"
@@ -55,7 +54,7 @@
"publishConfig": {
"access": "public"
},
- "umd:main": "dist/core.umd.min.js",
+ "umd:main": "dist/react.umd.min.js",
"preconstruct": {
"umdName": "emotionCore"
}
diff --git a/packages/core/src/class-names.js b/packages/react/src/class-names.js
similarity index 100%
rename from packages/core/src/class-names.js
rename to packages/react/src/class-names.js
diff --git a/packages/core/src/context.js b/packages/react/src/context.js
similarity index 100%
rename from packages/core/src/context.js
rename to packages/react/src/context.js
diff --git a/packages/core/src/css.js b/packages/react/src/css.js
similarity index 100%
rename from packages/core/src/css.js
rename to packages/react/src/css.js
diff --git a/packages/core/src/global.js b/packages/react/src/global.js
similarity index 100%
rename from packages/core/src/global.js
rename to packages/react/src/global.js
diff --git a/packages/core/src/index.js b/packages/react/src/index.js
similarity index 86%
rename from packages/core/src/index.js
rename to packages/react/src/index.js
index 977a89cf5..109575835 100644
--- a/packages/core/src/index.js
+++ b/packages/react/src/index.js
@@ -9,11 +9,11 @@ export { default as css } from './css'
if (process.env.NODE_ENV !== 'production') {
const isBrowser = typeof document !== 'undefined'
- const globalKey = '__EMOTION_CORE__'
+ const globalKey = '__EMOTION_REACT__'
const globalContext = isBrowser ? window : global
if (globalContext[globalKey]) {
console.warn(
- 'You are loading @emotion/core when it is already loaded. Running ' +
+ 'You are loading @emotion/react when it is already loaded. Running ' +
'multiple instances may cause problems. This can happen if multiple ' +
'versions are used, or if multiple builds of the same version are ' +
'used.'
diff --git a/packages/core/src/jsx.js b/packages/react/src/jsx.js
similarity index 98%
rename from packages/core/src/jsx.js
rename to packages/react/src/jsx.js
index 762a60378..6048f2642 100644
--- a/packages/core/src/jsx.js
+++ b/packages/react/src/jsx.js
@@ -125,7 +125,7 @@ export const jsx: typeof React.createElement = function(
props.css.indexOf(':') !== -1
) {
throw new Error(
- `Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/core' like this: css\`${
+ `Strings are not allowed as css prop values, please wrap it in a css template literal from '@emotion/react' like this: css\`${
props.css
}\``
)
diff --git a/packages/core/src/keyframes.js b/packages/react/src/keyframes.js
similarity index 100%
rename from packages/core/src/keyframes.js
rename to packages/react/src/keyframes.js
diff --git a/packages/core/src/theming.js b/packages/react/src/theming.js
similarity index 100%
rename from packages/core/src/theming.js
rename to packages/react/src/theming.js
diff --git a/packages/core/src/utils.js b/packages/react/src/utils.js
similarity index 100%
rename from packages/core/src/utils.js
rename to packages/react/src/utils.js
diff --git a/packages/core/types/helper.d.ts b/packages/react/types/helper.d.ts
similarity index 100%
rename from packages/core/types/helper.d.ts
rename to packages/react/types/helper.d.ts
diff --git a/packages/core/types/index.d.ts b/packages/react/types/index.d.ts
similarity index 100%
rename from packages/core/types/index.d.ts
rename to packages/react/types/index.d.ts
diff --git a/packages/core/types/tests-css.tsx b/packages/react/types/tests-css.tsx
similarity index 94%
rename from packages/core/types/tests-css.tsx
rename to packages/react/types/tests-css.tsx
index 2f59829c5..2915c6341 100644
--- a/packages/core/types/tests-css.tsx
+++ b/packages/react/types/tests-css.tsx
@@ -1,4 +1,4 @@
-import { css } from '@emotion/core'
+import { css } from '@emotion/react'
// $ExpectType SerializedStyles
css()
diff --git a/packages/core/types/tests-theming.tsx b/packages/react/types/tests-theming.tsx
similarity index 99%
rename from packages/core/types/tests-theming.tsx
rename to packages/react/types/tests-theming.tsx
index 84ae7f167..9c14b532a 100644
--- a/packages/core/types/tests-theming.tsx
+++ b/packages/react/types/tests-theming.tsx
@@ -2,7 +2,7 @@
// TypeScript Version: 3.1
import * as React from 'react'
-import { useTheme, ThemeProvider, withTheme, Theme } from '@emotion/core'
+import { useTheme, ThemeProvider, withTheme, Theme } from '@emotion/react'
import { Interpolation, CSSObject } from '@emotion/styled/base'
declare const theme: Theme
diff --git a/packages/core/types/tests.tsx b/packages/react/types/tests.tsx
similarity index 97%
rename from packages/core/types/tests.tsx
rename to packages/react/types/tests.tsx
index 0c178666c..d57b4d0d7 100644
--- a/packages/core/types/tests.tsx
+++ b/packages/react/types/tests.tsx
@@ -7,9 +7,9 @@ import {
jsx,
keyframes,
withEmotionCache
-} from '@emotion/core'
+} from '@emotion/react'
-declare module '@emotion/core' {
+declare module '@emotion/react' {
// tslint:disable-next-line: strict-export-declare-modifiers
export interface Theme {
primary: string
diff --git a/packages/core/types/theming.d.ts b/packages/react/types/theming.d.ts
similarity index 95%
rename from packages/core/types/theming.d.ts
rename to packages/react/types/theming.d.ts
index b3529781d..6597ea404 100644
--- a/packages/core/types/theming.d.ts
+++ b/packages/react/types/theming.d.ts
@@ -2,7 +2,7 @@
// TypeScript Version: 3.1
import * as React from 'react'
-import { Theme } from '@emotion/core'
+import { Theme } from '@emotion/react'
import { DistributiveOmit, PropsOf } from './helper'
import {
StyledComponent,
diff --git a/packages/create-emotion/types/tsconfig.json b/packages/react/types/tsconfig.json
similarity index 100%
rename from packages/create-emotion/types/tsconfig.json
rename to packages/react/types/tsconfig.json
diff --git a/packages/core/types/tslint.json b/packages/react/types/tslint.json
similarity index 100%
rename from packages/core/types/tslint.json
rename to packages/react/types/tslint.json
diff --git a/packages/serialize/src/index.js b/packages/serialize/src/index.js
index eec6c08e0..59365d1a7 100644
--- a/packages/serialize/src/index.js
+++ b/packages/serialize/src/index.js
@@ -134,7 +134,7 @@ function handleInterpolation(
interpolation.toString() === 'NO_COMPONENT_SELECTOR'
) {
throw new Error(
- 'Component selectors can only be used in conjunction with babel-plugin-emotion.'
+ 'Component selectors can only be used in conjunction with @emotion/babel-plugin.'
)
}
return interpolation
@@ -281,7 +281,7 @@ function createStringFromObject(
process.env.NODE_ENV !== 'production'
) {
throw new Error(
- 'Component selectors can only be used in conjunction with babel-plugin-emotion.'
+ 'Component selectors can only be used in conjunction with @emotion/babel-plugin.'
)
}
if (
diff --git a/packages/serialize/types/index.d.ts b/packages/serialize/types/index.d.ts
index d849db387..753622824 100644
--- a/packages/serialize/types/index.d.ts
+++ b/packages/serialize/types/index.d.ts
@@ -1,7 +1,7 @@
// Definitions by: Junyoung Clare Jang
// TypeScript Version: 2.8
-import { Theme } from '@emotion/core'
+import { Theme } from '@emotion/react'
import { RegisteredCache, SerializedStyles } from '@emotion/utils'
import * as CSS from 'csstype'
diff --git a/packages/server/CHANGELOG.md b/packages/server/CHANGELOG.md
new file mode 100644
index 000000000..47064e34a
--- /dev/null
+++ b/packages/server/CHANGELOG.md
@@ -0,0 +1,26 @@
+# @emotion/server
+
+## 11.0.0-next.0
+
+### Major Changes
+
+- [`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Ensure packages are major bumped so that pre-release versions of the linked packages are consistent in the major number
+
+### Patch Changes
+
+- Updated dependencies [[`b0ad4f0c`](https://github.com/emotion-js/emotion/commit/b0ad4f0c628813a42c4637857be9a969429db6f0), [`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555)]:
+ - babel-plugin-emotion@11.0.0-next.0
+ - create-emotion-server@11.0.0-next.0
+ - emotion@11.0.0-next.0
+
+## 10.0.17
+
+### Patch Changes
+
+- [16ff2330](https://github.com/emotion-js/emotion/commit/16ff233061e35fe71bfb1671da54ac12d6fc9eeb) [#1483](https://github.com/emotion-js/emotion/pull/1483) Thanks [@JakeGinnivan](https://github.com/JakeGinnivan)! - nth selector will no longer warn when using extract critical
+
+## 10.0.14
+
+### Patch Changes
+
+- [c0eb604d](https://github.com/emotion-js/emotion/commit/c0eb604d) [#1419](https://github.com/emotion-js/emotion/pull/1419) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Update build tool
diff --git a/packages/server/README.md b/packages/server/README.md
new file mode 100644
index 000000000..00a0f73e6
--- /dev/null
+++ b/packages/server/README.md
@@ -0,0 +1,11 @@
+# @emotion/server
+
+> Extract and inline critical css with emotion.
+
+`@emotion/server` provides three APIs for doing server-side rendering with emotion to extract critical css, inline critical css in html to a string and inline critical css in html to a stream.
+
+[`@emotion/server`'s APIs are documented here.](https://emotion.sh/docs/ssr)
+
+```bash
+npm install --save @emotion/css @emotion/server
+```
diff --git a/packages/server/create-instance/package.json b/packages/server/create-instance/package.json
new file mode 100644
index 000000000..21385b5bd
--- /dev/null
+++ b/packages/server/create-instance/package.json
@@ -0,0 +1,10 @@
+{
+ "main": "dist/server.cjs.js",
+ "browser": {
+ "./dist/server.cjs.js": "./dist/server.browser.cjs.js"
+ },
+ "types": "../types/create-instance",
+ "preconstruct": {
+ "source": "../src/create-instance"
+ }
+}
diff --git a/packages/server/package.json b/packages/server/package.json
new file mode 100644
index 000000000..4ca6ed36e
--- /dev/null
+++ b/packages/server/package.json
@@ -0,0 +1,62 @@
+{
+ "name": "@emotion/server",
+ "version": "11.0.0-next.0",
+ "description": "Extract and inline critical css with emotion for server side rendering.",
+ "main": "dist/server.cjs.js",
+ "types": "types/index.d.ts",
+ "files": [
+ "src",
+ "dist",
+ "types/*.d.ts",
+ "create-instance"
+ ],
+ "scripts": {
+ "test:typescript": "dtslint types"
+ },
+ "dependencies": {
+ "@emotion/utils": "0.11.2",
+ "html-tokenize": "^2.0.0",
+ "multipipe": "^1.0.2",
+ "through": "^2.3.8"
+ },
+ "peerDependencies": {
+ "@emotion/css": "^11.0.0-next.0"
+ },
+ "peerDependenciesMeta": {
+ "@emotion/css": {
+ "optional": true
+ }
+ },
+ "devDependencies": {
+ "@emotion/babel-plugin": "^11.0.0-next.0",
+ "@emotion/css": "^11.0.0-next.0",
+ "@types/node": "^10.11.4",
+ "dtslint": "^0.3.0",
+ "emotion": "^11.0.0-next.0"
+ },
+ "author": "Kye Hohenberger",
+ "homepage": "https://emotion.sh",
+ "license": "MIT",
+ "repository": "https://github.com/emotion-js/emotion/tree/master/packages/emotion-server",
+ "keywords": [
+ "styles",
+ "emotion",
+ "react",
+ "css",
+ "css-in-js",
+ "ssr",
+ "server-side-rendering"
+ ],
+ "bugs": {
+ "url": "https://github.com/emotion-js/emotion/issues"
+ },
+ "browser": {
+ "./dist/server.cjs.js": "./dist/server.browser.cjs.js"
+ },
+ "preconstruct": {
+ "entrypoints": [
+ ".",
+ "create-instance"
+ ]
+ }
+}
diff --git a/packages/create-emotion-server/src/extract-critical.js b/packages/server/src/create-instance/extract-critical.js
similarity index 100%
rename from packages/create-emotion-server/src/extract-critical.js
rename to packages/server/src/create-instance/extract-critical.js
diff --git a/packages/create-emotion-server/src/index.js b/packages/server/src/create-instance/index.js
similarity index 100%
rename from packages/create-emotion-server/src/index.js
rename to packages/server/src/create-instance/index.js
diff --git a/packages/create-emotion-server/src/inline.js b/packages/server/src/create-instance/inline.js
similarity index 100%
rename from packages/create-emotion-server/src/inline.js
rename to packages/server/src/create-instance/inline.js
diff --git a/packages/create-emotion-server/src/stream.js b/packages/server/src/create-instance/stream.js
similarity index 100%
rename from packages/create-emotion-server/src/stream.js
rename to packages/server/src/create-instance/stream.js
diff --git a/packages/emotion-server/src/index.js b/packages/server/src/index.js
similarity index 58%
rename from packages/emotion-server/src/index.js
rename to packages/server/src/index.js
index a842c3e60..58c162cb3 100644
--- a/packages/emotion-server/src/index.js
+++ b/packages/server/src/index.js
@@ -1,6 +1,6 @@
// @flow
-import createEmotionServer from 'create-emotion-server'
-import { cache } from 'emotion'
+import createEmotionServer from './create-instance'
+import { cache } from '@emotion/css'
export const {
extractCritical,
diff --git a/packages/emotion-server/test/__snapshots__/index.test.js.snap b/packages/server/test/__snapshots__/index.test.js.snap
similarity index 100%
rename from packages/emotion-server/test/__snapshots__/index.test.js.snap
rename to packages/server/test/__snapshots__/index.test.js.snap
diff --git a/packages/emotion-server/test/__snapshots__/inline.test.js.snap b/packages/server/test/__snapshots__/inline.test.js.snap
similarity index 100%
rename from packages/emotion-server/test/__snapshots__/inline.test.js.snap
rename to packages/server/test/__snapshots__/inline.test.js.snap
diff --git a/packages/emotion-server/test/__snapshots__/stream.test.js.snap b/packages/server/test/__snapshots__/stream.test.js.snap
similarity index 100%
rename from packages/emotion-server/test/__snapshots__/stream.test.js.snap
rename to packages/server/test/__snapshots__/stream.test.js.snap
diff --git a/packages/emotion-server/test/index.test.js b/packages/server/test/index.test.js
similarity index 89%
rename from packages/emotion-server/test/index.test.js
rename to packages/server/test/index.test.js
index ae7a4e65e..851038da8 100644
--- a/packages/emotion-server/test/index.test.js
+++ b/packages/server/test/index.test.js
@@ -9,9 +9,9 @@ import { getComponents, prettyifyCritical, getInjectedRules } from './util'
import { JSDOM } from 'jsdom'
import { ignoreConsoleErrors } from 'test-utils'
-let emotion = require('emotion')
+let emotion = require('@emotion/css')
let reactEmotion = require('@emotion/styled')
-let emotionServer = require('emotion-server')
+let emotionServer = require('@emotion/server')
describe('extractCritical', () => {
test('returns static css', () => {
@@ -29,7 +29,7 @@ describe('extractCritical', () => {
})
test('does not warn when using extract critical', () => {
- let Provider = require('@emotion/core').CacheProvider
+ let Provider = require('@emotion/react').CacheProvider
const WithNthSelector = reactEmotion.default('div')({
':nth-child(1)': {}
})
@@ -59,8 +59,8 @@ describe('hydration', () => {
global.window = window
jest.resetModules()
- emotion = require('emotion')
- emotionServer = require('emotion-server')
+ emotion = require('@emotion/css')
+ emotionServer = require('@emotion/server')
expect(emotion.cache.inserted).toEqual({})
emotion.hydrate(ids)
diff --git a/packages/emotion-server/test/inline.test.js b/packages/server/test/inline.test.js
similarity index 96%
rename from packages/emotion-server/test/inline.test.js
rename to packages/server/test/inline.test.js
index 00a43195c..17464c587 100644
--- a/packages/emotion-server/test/inline.test.js
+++ b/packages/server/test/inline.test.js
@@ -15,8 +15,8 @@ const resetAllModules = () => {
jest.resetModules()
React = require('react')
renderToString = require('react-dom/server').renderToString
- emotion = require('emotion')
- emotionServer = require('emotion-server')
+ emotion = require('@emotion/css')
+ emotionServer = require('@emotion/server')
reactEmotion = require('@emotion/styled')
util = require('./util')
}
diff --git a/packages/emotion-server/test/stream.test.js b/packages/server/test/stream.test.js
similarity index 95%
rename from packages/emotion-server/test/stream.test.js
rename to packages/server/test/stream.test.js
index f8733c679..ce7cf5680 100644
--- a/packages/emotion-server/test/stream.test.js
+++ b/packages/server/test/stream.test.js
@@ -15,8 +15,8 @@ const resetAllModules = () => {
jest.resetModules()
React = require('react')
renderToString = require('react-dom/server').renderToString
- emotion = require('emotion')
- emotionServer = require('emotion-server')
+ emotion = require('@emotion/css')
+ emotionServer = require('@emotion/server')
reactEmotion = require('@emotion/styled')
util = require('./util')
}
diff --git a/packages/emotion-server/test/util.js b/packages/server/test/util.js
similarity index 97%
rename from packages/emotion-server/test/util.js
rename to packages/server/test/util.js
index 0a18caa32..380790578 100644
--- a/packages/emotion-server/test/util.js
+++ b/packages/server/test/util.js
@@ -2,7 +2,7 @@
/* eslint-env jest */
import * as React from 'react'
import { parse, stringify } from 'css'
-import type { Emotion } from 'create-emotion'
+import type { Emotion } from '@emotion/css/create-instance'
// $FlowFixMe
import { renderToNodeStream } from 'react-dom/server'
import HTMLSerializer from 'jest-serializer-html'
@@ -19,7 +19,7 @@ export const getComponents = (
emotion: Emotion,
{ default: styled }: { default: Function }
) => {
- let Provider = require('@emotion/core').CacheProvider
+ let Provider = require('@emotion/react').CacheProvider
let { injectGlobal, keyframes, css } = emotion
const color = 'red'
diff --git a/packages/create-emotion-server/types/index.d.ts b/packages/server/types/create-instance.d.ts
similarity index 100%
rename from packages/create-emotion-server/types/index.d.ts
rename to packages/server/types/create-instance.d.ts
diff --git a/packages/emotion-server/types/index.d.ts b/packages/server/types/index.d.ts
similarity index 83%
rename from packages/emotion-server/types/index.d.ts
rename to packages/server/types/index.d.ts
index ced5c0492..1c7671924 100644
--- a/packages/emotion-server/types/index.d.ts
+++ b/packages/server/types/index.d.ts
@@ -1,7 +1,7 @@
// Definitions by: Junyoung Clare Jang
// TypeScript Version: 2.8
-import { EmotionServer } from 'create-emotion-server'
+import { EmotionServer } from '@emotion/server/create-instance'
export const renderStylesToString: EmotionServer['renderStylesToString']
export const renderStylesToNodeStream: EmotionServer['renderStylesToNodeStream']
diff --git a/packages/create-emotion-server/types/tests.tsx b/packages/server/types/tests-create-instance.ts
similarity index 93%
rename from packages/create-emotion-server/types/tests.tsx
rename to packages/server/types/tests-create-instance.ts
index 50cc032fb..54fa78e5e 100644
--- a/packages/create-emotion-server/types/tests.tsx
+++ b/packages/server/types/tests-create-instance.ts
@@ -1,4 +1,4 @@
-import createEmotionServer from 'create-emotion-server'
+import createEmotionServer from '@emotion/server/create-instance'
import { EmotionCache } from '@emotion/utils'
declare const cache: EmotionCache
diff --git a/packages/emotion-server/types/tests.tsx b/packages/server/types/tests.tsx
similarity index 96%
rename from packages/emotion-server/types/tests.tsx
rename to packages/server/types/tests.tsx
index 3cc16423f..5ea520004 100644
--- a/packages/emotion-server/types/tests.tsx
+++ b/packages/server/types/tests.tsx
@@ -2,7 +2,7 @@ import {
extractCritical,
renderStylesToNodeStream,
renderStylesToString
-} from 'emotion-server'
+} from '@emotion/server'
declare const renderedString: string
declare const renderedNodeStream: NodeJS.ReadableStream
diff --git a/packages/create-emotion-server/types/tsconfig.json b/packages/server/types/tsconfig.json
similarity index 100%
rename from packages/create-emotion-server/types/tsconfig.json
rename to packages/server/types/tsconfig.json
diff --git a/packages/server/types/tslint.json b/packages/server/types/tslint.json
new file mode 100644
index 000000000..36ae1d949
--- /dev/null
+++ b/packages/server/types/tslint.json
@@ -0,0 +1,8 @@
+{
+ "extends": "dtslint/dtslint.json",
+ "rules": {
+ "array-type": [true, "generic"],
+ "semicolon": false,
+ "file-name-casing": false
+ }
+}
diff --git a/packages/sheet/types/tests.ts b/packages/sheet/types/tests.ts
index de636a96f..e035257ec 100644
--- a/packages/sheet/types/tests.ts
+++ b/packages/sheet/types/tests.ts
@@ -15,11 +15,12 @@ new StyleSheet({
container: document.createElement('div'),
speedy: true
})
-// $ExpectError
-new StyleSheet({
- container: document.createElement('div'),
- key: 120
-})
+// this has been commented out because the error location has moved in typescript@next at the time of writing this comment
+// // $ExpectError
+// new StyleSheet({
+// container: document.createElement('div'),
+// key: 120
+// })
new StyleSheet({
container: document.createElement('div'),
// $ExpectError
diff --git a/packages/styled/README.md b/packages/styled/README.md
index 1fcd85310..75a51f7dc 100644
--- a/packages/styled/README.md
+++ b/packages/styled/README.md
@@ -1,11 +1,11 @@
# @emotion/styled
-> The styled API for @emotion/core
+> The styled API for @emotion/react
## Install
```bash
-yarn add @emotion/core @emotion/styled
+yarn add @emotion/react @emotion/styled
```
## Usage
diff --git a/packages/styled/__tests__/edge-cases.js b/packages/styled/__tests__/edge-cases.js
index 1868b8d73..ec1070375 100644
--- a/packages/styled/__tests__/edge-cases.js
+++ b/packages/styled/__tests__/edge-cases.js
@@ -3,7 +3,7 @@ import 'test-utils/next-env'
import * as React from 'react'
import renderer from 'react-test-renderer'
import styled from '@emotion/styled'
-import { css, keyframes } from '@emotion/core'
+import { css, keyframes } from '@emotion/react'
test('nested function using css', () => {
let Comp = styled.div`
diff --git a/packages/styled/__tests__/styled.js b/packages/styled/__tests__/styled.js
index a78e12220..ddcc9509c 100644
--- a/packages/styled/__tests__/styled.js
+++ b/packages/styled/__tests__/styled.js
@@ -4,7 +4,7 @@ import 'test-utils/next-env'
import renderer from 'react-test-renderer'
import hoistNonReactStatics from 'hoist-non-react-statics'
import styled from '@emotion/styled'
-import { jsx, keyframes, css, ThemeProvider } from '@emotion/core'
+import { jsx, keyframes, css, ThemeProvider } from '@emotion/react'
describe('styled', () => {
test('no dynamic', () => {
diff --git a/packages/styled/__tests__/warnings.js b/packages/styled/__tests__/warnings.js
index a9f2035db..b0cfcebca 100644
--- a/packages/styled/__tests__/warnings.js
+++ b/packages/styled/__tests__/warnings.js
@@ -1,7 +1,7 @@
// @flow
import 'test-utils/legacy-env'
import * as React from 'react'
-import { css } from '@emotion/core'
+import { css } from '@emotion/react'
import styled from '@emotion/styled'
import { render } from '@testing-library/react'
diff --git a/packages/styled/macro.js b/packages/styled/macro.js
index c8b45a736..f87430ff1 100644
--- a/packages/styled/macro.js
+++ b/packages/styled/macro.js
@@ -1 +1 @@
-module.exports = require('babel-plugin-emotion').macros.webStyled
+module.exports = require('@emotion/babel-plugin').macros.webStyled
diff --git a/packages/styled/package.json b/packages/styled/package.json
index 8bbc7772e..b5d39aa98 100644
--- a/packages/styled/package.json
+++ b/packages/styled/package.json
@@ -12,14 +12,14 @@
},
"dependencies": {
"@babel/runtime": "^7.7.2",
+ "@emotion/babel-plugin": "^11.0.0-next.6",
"@emotion/is-prop-valid": "0.9.0-next.1",
"@emotion/serialize": "^0.12.0-next.3",
- "@emotion/utils": "0.11.2",
- "babel-plugin-emotion": "^11.0.0-next.8"
+ "@emotion/utils": "0.11.2"
},
"peerDependencies": {
"@babel/core": "^7.0.0",
- "@emotion/core": "^11.0.0-next.9",
+ "@emotion/react": "^11.0.0-next.7",
"react": ">=16.8.0"
},
"peerDependenciesMeta": {
@@ -29,7 +29,7 @@
},
"devDependencies": {
"@babel/core": "^7.7.2",
- "@emotion/core": "^11.0.0-next.9",
+ "@emotion/react": "^11.0.0-next.7",
"dtslint": "^0.3.0",
"react": "^16.11.0"
},
diff --git a/packages/styled/src/base.js b/packages/styled/src/base.js
index 7bc13b542..71f65217a 100644
--- a/packages/styled/src/base.js
+++ b/packages/styled/src/base.js
@@ -7,7 +7,7 @@ import {
type CreateStyled,
type PrivateStyledComponent
} from './utils'
-import { withEmotionCache, ThemeContext } from '@emotion/core'
+import { withEmotionCache, ThemeContext } from '@emotion/react'
import { getRegisteredStyles, insertStyles } from '@emotion/utils'
import { serializeStyles } from '@emotion/serialize'
diff --git a/packages/styled/test/composition.test.js b/packages/styled/test/composition.test.js
index 59ce81db6..b96e620ce 100644
--- a/packages/styled/test/composition.test.js
+++ b/packages/styled/test/composition.test.js
@@ -2,7 +2,7 @@
/** @jsx jsx */
import 'test-utils/legacy-env'
import * as renderer from 'react-test-renderer'
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
import styled from '@emotion/styled'
import { lighten, hiDPI } from 'polished'
diff --git a/packages/styled/test/index.test.js b/packages/styled/test/index.test.js
index 9ebecc7d3..e73594200 100644
--- a/packages/styled/test/index.test.js
+++ b/packages/styled/test/index.test.js
@@ -2,7 +2,7 @@
import 'test-utils/legacy-env'
import React from 'react'
import * as renderer from 'react-test-renderer'
-import { css } from '@emotion/core'
+import { css } from '@emotion/react'
import styled from '@emotion/styled'
import hoistNonReactStatics from 'hoist-non-react-statics'
diff --git a/packages/styled/test/theming.dom.test.js b/packages/styled/test/theming.dom.test.js
index 8674eab8e..fcb219edd 100644
--- a/packages/styled/test/theming.dom.test.js
+++ b/packages/styled/test/theming.dom.test.js
@@ -2,7 +2,7 @@
import 'test-utils/legacy-env'
import React from 'react'
import styled from '@emotion/styled'
-import { ThemeProvider } from '@emotion/core'
+import { ThemeProvider } from '@emotion/react'
import { render, cleanup } from '@testing-library/react'
afterEach(cleanup)
diff --git a/packages/styled/test/theming.test.js b/packages/styled/test/theming.test.js
index 83168b8d3..da9578b42 100644
--- a/packages/styled/test/theming.test.js
+++ b/packages/styled/test/theming.test.js
@@ -3,7 +3,7 @@ import 'test-utils/legacy-env'
import React from 'react'
import * as renderer from 'react-test-renderer'
import styled from '@emotion/styled'
-import { css, ThemeProvider } from '@emotion/core'
+import { css, ThemeProvider } from '@emotion/react'
test('theme with react-test-renderer', () => {
const Div = styled.div`
diff --git a/packages/styled/types/base.d.ts b/packages/styled/types/base.d.ts
index 5c377ffe8..ec158e806 100644
--- a/packages/styled/types/base.d.ts
+++ b/packages/styled/types/base.d.ts
@@ -3,7 +3,7 @@
import * as React from 'react'
import { ComponentSelector, Interpolation } from '@emotion/serialize'
-import { PropsOf, DistributiveOmit, Theme } from '@emotion/core'
+import { PropsOf, DistributiveOmit, Theme } from '@emotion/react'
export {
ArrayInterpolation,
diff --git a/packages/styled/types/index.d.ts b/packages/styled/types/index.d.ts
index eb35d2570..8f4335f23 100644
--- a/packages/styled/types/index.d.ts
+++ b/packages/styled/types/index.d.ts
@@ -1,7 +1,7 @@
// Definitions by: Junyoung Clare Jang
// TypeScript Version: 3.2
-import { Theme } from '@emotion/core'
+import { Theme } from '@emotion/react'
import { CreateStyled as BaseCreateStyled, CreateStyledComponent } from './base'
export {
diff --git a/packages/styled/types/tests-base.tsx b/packages/styled/types/tests-base.tsx
index 5df973ce3..3160048bc 100644
--- a/packages/styled/types/tests-base.tsx
+++ b/packages/styled/types/tests-base.tsx
@@ -2,7 +2,7 @@ import * as React from 'react'
import styled from '@emotion/styled/base'
import isPropValid from '@emotion/is-prop-valid'
-declare module '@emotion/core' {
+declare module '@emotion/react' {
// tslint:disable-next-line: strict-export-declare-modifiers
export interface Theme {
primary: string
diff --git a/packages/stylis/types/tests.ts b/packages/stylis/types/tests.ts
index 9ba77ad10..cb49114bc 100644
--- a/packages/stylis/types/tests.ts
+++ b/packages/stylis/types/tests.ts
@@ -41,18 +41,19 @@ new Stylis({
return value === 'world'
}
})
-// $ExpectError
-new Stylis({
- prefix(key: string, value: string, context: PrefixContext) {
- return 'hi'
- }
-})
-// $ExpectError
-new Stylis({
- prefix(key: string, value: string, context: PrefixContext, a: any) {
- return true
- }
-})
+// this has been commented out because the error location has moved in typescript@next at the time of writing this comment
+// // $ExpectError
+// new Stylis({
+// prefix(key: string, value: string, context: PrefixContext) {
+// return 'hi'
+// }
+// })
+// // $ExpectError
+// new Stylis({
+// prefix(key: string, value: string, context: PrefixContext, a: any) {
+// return true
+// }
+// })
const stylis0 = new Stylis()
const stylis1: Stylis = stylis0
diff --git a/playgrounds/cra/src/App.js b/playgrounds/cra/src/App.js
index ce681de10..4a4e97cf2 100644
--- a/playgrounds/cra/src/App.js
+++ b/playgrounds/cra/src/App.js
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react'
/** @jsx jsx */
-import { Global, jsx, keyframes } from '@emotion/core'
+import { Global, jsx, keyframes } from '@emotion/react'
let animation = keyframes({
'from,to': {
diff --git a/playgrounds/razzle/src/App.js b/playgrounds/razzle/src/App.js
index 537744add..ab6e3a127 100644
--- a/playgrounds/razzle/src/App.js
+++ b/playgrounds/razzle/src/App.js
@@ -2,7 +2,7 @@
import * as React from 'react'
import Route from 'react-router-dom/Route'
import Switch from 'react-router-dom/Switch'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
import Home from './Home'
const App = () => (
diff --git a/playgrounds/razzle/src/Home.js b/playgrounds/razzle/src/Home.js
index f6591b8b9..b8df8ed2c 100644
--- a/playgrounds/razzle/src/Home.js
+++ b/playgrounds/razzle/src/Home.js
@@ -1,6 +1,6 @@
// @flow
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import * as React from 'react'
class Home extends React.Component<{}, { isBrowser: boolean }> {
diff --git a/playgrounds/razzle/src/server.js b/playgrounds/razzle/src/server.js
index 39cb5d6fb..bec262448 100644
--- a/playgrounds/razzle/src/server.js
+++ b/playgrounds/razzle/src/server.js
@@ -4,9 +4,9 @@ import * as React from 'react'
import { StaticRouter } from 'react-router-dom'
import express from 'express'
import { renderToString } from 'react-dom/server'
-import { renderStylesToString } from 'emotion-server'
-import { cache } from 'emotion'
-import { CacheProvider } from '@emotion/core'
+import { renderStylesToString } from '@emotion/server'
+import { cache } from '@emotion/css'
+import { CacheProvider } from '@emotion/react'
// $FlowFixMe
const assets = require(process.env.RAZZLE_ASSETS_MANIFEST)
diff --git a/packages/babel-plugin-emotion/CHANGELOG.md b/removed-packages/babel-plugin-emotion/CHANGELOG.md
similarity index 100%
rename from packages/babel-plugin-emotion/CHANGELOG.md
rename to removed-packages/babel-plugin-emotion/CHANGELOG.md
diff --git a/packages/babel-plugin-emotion/package.json b/removed-packages/babel-plugin-emotion/package.json
similarity index 96%
rename from packages/babel-plugin-emotion/package.json
rename to removed-packages/babel-plugin-emotion/package.json
index 6e378d554..5fc6f87b7 100644
--- a/packages/babel-plugin-emotion/package.json
+++ b/removed-packages/babel-plugin-emotion/package.json
@@ -3,7 +3,6 @@
"version": "11.0.0-next.8",
"description": "A recommended babel preprocessing plugin for emotion, The Next Generation of CSS-in-JS.",
"main": "dist/babel-plugin-emotion.cjs.js",
- "module": "dist/babel-plugin-emotion.esm.js",
"files": [
"src",
"lib",
diff --git a/removed-packages/babel-plugin-emotion/src/index.js b/removed-packages/babel-plugin-emotion/src/index.js
new file mode 100644
index 000000000..1b7beabfb
--- /dev/null
+++ b/removed-packages/babel-plugin-emotion/src/index.js
@@ -0,0 +1,3 @@
+throw new Error(
+ 'The `babel-plugin-emotion` package has been renamed to `@emotion/babel-plugin`. Please replace `"plugins": ["emotion"]` with `"plugins": ["@emotion"]` in your Babel config'
+)
diff --git a/packages/core/CHANGELOG.md b/removed-packages/core/CHANGELOG.md
similarity index 100%
rename from packages/core/CHANGELOG.md
rename to removed-packages/core/CHANGELOG.md
diff --git a/removed-packages/core/package.json b/removed-packages/core/package.json
new file mode 100644
index 000000000..233ecf6e1
--- /dev/null
+++ b/removed-packages/core/package.json
@@ -0,0 +1,23 @@
+{
+ "name": "@emotion/core",
+ "version": "11.0.0-next.9",
+ "main": "dist/core.cjs.js",
+ "types": "types/index.d.ts",
+ "files": [
+ "src",
+ "dist",
+ "types",
+ "macro.js",
+ "macro.d.ts",
+ "macro.js.flow"
+ ],
+ "author": "mitchellhamilton ",
+ "license": "MIT",
+ "scripts": {
+ "test:typescript": "exit 0"
+ },
+ "repository": "https://github.com/emotion-js/emotion/tree/master/removed-packages/core",
+ "publishConfig": {
+ "access": "public"
+ }
+}
diff --git a/removed-packages/core/src/index.js b/removed-packages/core/src/index.js
new file mode 100644
index 000000000..d876dd89a
--- /dev/null
+++ b/removed-packages/core/src/index.js
@@ -0,0 +1,3 @@
+throw new Error(
+ "The `@emotion/core` package has been renamed to `@emotion/react`. Please import it like this `import { jsx } from '@emotion/react'`."
+)
diff --git a/packages/create-emotion-server/CHANGELOG.md b/removed-packages/create-emotion-server/CHANGELOG.md
similarity index 100%
rename from packages/create-emotion-server/CHANGELOG.md
rename to removed-packages/create-emotion-server/CHANGELOG.md
diff --git a/packages/create-emotion-server/package.json b/removed-packages/create-emotion-server/package.json
similarity index 65%
rename from packages/create-emotion-server/package.json
rename to removed-packages/create-emotion-server/package.json
index f06d8166a..3945e8153 100644
--- a/packages/create-emotion-server/package.json
+++ b/removed-packages/create-emotion-server/package.json
@@ -10,17 +10,7 @@
"types/*.d.ts"
],
"scripts": {
- "test:typescript": "dtslint types"
- },
- "dependencies": {
- "@emotion/utils": "0.11.2",
- "html-tokenize": "^2.0.0",
- "multipipe": "^1.0.2",
- "through": "^2.3.8"
- },
- "devDependencies": {
- "@types/node": "^10.11.4",
- "dtslint": "^0.3.0"
+ "test:typescript": "exit 0"
},
"author": "Kye Hohenberger",
"homepage": "https://emotion.sh",
@@ -37,8 +27,5 @@
],
"bugs": {
"url": "https://github.com/emotion-js/emotion/issues"
- },
- "browser": {
- "./dist/create-emotion-server.cjs.js": "./dist/create-emotion-server.browser.cjs.js"
}
}
diff --git a/removed-packages/create-emotion-server/src/index.js b/removed-packages/create-emotion-server/src/index.js
new file mode 100644
index 000000000..89df500f0
--- /dev/null
+++ b/removed-packages/create-emotion-server/src/index.js
@@ -0,0 +1,3 @@
+throw new Error(
+ "The `create-emotion-server` package has been moved to `@emotion/server/create-instance`. Please import it like this `import { css } from '@emotion/css'`."
+)
diff --git a/packages/create-emotion/CHANGELOG.md b/removed-packages/create-emotion/CHANGELOG.md
similarity index 100%
rename from packages/create-emotion/CHANGELOG.md
rename to removed-packages/create-emotion/CHANGELOG.md
diff --git a/removed-packages/create-emotion/package.json b/removed-packages/create-emotion/package.json
new file mode 100644
index 000000000..efe303557
--- /dev/null
+++ b/removed-packages/create-emotion/package.json
@@ -0,0 +1,28 @@
+{
+ "name": "create-emotion",
+ "version": "11.0.0-next.8",
+ "description": "The Next Generation of CSS-in-JS.",
+ "main": "dist/create-emotion.cjs.js",
+ "files": [
+ "src",
+ "dist",
+ "types"
+ ],
+ "scripts": {
+ "test:typescript": "exit 0"
+ },
+ "author": "Kye Hohenberger",
+ "homepage": "https://emotion.sh",
+ "license": "MIT",
+ "repository": "https://github.com/emotion-js/emotion/tree/master/removed-packages/create-emotion",
+ "keywords": [
+ "styles",
+ "emotion",
+ "react",
+ "css",
+ "css-in-js"
+ ],
+ "bugs": {
+ "url": "https://github.com/emotion-js/emotion/issues"
+ }
+}
diff --git a/removed-packages/create-emotion/src/index.js b/removed-packages/create-emotion/src/index.js
new file mode 100644
index 000000000..8b70f56cd
--- /dev/null
+++ b/removed-packages/create-emotion/src/index.js
@@ -0,0 +1,3 @@
+throw new Error(
+ "The `create-emotion` package has been moved to `@emotion/css/create-instance`. Please import it like this `import createEmotion from '@emotion/css/create-instance'`."
+)
diff --git a/packages/emotion-server/CHANGELOG.md b/removed-packages/emotion-server/CHANGELOG.md
similarity index 100%
rename from packages/emotion-server/CHANGELOG.md
rename to removed-packages/emotion-server/CHANGELOG.md
diff --git a/packages/emotion-server/package.json b/removed-packages/emotion-server/package.json
similarity index 70%
rename from packages/emotion-server/package.json
rename to removed-packages/emotion-server/package.json
index 34d853294..e97370132 100644
--- a/packages/emotion-server/package.json
+++ b/removed-packages/emotion-server/package.json
@@ -10,19 +10,7 @@
"types/*.d.ts"
],
"scripts": {
- "test:typescript": "dtslint types"
- },
- "dependencies": {
- "create-emotion-server": "11.0.0-next.0"
- },
- "peerDependencies": {
- "emotion": "^11.0.0-next.8"
- },
- "devDependencies": {
- "@types/node": "^10.11.4",
- "babel-plugin-emotion": "^11.0.0-next.8",
- "dtslint": "^0.3.0",
- "emotion": "^11.0.0-next.8"
+ "test:typescript": "exit 0"
},
"author": "Kye Hohenberger",
"homepage": "https://emotion.sh",
diff --git a/removed-packages/emotion-server/src/index.js b/removed-packages/emotion-server/src/index.js
new file mode 100644
index 000000000..7ea97a213
--- /dev/null
+++ b/removed-packages/emotion-server/src/index.js
@@ -0,0 +1,3 @@
+throw new Error(
+ "The `emotion-server` package has been renamed to `@emotion/server`. Please import it like this `import { extractCritical, renderStylesToString, renderStylesToNodeStream } from '@emotion/server'`."
+)
diff --git a/packages/emotion-theming/CHANGELOG.md b/removed-packages/emotion-theming/CHANGELOG.md
similarity index 100%
rename from packages/emotion-theming/CHANGELOG.md
rename to removed-packages/emotion-theming/CHANGELOG.md
diff --git a/packages/emotion-theming/package.json b/removed-packages/emotion-theming/package.json
similarity index 94%
rename from packages/emotion-theming/package.json
rename to removed-packages/emotion-theming/package.json
index fa066ea77..e6845df25 100644
--- a/packages/emotion-theming/package.json
+++ b/removed-packages/emotion-theming/package.json
@@ -3,7 +3,9 @@
"version": "11.0.0-next.6",
"description": "A CSS-in-JS theming solution, inspired by styled-components",
"main": "dist/emotion-theming.cjs.js",
- "files": ["dist"],
+ "files": [
+ "dist"
+ ],
"scripts": {
"test:typescript": "exit 0"
},
diff --git a/removed-packages/emotion-theming/src/index.js b/removed-packages/emotion-theming/src/index.js
new file mode 100644
index 000000000..8f920fcce
--- /dev/null
+++ b/removed-packages/emotion-theming/src/index.js
@@ -0,0 +1,3 @@
+throw new Error(
+ "`emotion-theming` has been removed and all its exports were moved to `@emotion/react` package. Please import them like this `import { useTheme, ThemeProvider, withTheme } from '@emotion/react'`."
+)
diff --git a/packages/emotion/CHANGELOG.md b/removed-packages/emotion/CHANGELOG.md
similarity index 100%
rename from packages/emotion/CHANGELOG.md
rename to removed-packages/emotion/CHANGELOG.md
diff --git a/removed-packages/emotion/macro.js b/removed-packages/emotion/macro.js
new file mode 100644
index 000000000..f912d61f5
--- /dev/null
+++ b/removed-packages/emotion/macro.js
@@ -0,0 +1,3 @@
+throw new Error(
+ "`emotion/macro` has been moved to `@emotion/css/macro`. Please import it like this `import { css } from '@emotion/css/macro'`."
+)
diff --git a/packages/emotion/package.json b/removed-packages/emotion/package.json
similarity index 60%
rename from packages/emotion/package.json
rename to removed-packages/emotion/package.json
index 4983be060..161fcf04a 100644
--- a/packages/emotion/package.json
+++ b/removed-packages/emotion/package.json
@@ -14,27 +14,7 @@
"macro.js.flow"
],
"scripts": {
- "test:typescript": "dtslint types"
- },
- "dependencies": {
- "babel-plugin-emotion": "^11.0.0-next.8",
- "create-emotion": "^11.0.0-next.8"
- },
- "peerDependencies": {
- "@babel/core": "^7.0.0"
- },
- "peerDependenciesMeta": {
- "@babel/core": {
- "optional": true
- }
- },
- "devDependencies": {
- "@babel/core": "^7.7.2",
- "@emotion/stylis": "0.8.4",
- "babel-plugin-transform-define": "^1.3.0",
- "dtslint": "^0.3.0",
- "stylis": "3.5.4",
- "stylis-rule-sheet": "^0.0.10"
+ "test:typescript": "exit 0"
},
"author": "Kye Hohenberger",
"homepage": "https://emotion.sh",
diff --git a/removed-packages/emotion/src/index.js b/removed-packages/emotion/src/index.js
new file mode 100644
index 000000000..8adb9b8eb
--- /dev/null
+++ b/removed-packages/emotion/src/index.js
@@ -0,0 +1,3 @@
+throw new Error(
+ "The `emotion` package has been renamed to `@emotion/css`. Please import it like this `import { css } from '@emotion/css'`."
+)
diff --git a/packages/eslint-plugin-emotion/CHANGELOG.md b/removed-packages/eslint-plugin-emotion/CHANGELOG.md
similarity index 100%
rename from packages/eslint-plugin-emotion/CHANGELOG.md
rename to removed-packages/eslint-plugin-emotion/CHANGELOG.md
diff --git a/packages/eslint-plugin-emotion/package.json b/removed-packages/eslint-plugin-emotion/package.json
similarity index 91%
rename from packages/eslint-plugin-emotion/package.json
rename to removed-packages/eslint-plugin-emotion/package.json
index 7a9b1ccf1..890fba69b 100644
--- a/packages/eslint-plugin-emotion/package.json
+++ b/removed-packages/eslint-plugin-emotion/package.json
@@ -16,11 +16,11 @@
"engines": {
"node": ">=6"
},
- "license": "ISC",
+ "license": "MIT",
"peerDependencies": {
"eslint": "6"
},
"devDependencies": {
- "eslint": "^6.7.1"
+ "eslint": "^6.7.2"
}
}
diff --git a/removed-packages/eslint-plugin-emotion/src/index.js b/removed-packages/eslint-plugin-emotion/src/index.js
new file mode 100644
index 000000000..dd2b59b9f
--- /dev/null
+++ b/removed-packages/eslint-plugin-emotion/src/index.js
@@ -0,0 +1,3 @@
+throw new Error(
+ 'The `eslint-plugin-emotion` package has been renamed to `@emotion/eslint-plugin`.\nPlease replace `"plugins": ["emotion"]` with `"plugins": ["@emotion"]` in your ESLint config.\nIf you get an error saying that ESLint could not find the plugin `eslint-plugin-@emotion`, you need to update ESLint or use `"plugins": ["@emotion/eslint-plugin"]`.'
+)
diff --git a/removed-packages/jest-emotion/CHANGELOG.md b/removed-packages/jest-emotion/CHANGELOG.md
new file mode 100644
index 000000000..52ee986fd
--- /dev/null
+++ b/removed-packages/jest-emotion/CHANGELOG.md
@@ -0,0 +1,74 @@
+# jest-emotion
+
+## 11.0.0-next.7
+
+### Patch Changes
+
+- Updated dependencies [[`5c55fd17`](https://github.com/emotion-js/emotion/commit/5c55fd17dcaec84d1f5d5d13ae90dd336d7e4403)]:
+ - @emotion/core@11.0.0-next.7
+
+## 11.0.0-next.4
+
+### Major Changes
+
+- [`702f3fd2`](https://github.com/emotion-js/emotion/commit/702f3fd22aab8f3cb09dd547c07b9045ca5c3d9c) [#973](https://github.com/emotion-js/emotion/pull/973) Thanks [@spudly](https://github.com/spudly)! - Added the `T` parameter to the `Matchers` interface in the TypeScript definitions to make this module compatible with `@types/jest@^24.0.20`.
+
+### Patch Changes
+
+- Updated dependencies []:
+ - @emotion/core@11.0.0-next.4
+
+## 11.0.0-next.3
+
+### Patch Changes
+
+- Updated dependencies [[`a085003d`](https://github.com/emotion-js/emotion/commit/a085003d4c8ca284c116668d7217fb747802ed85)]:
+ - @emotion/core@11.0.0-next.3
+
+## 11.0.0-next.1
+
+### Patch Changes
+
+- [`e67a5be9`](https://github.com/emotion-js/emotion/commit/e67a5be9bffaa12f9ae0e366983dced4c3716f84) [#967](https://github.com/emotion-js/emotion/pull/967) Thanks [@Andarist](https://github.com/Andarist)! - Take specificity into account when matching styles
+
+* [`e67a5be9`](https://github.com/emotion-js/emotion/commit/e67a5be9bffaa12f9ae0e366983dced4c3716f84) [#967](https://github.com/emotion-js/emotion/pull/967) Thanks [@Andarist](https://github.com/Andarist)! - Match rules in declarations with component used as a selector
+* Updated dependencies []:
+ - @emotion/core@11.0.0-next.1
+
+## 11.0.0-next.0
+
+### Major Changes
+
+- [`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555) [#1600](https://github.com/emotion-js/emotion/pull/1600) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Ensure packages are major bumped so that pre-release versions of the linked packages are consistent in the major number
+
+### Patch Changes
+
+- Updated dependencies [[`302bdba1`](https://github.com/emotion-js/emotion/commit/302bdba1a6b793484c09edeb668815c5e31ea555)]:
+ - @emotion/core@11.0.0-next.0
+ - emotion@11.0.0-next.0
+
+## 10.0.25
+
+### Patch Changes
+
+- [`858c6e70`](https://github.com/emotion-js/emotion/commit/858c6e70e2aa83d159dba00af16f1e34a6d93fd0) [#1648](https://github.com/emotion-js/emotion/pull/1648) Thanks [@ajs139](https://github.com/ajs139)! - Improve support for Enzyme's shallow rendering.
+
+## 10.0.17
+
+### Patch Changes
+
+- [fa5ffa80](https://github.com/emotion-js/emotion/commit/fa5ffa80890a079a3f333a463284bdb683cc2e0c) [#1477](https://github.com/emotion-js/emotion/pull/1477) Thanks [@liamcmitchell-sc](https://github.com/liamcmitchell-sc)! - Fixed snapshots when using Enzyme serializer and its deep mode in combination with fragments
+ - [c8de890b](https://github.com/emotion-js/emotion/commit/c8de890b5aeeaafdcc5742aab310a61aebd666bf) [#1486](https://github.com/emotion-js/emotion/pull/1486) Thanks [@Andarist](https://github.com/Andarist)! - Fix printing speedy (usually this means production) styles
+ - [66cda641](https://github.com/emotion-js/emotion/commit/66cda64128631790b81e3c9df273a972358ea593) [#1478](https://github.com/emotion-js/emotion/pull/1478) Thanks [@Andarist](https://github.com/Andarist)! - Update Babel dependencies
+
+## 10.0.14
+
+### Patch Changes
+
+- [c0eb604d](https://github.com/emotion-js/emotion/commit/c0eb604d) [#1419](https://github.com/emotion-js/emotion/pull/1419) Thanks [@mitchellhamilton](https://github.com/mitchellhamilton)! - Update build tool
+
+## 10.0.11
+
+### Patch Changes
+
+- [3705706](https://github.com/emotion-js/emotion/commit/3705706) [#1344](https://github.com/emotion-js/emotion/pull/1292) Thanks [@alanctkc](https://github.com/alanctkc)! - Allow jest-emotion matcher to match target by RegExp
diff --git a/removed-packages/jest-emotion/package.json b/removed-packages/jest-emotion/package.json
new file mode 100644
index 000000000..454ceefe2
--- /dev/null
+++ b/removed-packages/jest-emotion/package.json
@@ -0,0 +1,31 @@
+{
+ "name": "jest-emotion",
+ "version": "11.0.0-next.7",
+ "description": "Jest utilities for emotion",
+ "main": "dist/jest-emotion.cjs.js",
+ "types": "types/index.d.ts",
+ "files": [
+ "src",
+ "dist",
+ "serializer.js"
+ ],
+ "scripts": {
+ "test:typescript": "exit 0"
+ },
+ "author": "Kye Hohenberger",
+ "homepage": "https://emotion.sh",
+ "license": "MIT",
+ "repository": "https://github.com/emotion-js/emotion/tree/master/packages/jest-emotion",
+ "keywords": [
+ "styles",
+ "emotion",
+ "react",
+ "css",
+ "css-in-js",
+ "jest",
+ "snapshot"
+ ],
+ "bugs": {
+ "url": "https://github.com/emotion-js/emotion/issues"
+ }
+}
diff --git a/removed-packages/jest-emotion/serializer.js b/removed-packages/jest-emotion/serializer.js
new file mode 100644
index 000000000..2e20b0bf2
--- /dev/null
+++ b/removed-packages/jest-emotion/serializer.js
@@ -0,0 +1,2 @@
+// should we remove this?
+module.exports = require('jest-emotion')
diff --git a/removed-packages/jest-emotion/src/index.js b/removed-packages/jest-emotion/src/index.js
new file mode 100644
index 000000000..474d007c9
--- /dev/null
+++ b/removed-packages/jest-emotion/src/index.js
@@ -0,0 +1,3 @@
+throw new Error(
+ 'The `jest-emotion` package has been renamed to `@emotion/jest`. Please replace any usage of `jest-emotion` with `@emotion/jest`'
+)
diff --git a/packages/styled-base/CHANGELOG.md b/removed-packages/styled-base/CHANGELOG.md
similarity index 100%
rename from packages/styled-base/CHANGELOG.md
rename to removed-packages/styled-base/CHANGELOG.md
diff --git a/packages/styled-base/package.json b/removed-packages/styled-base/package.json
similarity index 100%
rename from packages/styled-base/package.json
rename to removed-packages/styled-base/package.json
diff --git a/packages/styled-base/src/index.js b/removed-packages/styled-base/src/index.js
similarity index 100%
rename from packages/styled-base/src/index.js
rename to removed-packages/styled-base/src/index.js
diff --git a/scripts/babel-tester/package.json b/scripts/babel-tester/package.json
index 8c0900010..35eaacf43 100644
--- a/scripts/babel-tester/package.json
+++ b/scripts/babel-tester/package.json
@@ -4,7 +4,7 @@
"version": "0.4.5",
"private": true,
"scripts": {
- "test:typescript": "exit 0"
+ "test:typescript": "exit 0"
},
"dependencies": {
"@babel/plugin-syntax-class-properties": "^7.2.0",
diff --git a/scripts/benchmarks/.babelrc b/scripts/benchmarks/.babelrc
index 546a3b6ab..8fecfd4cf 100644
--- a/scripts/benchmarks/.babelrc
+++ b/scripts/benchmarks/.babelrc
@@ -7,7 +7,7 @@
"plugins": [
["@babel/plugin-proposal-class-properties", { "loose": false }],
"babel-plugin-react-native-web",
- "babel-plugin-emotion",
+ "@emotion",
"transform-inline-environment-variables"
]
}
diff --git a/scripts/benchmarks/package.json b/scripts/benchmarks/package.json
index 66fe047f4..be04c56bb 100644
--- a/scripts/benchmarks/package.json
+++ b/scripts/benchmarks/package.json
@@ -10,7 +10,7 @@
},
"dependencies": {
"@babel/core": "^7.7.2",
- "babel-plugin-emotion": "^11.0.0-next.8",
+ "@emotion/babel-plugin": "^11.0.0-next.6",
"babel-plugin-react-native-web": "^0.9.6",
"d3-scale-chromatic": "^1.3.0",
"http-server": "^0.11.1",
diff --git a/scripts/benchmarks/src/implementations/emotion-css-func/Box.js b/scripts/benchmarks/src/implementations/emotion-css-func/Box.js
index 3abe880f8..1054a69a7 100644
--- a/scripts/benchmarks/src/implementations/emotion-css-func/Box.js
+++ b/scripts/benchmarks/src/implementations/emotion-css-func/Box.js
@@ -1,5 +1,5 @@
import React from 'react'
-import { css } from 'emotion'
+import { css } from '@emotion/css'
import { viewStyle } from './View'
const Box = ({
diff --git a/scripts/benchmarks/src/implementations/emotion-css-func/Dot.js b/scripts/benchmarks/src/implementations/emotion-css-func/Dot.js
index f6b494c7f..83256812a 100644
--- a/scripts/benchmarks/src/implementations/emotion-css-func/Dot.js
+++ b/scripts/benchmarks/src/implementations/emotion-css-func/Dot.js
@@ -1,5 +1,5 @@
import React from 'react'
-import { css } from 'emotion'
+import { css } from '@emotion/css'
const Dot = ({ size, x, y, children, color }) => (
{
diff --git a/scripts/benchmarks/src/implementations/emotion-css-prop/Box.js b/scripts/benchmarks/src/implementations/emotion-css-prop/Box.js
index 8c3fad6e3..7bdf103e3 100644
--- a/scripts/benchmarks/src/implementations/emotion-css-prop/Box.js
+++ b/scripts/benchmarks/src/implementations/emotion-css-prop/Box.js
@@ -1,6 +1,6 @@
/** @jsx jsx */
import { viewStyle } from './View'
-import { css, jsx } from '@emotion/core'
+import { css, jsx } from '@emotion/react'
const Box = ({
color,
diff --git a/scripts/benchmarks/src/implementations/emotion-css-prop/Dot.js b/scripts/benchmarks/src/implementations/emotion-css-prop/Dot.js
index e3ddc8a31..e525cd169 100644
--- a/scripts/benchmarks/src/implementations/emotion-css-prop/Dot.js
+++ b/scripts/benchmarks/src/implementations/emotion-css-prop/Dot.js
@@ -1,5 +1,5 @@
/** @jsx jsx */
-import { css, jsx } from '@emotion/core'
+import { css, jsx } from '@emotion/react'
const Dot = ({ size, x, y, children, color }) => (
{
return
diff --git a/scripts/benchmarks/src/implementations/emotion-styled/Dot.js b/scripts/benchmarks/src/implementations/emotion-styled/Dot.js
index e88cd06e3..9c6d0bfa5 100644
--- a/scripts/benchmarks/src/implementations/emotion-styled/Dot.js
+++ b/scripts/benchmarks/src/implementations/emotion-styled/Dot.js
@@ -1,5 +1,5 @@
import styled from '@emotion/styled'
-import { css } from '@emotion/core'
+import { css } from '@emotion/react'
import View from './View'
const Dot = styled(View)`
diff --git a/scripts/benchmarks/src/implementations/emotion-styled/Provider.js b/scripts/benchmarks/src/implementations/emotion-styled/Provider.js
index 9fc0e6301..37fd16263 100644
--- a/scripts/benchmarks/src/implementations/emotion-styled/Provider.js
+++ b/scripts/benchmarks/src/implementations/emotion-styled/Provider.js
@@ -1,6 +1,6 @@
// @flow
import * as React from 'react'
-import { CacheProvider } from '@emotion/core'
+import { CacheProvider } from '@emotion/react'
import createCache from '@emotion/cache'
let cache = createCache()
diff --git a/scripts/ssr-benchmarks/basic.js b/scripts/ssr-benchmarks/basic.js
index 9c144f963..0d4127ab7 100644
--- a/scripts/ssr-benchmarks/basic.js
+++ b/scripts/ssr-benchmarks/basic.js
@@ -1,6 +1,6 @@
process.env.NODE_ENV = 'production'
let React = require('react')
-let { jsx, css } = require('@emotion/core')
+let { jsx, css } = require('@emotion/react')
let { renderToString } = require('react-dom/server')
let { createTriangle } = require('./triangle')
diff --git a/scripts/ssr-benchmarks/bench.js b/scripts/ssr-benchmarks/bench.js
index 8eef76f9f..38fa20180 100644
--- a/scripts/ssr-benchmarks/bench.js
+++ b/scripts/ssr-benchmarks/bench.js
@@ -2,10 +2,10 @@ let React = require('react')
let styled = require('@emotion/styled').default
let { renderToString } = require('react-dom/server')
let Benchmark = require('benchmark')
-let { jsx, css, CacheProvider } = require('@emotion/core')
+let { jsx, css, CacheProvider } = require('@emotion/react')
let { createTriangle } = require('./triangle')
-let { css: cssClassName } = require('emotion')
-let { renderStylesToString } = require('emotion-server')
+let { css: cssClassName } = require('@emotion/css')
+let { renderStylesToString } = require('@emotion/server')
let createEmotionServer = require('create-emotion-server').default
let createCache = require('@emotion/cache').default
let { insertStyles } = require('@emotion/utils')
diff --git a/scripts/test-utils/legacy-env.js b/scripts/test-utils/legacy-env.js
index 52c7a1921..4e1673e7c 100644
--- a/scripts/test-utils/legacy-env.js
+++ b/scripts/test-utils/legacy-env.js
@@ -1,6 +1,6 @@
// @flow
/* eslint-env jest */
import 'test-utils/enzyme-env'
-import serializer from 'jest-emotion/enzyme'
+import serializer from '@emotion/jest/enzyme'
expect.addSnapshotSerializer(serializer)
diff --git a/scripts/test-utils/next-env.js b/scripts/test-utils/next-env.js
index cabca803c..249fd0134 100644
--- a/scripts/test-utils/next-env.js
+++ b/scripts/test-utils/next-env.js
@@ -1,5 +1,5 @@
// @flow
/* eslint-env jest */
-import serializer from 'jest-emotion'
+import serializer from '@emotion/jest'
expect.addSnapshotSerializer(serializer)
diff --git a/site/README.md b/site/README.md
index 4ddc018da..2e0b4e7c5 100644
--- a/site/README.md
+++ b/site/README.md
@@ -5,14 +5,14 @@
All of the docs live in the `docs` in the root of this repository. They are in [Markdown](https://daringfireball.net/projects/markdown/basics) and they should include the following frontmatter at the top of each file that specifies the title for the page.
```yaml
+title: 'Some Title'
---
-title: "Some Title"
----
+
```
### Code Blocks
-When the langauge is `jsx live` the code block will have a preview next to it and all of emotion and react-emotion's exports are available along with a `render` function that accepts a react element and will render into the preview next to it.
+When the langauge is `jsx` and the the code block has a `// @live` comment, it will have a preview next to it. Most of the Emotion packages can be imported and there is a `render` function that accepts a react element and will render into the preview next to it.
```md
\`\`\`jsx
diff --git a/site/plugins/gatsby-plugin-emotion-next-compat/gatsby-browser.js b/site/plugins/gatsby-plugin-emotion-next-compat/gatsby-browser.js
index 0368ded82..ceb042c3b 100644
--- a/site/plugins/gatsby-plugin-emotion-next-compat/gatsby-browser.js
+++ b/site/plugins/gatsby-plugin-emotion-next-compat/gatsby-browser.js
@@ -1,7 +1,7 @@
// @flow
import * as React from 'react'
-import { cache } from 'emotion'
-import { CacheProvider } from '@emotion/core'
+import { cache } from '@emotion/css'
+import { CacheProvider } from '@emotion/react'
export const wrapRootElement = ({ element }: { element: React.Node }) => {
return {element}
diff --git a/site/plugins/gatsby-plugin-emotion-next-compat/gatsby-ssr.js b/site/plugins/gatsby-plugin-emotion-next-compat/gatsby-ssr.js
index c5ba2402b..8329fb253 100644
--- a/site/plugins/gatsby-plugin-emotion-next-compat/gatsby-ssr.js
+++ b/site/plugins/gatsby-plugin-emotion-next-compat/gatsby-ssr.js
@@ -1,9 +1,9 @@
// @flow
import * as React from 'react'
import { renderToString } from 'react-dom/server'
-import { extractCritical } from 'emotion-server'
-import { cache } from 'emotion'
-import { CacheProvider } from '@emotion/core'
+import { extractCritical } from '@emotion/server'
+import { cache } from '@emotion/css'
+import { CacheProvider } from '@emotion/react'
export const replaceRenderer = ({
replaceBodyHTMLString,
diff --git a/site/plugins/gatsby-remark-live-code/index.js b/site/plugins/gatsby-remark-live-code/index.js
index 758cecc22..61618d82c 100644
--- a/site/plugins/gatsby-remark-live-code/index.js
+++ b/site/plugins/gatsby-remark-live-code/index.js
@@ -4,7 +4,7 @@ const Babel = require('@babel/standalone')
const babelPresetEnv = require('@babel/preset-env').default
const babelPresetReact = require('@babel/preset-react').default
-const babelPluginEmotion = require('babel-plugin-emotion').default
+const babelPluginEmotion = require('@emotion/babel-plugin').default
let livePattern = /^\s*\/\/ @live/
diff --git a/site/src/.eslintrc.js b/site/src/.eslintrc.js
index 49bc04713..253d385c9 100644
--- a/site/src/.eslintrc.js
+++ b/site/src/.eslintrc.js
@@ -1,8 +1,8 @@
module.exports = {
- plugins: ['emotion'],
+ plugins: ['@emotion'],
rules: {
'no-undef': 0,
'no-console': 2,
- 'emotion/jsx-import': 2
+ '@emotion/jsx-import': 2
}
}
diff --git a/site/src/components/DocWrapper.js b/site/src/components/DocWrapper.js
index fbe958b04..b92ea69f1 100644
--- a/site/src/components/DocWrapper.js
+++ b/site/src/components/DocWrapper.js
@@ -1,8 +1,8 @@
// @flow
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import * as React from 'react'
-import { keyframes, cx } from 'emotion'
+import { keyframes, cx } from '@emotion/css'
import { Match } from '@reach/router'
import { Link } from 'gatsby'
import MenuIcon from 'react-icons/lib/md/menu'
diff --git a/site/src/components/Link.js b/site/src/components/Link.js
index 5d034fec4..df20b85d0 100644
--- a/site/src/components/Link.js
+++ b/site/src/components/Link.js
@@ -1,6 +1,6 @@
// @flow
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import { Link } from 'gatsby'
import { constants } from 'styled-system'
import { colors } from '../utils/style'
diff --git a/site/src/components/Playground.js b/site/src/components/Playground.js
index ef58c6326..580692d2c 100644
--- a/site/src/components/Playground.js
+++ b/site/src/components/Playground.js
@@ -1,6 +1,6 @@
// @flow
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import { Component } from 'react'
import styled from '@emotion/styled'
import { StaticQuery, graphql } from 'gatsby'
@@ -17,20 +17,18 @@ export const scope = {
},
require(moduleName: string) {
switch (moduleName) {
- case 'emotion':
- return require('emotion')
+ case '@emotion/css':
+ return require('@emotion/css')
case '@emotion/cache':
return require('@emotion/cache')
- case '@emotion/core':
- return require('@emotion/core')
+ case '@emotion/react':
+ return require('@emotion/react')
case '@emotion/styled':
return require('@emotion/styled')
case '@emotion/styled/base':
return require('@emotion/styled/base')
case '@emotion/is-prop-valid':
return require('@emotion/is-prop-valid')
- case 'emotion-theming':
- return require('emotion-theming')
case 'facepaint':
return require('facepaint')
default:
diff --git a/site/src/components/Search.js b/site/src/components/Search.js
index e4523c262..526f82c55 100644
--- a/site/src/components/Search.js
+++ b/site/src/components/Search.js
@@ -1,6 +1,6 @@
// @flow
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import React from 'react'
import { navigate } from '@reach/router'
import { algoliaStyles } from '../utils/algolia-styles'
diff --git a/site/src/components/SiteHeader.js b/site/src/components/SiteHeader.js
index 1d0372243..95e100ba9 100644
--- a/site/src/components/SiteHeader.js
+++ b/site/src/components/SiteHeader.js
@@ -1,6 +1,6 @@
// @flow
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import '../utils/make-prism-manual'
import { Match } from '@reach/router'
diff --git a/site/src/components/live/worker.js b/site/src/components/live/worker.js
index 8bc36762a..d4d15d52b 100644
--- a/site/src/components/live/worker.js
+++ b/site/src/components/live/worker.js
@@ -4,7 +4,7 @@ importScripts('https://unpkg.com/@babel/standalone@7.7.3/babel.min.js')
const babelPresetEnv = require('@babel/preset-env').default
const babelPresetReact = require('@babel/preset-react').default
-const babelPluginEmotion = require('babel-plugin-emotion').default
+const babelPluginEmotion = require('@emotion/babel-plugin').default
global.window = global
diff --git a/site/src/layouts/index.js b/site/src/layouts/index.js
index 9a95cacb8..17660e334 100644
--- a/site/src/layouts/index.js
+++ b/site/src/layouts/index.js
@@ -1,13 +1,13 @@
// @flow
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import '../utils/make-prism-manual'
import globalStyles from '../utils/global'
import * as React from 'react'
import Helmet from 'react-helmet'
import SiteHeader from '../components/SiteHeader'
import { constants, mq } from '../utils/style'
-import { Global } from '@emotion/core'
+import { Global } from '@emotion/react'
const TemplateWrapper = ({
children,
diff --git a/site/src/pages/community.js b/site/src/pages/community.js
index d57cf1cb6..510db8bae 100644
--- a/site/src/pages/community.js
+++ b/site/src/pages/community.js
@@ -1,6 +1,6 @@
// @flow
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import { graphql } from 'gatsby'
import Layout from '../layouts'
import * as markdownComponents from '../utils/markdown-styles'
diff --git a/site/src/templates/doc.js b/site/src/templates/doc.js
index e706bc02b..03bb389ff 100644
--- a/site/src/templates/doc.js
+++ b/site/src/templates/doc.js
@@ -1,6 +1,6 @@
// @flow
/** @jsx jsx */
-import { jsx } from '@emotion/core'
+import { jsx } from '@emotion/react'
import React from 'react'
import { mq, colors } from '../utils/style'
import Playground from '../components/Playground'
diff --git a/site/src/utils/algolia-styles.js b/site/src/utils/algolia-styles.js
index 9837d98f4..1b9c5649a 100644
--- a/site/src/utils/algolia-styles.js
+++ b/site/src/utils/algolia-styles.js
@@ -1,5 +1,5 @@
// @flow
-import { css } from '@emotion/core'
+import { css } from '@emotion/react'
import { colors } from '../utils/style'
const headingBackground = colors.hightlight
diff --git a/site/src/utils/global.js b/site/src/utils/global.js
index 3159a1537..d6ea821ba 100644
--- a/site/src/utils/global.js
+++ b/site/src/utils/global.js
@@ -1,4 +1,4 @@
-import { css } from '@emotion/core'
+import { css } from '@emotion/react'
import { mq, fonts } from './style'
import prismStyles from 'react-live/lib/constants/css.js'
import draculaStyles from './dracula-prism'
diff --git a/site/src/utils/markdown-styles.js b/site/src/utils/markdown-styles.js
index a5c839b54..65cb2b546 100644
--- a/site/src/utils/markdown-styles.js
+++ b/site/src/utils/markdown-styles.js
@@ -1,6 +1,6 @@
// @flow
/** @jsx jsx */
-import { jsx, css } from '@emotion/core'
+import { jsx, css } from '@emotion/react'
import styled from '@emotion/styled'
import { mq, colors, constants, animatedUnderline } from './style'
diff --git a/site/src/utils/style.js b/site/src/utils/style.js
index 3e33bab7c..85cc8ad22 100644
--- a/site/src/utils/style.js
+++ b/site/src/utils/style.js
@@ -1,5 +1,5 @@
// @flow
-import { css } from '@emotion/core'
+import { css } from '@emotion/react'
import facepaint from 'facepaint'
import { util, constants } from 'styled-system'
import darken from 'polished/lib/color/darken'
diff --git a/site/src/utils/transform.js b/site/src/utils/transform.js
index 43c5fabbf..b07469b69 100644
--- a/site/src/utils/transform.js
+++ b/site/src/utils/transform.js
@@ -1,11 +1,11 @@
/* global Babel */
-import babelPluginEmotion from 'babel-plugin-emotion'
+import babelPluginEmotion from '@emotion/babel-plugin'
-Babel.registerPlugin('babel-plugin-emotion', babelPluginEmotion)
+Babel.registerPlugin('@emotion/babel-plugin', babelPluginEmotion)
const options = {
presets: ['es2015', 'react', 'stage-1'],
- plugins: ['babel-plugin-emotion']
+ plugins: ['@emotion/babel-plugin']
}
module.exports = {
transform(code) {
diff --git a/site/transform.js b/site/transform.js
deleted file mode 100644
index 7cd8b738e..000000000
--- a/site/transform.js
+++ /dev/null
@@ -1,45 +0,0 @@
-// Press ctrl+space for code completion
-export default function transformer(file, api) {
- const j = api.jscodeshift
- let reactEmotionImportSource = 'react-emotion'
- let emotionImportSource = 'emotion'
- // change this to @emotion/styled.macro if you want to use that
- let newStyledImportSource = '@emotion/styled.macro'
-
- let quote = 'single'
-
- return j(file.source)
- .find(j.ImportDeclaration, {
- source: { value: reactEmotionImportSource }
- })
- .forEach(path => {
- if (path.value.source.raw.charAt(0) === '"') {
- quote = 'double'
- }
- if (
- path.value.specifiers.length === 1 &&
- path.value.specifiers[0].type === 'ImportDefaultSpecifier'
- ) {
- path.value.source.value = newStyledImportSource
- } else {
- let defaultImportSpecifierIndex = path.value.specifiers.findIndex(
- val => val.type === 'ImportDefaultSpecifier'
- )
- path.value.source.value = emotionImportSource
-
- if (defaultImportSpecifierIndex !== -1) {
- let index = path.parentPath.value.indexOf(path.value)
- path.parentPath.value.splice(
- index,
- 0,
- j.importDeclaration(
- [path.value.specifiers[defaultImportSpecifierIndex]],
- j.literal(newStyledImportSource)
- )
- )
- path.value.specifiers.splice(defaultImportSpecifierIndex, 1)
- }
- }
- })
- .toSource({ quote })
-}
diff --git a/yarn.lock b/yarn.lock
index aa409b6dc..38d87e538 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -9,13 +9,6 @@
dependencies:
"@babel/highlight" "^7.0.0"
-"@babel/code-frame@7.0.0-beta.44":
- version "7.0.0-beta.44"
- resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.0.0-beta.44.tgz#2a02643368de80916162be70865c97774f3adbd9"
- integrity sha512-cuAuTTIQ9RqcFRJ/Y8PvTh+paepNcaGxwQwjIDRWPXmzzyAeCO4KqS9ikMvq0MCbRk6GlYKwfzStrcP3/jSL8g==
- dependencies:
- "@babel/highlight" "7.0.0-beta.44"
-
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.0.0-beta.35", "@babel/code-frame@^7.5.5":
version "7.5.5"
resolved "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.5.5.tgz#bc0782f6d69f7b7d49531219699b988f669a8f9d"
@@ -103,17 +96,6 @@
semver "^5.4.1"
source-map "^0.5.0"
-"@babel/generator@7.0.0-beta.44":
- version "7.0.0-beta.44"
- resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.0.0-beta.44.tgz#c7e67b9b5284afcf69b309b50d7d37f3e5033d42"
- integrity sha512-5xVb7hlhjGcdkKpMXgicAVgx8syK5VJz193k0i/0sLP6DzE6lRrU1K3B/rFefgdo9LPGMAOOOAWW4jycj07ShQ==
- dependencies:
- "@babel/types" "7.0.0-beta.44"
- jsesc "^2.5.1"
- lodash "^4.2.0"
- source-map "^0.5.0"
- trim-right "^1.0.1"
-
"@babel/generator@^7.0.0", "@babel/generator@^7.3.4", "@babel/generator@^7.4.0", "@babel/generator@^7.5.5":
version "7.5.5"
resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.5.5.tgz#873a7f936a3c89491b43536d12245b626664e3cf"
@@ -322,15 +304,6 @@
"@babel/traverse" "^7.7.4"
"@babel/types" "^7.7.4"
-"@babel/helper-function-name@7.0.0-beta.44":
- version "7.0.0-beta.44"
- resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.0.0-beta.44.tgz#e18552aaae2231100a6e485e03854bc3532d44dd"
- integrity sha512-MHRG2qZMKMFaBavX0LWpfZ2e+hLloT++N7rfM3DYOMUOGCD8cVjqZpwiL8a0bOX3IYcQev1ruciT0gdFFRTxzg==
- dependencies:
- "@babel/helper-get-function-arity" "7.0.0-beta.44"
- "@babel/template" "7.0.0-beta.44"
- "@babel/types" "7.0.0-beta.44"
-
"@babel/helper-function-name@^7.1.0":
version "7.1.0"
resolved "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.1.0.tgz#a0ceb01685f73355d4360c1247f582bfafc8ff53"
@@ -358,13 +331,6 @@
"@babel/template" "^7.7.4"
"@babel/types" "^7.7.4"
-"@babel/helper-get-function-arity@7.0.0-beta.44":
- version "7.0.0-beta.44"
- resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0-beta.44.tgz#d03ca6dd2b9f7b0b1e6b32c56c72836140db3a15"
- integrity sha512-w0YjWVwrM2HwP6/H3sEgrSQdkCaxppqFeJtAnB23pRiJB5E/O9Yp7JAAeWBl+gGEgmBFinnTyOv2RN7rcSmMiw==
- dependencies:
- "@babel/types" "7.0.0-beta.44"
-
"@babel/helper-get-function-arity@^7.0.0":
version "7.0.0"
resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.0.0.tgz#83572d4320e2a4657263734113c42868b64e49c3"
@@ -605,13 +571,6 @@
"@babel/template" "^7.7.4"
"@babel/types" "^7.7.4"
-"@babel/helper-split-export-declaration@7.0.0-beta.44":
- version "7.0.0-beta.44"
- resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.0.0-beta.44.tgz#c0b351735e0fbcb3822c8ad8db4e583b05ebd9dc"
- integrity sha512-aQ7QowtkgKKzPGf0j6u77kBMdUFVBKNHw2p/3HX/POt5/oz8ec5cs0GwlgM8Hz7ui5EwJnzyfRmkNF1Nx1N7aA==
- dependencies:
- "@babel/types" "7.0.0-beta.44"
-
"@babel/helper-split-export-declaration@^7.0.0", "@babel/helper-split-export-declaration@^7.4.4":
version "7.4.4"
resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677"
@@ -690,15 +649,6 @@
"@babel/traverse" "^7.7.4"
"@babel/types" "^7.7.4"
-"@babel/highlight@7.0.0-beta.44":
- version "7.0.0-beta.44"
- resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.0.0-beta.44.tgz#18c94ce543916a80553edcdcf681890b200747d5"
- integrity sha512-Il19yJvy7vMFm8AVAh6OZzaFoAd0hbkeMZiX3P5HGD+z7dyI7RzndHB0dg6Urh/VAFfHtpOIzDUSxmY6coyZWQ==
- dependencies:
- chalk "^2.0.0"
- esutils "^2.0.2"
- js-tokens "^3.0.0"
-
"@babel/highlight@^7.0.0":
version "7.5.0"
resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.5.0.tgz#56d11312bd9248fa619591d02472be6e8cb32540"
@@ -2073,16 +2023,6 @@
resolved "https://registry.yarnpkg.com/@babel/standalone/-/standalone-7.7.3.tgz#9a4f7fc64876b11398e7371665969ccfdb0c9806"
integrity sha512-tVwxALbq7HGudHD0oZ6SQPkWM2L/Snw1vcbrtirDTqZsgswZ9xyuOOsSplqGtyazCCt9fidbymM47ZfYjASscg==
-"@babel/template@7.0.0-beta.44":
- version "7.0.0-beta.44"
- resolved "https://registry.npmjs.org/@babel/template/-/template-7.0.0-beta.44.tgz#f8832f4fdcee5d59bf515e595fc5106c529b394f"
- integrity sha512-w750Sloq0UNifLx1rUqwfbnC6uSUk0mfwwgGRfdLiaUzfAOiH0tHJE6ILQIUi3KYkjiCDTskoIsnfqZvWLBDng==
- dependencies:
- "@babel/code-frame" "7.0.0-beta.44"
- "@babel/types" "7.0.0-beta.44"
- babylon "7.0.0-beta.44"
- lodash "^4.2.0"
-
"@babel/template@^7.0.0", "@babel/template@^7.1.0", "@babel/template@^7.2.2", "@babel/template@^7.4.0", "@babel/template@^7.4.4":
version "7.4.4"
resolved "https://registry.npmjs.org/@babel/template/-/template-7.4.4.tgz#f4b88d1225689a08f5bc3a17483545be9e4ed237"
@@ -2119,22 +2059,6 @@
"@babel/parser" "^7.7.4"
"@babel/types" "^7.7.4"
-"@babel/traverse@7.0.0-beta.44":
- version "7.0.0-beta.44"
- resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.0.0-beta.44.tgz#a970a2c45477ad18017e2e465a0606feee0d2966"
- integrity sha512-UHuDz8ukQkJCDASKHf+oDt3FVUzFd+QYfuBIsiNu/4+/ix6pP/C+uQZJ6K1oEfbCMv/IKWbgDEh7fcsnIE5AtA==
- dependencies:
- "@babel/code-frame" "7.0.0-beta.44"
- "@babel/generator" "7.0.0-beta.44"
- "@babel/helper-function-name" "7.0.0-beta.44"
- "@babel/helper-split-export-declaration" "7.0.0-beta.44"
- "@babel/types" "7.0.0-beta.44"
- babylon "7.0.0-beta.44"
- debug "^3.1.0"
- globals "^11.1.0"
- invariant "^2.2.0"
- lodash "^4.2.0"
-
"@babel/traverse@^7.0.0", "@babel/traverse@^7.1.0", "@babel/traverse@^7.3.4", "@babel/traverse@^7.4.3", "@babel/traverse@^7.4.4", "@babel/traverse@^7.5.5":
version "7.5.5"
resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.5.5.tgz#f664f8f368ed32988cd648da9f72d5ca70f165bb"
@@ -2195,15 +2119,6 @@
globals "^11.1.0"
lodash "^4.17.13"
-"@babel/types@7.0.0-beta.44":
- version "7.0.0-beta.44"
- resolved "https://registry.npmjs.org/@babel/types/-/types-7.0.0-beta.44.tgz#6b1b164591f77dec0a0342aca995f2d046b3a757"
- integrity sha512-5eTV4WRmqbaFM3v9gHAIljEQJU4Ssc6fxL61JN+Oe2ga/BwyjzjamwkCVVAQjHGuAX8i0BWo42dshL8eO5KfLQ==
- dependencies:
- esutils "^2.0.2"
- lodash "^4.2.0"
- to-fast-properties "^2.0.0"
-
"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.2.2", "@babel/types@^7.3.0", "@babel/types@^7.3.4", "@babel/types@^7.4.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5":
version "7.5.5"
resolved "https://registry.npmjs.org/@babel/types/-/types-7.5.5.tgz#97b9f728e182785909aa4ab56264f090a028d18a"
@@ -3124,10 +3039,10 @@
string-width "^2.0.0"
strip-ansi "^3"
-"@preconstruct/cli@^1.1.1":
- version "1.1.1"
- resolved "https://registry.yarnpkg.com/@preconstruct/cli/-/cli-1.1.1.tgz#3445c47c9c278eb1ebdb6eb2040d7f8943f668ae"
- integrity sha512-a7rhjZSe6VxAGnWidJe0ncBZiRwRmJwo6b+Je2lVPeztfOcg2wzoCmwm8u4xrAXW57Jo8qMW2fMstRTWmFMEnA==
+"@preconstruct/cli@^1.1.3":
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/@preconstruct/cli/-/cli-1.1.3.tgz#e63636960d3c557ee39a25dd0d8073deb41096ed"
+ integrity sha512-014JDYyE9o+xv2pgc3yft4VF4CNw+F0gq3BvVzLx0Ml856jZjpBF5BSe8e6mgLe6in5hXnxugeLFVR/lup41ag==
dependencies:
"@babel/code-frame" "^7.5.5"
"@babel/core" "^7.6.4"
@@ -3151,6 +3066,7 @@
npm-packlist "^1.4.6"
p-limit "^2.2.1"
parse-glob "^3.0.4"
+ parse-json "^5.0.0"
quick-lru "^4.0.1"
resolve "^1.12.0"
resolve-from "^5.0.0"
@@ -4737,17 +4653,17 @@ babel-eslint@7.2.3:
babel-types "^6.23.0"
babylon "^6.17.0"
-babel-eslint@^8.2.3:
- version "8.2.6"
- resolved "https://registry.npmjs.org/babel-eslint/-/babel-eslint-8.2.6.tgz#6270d0c73205628067c0f7ae1693a9e797acefd9"
- integrity sha512-aCdHjhzcILdP8c9lej7hvXKvQieyRt20SF102SIGyY4cUIiw6UaAtK4j2o3dXX74jEmy0TJ0CEhv4fTIM3SzcA==
+babel-eslint@^10.0.3:
+ version "10.0.3"
+ resolved "https://registry.yarnpkg.com/babel-eslint/-/babel-eslint-10.0.3.tgz#81a2c669be0f205e19462fed2482d33e4687a88a"
+ integrity sha512-z3U7eMY6r/3f3/JB9mTsLjyxrv0Yb1zb8PCWCLpguxfCzBIZUwy23R1t/XKewP+8mEN2Ck8Dtr4q20z6ce6SoA==
dependencies:
- "@babel/code-frame" "7.0.0-beta.44"
- "@babel/traverse" "7.0.0-beta.44"
- "@babel/types" "7.0.0-beta.44"
- babylon "7.0.0-beta.44"
- eslint-scope "3.7.1"
+ "@babel/code-frame" "^7.0.0"
+ "@babel/parser" "^7.0.0"
+ "@babel/traverse" "^7.0.0"
+ "@babel/types" "^7.0.0"
eslint-visitor-keys "^1.0.0"
+ resolve "^1.12.0"
babel-eslint@^9.0.0:
version "9.0.0"
@@ -5858,11 +5774,6 @@ babylon-walk@^1.0.2:
babel-types "^6.15.0"
lodash.clone "^4.5.0"
-babylon@7.0.0-beta.44:
- version "7.0.0-beta.44"
- resolved "https://registry.npmjs.org/babylon/-/babylon-7.0.0-beta.44.tgz#89159e15e6e30c5096e22d738d8c0af8a0e8ca1d"
- integrity sha512-5Hlm13BJVAioCHpImtFqNOF2H3ieTOHd0fmFGMxOJ9jgeFqeAwsv3u5P5cR7CSeFrkgHsT19DgFJkHV0/Mcd8g==
-
babylon@^6.17.0, babylon@^6.18.0:
version "6.18.0"
resolved "https://registry.npmjs.org/babylon/-/babylon-6.18.0.tgz#af2f3b88fa6f5c1e4c634d1a0f8eac4f55b395e3"
@@ -9877,10 +9788,10 @@ eslint@^5.6.0:
table "^5.2.3"
text-table "^0.2.0"
-eslint@^6.7.1:
- version "6.7.1"
- resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.7.1.tgz#269ccccec3ef60ab32358a44d147ac209154b919"
- integrity sha512-UWzBS79pNcsDSxgxbdjkmzn/B6BhsXMfUaOHnNwyE8nD+Q6pyT96ow2MccVayUTV4yMid4qLhMiQaywctRkBLA==
+eslint@^6.7.2:
+ version "6.7.2"
+ resolved "https://registry.yarnpkg.com/eslint/-/eslint-6.7.2.tgz#c17707ca4ad7b2d8af986a33feba71e18a9fecd1"
+ integrity sha512-qMlSWJaCSxDFr8fBPvJM9kJwbazrhNcBU3+DszDW1OlEwKBBRWsJc7NJFelvwQpanHCR14cOLD41x8Eqvo3Nng==
dependencies:
"@babel/code-frame" "^7.0.0"
ajv "^6.10.0"
@@ -10194,7 +10105,7 @@ expand-template@^2.0.3:
resolved "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz#6e14b3fcee0f3a6340ecb57d2e8918692052a47c"
integrity sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==
-expand-tilde@^2.0.0, expand-tilde@^2.0.2:
+expand-tilde@^2.0.0:
version "2.0.2"
resolved "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz#97e801aa052df02454de46b02bf621642cdc8502"
integrity sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=
@@ -11953,12 +11864,6 @@ global-prefix@^1.0.1:
version "1.0.2"
resolved "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz#dbf743c6c14992593c655568cb66ed32c0122ebe"
integrity sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=
- dependencies:
- expand-tilde "^2.0.2"
- homedir-polyfill "^1.0.1"
- ini "^1.3.4"
- is-windows "^1.0.1"
- which "^1.2.14"
global@^4.3.0:
version "4.4.0"
@@ -15368,16 +15273,16 @@ js-levenshtein@^1.1.3:
resolved "https://registry.npmjs.org/js-levenshtein/-/js-levenshtein-1.1.6.tgz#c6cee58eb3550372df8deb85fad5ce66ce01d59d"
integrity sha512-X2BB11YZtrRqY4EnQcLX5Rh373zbK4alC1FW7D7MBhL2gtcC17cTnr6DmfHZeS0s2rTHjUTMMHfG7gO8SSdw+g==
-js-tokens@^3.0.0, js-tokens@^3.0.2:
- version "3.0.2"
- resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
- integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=
-
"js-tokens@^3.0.0 || ^4.0.0", js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
+js-tokens@^3.0.2:
+ version "3.0.2"
+ resolved "https://registry.npmjs.org/js-tokens/-/js-tokens-3.0.2.tgz#9866df395102130e38f7f996bceb65443209c25b"
+ integrity sha1-mGbfOVECEw449/mWvOtlRDIJwls=
+
js-yaml@^3.10.0, js-yaml@^3.11.0, js-yaml@^3.13.0, js-yaml@^3.13.1, js-yaml@^3.4.3, js-yaml@^3.5.2, js-yaml@^3.7.0, js-yaml@^3.9.1:
version "3.13.1"
resolved "https://registry.npmjs.org/js-yaml/-/js-yaml-3.13.1.tgz#aff151b30bfdfa8e49e05da22e7415e9dfa37847"
@@ -16354,7 +16259,7 @@ lodash.without@~4.4.0:
resolved "https://registry.npmjs.org/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac"
integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw=
-"lodash@>=3.5 <5", lodash@^4.11.1, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.2.0, lodash@^4.3.0, lodash@^4.6.1:
+"lodash@>=3.5 <5", lodash@^4.11.1, lodash@^4.13.1, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12, lodash@^4.17.13, lodash@^4.17.14, lodash@^4.17.15, lodash@^4.17.2, lodash@^4.17.3, lodash@^4.17.4, lodash@^4.17.5, lodash@^4.3.0, lodash@^4.6.1:
version "4.17.15"
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz#b447f6670a0455bbfeedd11392eff330ea097548"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
@@ -25762,7 +25667,7 @@ which-pm-runs@^1.0.0:
resolved "https://registry.npmjs.org/which-pm-runs/-/which-pm-runs-1.0.0.tgz#670b3afbc552e0b55df6b7780ca74615f23ad1cb"
integrity sha1-Zws6+8VS4LVd9rd4DKdGFfI60cs=
-which@1, which@^1.2.10, which@^1.2.12, which@^1.2.14, which@^1.2.9, which@^1.3.0, which@^1.3.1:
+which@1, which@^1.2.10, which@^1.2.12, which@^1.2.9, which@^1.3.0, which@^1.3.1:
version "1.3.1"
resolved "https://registry.npmjs.org/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a"
integrity sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==