Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

feat(gatsby-plugin-emotion): update plugin for emotion v10 #10226

Merged
merged 9 commits into from
Dec 4, 2018
Merged

feat(gatsby-plugin-emotion): update plugin for emotion v10 #10226

merged 9 commits into from
Dec 4, 2018

Conversation

wKovacs64
Copy link
Contributor

@wKovacs64 wKovacs64 commented Nov 30, 2018

🎉 Emotion v10 is here! 🎉

  • Update dependencies
  • Update critical style handling
  • Add Babel config for jsx pragma
  • Update plugin install instructions
  • Update Gatsby tutorial (part 4)
  • Update the "using emotion" example

Copy link
Contributor

@emmatown emmatown left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FYI, we're likely going to be adding a babel preset for automatically adding the jsx pragma (emotion-js/emotion#1049)

packages/gatsby-plugin-emotion/src/gatsby-node.js Outdated Show resolved Hide resolved
@DSchau
Copy link
Contributor

DSchau commented Dec 1, 2018

So, this seems to work for me but it isn't backwards compatible... what's the best way to deal with that

The peerDep handles it right? Requiring v10 of packages as peerDependencies should cover our bases there.

@wKovacs64
Copy link
Contributor Author

The peerDep handles it right? Requiring v10 of packages as peerDependencies should cover our bases there.

Cool with me if peerDep bumps are good enough, just wasn't sure since bumping this plugin version by a minor or patch would convey non-breaking changes but an emotion v9 consumer's build will explode because the plugin now imports from @emotion/core. SSR critical styles are handled differently too, so those would be broken as well (if they got that far by bringing in the new peerDeps). I might be overthinking it, though. 😅

@DSchau
Copy link
Contributor

DSchau commented Dec 1, 2018

since bumping this plugin version

Oh yeah. This would be a major version bump for this plugin! Misunderstood you there.

@wKovacs64
Copy link
Contributor Author

Oh yeah. This would be a major version bump for this plugin! Misunderstood you there.

Cool. I bumped it to 10.0.0 to match emotion, but let me know if you/the team aren't a fan of skipping semver majors like that and I'll drop it to 3.0.0.

@DSchau
Copy link
Contributor

DSchau commented Dec 1, 2018

@wKovacs64 I'm so sorry, that's my fault on that one!

If you could, could you revert that commit, e.g.

git revert f05f5a2

and then push that up to this branch. We actually use lerna to manage version bumping, so in this example, we'll automatically bump this plugin up to the next major version with lerna (which will create the patch) rather than as part of this commit!

Before we merge, we'll want to edit the description with something like

BREAKING: moved to emotion10, which changes some core APIs and switches to scoped packages

so that we can get that info in the changelog.

@wKovacs64
Copy link
Contributor Author

@DSchau Sure, no problem. Will that handle bumping the using-emotion example project, too?

@DSchau
Copy link
Contributor

DSchau commented Dec 1, 2018

Will that handle bumping the using-emotion example project, too

It will!

@wKovacs64
Copy link
Contributor Author

Word.

@wKovacs64
Copy link
Contributor Author

wKovacs64 commented Dec 1, 2018

Before we merge, we'll want to edit the description

I assume whoever merges do that, but let me know if you need me to do something else in that regard.

Copy link

@joe-bell joe-bell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❤️

@DSchau
Copy link
Contributor

DSchau commented Dec 4, 2018

@wKovacs64 I'll take a look at this today and get it merged in. Thanks to both you and @mitchellhamilton!

Copy link
Contributor

@DSchau DSchau left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's merge. Thanks again!

@DSchau DSchau merged commit 5754c2c into gatsbyjs:master Dec 4, 2018
@DSchau
Copy link
Contributor

DSchau commented Dec 4, 2018

Successfully published:
 - gatsby-plugin-emotion@3.0.0

@wKovacs64
Copy link
Contributor Author

Before we merge, we'll want to edit the description with something like

BREAKING: moved to emotion10, which changes some core APIs and switches to scoped packages

so that we can get that info in the changelog.

😅

@wKovacs64 wKovacs64 deleted the gatsby-plugin-emotion/v10 branch December 4, 2018 19:27
@wKovacs64
Copy link
Contributor Author

Doesn't look like lerna updated the example, I'll send another PR for that.

@DSchau
Copy link
Contributor

DSchau commented Dec 4, 2018

@wKovacs64 ah, yep 😢 Good catch on the missed breaking change. My fault!

gpetrioli pushed a commit to gpetrioli/gatsby that referenced this pull request Jan 22, 2019
…10226)

# 🎉 Emotion v10 is here! 🎉 

- [X] Update dependencies
- [X] Update critical style handling
- [X] Add Babel config for `jsx` pragma
- [X] Update plugin install instructions
- [X] Update Gatsby tutorial (part 4)
- [X] Update the "using emotion" example
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants