mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
Bump mobx from 6.3.0 to 6.3.5
Bumps [mobx](https://github.com/mobxjs/mobx) from 6.3.0 to 6.3.5. - [Release notes](https://github.com/mobxjs/mobx/releases) - [Commits](https://github.com/mobxjs/mobx/compare/mobx@6.3.0...mobx@6.3.5) --- updated-dependencies: - dependency-name: mobx dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
parent
b95be78ded
commit
e7b3b00db7
@ -212,7 +212,7 @@
|
||||
"mac-ca": "^1.0.6",
|
||||
"marked": "^2.1.3",
|
||||
"md5-file": "^5.0.0",
|
||||
"mobx": "^6.3.0",
|
||||
"mobx": "6.3.6",
|
||||
"mobx-observable-history": "^2.0.1",
|
||||
"mobx-react": "^7.2.1",
|
||||
"mock-fs": "^4.14.0",
|
||||
|
||||
@ -32,8 +32,18 @@ import { isTestEnv } from "./vars";
|
||||
import { kebabCase } from "lodash";
|
||||
import { AppPaths } from "./app-paths";
|
||||
|
||||
/**
|
||||
* Removing the generic boolean type from `IReactionOptions`
|
||||
*/
|
||||
export type ReactionOptions<T> = IReactionOptions<T, boolean>;
|
||||
|
||||
/**
|
||||
* A form of `IReactionOptions` which disallows changing the equality function
|
||||
*/
|
||||
export type ChangeOptions = Omit<ReactionOptions<void>, "equals">;
|
||||
|
||||
export interface BaseStoreParams<T> extends ConfOptions<T> {
|
||||
syncOptions?: IReactionOptions;
|
||||
syncOptions?: ReactionOptions<T>;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@ -19,11 +19,12 @@
|
||||
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
import { action, comparer, computed, IReactionDisposer, IReactionOptions, makeObservable, reaction } from "mobx";
|
||||
import { action, comparer, computed, IReactionDisposer, makeObservable, reaction } from "mobx";
|
||||
import { autoBind, createStorage, noop, ToggleSet } from "../../utils";
|
||||
import { KubeObjectStore, KubeObjectStoreLoadingParams } from "../../../common/k8s-api/kube-object.store";
|
||||
import { Namespace, namespacesApi } from "../../../common/k8s-api/endpoints/namespaces.api";
|
||||
import { apiManager } from "../../../common/k8s-api/api-manager";
|
||||
import type { ReactionOptions } from "../../../common/base-store";
|
||||
|
||||
export class NamespaceStore extends KubeObjectStore<Namespace> {
|
||||
api = namespacesApi;
|
||||
@ -45,7 +46,7 @@ export class NamespaceStore extends KubeObjectStore<Namespace> {
|
||||
this.autoLoadAllowedNamespaces();
|
||||
}
|
||||
|
||||
public onContextChange(callback: (namespaces: string[]) => void, opts: IReactionOptions = {}): IReactionDisposer {
|
||||
public onContextChange(callback: (namespaces: string[]) => void, opts: ReactionOptions<string[]> = {}): IReactionDisposer {
|
||||
return reaction(() => Array.from(this.contextNamespaces), callback, {
|
||||
equals: comparer.shallow,
|
||||
...opts,
|
||||
|
||||
@ -52,15 +52,12 @@ type Props = {};
|
||||
|
||||
@observer
|
||||
export class DeleteClusterDialog extends React.Component {
|
||||
showContextSwitch = false;
|
||||
newCurrentContext = "";
|
||||
@observable showContextSwitch = false;
|
||||
@observable newCurrentContext = "";
|
||||
|
||||
constructor(props: Props) {
|
||||
super(props);
|
||||
makeObservable(this, {
|
||||
showContextSwitch: observable,
|
||||
newCurrentContext: observable,
|
||||
});
|
||||
makeObservable(this);
|
||||
}
|
||||
|
||||
static open({ config, cluster }: Partial<DialogState>) {
|
||||
|
||||
@ -20,10 +20,11 @@
|
||||
*/
|
||||
|
||||
import * as uuid from "uuid";
|
||||
import { action, computed, IReactionOptions, makeObservable, observable, reaction } from "mobx";
|
||||
import { action, computed, makeObservable, observable, reaction } from "mobx";
|
||||
import { autoBind, createStorage } from "../../utils";
|
||||
import throttle from "lodash/throttle";
|
||||
import { monacoModelsManager } from "./monaco-model-manager";
|
||||
import type { ChangeOptions, ReactionOptions } from "../../../common/base-store";
|
||||
|
||||
export type TabId = string;
|
||||
|
||||
@ -181,11 +182,11 @@ export class DockStore implements DockStorageState {
|
||||
if (this.height > this.maxHeight) this.height = this.maxHeight;
|
||||
}
|
||||
|
||||
onResize(callback: () => void, options?: IReactionOptions) {
|
||||
onResize(callback: () => void, options?: ChangeOptions) {
|
||||
return reaction(() => [this.height, this.fullSize], callback, options);
|
||||
}
|
||||
|
||||
onTabChange(callback: (tabId: TabId) => void, options?: IReactionOptions) {
|
||||
onTabChange(callback: (tabId: TabId) => void, options?: ReactionOptions<TabId>) {
|
||||
return reaction(() => this.selectedTabId, callback, options);
|
||||
}
|
||||
|
||||
|
||||
11
yarn.lock
11
yarn.lock
@ -9562,10 +9562,15 @@ mobx-react@^7.2.1:
|
||||
dependencies:
|
||||
mobx-react-lite "^3.2.0"
|
||||
|
||||
mobx@6.3.6:
|
||||
version "6.3.6"
|
||||
resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.3.6.tgz#3192dea21ae8213d04a0df5c98a5ca164ed29ecd"
|
||||
integrity sha512-TeCp8BTco5cmXKY7Zt5VSL5fHBEAHTSA6xs+KWmcxi3cFN1C+Xqs2m3giyGT/e6TSjtdDysVX5+cCZZhEyiJmA==
|
||||
|
||||
mobx@^6.3.0:
|
||||
version "6.3.0"
|
||||
resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.3.0.tgz#a8fb693c3047bdfcb1eaff9aa48e36a7eb084f96"
|
||||
integrity sha512-Aa1+VXsg4WxqJMTQfWoYuJi5UD10VZhiobSmcs5kcmI3BIT0aVtn7DysvCeDADCzl7dnbX+0BTHUj/v7gLlZpQ==
|
||||
version "6.3.5"
|
||||
resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.3.5.tgz#4464565bf2fa0f74f5dc2e4d6a9713bcee0ddf9c"
|
||||
integrity sha512-MeDfqtiSbhVoJgXqQsrJwvq2klj7Xk9pPdMThCdFiwFt33vgWJe82ATppPwVzQoz0AI3QpSSwQzcp3TBDK4syg==
|
||||
|
||||
mock-fs@^4.14.0:
|
||||
version "4.14.0"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user