Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codingame/monaco-languageclient

Package Overview
Dependencies
Maintainers
3
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codingame/monaco-languageclient - npm Package Compare versions

Comparing version 0.15.1 to 0.16.0

dist/amd/monaco.d.ts

30

dist/amd/monaco-converter.js

@@ -561,21 +561,21 @@ define(["require", "exports", "vscode-languageserver-protocol", "vscode-languageserver-protocol/lib/common/utils/is", "./services"], function (require, exports, ls, Is, services_1) {

asCodeAction(item) {
if (services_1.CodeAction.is(item)) {
if (services_1.Command.is(item)) {
return {
title: item.title,
command: this.asCommand(item.command),
edit: this.asWorkspaceEdit(item.edit),
diagnostics: this.asDiagnostics(item.diagnostics),
kind: item.kind,
disabled: item.disabled ? item.disabled.reason : undefined,
isPreferred: item.isPreferred,
data: item.data
command: {
id: item.command,
title: item.title,
arguments: item.arguments
},
title: item.title
};
}
return {
command: {
id: item.command,
title: item.title,
arguments: item.arguments
},
title: item.title
title: item.title,
command: this.asCommand(item.command),
edit: this.asWorkspaceEdit(item.edit),
diagnostics: this.asDiagnostics(item.diagnostics),
kind: item.kind,
disabled: item.disabled ? item.disabled.reason : undefined,
isPreferred: item.isPreferred,
data: item.data
};

@@ -582,0 +582,0 @@ }

@@ -223,19 +223,13 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {

let result = yield provider.provideCodeActions(params, token);
// FIXME: get rid of it and implement resolveCodeAction when https://github.com/microsoft/monaco-editor/issues/2663 is resolved
return result && this.p2m.asCodeActionList(result);
}),
resolveCodeAction: provider.resolveCodeAction ? (codeAction, token) => __awaiter(this, void 0, void 0, function* () {
const params = this.m2p.asCodeAction(codeAction);
const result = yield provider.resolveCodeAction(params, token);
if (result) {
if (provider.resolveCodeAction) {
result = yield Promise.all(result.map((item) => __awaiter(this, void 0, void 0, function* () {
if (!services_1.Command.is(item) && !item.edit) {
const resolved = yield provider.resolveCodeAction(item, token);
if (resolved) {
return resolved;
}
}
return item;
})));
}
return this.p2m.asCodeActionList(result);
const resolvedCodeAction = this.p2m.asCodeAction(result);
Object.assign(codeAction, resolvedCodeAction);
}
return undefined;
})
return codeAction;
}) : undefined
};

@@ -272,3 +266,3 @@ }

return codeLens;
}) : ((_, codeLens) => codeLens)
}) : undefined
};

@@ -275,0 +269,0 @@ }

