From e21069bd8361d43ac98a5688e66c1cdc5e0b2e08 Mon Sep 17 00:00:00 2001 From: Dimitar Kerezov Date: Tue, 28 Feb 2017 15:44:06 +0200 Subject: [PATCH] Upgrade ws module The newer version doesn't require `bufferutil` or `utf-8-validate` both of which have native V8 code which we are trying to get rid of. Debugging still works with this new version - tested on three different OS X machines with `tns debug ios --chrome` command. --- lib/device-sockets/ios/socket-proxy-factory.ts | 2 +- package.json | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/lib/device-sockets/ios/socket-proxy-factory.ts b/lib/device-sockets/ios/socket-proxy-factory.ts index a4365c6163..7c720fab88 100644 --- a/lib/device-sockets/ios/socket-proxy-factory.ts +++ b/lib/device-sockets/ios/socket-proxy-factory.ts @@ -78,7 +78,7 @@ export class SocketProxyFactory implements ISocketProxyFactory { // We store the socket that connects us to the device in the upgrade request object itself and later on retrieve it // in the connection callback. - let server = ws.createServer({ + let server = new ws.Server({ port: localPort, verifyClient: (info: any, callback: Function) => { this.$logger.info("Frontend client connected."); diff --git a/package.json b/package.json index 6aeb595445..d9fdc42b36 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,6 @@ "dependencies": { "bplist-parser": "0.1.0", "bufferpack": "0.0.6", - "bufferutil": "https://github.com/telerik/bufferutil/tarball/v1.0.1.5", "byline": "4.2.1", "chalk": "1.1.0", "chokidar": "^1.6.1", @@ -70,10 +69,9 @@ "source-map": "0.5.6", "tabtab": "https://github.com/Icenium/node-tabtab/tarball/master", "temp": "0.8.3", - "utf-8-validate": "https://github.com/telerik/utf-8-validate/tarball/v1.0.1.5", "uuid": "3.0.1", "winreg": "0.0.17", - "ws": "0.7.1", + "ws": "2.2.0", "xcode": "https://github.com/NativeScript/node-xcode/archive/1.4.0.tar.gz", "xmldom": "0.1.21", "xmlhttprequest": "https://github.com/telerik/node-XMLHttpRequest/tarball/master",