emotion
emotion copied to clipboard
TS migration
Just wanted a PR open to more easily see the progress of this
This pull request is automatically built and testable in CodeSandbox.
To see build info of the built libraries, click here or the icon next to each commit SHA.
Latest deployment of this branch, based on commit 993557dcc253488eabf4673696c87085ded40772:
Sandbox | Source |
---|---|
Emotion | Configuration |
🦋 Changeset detected
Latest commit: 993557dcc253488eabf4673696c87085ded40772
The changes in this PR will be included in the next version bump.
This PR includes changesets to release 17 packages
Name | Type |
---|---|
@emotion/unitless | Minor |
@emotion/css | Minor |
@emotion/serialize | Minor |
@emotion/memoize | Minor |
@emotion/is-prop-valid | Minor |
@emotion/weak-memoize | Minor |
@emotion/eslint-plugin | Minor |
@emotion/primitives-core | Minor |
@emotion/utils | Minor |
@emotion/hash | Patch |
@emotion/sheet | Minor |
@emotion/babel-plugin-jsx-pragmatic | Minor |
@emotion/react | Minor |
@emotion/babel-plugin | Minor |
@emotion/cache | Minor |
@emotion/css-prettifier | Patch |
@emotion/babel-preset-css-prop | Minor |
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
Codecov Report
Merging #2555 (993557d) into main (7b4f016) will decrease coverage by
0.02%
. The diff coverage is98.25%
.
Impacted Files | Coverage Δ | |
---|---|---|
babel.config.js | 95.45% <ø> (ø) |
|
packages/babel-plugin/src/utils/add-import.js | 100.00% <ø> (ø) |
|
...ckages/babel-plugin/src/utils/transformer-macro.js | 100.00% <ø> (ø) |
|
packages/css/src/index.ts | 100.00% <ø> (ø) |
|
packages/css/test/instance/emotion-instance.js | 100.00% <ø> (ø) |
|
packages/jest/src/enzyme-serializer.js | 100.00% <ø> (ø) |
|
packages/primitives/src/index.js | 100.00% <ø> (ø) |
|
packages/react/src/index.js | 30.76% <ø> (ø) |
|
packages/react/src/utils.js | 100.00% <ø> (ø) |
|
packages/server/src/create-instance/utils.js | 100.00% <ø> (ø) |
|
... and 73 more |
I see that you have done a little bit more than just checking out the progress 😉 Could we move those changes to a separate PR that would target this? That way we could review this more easily but we could also create a changeset that would point to that other PR (I feel like we should merge this PR at the end, instead of squashing everything into a single commit).
We might be currently blocked on the dtslint
update, see here. I also mention in that comment that we might have to require at least TS 3.8 after this migration. It doesn't feel ideal but this version has been released 2 years ago - since TS doesn't follow semver I feel like it's OK for us to introduce such a requirement in a minor version too (it's not like we'd change the requirement to 4.4 or smth)
I agree TS 3.8 seems like a safe choice. TS rarely introduces breaking changes, so users of older versions might be able to upgrade easily.
TS does allow emitting multiple type declarations, each for a specific version, but I'm not sure it's viable.
TS does allow emitting multiple type declarations, each for a specific version, but I'm not sure it's viable.
I'm not sure if emitting for specific versions is supported. The only thing that I'm aware of is package.json#typesVersion
but that is only intended as a hint for the consumer - so they can load typedefs targeting their matching TS version. AFAIK such different typedefs must have to be written, mostly, by hand
There is https://github.com/sandersn/downlevel-dts but not sure it's really worth doing
Ye, I'm not sure if it's worth it - I would probably consider doing this after the release, if we get some issue reports about this.