-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
TS migration #2555
TS migration #2555
Conversation
* Removed Flow * Update packages/jest/src/utils.js Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com> * Update packages/react/src/theming.js Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com> * Update site/src/utils/markdown-styles.js Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com> * Fix markdown-styles.js * Title.js * One more formatting, and a FlowFixMe removal * Updated a few snapshots, and yarn.lock Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
# Conflicts: # .prettierrc.yaml # flow-typed/npm/jest-glamor-react_vx.x.x.js # flow-typed/npm/jest_v25.x.x.js # packages/babel-plugin/src/emotion-macro.js # packages/babel-plugin/src/index.js # packages/css/src/create-instance.js # packages/jest/src/create-serializer.js # packages/react/src/class-names.js # packages/react/src/context.js # packages/react/src/global.js # packages/react/src/jsx.js # packages/serialize/src/index.js # packages/server/src/create-instance/construct-style-tags-from-chunks.js # packages/server/src/create-instance/extract-critical-to-chunks.js # packages/server/src/create-instance/index.js # packages/server/src/create-instance/inline.js # packages/server/src/create-instance/stream.js # packages/styled/src/base.js # packages/weak-memoize/src/index.js # test/testSetup.js
* Add typescript-eslint and base tsconfig.json * Create/move tsconfig.json files and extend from root * Add "site" and "test" to root tsconfig include * Add @babel/preset-typescript * Add tsconfig.json for site * Add "playgrounds" to root tsconfig include * Add typescript-eslint as eslint plugin * Remove standard * Add eslint files override for ts,tsx * Add eslint import and react plugins * Remove eslint-plugin-import and related rules * Add extend for @typescript-extend/eslint-recommended * Restore **/types/tsconfig.json files * Remove typescript-eslint resolutions * Move parserOptions to ts overrides * Enable skipDefaultLibCheck * Exclude types tests from root tsconfig * Add tsconfig content for jsx-pragmatic * Update eslint prettier parser and add auto-fixes * Remove per-package tsconfig.json files
* [memoize] Migrate to TypeScript * Add changeset * Move tsconfig.json for types tests back * Fix dtslint setup in @emotion/memoize * Add TS files to Jest transform setting * Update .changeset/hip-moons-play.md Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* [weak-memoize] Convert to TypeScript * Add changeset * tweak a bunch of stuff Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* [unitless] Convert to TypeScript * Add changeset * tweak some minor things Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* [is-prop-valid] Convert to TypeScript * Add changeset * tweak some minor things Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* [sheet] Convert to TypeScript * Add changeset * Make _insertTag private * tweak some minor things * add more type tests for constructing StyleSheet * add changeset Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* feat(ts-utils): Initial migration of utils * Small tweaks * More small tweaks Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
…n `@emotion/utils`
…migration Conflicts: packages/cache/__tests__/index.js packages/jest/src/matchers.js packages/react/src/context.js packages/react/src/global.js packages/react/src/index.js packages/react/src/theming.js packages/sheet/__tests__/index.js packages/sheet/src/index.ts packages/sheet/types/index.d.ts
…migration Conflicts: packages/jest/src/create-enzyme-serializer.js packages/jest/src/create-serializer.js packages/jest/src/utils.js packages/react/src/class-names.js packages/react/src/emotion-element.js scripts/benchmarks/src/impl.js
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. |
Merge main into ts-migration
🦋 Changeset detectedLatest commit: 1effaf9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
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 ReportAttention: Patch coverage is
Additional details and impacted files
|
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 |
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. |
I'm not sure if emitting for specific versions is supported. The only thing that I'm aware of is |
0ca1837
to
f3ef8cb
Compare
d210619
to
da3f244
Compare
* feat(babel-plugin-jsx-pragmatic): add changeset * feat(babel-plugin-jsx-pragmatic): convert to typescript * fix(babel-plugin-jsx-pragmatic): update babel core types * Update .changeset/wet-boxes-raise.md Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
…into ts-migration-merge
* Migrate `babel-tester` to TypeScript * update yarn.lock
* feat(eslint-plugin): add standard utils & dependencies for typescript * feat(eslint-plugin): convert `no-vanilla` to typescript * feat(eslint-plugin): convert `styled-import` to typescript * feat(eslint-plugin): convert `import-from-emotion` to typescript * feat(eslint-plugin): convert `syntax-preference` to typescript * feat(eslint-plugin): convert `pkg-renaming` to typescript * feat(eslint-plugin): convert `jsx-import` to typescript * feat(eslint-plugin): move index to typescript * feat(eslint-plugin): add changeset * fix(eslint-plugin): use `require` to get package version * fix(eslint-plugin): adjust rule description Co-authored-by: Sam Magura <srmagura@gmail.com> * fix(eslint-plugin): use `REPO_URL` constant everywhere * chore(eslint-plugin): add change sets for other bugs * nit * Tweak changeset * Report empty css attribute as invalid in syntax-preference rule * Tweak changesets Co-authored-by: Sam Magura <srmagura@gmail.com> Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* Point to package root rather than src so that the declarations are used when published, not the src * Don't use as const for unitless * Make tsc pass * Add tsc to CI * Remove type aware linting * Remove ESLint from DTSLint CI job * Newline * Fix more things Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* [serialize]: Convert to Typescript * fix: Some tests * chore: Revert unrelated change * chore: Revert code behaviour changes * chore: Revert toString method addition * chore: Changeset * fix: Add missing return of ComponentSelector * fix: Export missing interfaces * small tweaks * fix stuff Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Merge `main` into `ts-migration`
Merge `main` into `ts-migration`
* Fix dtslint issues * Update @emotion/server tsconfig comment about DOM types * Remove redundant declarations * Fixed dtslint in `@emotion/cache` Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
* [wip] primitives-core TS migration * Finish converting primitives-core to TS * Update yarn.lock? * Implement @Andarist's feedback for primitives-core TS migration * Fix regression
Merge `main` into `ts-migration` (August 8th)
7010c39
to
04c9f33
Compare
# Conflicts: # docs/docs.yaml # packages/babel-plugin/src/index.js # packages/cache/src/index.js # packages/css/package.json # packages/css/src/create-instance.d.ts # packages/primitives-core/package.json # packages/react/__tests__/warnings.js # packages/react/src/global.js # packages/react/src/jsx-dev-runtime.js # packages/react/src/jsx-runtime.js # packages/react/src/jsx.js # packages/serialize/types/index.d.ts # packages/styled/package.json # yarn.lock
Just wanted a PR open to more easily see the progress of this