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

vscode-jsonrpc

Package Overview
Dependencies
Maintainers
9
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vscode-jsonrpc - npm Package Compare versions

Comparing version 3.0.3 to 3.0.4

18

lib/main.d.ts

@@ -113,2 +113,20 @@ /// <reference path="thenable.d.ts" />

}
export declare enum ConnectionErrors {
/**
* The connection is closed.
*/
Closed = 1,
/**
* The connection got disposed.
*/
Disposed = 2,
/**
* The connection is already in listening mode.
*/
AlreadyListening = 3,
}
export declare class ConnectionError extends Error {
readonly code: ConnectionErrors;
constructor(code: ConnectionErrors, message: string);
}
export interface MessageConnection {

@@ -115,0 +133,0 @@ sendRequest<R, E, RO>(type: RequestType0<R, E, RO>, token?: CancellationToken): Thenable<R>;

37

lib/main.js

@@ -7,2 +7,7 @@ /* --------------------------------------------------------------------------------------------

'use strict';
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var is = require("./is");

@@ -94,2 +99,28 @@ var messages_1 = require("./messages");

})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {}));
var ConnectionErrors;
(function (ConnectionErrors) {
/**
* The connection is closed.
*/
ConnectionErrors[ConnectionErrors["Closed"] = 1] = "Closed";
/**
* The connection got disposed.
*/
ConnectionErrors[ConnectionErrors["Disposed"] = 2] = "Disposed";
/**
* The connection is already in listening mode.
*/
ConnectionErrors[ConnectionErrors["AlreadyListening"] = 3] = "AlreadyListening";
})(ConnectionErrors = exports.ConnectionErrors || (exports.ConnectionErrors = {}));
var ConnectionError = (function (_super) {
__extends(ConnectionError, _super);
function ConnectionError(code, message) {
var _this = _super.call(this, message) || this;
_this.code = code;
Object.setPrototypeOf(_this, ConnectionError.prototype);
return _this;
}
return ConnectionError;
}(Error));
exports.ConnectionError = ConnectionError;
var ConnectionState;

@@ -452,6 +483,6 @@ (function (ConnectionState) {

if (isClosed()) {
throw new Error('Connection is closed.');
throw new ConnectionError(ConnectionErrors.Closed, 'Connection is closed.');
}
if (isDisposed()) {
throw new Error('Connection is disposed.');
throw new ConnectionError(ConnectionErrors.Disposed, 'Connection is disposed.');
}

@@ -461,3 +492,3 @@ }

if (isListening()) {
throw new Error('Connection is already listening');
throw new ConnectionError(ConnectionErrors.AlreadyListening, 'Connection is already listening');
}

@@ -464,0 +495,0 @@ }

2

package.json
{
"name": "vscode-jsonrpc",
"description": "A json rpc implementation over streams",
"version": "3.0.3",
"version": "3.0.4",
"author": "Microsoft Corporation",

@@ -6,0 +6,0 @@ "license": "MIT",

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