Skip to content

Migrated codemirror-graphql to typescript#1790

Merged
acao merged 8 commits intomainfrom
imolorhe/codemirror-graphql-typescript
Feb 9, 2021
Merged

Migrated codemirror-graphql to typescript#1790
acao merged 8 commits intomainfrom
imolorhe/codemirror-graphql-typescript

Conversation

@imolorhe
Copy link
Copy Markdown
Contributor

@imolorhe imolorhe commented Feb 8, 2021

Moving all codemirror-graphql logic to typescript.

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Feb 8, 2021

⚠️ No Changeset found

Latest commit: 9ab7ee6

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 8, 2021

Codecov Report

Merging #1790 (9ab7ee6) into main (59296d5) will decrease coverage by 0.01%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1790      +/-   ##
==========================================
- Coverage   65.62%   65.61%   -0.02%     
==========================================
  Files          85       85              
  Lines        5102     5115      +13     
  Branches     1610     1624      +14     
==========================================
+ Hits         3348     3356       +8     
- Misses       1727     1755      +28     
+ Partials       27        4      -23     
Impacted Files Coverage Δ
packages/codemirror-graphql/src/mode.ts 36.36% <0.00%> (ø)
...raphql-language-service-parser/src/onlineParser.ts 88.14% <ø> (ø)
packages/codemirror-graphql/src/results/mode.ts 47.05% <25.00%> (ø)
packages/codemirror-graphql/src/variables/lint.ts 46.98% <48.14%> (ø)
packages/codemirror-graphql/src/variables/mode.ts 79.48% <57.14%> (ø)
packages/codemirror-graphql/src/utils/jsonParse.ts 51.39% <76.92%> (ø)
...ges/codemirror-graphql/src/__tests__/testSchema.ts 47.22% <83.33%> (ø)
packages/codemirror-graphql/src/variables/hint.ts 89.70% <90.47%> (ø)
packages/codemirror-graphql/src/hint.ts 94.73% <94.73%> (ø)
packages/codemirror-graphql/src/lint.ts 100.00% <100.00%> (ø)
... and 8 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 59296d5...9ab7ee6. Read the comment docs.

@imolorhe imolorhe requested a review from acao February 8, 2021 21:36
Comment thread packages/codemirror-graphql/package.json
Copy link
Copy Markdown
Member

@acao acao left a comment

Choose a reason for hiding this comment

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

looks great! lets merge it

Comment thread package.json
"scripts": {
"build": "yarn run build-clean && yarn build-ts && yarn build-babel",
"build-babel": "yarn workspace codemirror-graphql run build",
"build": "yarn tsc --clean && yarn tsc",
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

🥳

.replace(tempRenamePath, dest), // and destination path
);

mkdirp.sync(path.dirname(destinationPath));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

oh good catch!

import * as CM from 'codemirror';
import 'codemirror/addon/hint/show-hint';

declare module 'codemirror' {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

thank you for setting this up so nicely with the global declare and all. what do you think of calling this file types/codemirror.d.ts ? unnecessary? we need to improve this on the graphiql side as well but we can do that in another PR if you prefer. it's exciting how this really brings the whole codebase together!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We should be able to rename it without issues

@acao acao merged commit e08f19c into main Feb 9, 2021
@acao acao deleted the imolorhe/codemirror-graphql-typescript branch February 9, 2021 13:59
@acao
Copy link
Copy Markdown
Member

acao commented Feb 9, 2021

oh crap @imolorhe we forgot the changeset ://

@imolorhe
Copy link
Copy Markdown
Contributor Author

imolorhe commented Feb 9, 2021

Oh right! That can be another PR right?

acao pushed a commit that referenced this pull request Feb 12, 2021
* Migrated codemirror-graphql to typescript

* Migrated codemirror-graphql tests to typescript

* Cleaned up codemirror-graphql package.json
set build output to root (to align with current behavior)

* ignore generated __tests__ folder from eslint

* Updated codemirror typing

* Updated codemirror typing

* Updated ci-e2e script

* Exclude babel and jest config from npm files
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