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

Rename packages #1675

Merged
merged 70 commits into from
Jan 5, 2020
Merged

Rename packages #1675

merged 70 commits into from
Jan 5, 2020

Conversation

emmatown
Copy link
Member

@emmatown emmatown commented Dec 5, 2019

See #1635 for context

@changeset-bot
Copy link

changeset-bot bot commented Dec 5, 2019

🦋 Changeset is good to go

Latest commit: efa8fae

We got this.

Not sure what this means? Click here to learn what changesets are.

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

@emmatown emmatown changed the base branch from master to next December 5, 2019 23:03

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:
Copy link
Member

Choose a reason for hiding this comment

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

We should review all changesets & changelogs carefully after merging this in. Some changesets should still refer to old names, like for example in here - it should still stay as "(it was always reexported from @emotion/core".

And probably best to keep copies of existing changelogs in old and new packages?

Copy link
Member

Choose a reason for hiding this comment

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

bump - we should mentioned here that it was always reexported from @emotion/core, optionally we can mention that it has been renamed now to @emotion/react

emmatown and others added 3 commits December 9, 2019 13:20
Co-Authored-By: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-Authored-By: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-Authored-By: Mateusz Burzyński <mateuszburzynski@gmail.com>
@emmatown emmatown marked this pull request as ready for review December 24, 2019 00:59
@emmatown
Copy link
Member Author

Can we be sure that this is true for all changed packages? Still would kinda feel better if versions of all packages would match to what is currently on next.

It is true for all packages that are linked(as in the Changesets option).

Here is the result of changeset status --verbose

🦋  info Packages to be bumped at minor
🦋  
🦋    ┌────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐
🦋    │    Package Name    │    New Version     │                     Related Changeset Summaries                      │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/sheet     │ 0.10.0-next.1      │ .changeset/healthy-peaches-speak/changes.md +                        │
🦋    │                    │                    │ .changeset/odd-geese-matter/changes.md                               │
🦋    └────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘
🦋  
🦋  ---
🦋  info Packages to be bumped at major
🦋  
🦋    ┌────────────────────┬────────────────────┬──────────────────────────────────────────────────────────────────────┐
🦋    │    Package Name    │    New Version     │                     Related Changeset Summaries                      │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/eslint-plu│ 11.0.0-next.10     │ .changeset/brave-rice-yawn/changes.md                                │
🦋    │ gin                │                    │                                                                      │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ eslint-plugin-emoti│ 11.0.0-next.10     │ .changeset/brave-rice-yawn/changes.md                                │
🦋    │ on                 │                    │                                                                      │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/babel-plug│ 11.0.0-next.10     │ .changeset/grumpy-news-wonder/changes.md                             │
🦋    │ in                 │                    │                                                                      │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ babel-plugin-emotio│ 11.0.0-next.10     │ .changeset/grumpy-news-wonder/changes.md                             │
🦋    │ n                  │                    │                                                                      │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/styled    │ 11.0.0-next.10     │ .changeset/modern-socks-remember/changes.md                          │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/react     │ 11.0.0-next.10     │ .changeset/nervous-clouds-brush/changes.md                           │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/core      │ 11.0.0-next.10     │ .changeset/nervous-clouds-brush/changes.md                           │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/css       │ 11.0.0-next.10     │ .changeset/odd-flowers-breathe/changes.md +                          │
🦋    │                    │                    │ .changeset/shaggy-cheetahs-vanish/changes.md                         │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ create-emotion     │ 11.0.0-next.10     │ .changeset/odd-flowers-breathe/changes.md                            │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/jest      │ 11.0.0-next.10     │ .changeset/purple-teachers-clean/changes.md                          │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ jest-emotion       │ 11.0.0-next.10     │ .changeset/purple-teachers-clean/changes.md                          │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/server    │ 11.0.0-next.10     │ .changeset/rotten-adults-guess/changes.md +                          │
🦋    │                    │                    │ .changeset/soft-moose-attend/changes.md                              │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ emotion-server     │ 11.0.0-next.10     │ .changeset/rotten-adults-guess/changes.md                            │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ emotion            │ 11.0.0-next.10     │ .changeset/shaggy-cheetahs-vanish/changes.md                         │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ create-emotion-serv│ 11.0.0-next.10     │ .changeset/soft-moose-attend/changes.md                              │
🦋    │ er                 │                    │                                                                      │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/native    │ 11.0.0-next.10     │ .changeset/tall-weeks-compete/changes.md                             │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/cache     │ 11.0.0-next.10     │ .changeset/wicked-dolphins-cough/changes.md                          │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/primitives│ 11.0.0-next.10     │                                                                      │
🦋    │ -core              │                    │                                                                      │
🦋    ├────────────────────┼────────────────────┼──────────────────────────────────────────────────────────────────────┤
🦋    │ @emotion/primitives│ 11.0.0-next.10     │                                                                      │
🦋    └────────────────────┴────────────────────┴──────────────────────────────────────────────────────────────────────┘

