mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Upgrade to electron@^19 (#5369)
* Upgrade to use electron 19.0.4 - Update documentation - Updated disturl in .yarnrc to fix build issue - Remove use of abort-controller package Signed-off-by: Sebastian Malton <sebastian@malton.name> * Remove support for webview tags Signed-off-by: Sebastian Malton <sebastian@malton.name> Signed-off-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
1 parent
edacf3bec6
commit
6d37019089
18 files changed
+84
-134
No files matched your search
@@ -5,11 +5,14 @@
|
||||
import { comparer, reaction } from "mobx";
|
||||
import type { Disposer } from "../../common/utils";
|
||||
import { disposer, getOrInsert, noop, WrappedAbortController } from "../../common/utils";
|
||||
import AbortController from "abort-controller";
|
||||
import { once } from "lodash";
|
||||
import type { ClusterFrameContext } from "../cluster-frame-context/cluster-frame-context";
|
||||
import logger from "../../common/logger";
|
||||
import type { KubeObjectStoreLoadAllParams, KubeObjectStoreSubscribeParams } from "../../common/k8s-api/kube-object.store";
|
||||
import type { RequestInit } from "node-fetch";
|
||||
|
||||
// TODO: upgrade node-fetch once we are starting to use ES modules
|
||||
type LegacyAbortSignal = NonNullable<RequestInit["signal"]>;
|
||||
|
||||
// Kubernetes watch-api client
|
||||
// API: https://developer.mozilla.org/en-US/docs/Web/API/Streams_API/Using_readable_streams
|
||||
@@ -103,7 +106,7 @@ export class KubeWatchApi {
|
||||
|
||||
const loadThenSubscribe = async (namespaces: string[] | undefined) => {
|
||||
try {
|
||||
await store.loadAll({ namespaces, reqInit: { signal: childController.signal }, onLoadFailure });
|
||||
await store.loadAll({ namespaces, reqInit: { signal: childController.signal as LegacyAbortSignal }, onLoadFailure });
|
||||
unsubscribe.push(store.subscribe({ onLoadFailure, abortController: childController }));
|
||||
} catch (error) {
|
||||
if (!(error instanceof DOMException)) {
|
||||
|
||||
Reference in new issue
Block a user