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

vscode-languageclient

Package Overview
Dependencies
Maintainers
9
Versions
302
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-languageclient - npm Package Compare versions

Comparing version 1.3.1 to 1.4.0

11

lib/codeConverter.js

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

uri: textDocument.uri.toString(),
languageId: textDocument.languageId,
text: textDocument.getText()

@@ -31,2 +32,3 @@ };

uri: arg.uri.toString(),
languageId: arg.languageId,
contentChanges: [{ text: arg.getText() }]

@@ -39,2 +41,3 @@ };

uri: arg.document.uri.toString(),
languageId: arg.document.languageId,
contentChanges: arg.contentChanges.map(function (change) {

@@ -61,3 +64,4 @@ var range = change.range;

return {
uri: textDocument.uri.toString()
uri: textDocument.uri.toString(),
languageId: textDocument.languageId
};

@@ -67,7 +71,7 @@ }

function asTextDocumentIdentifier(textDocument) {
return { uri: textDocument.uri.toString() };
return { uri: textDocument.uri.toString(), languageId: textDocument.languageId };
}
exports.asTextDocumentIdentifier = asTextDocumentIdentifier;
function asTextDocumentPosition(textDocument, position) {
return { uri: textDocument.uri.toString(), position: asWorkerPosition(position) };
return { uri: textDocument.uri.toString(), languageId: textDocument.languageId, position: asWorkerPosition(position) };
}

@@ -155,2 +159,3 @@ exports.asTextDocumentPosition = asTextDocumentPosition;

uri: textDocument.uri.toString(),
languageId: textDocument.languageId,
position: asWorkerPosition(position),

@@ -157,0 +162,0 @@ context: { includeDeclaration: options.includeDeclaration }

@@ -301,2 +301,6 @@ import { RequestType, NotificationType } from 'vscode-jsonrpc';

uri: string;
/**
* The text document's language identifier
*/
languageId: string;
}

@@ -311,4 +315,5 @@ /**

* @param uri The document's uri.
* @param languageId The document's language id.
*/
function create(uri: string): TextDocumentIdentifier;
function create(uri: string, languageId?: string): TextDocumentIdentifier;
/**

@@ -340,2 +345,8 @@ * Checks whether the given literal conforms to the [TextDocumentIdentifier](#TextDocumentIdentifier) interface.

/**
* Creates a new TextDocumentPosition
* @param uri The document's uri.
* @param position The position inside the document.
*/
function create(uri: string, languageId: string, position: Position): TextDocumentPosition;
/**
* Checks whether the given literal conforms to the [TextDocumentPosition](#TextDocumentPosition) interface.

@@ -342,0 +353,0 @@ */

@@ -27,3 +27,3 @@ /* --------------------------------------------------------------------------------------------

var candidate = value;
return Is.defined(candidate) && Is.number(candidate.line) && Is.number(candidate.character);
return Is.defined(candidate) && Is.number(candidate.line) && Is.number(candidate.character) ? true : false;
}

@@ -55,3 +55,3 @@ Position.is = is;

var candidate = value;
return Is.defined(candidate) && Position.is(candidate.start) && Position.is(candidate.end);
return Is.defined(candidate) && Position.is(candidate.start) && Position.is(candidate.end) ? true : false;
}

@@ -80,3 +80,3 @@ Range.is = is;

var candidate = value;
return Is.defined(candidate) && Range.is(candidate) && (Is.string(candidate.uri) || Is.undefined(candidate.uri));
return Is.defined(candidate) && Range.is(candidate) && (Is.string(candidate.uri) || Is.undefined(candidate.uri)) ? true : false;
}

@@ -140,3 +140,3 @@ Location.is = is;

&& (Is.number(candidate.code) || Is.string(candidate.code) || Is.undefined(candidate.code))
&& (Is.string(candidate.source) || Is.undefined(candidate.source));
&& (Is.string(candidate.source) || Is.undefined(candidate.source)) ? true : false;
}

@@ -171,3 +171,3 @@ Diagnostic.is = is;

var candidate = value;
return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.title);
return Is.defined(candidate) && Is.string(candidate.title) && Is.string(candidate.title) ? true : false;
}

@@ -277,5 +277,6 @@ Command.is = is;

* @param uri The document's uri.
* @param languageId The document's language id.
*/
function create(uri) {
return { uri: uri };
function create(uri, languageId) {
return { uri: uri, languageId: languageId };
}

@@ -288,3 +289,3 @@ TextDocumentIdentifier.create = create;

var candidate = value;
return Is.defined(candidate) && Is.string(candidate.uri);
return Is.defined(candidate) && Is.string(candidate.uri) ? true : false;
}

@@ -299,9 +300,13 @@ TextDocumentIdentifier.is = is;

(function (TextDocumentPosition) {
/**
* Creates a new TextDocumentPosition
* @param uri The document's uri.
* @param position The position inside the document.
*/
function create(uri, position) {
return { uri: uri, position: position };
function create(uri, arg2, arg3) {
var languageId;
var position;
if (Is.string(arg2) && Position.is(arg3)) {
languageId = arg2;
position = arg3;
}
else if (Position.is(arg2)) {
position = arg2;
}
return { uri: uri, languageId: languageId, position: position };
}

@@ -314,3 +319,3 @@ TextDocumentPosition.create = create;

var candidate = value;
return Is.defined(candidate) && TextDocumentIdentifier.is(candidate) && Position.is(candidate.position);
return Is.defined(candidate) && TextDocumentIdentifier.is(candidate) && Position.is(candidate.position) ? true : false;
}

@@ -783,3 +788,3 @@ TextDocumentPosition.is = is;

var candidate = value;
return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is);
return Is.defined(candidate) && Is.typedArray(candidate.diagnostics, Diagnostic.is) ? true : false;
}

@@ -852,3 +857,3 @@ CodeActionContext.is = is;

var candidate = value;
return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces);
return Is.defined(candidate) && Is.number(candidate.tabSize) && Is.boolean(candidate.insertSpaces) ? true : false;
}

@@ -855,0 +860,0 @@ FormattingOptions.is = is;

{
"name": "vscode-languageclient",
"description": "VSCode Language client implementation",
"version": "1.3.1",
"version": "1.4.0",
"author": "Microsoft Corporation",

@@ -21,3 +21,3 @@ "license": "MIT",

"typescript": "^1.7.5",
"vscode": "^0.2.0"
"vscode": "^0.11.x"
},

@@ -28,2 +28,3 @@ "dependencies": {

"scripts": {
"postinstall": "node ./node_modules/vscode/bin/install",
"prepublish": "tsc -p ./src",

@@ -30,0 +31,0 @@ "compile": "tsc -p ./src",

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