1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Bump mobx from 6.3.7 to 6.5.0 (#5038)

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
This commit is contained in:
dependabot[bot] 2022-03-21 17:11:54 -04:00 committed by GitHub
parent 8ded571e35
commit be0370a7bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 22 additions and 19 deletions

View File

@ -232,7 +232,7 @@
"mac-ca": "^1.0.6",
"marked": "^4.0.12",
"md5-file": "^5.0.0",
"mobx": "^6.3.7",
"mobx": "^6.5.0",
"mobx-observable-history": "^2.0.3",
"mobx-react": "^7.3.0",
"mobx-utils": "^6.0.4",

View File

@ -169,11 +169,9 @@ export class UserStore extends BaseStore<UserStoreModel> /* implements UserStore
const curVal = this[key];
const newVal = fromStore((preferences)?.[key] as never) as never;
if (
isObservableArray(curVal)
|| isObservableSet(curVal)
|| isObservableMap(curVal)
) {
if (isObservableArray(curVal)) {
curVal.replace(newVal);
} else if (isObservableSet(curVal) || isObservableMap(curVal)) {
curVal.replace(newVal);
} else {
this[key] = newVal;

View File

@ -42,3 +42,10 @@ export function* zip<T, N extends number>(...sources: Tuple<T[], N>): Iterator<T
export function filled<T, L extends number>(length: L, value: T): Tuple<T, L> {
return array.filled(length, value) as Tuple<T, L>;
}
/**
* A function for converting an explicit array to a tuple but without the `readonly` typing
*/
export function from<T extends any[]>(...args: T): [...T] {
return args;
}

View File

@ -11,7 +11,7 @@ import { Notice } from "../+extensions/notice";
import { KubeconfigSyncEntry, KubeconfigSyncValue, UserStore } from "../../../common/user-store";
import { isWindows } from "../../../common/vars";
import logger from "../../../main/logger";
import { iter } from "../../utils";
import { iter, tuple } from "../../utils";
import { SubTitle } from "../layout/sub-title";
import { PathPicker } from "../path-picker/path-picker";
import { Spinner } from "../spinner";
@ -79,9 +79,12 @@ export class KubeconfigSyncs extends React.Component {
this.loaded = true;
disposeOnUnmount(this, [
reaction(() => Array.from(this.syncs.entries(), ([filePath, { data }]) => [filePath, data]), syncs => {
UserStore.getInstance().syncKubeconfigEntries.replace(syncs);
}),
reaction(
() => Array.from(this.syncs.entries(), ([filePath, { data }]) => tuple.from(filePath, data)),
syncs => {
UserStore.getInstance().syncKubeconfigEntries.replace(syncs);
},
),
]);
}

View File

@ -9285,15 +9285,10 @@ mobx-utils@^6.0.4:
resolved "https://registry.yarnpkg.com/mobx-utils/-/mobx-utils-6.0.4.tgz#5283a466ece8de0ac36ae3cfa1b1c032ec302b37"
integrity sha512-CcTgFcCWN78eyRXU7OiKfhIVDEWFFoKdpfj49GIVcWykIQ4deXnaRnnKHElbVYFFgz1TOs8a3bDAq7qsSe864A==
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==
mobx@^6.3.7:
version "6.3.7"
resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.3.7.tgz#9ed85561e86da45141134c8fa20cf5f9c7246c3d"
integrity sha512-X7yU7eOEyxIBk4gjIi2UIilwdw48gXh0kcZ5ex3Rc+COJsJmJ4SNpf42uYea3aUqb1hedTv5xzJrq5Q55p0P5g==
mobx@^6.3.0, mobx@^6.5.0:
version "6.5.0"
resolved "https://registry.yarnpkg.com/mobx/-/mobx-6.5.0.tgz#dc2d028b1882737f6e813fc92454381e438b7ad3"
integrity sha512-pHZ/cySF00FVENDWIDzJyoObFahK6Eg4d0papqm6d7yMkxWTZ/S/csqJX1A3PsYy4t5k3z2QnlwuCfMW5lSEwA==
mock-fs@^5.1.2:
version "5.1.2"