Update ws dependency (#23520)

Summary:
Our `ws` dependency is super outdated, and is [insecure](https://www.npmjs.com/advisories/550). It is used for the websocket example code in RNTester. This PR updates the dependency, and removes undefined console.logs.

[General] [Security] - Updates ws dependency to 6.4.1
Pull Request resolved: https://github.com/facebook/react-native/pull/23520

Differential Revision: D14147596

Pulled By: cpojer

fbshipit-source-id: a03041f613a84bf019d8d0a8c5028d6657b5d89a
This commit is contained in:
Eric Lewis
2019-02-21 13:49:14 -08:00
committed by Facebook Github Bot
parent 9ca7565563
commit a9c8e2c078
4 changed files with 9 additions and 4 deletions

View File

@@ -34,7 +34,6 @@ server.on('connection', ws => {
console.log('WebSocket integration test server exit');
process.exit(0);
}
console.log('Cookie:', ws.upgradeReq.headers.cookie);
ws.send(message + '_response');
});

View File

@@ -33,7 +33,6 @@ const server = new WebSocket.Server({port: 5555});
server.on('connection', ws => {
ws.on('message', message => {
console.log('Received message:', message);
console.log('Cookie:', ws.upgradeReq.headers.cookie);
if (respondWithBinary) {
message = Buffer.from(message);
}

View File

@@ -182,7 +182,6 @@
"react-devtools-core": "^3.6.0",
"regenerator-runtime": "^0.11.0",
"stacktrace-parser": "^0.1.3",
"ws": "^1.1.5",
"yargs": "^9.0.0"
},
"devDependencies": {
@@ -212,7 +211,8 @@
"react": "16.8.1",
"react-native-dummy": "0.2.0",
"react-test-renderer": "16.8.1",
"shelljs": "^0.7.8"
"shelljs": "^0.7.8",
"ws": "^6.1.4"
},
"detox": {
"test-runner": "jest",

View File

@@ -6916,6 +6916,13 @@ ws@^5.2.0:
dependencies:
async-limiter "~1.0.0"
ws@^6.1.4:
version "6.1.4"
resolved "https://registry.yarnpkg.com/ws/-/ws-6.1.4.tgz#5b5c8800afab925e94ccb29d153c8d02c1776ef9"
integrity sha512-eqZfL+NE/YQc1/ZynhojeV8q+H050oR8AZ2uIev7RU10svA9ZnJUddHcOUZTJLinZ9yEfdA2kSATS2qZK5fhJA==
dependencies:
async-limiter "~1.0.0"
xcode@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/xcode/-/xcode-1.0.0.tgz#e1f5b1443245ded38c180796df1a10fdeda084ec"