Some have now also missing changelog entries because your branch is not up to date with next, would be good to merge next into this and resolve potential conflicts.

Done.

@codecov
Copy link

codecov bot commented Jan 1, 2020

Codecov Report

Merging #1675 into next will decrease coverage by 0.44%.
The diff coverage is 100%.

Impacted Files Coverage Δ
packages/babel-plugin/src/utils/add-import.js 100% <ø> (ø)
packages/babel-plugin/src/emotion-macro.js 69.23% <ø> (ø)
packages/babel-plugin/src/utils/label.js 98.11% <ø> (ø)
packages/babel-plugin/src/styled-macro.js 100% <ø> (ø)
packages/babel-plugin/src/utils/minify-utils.js 97.14% <ø> (ø)
packages/css/src/create-instance.js 100% <ø> (ø)
...ackages/babel-plugin/src/utils/object-to-string.js 88.23% <ø> (ø)
packages/babel-plugin/src/utils/source-maps.js 100% <ø> (ø)
babel.config.js 100% <ø> (ø) ⬆️
packages/babel-preset-css-prop/src/index.js 100% <ø> (ø) ⬆️
... and 69 more

@Andarist
Copy link
Member

Andarist commented Jan 1, 2020

Besides few unresolved comments - looks good 👍 Note that I've pushed out a syntax error fix to this branch.

packages/css/README.md Outdated Show resolved Hide resolved
- [Global Styles — `injectGlobal`](#global-styles)
- [Animation Keyframes — `keyframes`](#animation-keyframes)
- [Composing Class Names — `cx`](#cx)
- [Server Side Rendering](https://emotion.sh/docs/ssr#api)
Copy link
Member

Choose a reason for hiding this comment

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

those 2 last things should point to a local repo paths, shouldnt they? at the moment they point to external site

Copy link
Member Author

@emmatown emmatown Jan 4, 2020

Choose a reason for hiding this comment

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

The site removes the https://emotion.sh so it points to the site on npm/GitHub and it points to local url on the site so it works on deploy previews, e.g. https://deploy-preview-1675--emotion.netlify.com/docs/@emotion/css

Copy link
Member

Choose a reason for hiding this comment

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

It won't work directly when using GitHub or exploring a checked out repository though.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, that's true but the alternatives are:

  • absolute path relative to the root or relative path from the README - works on GH and I think the site but is broken on npm
  • GitHub url to the root - links to the file on master always so it's not on the right branch

So I think this solution is the best of the three

@emmatown emmatown merged commit b8476e0 into next Jan 5, 2020
@emmatown emmatown deleted the rename-packages branch January 5, 2020 01:08
louisgv pushed a commit to louisgv/emotion that referenced this pull request Sep 6, 2020
* WIP codemod for renaming

* Lockfile changes

* emotion -> @emotion/css

* core -> react

* Server stuff

* Move removed packages to another directory

* More things

* More things

* Some more things

* Rename ESLint plugin

* Change name in @emotion/eslint-plugin CHANGELOG.md

* Jest package and Babel plugin renmaes

* Things

* Update eslint plugin migration error message

* Formatting things

* Fix some things

* Upgrade babel-eslint

* Add @emotion/pkg-renaming rule to ESLint config and run it

* Update existing changesets

* Add some changesets

* Update removed-packages/create-emotion/src/index.js

Co-Authored-By: Mateusz Burzyński <mateuszburzynski@gmail.com>

* Update removed-packages/emotion/macro.js

Co-Authored-By: Mateusz Burzyński <mateuszburzynski@gmail.com>

* Update removed-packages/eslint-plugin-emotion/src/index.js

Co-Authored-By: Mateusz Burzyński <mateuszburzynski@gmail.com>

* Update CodeSandbox CI config

* Fix some things

* Fix more things

* Fix some stuff

* Fix some more things

* More fixes

* Some things

* Various updates for babel plugin

* Fix more things

* Fix another thing

* Things

* More stuff

* Bad linting rules.

* More things

* More changes

* Fix all the babel plugin stuff

* Test the Babel plugin in dist tests because it's built now

* Fix docs site building maybe

* Update some snapshots

* Fix some more things

* Hopefully actually fix it this time

* Replace @emotion/core with @emotion/react in a bunch of places

* Fix TS types for @emotion/server/create-instance

* Update snapshots

* Disable a TSLint rule

* More changesets

* Docs and things

* Fix more things

* Fix a thing

* Add a test:typescript script

* Use glob in CodeSandbox CI config

* Fix a thing

* Fix TS things

* ESLint plugin things

* Fix some things

* Fix @emotion/server pkg.json syntax error

* Update docs/package-summary.mdx

Co-Authored-By: Mateusz Burzyński <mateuszburzynski@gmail.com>

* Fix some things

* Add docs for creating instances of @emotion/css

* Fix some little things

* Comment out a test

* Fix some little things

* ts@next..........

Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
@github-actions github-actions bot mentioned this pull request Nov 10, 2020
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.

2 participants