villebro commented on a change in pull request #17325:
URL: https://github.com/apache/superset/pull/17325#discussion_r741686741



##########
File path: superset-websocket/package.json
##########
@@ -16,29 +16,33 @@
   "license": "Apache-2.0",
   "dependencies": {
     "cookie": "^0.4.1",
-    "hot-shots": "^8.3.1",
-    "ioredis": "^4.16.1",
+    "hot-shots": "^9.0.0",
+    "ioredis": "^4.28.0",
     "jsonwebtoken": "^8.5.1",
     "uuid": "^8.3.2",
     "winston": "^3.3.3",
-    "ws": "^7.4.2"
+    "ws": "^8.2.3"
   },
   "devDependencies": {
-    "@types/cookie": "^0.4.0",
-    "@types/ioredis": "^4.22.0",
-    "@types/jest": "^26.0.20",
-    "@types/jsonwebtoken": "^8.5.1",
-    "@types/node": "^14.14.22",
-    "@types/uuid": "^8.3.0",
-    "@types/ws": "^7.4.0",
+    "@types/cookie": "^0.4.1",
+    "@types/ioredis": "^4.27.8",
+    "@types/jest": "^27.0.2",
+    "@types/jsonwebtoken": "^8.5.5",
+    "@types/node": "^16.11.6",
+    "@types/uuid": "^8.3.1",
+    "@types/ws": "^8.2.0",
     "@typescript-eslint/eslint-plugin": "^4.19.0",
     "@typescript-eslint/parser": "^4.19.0",
-    "eslint": "^7.22.0",
-    "eslint-config-prettier": "^8.1.0",
-    "jest": "^26.6.3",
-    "prettier": "2.2.1",
-    "ts-jest": "^26.5.3",
+    "eslint": "^7.32.0",
+    "eslint-config-prettier": "^7.1.0",
+    "jest": "^27.3.1",
+    "prettier": "^2.4.1",

Review comment:
       `prettier` bumped to same version as `superset-ui` to make monorepo 
migration easier.

##########
File path: superset-websocket/spec/index.test.ts
##########
@@ -459,6 +459,18 @@ describe('server', () => {
     });
   });
 
+  const setReadyState = (ws: WebSocket, value: typeof ws.readyState) => {
+    // workaround for not being able to do
+    // spyOn(instance,'readyState','get').and.returnValue(value);
+    // See for details: https://github.com/facebook/jest/issues/9675
+    Object.defineProperty(ws, 'readyState', {
+      configurable: true,
+      get() {
+        return value;
+      },
+    });
+  };

Review comment:
       `WebSocket.readyState` has been made `readonly` in version 8 of `ws`, so 
the property needs to be mocked.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to