@tracerbench/websocket-message-transport
Advanced tools
Comparing version 1.2.0 to 1.3.0
@@ -16,3 +16,3 @@ "use strict"; | ||
let message = `Failed to open ${url}`; | ||
if (lastError !== undefined) { | ||
if (lastError !== undefined && lastError.stack) { | ||
message += `: ${lastError.stack}`; | ||
@@ -46,3 +46,3 @@ } | ||
ws.on("close", handleClose); | ||
return message => ws.send(message); | ||
return (message) => ws.send(message); | ||
}, | ||
@@ -49,0 +49,0 @@ () => ws.close(), |
{ | ||
"name": "@tracerbench/websocket-message-transport", | ||
"version": "1.2.0", | ||
"version": "1.3.0", | ||
"license": "BSD-2-Clause", | ||
@@ -15,19 +15,23 @@ "author": "Kris Selden <kris.selden@gmail.com>", | ||
"clean": "rm -rf dist tsconfig.tsbuildinfo", | ||
"lint": "tslint -p tsconfig.json", | ||
"fixlint": "eslint --ext .ts src --fix", | ||
"lint": "eslint --ext .ts src", | ||
"prepare": "yarn run build" | ||
}, | ||
"dependencies": { | ||
"@tracerbench/message-transport": "^1.2.0", | ||
"@tracerbench/message-transport": "^1.3.0", | ||
"race-cancellation": "^0.4.1", | ||
"ws": "^7.1.2" | ||
"ws": "^7.3.0" | ||
}, | ||
"devDependencies": { | ||
"@types/ws": "^6.0.3", | ||
"prettier": "^1.19.1", | ||
"tslint": "^5.20.0", | ||
"tslint-config-prettier": "^1.18.0", | ||
"tslint-plugin-prettier": "^2.0.1", | ||
"@types/ws": "^7.2.0", | ||
"@typescript-eslint/eslint-plugin": "^3.0.2", | ||
"@typescript-eslint/parser": "^3.0.2", | ||
"eslint": "^7.1.0", | ||
"eslint-config-prettier": "^6.7.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-prettier": "^3.1.1", | ||
"eslint-plugin-simple-import-sort": "^5.0.0", | ||
"prettier": "^2.0.5", | ||
"typescript": "^3.7.2" | ||
}, | ||
"gitHead": "3318d9cdbd6bce276ebe8e2570bd64c1aaa16046" | ||
} | ||
} |
@@ -21,5 +21,5 @@ import { AttachMessageTransport } from "@tracerbench/message-transport"; | ||
ws.on("close", onClose); | ||
function onClose() { | ||
function onClose(): void { | ||
let message = `Failed to open ${url}`; | ||
if (lastError !== undefined) { | ||
if (lastError !== undefined && lastError.stack) { | ||
message += `: ${lastError.stack}`; | ||
@@ -44,3 +44,3 @@ } | ||
let called = false; | ||
function handleClose() { | ||
function handleClose(): void { | ||
if (called) { | ||
@@ -57,3 +57,3 @@ return; | ||
ws.on("close", handleClose); | ||
return message => ws.send(message); | ||
return (message) => ws.send(message); | ||
}, | ||
@@ -60,0 +60,0 @@ () => ws.close(), |
Sorry, the diff of this file is not supported yet
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
9
123
7539
10
Updatedws@^7.3.0