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 0.10.7 to 1.0.1

1

lib/main.d.ts

@@ -30,2 +30,3 @@ import * as cp from 'child_process';

module: string;
useIPC?: boolean;
args?: string[];

@@ -32,0 +33,0 @@ options?: ForkOptions;

31

lib/main.js

@@ -33,5 +33,5 @@ /* --------------------------------------------------------------------------------------------

})();
function createConnection(inputStream, outputStream) {
function createConnection(input, output) {
var logger = new Logger();
var connection = vscode_jsonrpc_1.createClientMessageConnection(inputStream, outputStream, logger);
var connection = vscode_jsonrpc_1.createClientMessageConnection(input, output, logger);
var result = {

@@ -247,3 +247,3 @@ listen: function () { return connection.listen(); },

var _this = this;
var initParams = { rootPath: vscode_1.workspace.rootPath, capabilities: {} };
var initParams = { processId: process.pid, rootPath: vscode_1.workspace.rootPath, capabilities: {} };
return connection.initialize(initParams).then(function (result) {

@@ -406,11 +406,22 @@ _this._state = ClientState.Running;

options.cwd = options.cwd || vscode_1.workspace.rootPath;
electron.fork(node.module, node.args || [], options, function (error, cp) {
if (error) {
reject(error);
if (node.useIPC) {
_this._childProcess = cp.fork(node.module, node.args || [], options);
if (_this._childProcess.pid) {
resolve(createConnection(new vscode_jsonrpc_1.IPCMessageReader(_this._childProcess), new vscode_jsonrpc_1.IPCMessageWriter(_this._childProcess)));
}
else {
_this._childProcess = cp;
resolve(createConnection(cp.stdout, cp.stdin));
reject(new Error("Unable to fork node using module " + node.module));
}
});
}
else {
electron.fork(node.module, node.args || [], options, function (error, cp) {
if (error) {
reject(error);
}
else {
_this._childProcess = cp;
resolve(createConnection(cp.stdout, cp.stdin));
}
});
}
});

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

try {
process.kill(childProcess.pid, '0');
process.kill(childProcess.pid, 0);
processes_1.terminate(childProcess);

@@ -435,0 +446,0 @@ }

@@ -91,2 +91,7 @@ import { RequestType, NotificationType } from 'vscode-jsonrpc';

/**
* The process Id of the parent process that started
* the server.
*/
processId: number;
/**
* The rootPath of the workspace. Is null

@@ -93,0 +98,0 @@ * if no folder is open.

@@ -5,2 +5,3 @@ import * as code from 'vscode';

export declare function asDiagnostics(diagnostics: proto.Diagnostic[]): code.Diagnostic[];
export declare function asDiagnostic(diagnostic: proto.Diagnostic): code.Diagnostic;
export declare function asRange(value: proto.Range): code.Range;

@@ -7,0 +8,0 @@ export declare function asPosition(value: proto.Position): code.Position;

@@ -11,5 +11,13 @@ /* --------------------------------------------------------------------------------------------

function asDiagnostics(diagnostics) {
return diagnostics.map(function (diagnostic) { return new code.Diagnostic(asRange(diagnostic.range), diagnostic.message, asDiagnosticSeverity(diagnostic.severity)); });
return diagnostics.map(asDiagnostic);
}
exports.asDiagnostics = asDiagnostics;
function asDiagnostic(diagnostic) {
var result = new code.Diagnostic(asRange(diagnostic.range), diagnostic.message, asDiagnosticSeverity(diagnostic.severity));
if (is.defined(diagnostic.code)) {
result.code = diagnostic.code;
}
return result;
}
exports.asDiagnostic = asDiagnostic;
function asRange(value) {

@@ -16,0 +24,0 @@ if (is.undefined(value)) {

@@ -1,21 +0,11 @@

The MIT License (MIT)
Copyright (c) Microsoft Corporation
Copyright (c) 2015 Microsoft
All rights reserved.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
MIT License
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
{
"name": "vscode-languageclient",
"description": "VSCode Language client implementation",
"version": "0.10.7",
"version": "1.0.1",
"author": "Microsoft Corporation",

@@ -20,3 +20,2 @@ "license": "MIT",

"devDependencies": {
"mocha": "^2.3.2",
"typescript": "^1.6.2",

@@ -26,7 +25,9 @@ "vscode": "0.10.x"

"dependencies": {
"vscode-jsonrpc": "0.10.x"
"vscode-jsonrpc": "^1.0.1"
},
"scripts": {
"prepublish": "tsc -p ./src"
"prepublish": "tsc -p ./src",
"compile": "tsc -p ./src",
"watch": "tsc -w -p ./src"
}
}

@@ -1,4 +0,11 @@

# VSCode Language Worker for Node
# VSCode Language Server - Client Module
This npm module provides the implementation of the VSCode language worker protocol for node.js. This allows writing
language service extensions in node which are executed in a different process.
[![NPM Version](https://img.shields.io/npm/v/vscode-languageclient.svg)](https://npmjs.org/package/vscode-languageclient)
[![NPM Downloads](https://img.shields.io/npm/dm/vscode-languageclient.svg)](https://npmjs.org/package/vscode-languageclient)
[![Build Status](https://travis-ci.org/Microsoft/vscode-languageserver-node.svg?branch=master)](https://travis-ci.org/Microsoft/vscode-languageserver-node)
This npm module allows VSCode extensions to talk to langauge servers implemented in any kind of language
as long as the 'speak' the VSCode language server protocol.
Click [here](https://code.visualstudio.com/docs/extensions/example-language-server) for a detaild document on how to uses this npm module
to implement language servers for [VSCode](https://code.visualstudio.com/).
THIRD-PARTY SOFTWARE NOTICES AND INFORMATION
For Microsoft vscode-eslint
For Microsoft vscode-languageclient

@@ -4,0 +4,0 @@ This project incorporates material from the project(s) listed below (collectively, “Third Party Code”).

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