Skip to content

breaking(gatsby-plugin-emotion): update to emotion@11 #27981

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Nov 23, 2020
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
c873c8b
chore(gatsby-plugin-emotion): upgrade packages
theskillwithin Nov 12, 2020
535419e
chore(gatsby-plugin-emotion): update documentation for emotion/core t…
theskillwithin Nov 12, 2020
5abd298
fix(gatsby-plugin-emotion): fix spelling typo
theskillwithin Nov 12, 2020
ee04ff1
fix(gatsby-plugin-emotion): add @emotion/react as peer dep
theskillwithin Nov 12, 2020
91dd936
fix(gatsby-plugin-emotion): remove @emotion/core as peer dep
theskillwithin Nov 12, 2020
b1c0e49
fix(gatsby-plugin-emotion): only update what is needed for emotion 11
theskillwithin Nov 14, 2020
7ea08ee
docs(gatsby-plugin-emotion): update emotionjs examples for emotion v11
theskillwithin Nov 14, 2020
be8533f
Update index.md
jHards Nov 15, 2020
3a527fe
update gatsby docs and packages references to reflect breaking changes
kimbaudi Nov 15, 2020
b15a5ba
Merge pull request #1 from kimbaudi/master
jHards Nov 16, 2020
676646c
revert changes to gatsby-admin packages due to circleci build error
kimbaudi Nov 16, 2020
9e23f1f
run prettier on gatsby-plugin-emotion README
kimbaudi Nov 16, 2020
22f34f5
update gatsby-admin package to emotion v11
kimbaudi Nov 16, 2020
fcc1422
Merge branch 'master' into master
kimbaudi Nov 16, 2020
1e82111
set autoLabel to `dev-only`
kimbaudi Nov 16, 2020
3593098
Merge branch 'master' into master
kimbaudi Nov 17, 2020
74fd7da
revert @babel/runtime version back to 7.11.2
kimbaudi Nov 17, 2020
86058b7
Merge pull request #2 from gatsbyjs/master
theskillwithin Nov 20, 2020
37d91b1
update emotion and emotion-server to v11
kimbaudi Nov 21, 2020
c1f24cd
update @emotion/core to @emotion/react in create-gatsby package
kimbaudi Nov 21, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/gatsby-plugin-emotion/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ guide](https://emotion.sh/docs/migrating-to-emotion-10#incremental-migration) fo
## Install

```shell
npm install gatsby-plugin-emotion @emotion/core @emotion/styled
npm install gatsby-plugin-emotion @emotion/styled @emotion/react
```

## How to use
Expand Down Expand Up @@ -46,4 +46,4 @@ The plugin supports the same options that you can pass into [`babel-plugin-emoti
| sourceMap | boolean | Tells the plugin to inject source maps for use in browser dev tools in development. | `true` | |
| autoLabel | boolean | Automatically adds the label property to styles so that class names generated by css or styled include the name of the variable the result is assigned to. You can read more about this option in [`babel-plugin-emotion`'s docs](https://emotion.sh/docs/babel-plugin-emotion#autolabel) | `process.env.NODE_ENV !== 'production'` | |
| labelFormat | string | Only works when `autoLabel` is set to true. It allows you to define the format of the resulting label. The format is defined via string where variable parts are enclosed in square brackets []. For example `labelFormat: "my-classname--[local]"`, where `[local]` will be replaced with the name of the variable the result is assigned to. | "[local]" | |
| cssPropOptimization | boolean | 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. | `true` | |
| cssPropOptimization | boolean | 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. | `true` | |
14 changes: 7 additions & 7 deletions packages/gatsby-plugin-emotion/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,19 @@
"url": "https://github.com/gatsbyjs/gatsby/issues"
},
"dependencies": {
"@babel/runtime": "^7.11.2",
"@emotion/babel-preset-css-prop": "^10.0.27"
"@babel/runtime": "^7.12.5",
"@emotion/babel-preset-css-prop": "^11.0.0"
},
"devDependencies": {
"@babel/cli": "^7.11.6",
"@babel/core": "^7.11.6",
"@babel/cli": "^7.12.1",
"@babel/core": "^7.12.3",
"babel-preset-gatsby-package": "^0.7.0-next.0",
"cross-env": "^7.0.2"
},
"peerDependencies": {
"@babel/core": "^7.11.6",
"@emotion/core": "^10.0.5",
"gatsby": "^2.0.0"
"@babel/core": "^7.12.3",
"@emotion/react": "^11.0.0",
"gatsby": "^2.25.4"
},
"homepage": "https://github.com/gatsbyjs/gatsby/tree/master/packages/gatsby-plugin-emotion#readme",
"keywords": [
Expand Down
2 changes: 1 addition & 1 deletion packages/gatsby-plugin-emotion/src/gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,6 @@ exports.pluginOptionsSchema = ({ Joi }) =>
cssPropOptimization: Joi.boolean()
.default(true)
.description(
`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.`
),
})