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

Convert all values of MarkerSeverity in the converter #71

Merged
merged 1 commit into from
Apr 18, 2018

Conversation

rcjsuen
Copy link
Collaborator

@rcjsuen rcjsuen commented Apr 18, 2018

It seems that monaco.MarkerSeverity.Hint is not being considered when converting a Monaco marker to an LSP Diagnostic so I fixed the converter.

asDiagnosticSeverity(value: monaco.MarkerSeverity): DiagnosticSeverity | undefined {
switch (value) {
case monaco.MarkerSeverity.Error:
return DiagnosticSeverity.Error;
case monaco.MarkerSeverity.Warning:
return DiagnosticSeverity.Warning;
case monaco.MarkerSeverity.Info:
return DiagnosticSeverity.Information;
}
return undefined;
}

Fixed the switch statement so that it would convert
MarkerSeverity.Hint to DiagnosticSeverity.Hint.

Signed-off-by: Remy Suen <remy.suen@gmail.com>
Copy link
Contributor

@AlexTugarev AlexTugarev left a comment

Choose a reason for hiding this comment

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

LGTM!

@AlexTugarev
Copy link
Contributor

@rcjsuen, I'm not sure about the change logs and the next release. I think, I'll add a change and do a 0.6.0 release if there are not objections. As @akosyakov mentioned currently published latest is published by accident.

@rcjsuen rcjsuen merged commit 2827b95 into TypeFox:master Apr 18, 2018
@rcjsuen rcjsuen deleted the hint branch April 18, 2018 11:44
@rcjsuen
Copy link
Collaborator Author

rcjsuen commented Apr 18, 2018

Thanks for the review, @AlexTugarev. I've merged the changes into master.

If you want to just version the next release 0.6.0 then feel free. I don't have any issues with that. Perhaps we can just skip over 0.5.0 in the changelog too then in that case.

Here's a diff of what I think needs to be done.

  1. Replace 'Unreleased' with '0.6.0' obviously. When work on the next release begins we can add an 'Unreleased' section back. Alternatively, you can of course keep it and just append a new '0.6.0' section header to "replace" it. Whatever works for you.

  2. Change the dependency update to 0.12 instead of 0.11.

  3. Replace the link at the bottom to diff the v0.4.0 tag and the (to-be-created) v0.6.0 tag.

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 000e43b..d27523c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,8 +1,8 @@
 # Changelog
 All notable changes to this project will be documented in this file.
 
-## [Unreleased]
-- updated dependency to Monaco 0.11 ([#61](https://github.com/TypeFox/monaco-languageclient/issues/61))
+## [0.6.0] - 2018-04-18
+- updated dependency to Monaco 0.12 ([#70](https://github.com/TypeFox/monaco-languageclient/pull/70))
 - support `CompletionItem`'s `additionalTextEdits` property ([#39](https://github.com/TypeFox/monaco-languageclient/issues/39))
 - convert `monaco.MarkerSeverity.Hint` values to `DiagnosticSeverity.Hint` ([#71](https://github.com/TypeFox/monaco-languageclient/pull/71))
 
@@ -29,7 +29,7 @@ All notable changes to this project will be documented in this file.
 ## 0.1.0 - 2017-0
 - initial 0.1.0 release, depends on Monaco 0.9.0
 
-[Unreleased]: https://github.com/TypeFox/monaco-languageclient/compare/v0.4.0...HEAD
+[0.6.0]: https://github.com/TypeFox/monaco-languageclient/compare/v0.4.0...v0.6.0
 [0.4.0]: https://github.com/TypeFox/monaco-languageclient/compare/v0.3.0...v0.4.0
 [0.3.0]: https://github.com/TypeFox/monaco-languageclient/compare/v0.2.1...v0.3.0
 [0.2.1]: https://github.com/TypeFox/monaco-languageclient/compare/v0.2.0...v0.2.1

@AlexTugarev
Copy link
Contributor

That's very kind of you, @rcjsuen! Thanks! Will do so.

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