Skip to content

Commit 0fb4ff1

Browse files
Restoring the changes
1 parent 1c4a82f commit 0fb4ff1

File tree

5 files changed

+3
-28
lines changed

5 files changed

+3
-28
lines changed

frontend/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -213,10 +213,6 @@
213213
"@vitest/coverage-istanbul": "^3.0.5",
214214
"eslint-plugin-license-header": "^0.8.0",
215215
"fast-check": "^4.5.3",
216-
<<<<<<< HEAD
217-
"husky": "^4.3.8",
218-
=======
219-
>>>>>>> aac9f6766 (root: ci: Add husky,commitlint.config.js& Update docs)
220216
"i18next-parser": "^9.1.0",
221217
"jsdom": "^24.0.0",
222218
"lint-staged": "^10.5.4",

frontend/src/lib/k8s/api/v2/multiplexer.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,21 +76,15 @@ export const WebSocketManager = {
7676
*/
7777
async connect(): Promise<WebSocket> {
7878
// Return existing connection if available
79-
if (
80-
typeof WebSocket !== 'undefined' &&
81-
this.socketMultiplexer?.readyState === WebSocket.OPEN
82-
) {
79+
if (this.socketMultiplexer?.readyState === WebSocket.OPEN) {
8380
return this.socketMultiplexer;
8481
}
8582

8683
// Wait for existing connection attempt if in progress
8784
if (this.connecting) {
8885
return new Promise(resolve => {
8986
const checkConnection = setInterval(() => {
90-
if (
91-
typeof WebSocket !== 'undefined' &&
92-
this.socketMultiplexer?.readyState === WebSocket.OPEN
93-
) {
87+
if (this.socketMultiplexer?.readyState === WebSocket.OPEN) {
9488
clearInterval(checkConnection);
9589
resolve(this.socketMultiplexer);
9690
}
@@ -240,10 +234,7 @@ export const WebSocketManager = {
240234
this.activeSubscriptions.delete(key);
241235
this.completedPaths.delete(key);
242236

243-
if (
244-
typeof WebSocket !== 'undefined' &&
245-
this.socketMultiplexer?.readyState === WebSocket.OPEN
246-
) {
237+
if (this.socketMultiplexer?.readyState === WebSocket.OPEN) {
247238
const userId = getUserIdFromLocalStorage();
248239
const closeMsg: WebSocketMessage = {
249240
clusterId,

frontend/src/setupTests.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,8 @@
1717
/// <reference types="@testing-library/jest-dom" />
1818
import '@testing-library/jest-dom/vitest';
1919
import indexeddb from 'fake-indexeddb';
20-
import WS from 'vitest-websocket-mock';
2120

2221
globalThis.indexedDB = indexeddb;
23-
(globalThis as any).WebSocket = WS;
2422

2523
if (typeof TextDecoder === 'undefined' && typeof require !== 'undefined') {
2624
(global as any).TextDecoder = require('util').TextDecoder;

frontend/tsconfig.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@
2121
"typedocOptions": {
2222
"out": "../docs/development/api",
2323
"plugin": ["typedoc-plugin-markdown", "typedoc-plugin-rename-defaults"],
24-
"exclude": [
25-
"**/*.test.tsx",
26-
"**/*.test.ts",
27-
"src/setupTests.ts"
28-
],
2924
"entryPoints": [
3025
"src/lib/k8s/",
3126
"src/redux/reducers/reducers.tsx",

package.json

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,9 @@
2121
"dev": "npm run start",
2222
"start": "concurrently \"npm run backend:start\" \"npm run frontend:start\" --names \"backend,frontend\" --prefix-colors \"blue,green\"",
2323
"test": "npm run backend:test && npm run frontend:test",
24-
<<<<<<< HEAD
25-
"lint": "npm run backend:lint && npm run frontend:lint && npm run app:lint",
26-
"lint:fix": "npm run backend:lint:fix && npm run frontend:lint:fix && npm run app:lint:fix",
27-
=======
2824
"lint": "npm run backend:lint && npm run frontend:lint && npm run lint:commit",
2925
"lint:commit": "commitlint --from=origin/main",
3026
"lint:fix": "npm run backend:lint:fix && npm run frontend:lint:fix",
31-
>>>>>>> aac9f6766 (root: ci: Add husky,commitlint.config.js& Update docs)
3227
"clean": "rm -rf frontend/build frontend/node_modules app/node_modules app/dist backend/headlamp-server backend/headlamp-server.exe node_modules",
3328
"backend:build": "cd backend && go build -o ./headlamp-server ./cmd",
3429
"backend:lint": "npm run backend:install:linter && cd backend && ./tools/golangci-lint run",

0 commit comments

Comments
 (0)