@@ -363,3 +363,3 @@ /* --------------------------------------------------------------------------------------------

match(selector, document) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -385,3 +385,3 @@ }

registerCompletionItemProvider(selector, provider, ...triggerCharacters) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -406,3 +406,3 @@ }

registerCodeActionsProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -424,3 +424,3 @@ }

registerCodeLensProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -443,3 +443,3 @@ }

registerDefinitionProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -458,3 +458,3 @@ }

registerImplementationProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -473,3 +473,3 @@ }

registerTypeDefinitionProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -488,3 +488,3 @@ }

registerDeclarationProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -503,3 +503,3 @@ }

registerHoverProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -518,3 +518,3 @@ }

registerDocumentHighlightProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -533,3 +533,3 @@ }

registerDocumentSymbolProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -559,3 +559,3 @@ }

registerReferenceProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -574,3 +574,3 @@ }

registerRenameProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -589,3 +589,3 @@ }

registerDocumentFormattingEditProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -604,3 +604,3 @@ }

registerDocumentRangeFormattingEditProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -619,3 +619,3 @@ }

registerOnTypeFormattingEditProvider(selector, provider, firstTriggerCharacter, ...moreTriggerCharacter) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -634,3 +634,3 @@ }

registerSignatureHelpProvider(selector, provider, firstItem, ...remaining) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -660,3 +660,3 @@ }

registerDocumentLinkProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -679,3 +679,3 @@ }

registerColorProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -700,3 +700,3 @@ }

registerFoldingRangeProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -715,3 +715,3 @@ }

registerSelectionRangeProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -731,3 +731,3 @@ }

registerDocumentSemanticTokensProvider(selector, provider, legend) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -749,3 +749,3 @@ }

registerDocumentRangeSemanticTokensProvider(selector, provider, legend) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -752,0 +752,0 @@ }

define(["require", "exports", "./vscode-api", "./services"], function (require, exports, vscode_api_1, services_1) {
"use strict";
return vscode_api_1.createVSCodeApi(services_1.Services.get);
return (0, vscode_api_1.createVSCodeApi)(services_1.Services.get);
});
//# sourceMappingURL=vscode-compatibility.js.map

@@ -563,21 +563,21 @@ "use strict";

asCodeAction(item) {
if (services_1.CodeAction.is(item)) {
if (services_1.Command.is(item)) {
return {
title: item.title,
command: this.asCommand(item.command),
edit: this.asWorkspaceEdit(item.edit),
diagnostics: this.asDiagnostics(item.diagnostics),
kind: item.kind,
disabled: item.disabled ? item.disabled.reason : undefined,
isPreferred: item.isPreferred,
data: item.data
command: {
id: item.command,
title: item.title,
arguments: item.arguments
},
title: item.title
};
}
return {
command: {
id: item.command,
title: item.title,
arguments: item.arguments
},
title: item.title
title: item.title,
command: this.asCommand(item.command),
edit: this.asWorkspaceEdit(item.edit),
diagnostics: this.asDiagnostics(item.diagnostics),
kind: item.kind,
disabled: item.disabled ? item.disabled.reason : undefined,
isPreferred: item.isPreferred,
data: item.data
};

@@ -584,0 +584,0 @@ }

@@ -226,19 +226,13 @@ "use strict";

let result = yield provider.provideCodeActions(params, token);
// FIXME: get rid of it and implement resolveCodeAction when https://github.com/microsoft/monaco-editor/issues/2663 is resolved
return result && this.p2m.asCodeActionList(result);
}),
resolveCodeAction: provider.resolveCodeAction ? (codeAction, token) => __awaiter(this, void 0, void 0, function* () {
const params = this.m2p.asCodeAction(codeAction);
const result = yield provider.resolveCodeAction(params, token);
if (result) {
if (provider.resolveCodeAction) {
result = yield Promise.all(result.map((item) => __awaiter(this, void 0, void 0, function* () {
if (!services_1.Command.is(item) && !item.edit) {
const resolved = yield provider.resolveCodeAction(item, token);
if (resolved) {
return resolved;
}
}
return item;
})));
}
return this.p2m.asCodeActionList(result);
const resolvedCodeAction = this.p2m.asCodeAction(result);
Object.assign(codeAction, resolvedCodeAction);
}
return undefined;
})
return codeAction;
}) : undefined
};

@@ -275,3 +269,3 @@ }

return codeLens;
}) : ((_, codeLens) => codeLens)
}) : undefined
};

@@ -278,0 +272,0 @@ }

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

match(selector, document) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -390,3 +390,3 @@ }

registerCompletionItemProvider(selector, provider, ...triggerCharacters) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -411,3 +411,3 @@ }

registerCodeActionsProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -429,3 +429,3 @@ }

registerCodeLensProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -448,3 +448,3 @@ }

registerDefinitionProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -463,3 +463,3 @@ }

registerImplementationProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -478,3 +478,3 @@ }

registerTypeDefinitionProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -493,3 +493,3 @@ }

registerDeclarationProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -508,3 +508,3 @@ }

registerHoverProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -523,3 +523,3 @@ }

registerDocumentHighlightProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -538,3 +538,3 @@ }

registerDocumentSymbolProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -564,3 +564,3 @@ }

registerReferenceProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -579,3 +579,3 @@ }

registerRenameProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -594,3 +594,3 @@ }

registerDocumentFormattingEditProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -609,3 +609,3 @@ }

registerDocumentRangeFormattingEditProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -624,3 +624,3 @@ }

registerOnTypeFormattingEditProvider(selector, provider, firstTriggerCharacter, ...moreTriggerCharacter) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -639,3 +639,3 @@ }

registerSignatureHelpProvider(selector, provider, firstItem, ...remaining) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -665,3 +665,3 @@ }

registerDocumentLinkProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -684,3 +684,3 @@ }

registerColorProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -705,3 +705,3 @@ }

registerFoldingRangeProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -720,3 +720,3 @@ }

registerSelectionRangeProvider(selector, provider) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -736,3 +736,3 @@ }

registerDocumentSemanticTokensProvider(selector, provider, legend) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -754,3 +754,3 @@ }

registerDocumentRangeSemanticTokensProvider(selector, provider, legend) {
if (!services_1.isDocumentSelector(selector)) {
if (!(0, services_1.isDocumentSelector)(selector)) {
throw new Error('unexpected selector: ' + JSON.stringify(selector));

@@ -757,0 +757,0 @@ }

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

const services_1 = require("./services");
module.exports = vscode_api_1.createVSCodeApi(services_1.Services.get);
module.exports = (0, vscode_api_1.createVSCodeApi)(services_1.Services.get);
//# sourceMappingURL=vscode-compatibility.js.map
{
"name": "@codingame/monaco-languageclient",
"version": "0.15.1",
"version": "0.16.0",
"description": "Monaco Language client implementation",

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

@@ -642,21 +642,21 @@ /* --------------------------------------------------------------------------------------------

asCodeAction(item: Command | CodeAction): ProtocolCodeAction {
if (CodeAction.is(item)) {
if (Command.is(item)) {
return {
title: item.title,
command: this.asCommand(item.command),
edit: this.asWorkspaceEdit(item.edit),
diagnostics: this.asDiagnostics(item.diagnostics),
kind: item.kind,
disabled: item.disabled ? item.disabled.reason : undefined,
isPreferred: item.isPreferred,
data: item.data
command: {
id: item.command,
title: item.title,
arguments: item.arguments
},
title: item.title
};
}
return {
command: {
id: item.command,
title: item.title,
arguments: item.arguments
},
title: item.title
title: item.title,
command: this.asCommand(item.command),
edit: this.asWorkspaceEdit(item.edit),
diagnostics: this.asDiagnostics(item.diagnostics),
kind: item.kind,
disabled: item.disabled ? item.disabled.reason : undefined,
isPreferred: item.isPreferred,
data: item.data
};

@@ -663,0 +663,0 @@ }

@@ -14,3 +14,3 @@ /* --------------------------------------------------------------------------------------------

FoldingRangeProvider, SemanticTokensLegend,
DocumentSemanticTokensProvider, DocumentRangeSemanticTokensProvider, Command
DocumentSemanticTokensProvider, DocumentRangeSemanticTokensProvider
} from "./services";

@@ -252,21 +252,13 @@

let result = await provider.provideCodeActions(params, token);
// FIXME: get rid of it and implement resolveCodeAction when https://github.com/microsoft/monaco-editor/issues/2663 is resolved
return result && this.p2m.asCodeActionList(result);
},
resolveCodeAction: provider.resolveCodeAction ? async (codeAction, token) => {
const params = this.m2p.asCodeAction(codeAction);
const result = await provider.resolveCodeAction!(params, token);
if (result) {
if (provider.resolveCodeAction) {
result = await Promise.all(result.map(async item => {
if (!Command.is(item) && !item.edit) {
const resolved = await provider.resolveCodeAction!(item, token)
if (resolved) {
return resolved
}
}
return item
}))
}
return this.p2m.asCodeActionList(result)
const resolvedCodeAction = this.p2m.asCodeAction(result);
Object.assign(codeAction, resolvedCodeAction);
}
return undefined
}
return codeAction;
} : undefined
}

@@ -305,3 +297,3 @@ }

return codeLens;
} : ((_, codeLens) => codeLens)
} : undefined
}

@@ -308,0 +300,0 @@ }

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