New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

monaco-languageclient

Package Overview
Dependencies
Maintainers
1
Versions
216
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monaco-languageclient - npm Package Compare versions

Comparing version 0.7.2 to 0.7.3

6

CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file.
## [0.7.2] - 2018-08-02
- amd distribution ([#97](https://github.com/TypeFox/monaco-languageclient/pull/97)) - thanks to @zewa666
- updated dependency to Monaco 0.13.2 ([#100](https://github.com/TypeFox/monaco-languageclient/pull/100))
- register providers only for languages matching the documentSelector ([#101](https://github.com/TypeFox/monaco-languageclient/pull/101)) - thanks to @gins3000
## [0.7.0] - 2018-07-31

@@ -70,2 +75,3 @@ Updated to `vscode-languageclient` 4.4.0 to support LSP 3.10.0 features like hierarchical document symbols, go to type defition/implementation, workspace folders and document color provider ([#89](https://github.com/TypeFox/monaco-languageclient/pull/89)).

[0.7.2]: https://github.com/TypeFox/monaco-languageclient/compare/v0.7.0...v0.7.2
[0.7.0]: https://github.com/TypeFox/monaco-languageclient/compare/v0.6.3...v0.7.0

@@ -72,0 +78,0 @@ [0.6.0]: https://github.com/TypeFox/monaco-languageclient/compare/v0.4.0...v0.6.1

2

dist/amd/monaco-converter.d.ts

@@ -128,3 +128,2 @@ /// <reference types="monaco-editor-core/monaco" />

asHover(hover: Hover | undefined | null): monaco.languages.Hover | undefined;
asIMarkdownString(content: MarkedString | MarkupContent): monaco.IMarkdownString;
asHoverContent(contents: MarkedString | MarkedString[] | MarkupContent): monaco.IMarkdownString[];

@@ -170,2 +169,3 @@ asDocumentation(value: string | MarkupContent): string | monaco.IMarkdownString;

asColorPresentation(item: ColorPresentation): monaco.languages.IColorPresentation;
asFoldingRanges(items: undefined | null): undefined | null;
asFoldingRanges(items: FoldingRange[]): monaco.languages.FoldingRange[];

@@ -172,0 +172,0 @@ asFoldingRange(item: FoldingRange): monaco.languages.FoldingRange;

@@ -148,4 +148,2 @@ var __assign = (this && this.__assign) || function () {

switch (format) {
case '$string':
return documentation;
case services_1.MarkupKind.PlainText:

@@ -569,17 +567,2 @@ return { kind: format, value: documentation };

};
ProtocolToMonacoConverter.prototype.asIMarkdownString = function (content) {
if (typeof content === 'string') {
return {
value: content
};
}
if ('kind' in content) {
var value_1 = content.value;
return { value: value_1 };
}
var language = content.language, value = content.value;
return {
value: '```' + language + '\n' + value + '\n```'
};
};
ProtocolToMonacoConverter.prototype.asHoverContent = function (contents) {

@@ -596,2 +579,5 @@ var _this = this;

}
if (value.kind === services_1.MarkupKind.PlainText) {
return value.value;
}
return this.asMarkdownString(value);

@@ -601,9 +587,5 @@ };

if (services_1.MarkupContent.is(content)) {
var value_2 = content.value;
if (content.kind === services_1.MarkupKind.Markdown) {
return {
value: '```\n' + value_2 + '\n```'
};
}
return { value: value_2 };
return {
value: content.value
};
}

@@ -825,2 +807,5 @@ if (Is.string(content)) {

var _this = this;
if (!items) {
return items;
}
return items.map(function (item) { return _this.asFoldingRange(item); });

@@ -827,0 +812,0 @@ };

@@ -127,2 +127,3 @@ import { DocumentSelector, MessageActionItem, MessageType, TextDocumentPositionParams, ReferenceParams, CodeActionParams, CodeLensParams, DocumentFormattingParams, DocumentRangeFormattingParams, DocumentOnTypeFormattingParams, RenameParams, DocumentLinkParams, WorkspaceClientCapabilities, DidChangeTextDocumentParams, Diagnostic, TextDocument, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, Location, DocumentHighlight, SymbolInformation, Command, CodeLens, TextEdit, WorkspaceEdit, DocumentLink, TextDocumentSaveReason, DocumentSymbolParams, WorkspaceSymbolParams, TextDocumentContentChangeEvent, CompletionParams, ColorInformation, ColorPresentation, DocumentColorParams, ColorPresentationParams, FoldingRange, FoldingRangeRequestParam, DocumentSymbol, CodeAction } from 'vscode-languageserver-protocol/lib/main';

export interface WorkspaceConfiguration {
toJSON(): any;
get<T>(section: string): T | undefined;

@@ -129,0 +130,0 @@ get<T>(section: string, defaultValue: T): T;

@@ -130,3 +130,3 @@ /* --------------------------------------------------------------------------------------------

undefined;
return {
var result = {
get: function (section, defaultValue) {

@@ -141,2 +141,5 @@ return configuration ? configuration.get(section, defaultValue) : defaultValue;

};
return Object.assign(result, {
toJSON: function () { return configuration ? configuration.toJSON() : undefined; }
});
},

@@ -143,0 +146,0 @@ get onDidChangeConfiguration() {

@@ -128,3 +128,2 @@ /// <reference types="monaco-editor-core/monaco" />

asHover(hover: Hover | undefined | null): monaco.languages.Hover | undefined;
asIMarkdownString(content: MarkedString | MarkupContent): monaco.IMarkdownString;
asHoverContent(contents: MarkedString | MarkedString[] | MarkupContent): monaco.IMarkdownString[];

@@ -170,2 +169,3 @@ asDocumentation(value: string | MarkupContent): string | monaco.IMarkdownString;

asColorPresentation(item: ColorPresentation): monaco.languages.IColorPresentation;
asFoldingRanges(items: undefined | null): undefined | null;
asFoldingRanges(items: FoldingRange[]): monaco.languages.FoldingRange[];

@@ -172,0 +172,0 @@ asFoldingRange(item: FoldingRange): monaco.languages.FoldingRange;

@@ -153,4 +153,2 @@ "use strict";

switch (format) {
case '$string':
return documentation;
case services_1.MarkupKind.PlainText:

@@ -574,17 +572,2 @@ return { kind: format, value: documentation };

};
ProtocolToMonacoConverter.prototype.asIMarkdownString = function (content) {
if (typeof content === 'string') {
return {
value: content
};
}
if ('kind' in content) {
var value_1 = content.value;
return { value: value_1 };
}
var language = content.language, value = content.value;
return {
value: '```' + language + '\n' + value + '\n```'
};
};
ProtocolToMonacoConverter.prototype.asHoverContent = function (contents) {

@@ -601,2 +584,5 @@ var _this = this;

}
if (value.kind === services_1.MarkupKind.PlainText) {
return value.value;
}
return this.asMarkdownString(value);

@@ -606,9 +592,5 @@ };

if (services_1.MarkupContent.is(content)) {
var value_2 = content.value;
if (content.kind === services_1.MarkupKind.Markdown) {
return {
value: '```\n' + value_2 + '\n```'
};
}
return { value: value_2 };
return {
value: content.value
};
}

@@ -830,2 +812,5 @@ if (Is.string(content)) {

var _this = this;
if (!items) {
return items;
}
return items.map(function (item) { return _this.asFoldingRange(item); });

@@ -832,0 +817,0 @@ };

@@ -127,2 +127,3 @@ import { DocumentSelector, MessageActionItem, MessageType, TextDocumentPositionParams, ReferenceParams, CodeActionParams, CodeLensParams, DocumentFormattingParams, DocumentRangeFormattingParams, DocumentOnTypeFormattingParams, RenameParams, DocumentLinkParams, WorkspaceClientCapabilities, DidChangeTextDocumentParams, Diagnostic, TextDocument, CompletionItem, CompletionList, Hover, SignatureHelp, Definition, Location, DocumentHighlight, SymbolInformation, Command, CodeLens, TextEdit, WorkspaceEdit, DocumentLink, TextDocumentSaveReason, DocumentSymbolParams, WorkspaceSymbolParams, TextDocumentContentChangeEvent, CompletionParams, ColorInformation, ColorPresentation, DocumentColorParams, ColorPresentationParams, FoldingRange, FoldingRangeRequestParam, DocumentSymbol, CodeAction } from 'vscode-languageserver-protocol/lib/main';

export interface WorkspaceConfiguration {
toJSON(): any;
get<T>(section: string): T | undefined;

@@ -129,0 +130,0 @@ get<T>(section: string, defaultValue: T): T;

@@ -132,3 +132,3 @@ "use strict";

undefined;
return {
var result = {
get: function (section, defaultValue) {

@@ -143,2 +143,5 @@ return configuration ? configuration.get(section, defaultValue) : defaultValue;

};
return Object.assign(result, {
toJSON: function () { return configuration ? configuration.toJSON() : undefined; }
});
},

@@ -145,0 +148,0 @@ get onDidChangeConfiguration() {

{
"name": "monaco-languageclient",
"version": "0.7.2",
"version": "0.7.3",
"description": "Monaco Language client implementation",

@@ -5,0 +5,0 @@ "author": "TypeFox GmbH (http://www.typefox.io)",

@@ -156,31 +156,29 @@ /* --------------------------------------------------------------------------------------------

if (protocolItem) {
if (protocolItem.data !== undefined) {
result.data = protocolItem.data;
}
if (protocolItem.deprecated === true || protocolItem.deprecated === false) {
result.deprecated = protocolItem.deprecated;
}
}
return result;
if (protocolItem.data !== undefined) {
result.data = protocolItem.data;
}
if (protocolItem.deprecated === true || protocolItem.deprecated === false) {
result.deprecated = protocolItem.deprecated;
}
}
return result;
}
protected asCompletionItemKind(value: monaco.languages.CompletionItemKind, original: CompletionItemKind | undefined): CompletionItemKind {
if (original !== undefined) {
return original;
}
return value + 1 as CompletionItemKind;
}
protected asCompletionItemKind(value: monaco.languages.CompletionItemKind, original: CompletionItemKind | undefined): CompletionItemKind {
if (original !== undefined) {
return original;
}
return value + 1 as CompletionItemKind;
}
protected asDocumentation(format: string, documentation: string | monaco.IMarkdownString): string | MarkupContent {
switch (format) {
case '$string':
return documentation as string;
case MarkupKind.PlainText:
return { kind: format, value: documentation as string };
case MarkupKind.Markdown:
return { kind: format, value: (documentation as monaco.IMarkdownString).value };
default:
return `Unsupported Markup content received. Kind is: ${format}`;
}
}
switch (format) {
case MarkupKind.PlainText:
return { kind: format, value: documentation as string };
case MarkupKind.Markdown:
return { kind: format, value: (documentation as monaco.IMarkdownString).value };
default:
return `Unsupported Markup content received. Kind is: ${format}`;
}
}

@@ -303,7 +301,7 @@ protected fillPrimaryInsertText(target: CompletionItem, source: ProtocolCompletionItem): void {

let result = CodeLens.create(this.asRange(item.range));
if (item.command) { result.command = this.asCommand(item.command); }
if (ProtocolCodeLens.is(item)) {
if (item.data) { result.data = item.data };
}
return result;
if (item.command) { result.command = this.asCommand(item.command); }
if (ProtocolCodeLens.is(item)) {
if (item.data) { result.data = item.data };
}
return result;
}

@@ -354,8 +352,8 @@

asDocumentLink(item: monaco.languages.ILink): DocumentLink {
let result = DocumentLink.create(this.asRange(item.range));
if (item.url) { result.target = item.url; }
if (ProtocolDocumentLink.is(item) && item.data) {
result.data = item.data;
}
return result;
let result = DocumentLink.create(this.asRange(item.range));
if (item.url) { result.target = item.url; }
if (ProtocolDocumentLink.is(item) && item.data) {
result.data = item.data;
}
return result;
}

@@ -474,3 +472,3 @@ }

asCommand(command: Command | undefined): monaco.languages.Command | undefined;
asCommand(command: Command |  undefined): monaco.languages.Command | undefined {
asCommand(command: Command | undefined): monaco.languages.Command | undefined {
if (!command) {

@@ -645,18 +643,2 @@ return undefined;

asIMarkdownString(content: MarkedString | MarkupContent): monaco.IMarkdownString {
if (typeof content === 'string') {
return {
value: content
}
}
if ('kind' in content) {
const { value } = content;
return { value };
}
const { language, value } = content;
return {
value: '```' + language + '\n' + value + '\n```'
};
}
asHoverContent(contents: MarkedString | MarkedString[] | MarkupContent): monaco.IMarkdownString[] {

@@ -673,2 +655,5 @@ if (Array.isArray(contents)) {

}
if (value.kind === MarkupKind.PlainText) {
return value.value;
}
return this.asMarkdownString(value);

@@ -679,9 +664,5 @@ }

if (MarkupContent.is(content)) {
const value = content.value;
if (content.kind === MarkupKind.Markdown) {
return {
value: '```\n' + value + '\n```'
};
}
return { value };
return {
value: content.value
};
}

@@ -712,4 +693,4 @@ if (Is.string(content)) {

asDiagnostics(diagnostics: Diagnostic[]): monaco.editor.IMarkerData[];
asDiagnostics(diagnostics: Diagnostic[] |  undefined): monaco.editor.IMarkerData[] |  undefined;
asDiagnostics(diagnostics: Diagnostic[] |  undefined): monaco.editor.IMarkerData[] |  undefined {
asDiagnostics(diagnostics: Diagnostic[] | undefined): monaco.editor.IMarkerData[] | undefined;
asDiagnostics(diagnostics: Diagnostic[] | undefined): monaco.editor.IMarkerData[] | undefined {
if (!diagnostics) {

@@ -915,3 +896,8 @@ return undefined;

asFoldingRanges(items: FoldingRange[]): monaco.languages.FoldingRange[] {
asFoldingRanges(items: undefined | null): undefined | null;
asFoldingRanges(items: FoldingRange[]): monaco.languages.FoldingRange[];
asFoldingRanges(items: FoldingRange[] | undefined | null): monaco.languages.FoldingRange[] | undefined | null {
if (!items) {
return items;
}
return items.map(item => this.asFoldingRange(item));

@@ -918,0 +904,0 @@ }

@@ -199,2 +199,3 @@ /* --------------------------------------------------------------------------------------------

export interface WorkspaceConfiguration {
toJSON(): any;
get<T>(section: string): T | undefined;

@@ -201,0 +202,0 @@ get<T>(section: string, defaultValue: T): T;

@@ -82,3 +82,3 @@ /* --------------------------------------------------------------------------------------------

undefined;
return {
const result: vscode.WorkspaceConfiguration = {
get: (section: string, defaultValue?: any) => {

@@ -92,3 +92,6 @@ return configuration ? configuration.get(section, defaultValue) : defaultValue;

update: unsupported
}
};
return Object.assign(result, {
toJSON: () => configuration ? configuration.toJSON() : undefined
});
},

@@ -95,0 +98,0 @@ get onDidChangeConfiguration(): typeof vscode.workspace.onDidChangeConfiguration {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc