mirror of
https://github.com/pezkuwichain/pezkuwi-telemetry.git
synced 2026-06-12 21:31:01 +00:00
Update frontend dependencies (#498)
* update npm packages * update tsconfig * remove babelrc, babel presets as well as stable package * fix svg namespace tag syntax errors * fix reference error due to namespace and class component having same name * replace tslint with eslint * make eslint happier * update .nvmrc to 14 * update node version to 14 in gh workflow * fix eslint warnings due to warnings treated as errors on CI (process.env.CI = true) * pretty fix * bump node version in Dockerfile * use createRoot instead of react-dom render * update browsers list in package.json
This commit is contained in:
@@ -68,7 +68,7 @@ export class Connection {
|
||||
return `wss://${window.location.hostname}/feed/`;
|
||||
}
|
||||
|
||||
return `ws://127.0.0.1:8000/feed`;
|
||||
return 'ws://127.0.0.1:8000/feed';
|
||||
}
|
||||
|
||||
private static async socket(): Promise<WebSocket> {
|
||||
@@ -89,7 +89,7 @@ export class Connection {
|
||||
}
|
||||
|
||||
private static async trySocket(): Promise<Maybe<WebSocket>> {
|
||||
return new Promise<Maybe<WebSocket>>((resolve, _) => {
|
||||
return new Promise<Maybe<WebSocket>>((resolve) => {
|
||||
function clean() {
|
||||
socket.removeEventListener('open', onSuccess);
|
||||
socket.removeEventListener('close', onFailure);
|
||||
@@ -469,7 +469,8 @@ export class Connection {
|
||||
let data: FeedMessage.Data;
|
||||
|
||||
if (typeof event.data === 'string') {
|
||||
data = (event.data as any) as FeedMessage.Data;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
data = event.data as any as FeedMessage.Data;
|
||||
} else {
|
||||
const u8aData = new Uint8Array(event.data);
|
||||
|
||||
@@ -480,7 +481,8 @@ export class Connection {
|
||||
|
||||
const str = Connection.utf8decoder.decode(event.data);
|
||||
|
||||
data = (str as any) as FeedMessage.Data;
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
data = str as any as FeedMessage.Data;
|
||||
}
|
||||
|
||||
this.handleMessages(FeedMessage.deserialize(data));
|
||||
|
||||
Reference in New Issue
Block a user