vscode-jsonrpc
Advanced tools
Comparing version 6.0.0-next.3 to 6.0.0-next.4
@@ -96,7 +96,7 @@ "use strict"; | ||
(function (SetTraceNotification) { | ||
SetTraceNotification.type = new messages_1.NotificationType('$/setTraceNotification'); | ||
SetTraceNotification.type = new messages_1.NotificationType('$/setTrace'); | ||
})(SetTraceNotification = exports.SetTraceNotification || (exports.SetTraceNotification = {})); | ||
var LogTraceNotification; | ||
(function (LogTraceNotification) { | ||
LogTraceNotification.type = new messages_1.NotificationType('$/logTraceNotification'); | ||
LogTraceNotification.type = new messages_1.NotificationType('$/logTrace'); | ||
})(LogTraceNotification = exports.LogTraceNotification || (exports.LogTraceNotification = {})); | ||
@@ -103,0 +103,0 @@ var ConnectionErrors; |
@@ -79,3 +79,3 @@ /** | ||
*/ | ||
result?: string | number | boolean | object | null; | ||
result?: string | number | boolean | object | any[] | null; | ||
/** | ||
@@ -82,0 +82,0 @@ * The error object in case a request fails. |
@@ -153,3 +153,8 @@ "use strict"; | ||
encode: (msg, options) => { | ||
return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset)); | ||
try { | ||
return Promise.resolve(Buffer.from(JSON.stringify(msg, undefined, 0), options.charset)); | ||
} | ||
catch (err) { | ||
return Promise.reject(err); | ||
} | ||
} | ||
@@ -160,7 +165,12 @@ }), | ||
decode: (buffer, options) => { | ||
if (buffer instanceof Buffer) { | ||
return Promise.resolve(JSON.parse(buffer.toString(options.charset))); | ||
try { | ||
if (buffer instanceof Buffer) { | ||
return Promise.resolve(JSON.parse(buffer.toString(options.charset))); | ||
} | ||
else { | ||
return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer))); | ||
} | ||
} | ||
else { | ||
return Promise.resolve(JSON.parse(new util_1.TextDecoder(options.charset).decode(buffer))); | ||
catch (err) { | ||
return Promise.reject(err); | ||
} | ||
@@ -167,0 +177,0 @@ } |
{ | ||
"name": "vscode-jsonrpc", | ||
"description": "A json rpc implementation over streams", | ||
"version": "6.0.0-next.3", | ||
"version": "6.0.0-next.4", | ||
"author": "Microsoft Corporation", | ||
@@ -6,0 +6,0 @@ "license": "MIT", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
25220909
45
4344
1