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

support for template strings with replacement expressions #2111

Merged
merged 1 commit into from
Dec 9, 2021

Conversation

acao
Copy link
Member

@acao acao commented Dec 9, 2021

this adds some support for template strings with variable replacement expressions. this should remove the validation error for EOL. completion and hover should work for all segments of the template literal expression as well

the expressions will be replaced by a blank whitespace character.

characters will be off for the same line, so it won't work everywhere, and if replacing the template string expression still breaks parsing because of how its used, there isn't much else we can do

@changeset-bot
Copy link

changeset-bot bot commented Dec 9, 2021

🦋 Changeset detected

Latest commit: 3aa6c6d

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
graphql-language-service-server Patch

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

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2021

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2021

@github-actions github-actions bot temporarily deployed to monaco-graphql-webpack-preview December 9, 2021 20:41 Inactive
@github-actions github-actions bot temporarily deployed to graphiql-webpack-preview December 9, 2021 20:41 Inactive
@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2021

The latest changes of this PR are available as canary in npm (based on the declared changesets):

graphql-language-service-cli@3.2.13-canary-bf97503d.0
graphql-language-service-server@2.7.13-canary-bf97503d.0

@github-actions
Copy link
Contributor

github-actions bot commented Dec 9, 2021

@github-actions github-actions bot temporarily deployed to graphiql-cdn-preview December 9, 2021 20:42 Inactive
@codecov
Copy link

codecov bot commented Dec 9, 2021

Codecov Report

Merging #2111 (3aa6c6d) into main (2d91916) will decrease coverage by 0.92%.
The diff coverage is 77.30%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2111      +/-   ##
==========================================
- Coverage   65.70%   64.78%   -0.93%     
==========================================
  Files          85       77       -8     
  Lines        5106     5185      +79     
  Branches     1631     1654      +23     
==========================================
+ Hits         3355     3359       +4     
- Misses       1747     1822      +75     
  Partials        4        4              
Impacted Files Coverage Δ
packages/codemirror-graphql/src/hint.ts 94.73% <ø> (ø)
packages/codemirror-graphql/src/lint.ts 100.00% <ø> (ø)
packages/codemirror-graphql/src/results/mode.ts 47.05% <ø> (ø)
...kages/codemirror-graphql/src/utils/forEachState.ts 100.00% <ø> (ø)
...ckages/codemirror-graphql/src/utils/mode-indent.ts 0.00% <0.00%> (ø)
packages/codemirror-graphql/src/variables/hint.ts 89.70% <ø> (ø)
packages/codemirror-graphql/src/variables/mode.ts 79.48% <ø> (ø)
packages/graphiql/src/components/QueryEditor.tsx 63.96% <ø> (ø)
packages/graphiql/src/utility/fillLeafs.ts 5.33% <ø> (ø)
...kages/graphiql/src/utility/introspectionQueries.ts 100.00% <ø> (ø)
... and 56 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 f206e9b...3aa6c6d. Read the comment docs.

@github-actions github-actions bot temporarily deployed to monaco-graphql-webpack-preview December 9, 2021 21:05 Inactive
@github-actions github-actions bot temporarily deployed to graphiql-webpack-preview December 9, 2021 21:05 Inactive
@github-actions github-actions bot temporarily deployed to graphiql-cdn-preview December 9, 2021 21:06 Inactive
this adds support for template strings with variable replacement expressions.

they will be replaced by a blank whitespace chracter.

characters *will* be off for the same line
@github-actions github-actions bot temporarily deployed to monaco-graphql-webpack-preview December 9, 2021 21:19 Inactive
@github-actions github-actions bot temporarily deployed to graphiql-webpack-preview December 9, 2021 21:19 Inactive
@github-actions github-actions bot temporarily deployed to graphiql-cdn-preview December 9, 2021 21:19 Inactive
@acao acao changed the title support for template strings with replacement tags support for template strings with replacement expressions Dec 9, 2021
@acao acao merged commit 08ff6dc into main Dec 9, 2021
@acao acao deleted the feat/partial-templates branch December 9, 2021 21:57
@github-actions github-actions bot mentioned this pull request Dec 9, 2021
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.

1 participant