From d6107e95855d682ee0c2e098b642f75e34f4fd6f Mon Sep 17 00:00:00 2001 From: Jari Kolehmainen Date: Tue, 24 May 2022 15:22:46 +0300 Subject: [PATCH 01/62] Allow bundled extensions to use codesign (#5438) --- .azure-pipelines.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 3c928430ed..307032e036 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -94,9 +94,25 @@ jobs: GH_TOKEN: $(LENS_IDE_GH_TOKEN) displayName: Customize config - - script: make build + - bash: | + set -e + + echo "Importing codesign certificate ..." + echo $CSC_LINK | base64 -D > certificate.p12 + security create-keychain -p $KEYCHAIN_PASSWORD build.keychain + security set-keychain-settings -lut 21600 build.keychain + security default-keychain -s build.keychain + security unlock-keychain -p $KEYCHAIN_PASSWORD build.keychain + security import certificate.p12 -k build.keychain -P $CSC_KEY_PASSWORD -T /usr/bin/codesign -T /usr/bin/security -A + security set-key-partition-list -S apple-tool:,apple: -k $KEYCHAIN_PASSWORD build.keychain + + rm certificate.p12 + echo "Codesign certificate imported!" + + make build condition: "and(succeeded(), startsWith(variables['Build.SourceBranch'], 'refs/tags/'))" env: + KEYCHAIN_PASSWORD: secretz APPLEID: $(APPLEID) APPLEIDPASS: $(APPLEIDPASS) CSC_LINK: $(CSC_LINK) From a61a455fad8f8325ede54b12ec61619addeec31e Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Tue, 24 May 2022 09:28:17 -0700 Subject: [PATCH 02/62] Fix Catalog displaying wrong number of items per category (#5427) Signed-off-by: Sebastian Malton --- .../__tests__/catalog-entity-store.test.ts | 163 ++++++++++++++++++ .../catalog-entity.store.tsx | 9 +- 2 files changed, 169 insertions(+), 3 deletions(-) create mode 100644 src/renderer/components/+catalog/__tests__/catalog-entity-store.test.ts diff --git a/src/renderer/components/+catalog/__tests__/catalog-entity-store.test.ts b/src/renderer/components/+catalog/__tests__/catalog-entity-store.test.ts new file mode 100644 index 0000000000..6794fed899 --- /dev/null +++ b/src/renderer/components/+catalog/__tests__/catalog-entity-store.test.ts @@ -0,0 +1,163 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ + +import type { CatalogCategoryMetadata, CatalogCategorySpec } from "../../../../common/catalog"; +import { CatalogEntity, categoryVersion } from "../../../../common/catalog"; +import { CatalogCategory } from "../../../api/catalog-entity"; +import { noop } from "../../../utils"; +import type { CatalogEntityStore } from "../catalog-entity-store/catalog-entity.store"; +import { catalogEntityStore } from "../catalog-entity-store/catalog-entity.store"; + +class TestEntityOne extends CatalogEntity { + public static readonly apiVersion: string = "entity.k8slens.dev/v1alpha1"; + public static readonly kind: string = "TestEntityOne"; + + public readonly apiVersion = TestEntityOne.apiVersion; + public readonly kind = TestEntityOne.kind; +} + +class TestEntityTwo extends CatalogEntity { + public static readonly apiVersion: string = "entity.k8slens.dev/v1alpha1"; + public static readonly kind: string = "TestEntityTwo"; + + public readonly apiVersion = TestEntityTwo.apiVersion; + public readonly kind = TestEntityTwo.kind; +} + +class TestCategoryOne extends CatalogCategory { + apiVersion = "catalog.k8slens.dev/v1alpha1"; + kind = "CatalogCategory"; + metadata: CatalogCategoryMetadata = { + icon: "dash", + name: "test-one", + }; + spec: CatalogCategorySpec = { + group: "entity.k8slens.dev", + versions: [ + categoryVersion("v1alpha1", TestEntityOne), + ], + names: { + kind: "KubernetesCluster", + }, + }; +} + +class TestCategoryTwo extends CatalogCategory { + apiVersion = "catalog.k8slens.dev/v1alpha1"; + kind = "CatalogCategory"; + metadata: CatalogCategoryMetadata = { + icon: "dash", + name: "test-two", + }; + spec: CatalogCategorySpec = { + group: "entity.k8slens.dev", + versions: [ + categoryVersion("v1alpha1", TestEntityTwo), + ], + names: { + kind: "KubernetesCluster", + }, + }; +} + +describe("CatalogEntityStore", () => { + describe("getTotalCount", () => { + let store: CatalogEntityStore; + let testCategoryOne: TestCategoryOne; + let testCategoryTwo: TestCategoryTwo; + + beforeEach(() => { + const entityItems = [ + new TestEntityOne({ + metadata: { + labels: {}, + name: "my-test-one", + uid: "1", + }, + spec: {}, + status: { + phase: "unknown", + }, + }), + new TestEntityOne({ + metadata: { + labels: {}, + name: "my-test-two", + uid: "2", + }, + spec: {}, + status: { + phase: "unknown", + }, + }), + new TestEntityTwo({ + metadata: { + labels: {}, + name: "my-test-three", + uid: "3", + }, + spec: {}, + status: { + phase: "unknown", + }, + }), + new TestEntityTwo({ + metadata: { + labels: {}, + name: "my-test-four", + uid: "4", + }, + spec: {}, + status: { + phase: "unknown", + }, + }), + new TestEntityTwo({ + metadata: { + labels: {}, + name: "my-test-five", + uid: "5", + }, + spec: {}, + status: { + phase: "unknown", + }, + }), + ]; + + testCategoryOne = new TestCategoryOne(); + testCategoryTwo = new TestCategoryTwo(); + store = catalogEntityStore({ + catalogRegistry: { + items: [ + testCategoryOne, + testCategoryTwo, + ], + }, + entityRegistry: { + onRun: noop, + filteredItems: entityItems, + getItemsForCategory: (category: CatalogCategory): T[] => { + return entityItems.filter(item => category.spec.versions.some(version => item instanceof version.entityClass)) as T[]; + }, + }, + }); + }); + + it("given no active category, returns count of all kinds", () => { + expect(store.getTotalCount()).toBe(5); + }); + + it("given active category is TestCategoryOne, only returns count for those declared kinds", () => { + store.activeCategory.set(testCategoryOne); + expect(store.getTotalCount()).toBe(2); + }); + + it("given active category is TestCategoryTwo, only returns count for those declared kinds", () => { + store.activeCategory.set(testCategoryTwo); + expect(store.getTotalCount()).toBe(3); + }); + }); +}); diff --git a/src/renderer/components/+catalog/catalog-entity-store/catalog-entity.store.tsx b/src/renderer/components/+catalog/catalog-entity-store/catalog-entity.store.tsx index f0562fd736..3209428cba 100644 --- a/src/renderer/components/+catalog/catalog-entity-store/catalog-entity.store.tsx +++ b/src/renderer/components/+catalog/catalog-entity-store/catalog-entity.store.tsx @@ -12,9 +12,12 @@ import type { Disposer } from "../../../../common/utils"; import { disposer } from "../../../../common/utils"; import type { ItemListStore } from "../../item-object-list"; +type EntityRegistry = Pick; +type CatalogRegistry = Pick; + interface Dependencies { - entityRegistry: CatalogEntityRegistry; - catalogRegistry: CatalogCategoryRegistry; + entityRegistry: EntityRegistry; + catalogRegistry: CatalogRegistry; } export type CatalogEntityStore = ItemListStore & { @@ -71,7 +74,7 @@ export function catalogEntityStore({ ), onRun: entity => entityRegistry.onRun(entity), failedLoading: false, - getTotalCount: () => entityRegistry.filteredItems.length, + getTotalCount: () => entities.get().length, isLoaded: true, isSelected: (item) => item.getId() === selectedItemId.get(), isSelectedAll: () => false, From d09816aacf61bef6b0795d60a5ca76ed034d27dd Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Wed, 25 May 2022 06:00:37 -0700 Subject: [PATCH 03/62] Cherry Pick bug fixes from v5.5.0-beta.2 (#5429) --- .../__tests__/{nodes.test.ts => node.test.ts} | 56 ++++++++++++++++++- src/common/k8s-api/endpoints/node.api.ts | 35 +++++++++--- src/main/helm/exec.ts | 2 +- src/main/kubectl/kubectl.ts | 2 +- src/renderer/components/+nodes/store.ts | 4 +- 5 files changed, 86 insertions(+), 13 deletions(-) rename src/common/k8s-api/__tests__/{nodes.test.ts => node.test.ts} (72%) diff --git a/src/common/k8s-api/__tests__/nodes.test.ts b/src/common/k8s-api/__tests__/node.test.ts similarity index 72% rename from src/common/k8s-api/__tests__/nodes.test.ts rename to src/common/k8s-api/__tests__/node.test.ts index e2527cd9c6..53ffc59d79 100644 --- a/src/common/k8s-api/__tests__/nodes.test.ts +++ b/src/common/k8s-api/__tests__/node.test.ts @@ -8,7 +8,61 @@ import { Node } from "../endpoints"; * Copyright (c) OpenLens Authors. All rights reserved. * Licensed under MIT License. See LICENSE in root directory for more information. */ -describe("Nodes tests", () => { +describe("Node tests", () => { + describe("isMasterNode()", () => { + it("given a master node labelled before kubernetes 1.20, should return true", () => { + const node = new Node({ + apiVersion: "foo", + kind: "Node", + metadata: { + name: "bar", + resourceVersion: "1", + uid: "bat", + labels: { + "node-role.kubernetes.io/master": "NoSchedule", + }, + selfLink: "/api/v1/nodes/bar", + }, + }); + + expect(node.isMasterNode()).toBe(true); + }); + + it("given a master node labelled after kubernetes 1.20, should return true", () => { + const node = new Node({ + apiVersion: "foo", + kind: "Node", + metadata: { + name: "bar", + resourceVersion: "1", + uid: "bat", + labels: { + "node-role.kubernetes.io/control-plane": "NoSchedule", + }, + selfLink: "/api/v1/nodes/bar", + }, + }); + + expect(node.isMasterNode()).toBe(true); + }); + + it("given a non master node, should return false", () => { + const node = new Node({ + apiVersion: "foo", + kind: "Node", + metadata: { + name: "bar", + resourceVersion: "1", + uid: "bat", + labels: {}, + selfLink: "/api/v1/nodes/bar", + }, + }); + + expect(node.isMasterNode()).toBe(false); + }); + }); + describe("getRoleLabels()", () => { it("should return empty string if labels is not present", () => { const node = new Node({ diff --git a/src/common/k8s-api/endpoints/node.api.ts b/src/common/k8s-api/endpoints/node.api.ts index 3aab828621..a51db59fa7 100644 --- a/src/common/k8s-api/endpoints/node.api.ts +++ b/src/common/k8s-api/endpoints/node.api.ts @@ -5,7 +5,7 @@ import type { BaseKubeObjectCondition, KubeObjectScope } from "../kube-object"; import { KubeObject } from "../kube-object"; -import { cpuUnitsToNumber, unitsToBytes } from "../../../renderer/utils"; +import { cpuUnitsToNumber, unitsToBytes, isObject } from "../../../renderer/utils"; import type { MetricData } from "./metrics.api"; import { metricsApi } from "./metrics.api"; import type { DerivedKubeApiOptions, IgnoredKubeApiOptions } from "../kube-api"; @@ -69,6 +69,17 @@ export interface NodeCondition extends BaseKubeObjectCondition { lastHeartbeatTime?: string; } +/** + * These role label prefixs are the ones that are for master nodes + * + * The `master` label has been deprecated in Kubernetes 1.20, and will be removed in 1.25 so we + * have to also use the newer `control-plane` label + */ +const masterNodeLabels = [ + "master", + "control-plane", +]; + /** * This regex is used in the `getRoleLabels()` method bellow, but placed here * as factoring out regexes is best practice. @@ -189,15 +200,19 @@ export class Node extends KubeObject masterNodeLabels.includes(roleLabel)); + } + + getRoleLabelItems(): string[] { const { labels } = this.metadata; - - if (!labels || typeof labels !== "object") { - return ""; - } - const roleLabels: string[] = []; + if (!isObject(labels)) { + return roleLabels; + } + for (const labelKey of Object.keys(labels)) { const match = nodeRoleLabelKeyMatcher.match(labelKey); @@ -214,7 +229,11 @@ export class Node extends KubeObject { } @computed get masterNodes() { - return this.items.filter(node => node.getRoleLabels().includes("master")); + return this.items.filter(node => node.isMasterNode()); } @computed get workerNodes() { - return this.items.filter(node => !node.getRoleLabels().includes("master")); + return this.items.filter(node => !node.isMasterNode()); } getWarningsCount(): number { From b616eee6002ac8acb4de3240932a5e1b002a74ae Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 10:57:17 -0400 Subject: [PATCH 04/62] Bump @typescript-eslint/eslint-plugin from 5.23.0 to 5.26.0 (#5437) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 86 ++++++++++++++++++++++++++++++++++++---------------- 2 files changed, 61 insertions(+), 27 deletions(-) diff --git a/package.json b/package.json index a2b4408cfe..b31a5a8f44 100644 --- a/package.json +++ b/package.json @@ -340,7 +340,7 @@ "@types/webpack-dev-server": "^4.7.2", "@types/webpack-env": "^1.16.4", "@types/webpack-node-externals": "^2.5.3", - "@typescript-eslint/eslint-plugin": "^5.21.0", + "@typescript-eslint/eslint-plugin": "^5.26.0", "@typescript-eslint/parser": "^5.17.0", "ansi_up": "^5.1.0", "chart.js": "^2.9.4", diff --git a/yarn.lock b/yarn.lock index 21beb4bb50..492cff8d19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2196,19 +2196,19 @@ dependencies: "@types/node" "*" -"@typescript-eslint/eslint-plugin@^5.21.0": - version "5.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.23.0.tgz#bc4cbcf91fbbcc2e47e534774781b82ae25cc3d8" - integrity sha512-hEcSmG4XodSLiAp1uxv/OQSGsDY6QN3TcRU32gANp+19wGE1QQZLRS8/GV58VRUoXhnkuJ3ZxNQ3T6Z6zM59DA== +"@typescript-eslint/eslint-plugin@^5.26.0": + version "5.26.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.26.0.tgz#c1f98ccba9d345e38992975d3ca56ed6260643c2" + integrity sha512-oGCmo0PqnRZZndr+KwvvAUvD3kNE4AfyoGCwOZpoCncSh4MVD06JTE8XQa2u9u+NX5CsyZMBTEc2C72zx38eYA== dependencies: - "@typescript-eslint/scope-manager" "5.23.0" - "@typescript-eslint/type-utils" "5.23.0" - "@typescript-eslint/utils" "5.23.0" - debug "^4.3.2" + "@typescript-eslint/scope-manager" "5.26.0" + "@typescript-eslint/type-utils" "5.26.0" + "@typescript-eslint/utils" "5.26.0" + debug "^4.3.4" functional-red-black-tree "^1.0.1" - ignore "^5.1.8" + ignore "^5.2.0" regexpp "^3.2.0" - semver "^7.3.5" + semver "^7.3.7" tsutils "^3.21.0" "@typescript-eslint/parser@^5.17.0": @@ -2229,13 +2229,21 @@ "@typescript-eslint/types" "5.23.0" "@typescript-eslint/visitor-keys" "5.23.0" -"@typescript-eslint/type-utils@5.23.0": - version "5.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.23.0.tgz#f852252f2fc27620d5bb279d8fed2a13d2e3685e" - integrity sha512-iuI05JsJl/SUnOTXA9f4oI+/4qS/Zcgk+s2ir+lRmXI+80D8GaGwoUqs4p+X+4AxDolPpEpVUdlEH4ADxFy4gw== +"@typescript-eslint/scope-manager@5.26.0": + version "5.26.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.26.0.tgz#44209c7f649d1a120f0717e0e82da856e9871339" + integrity sha512-gVzTJUESuTwiju/7NiTb4c5oqod8xt5GhMbExKsCTp6adU3mya6AGJ4Pl9xC7x2DX9UYFsjImC0mA62BCY22Iw== dependencies: - "@typescript-eslint/utils" "5.23.0" - debug "^4.3.2" + "@typescript-eslint/types" "5.26.0" + "@typescript-eslint/visitor-keys" "5.26.0" + +"@typescript-eslint/type-utils@5.26.0": + version "5.26.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.26.0.tgz#937dee97702361744a3815c58991acf078230013" + integrity sha512-7ccbUVWGLmcRDSA1+ADkDBl5fP87EJt0fnijsMFTVHXKGduYMgienC/i3QwoVhDADUAPoytgjbZbCOMj4TY55A== + dependencies: + "@typescript-eslint/utils" "5.26.0" + debug "^4.3.4" tsutils "^3.21.0" "@typescript-eslint/types@5.23.0": @@ -2243,6 +2251,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.23.0.tgz#8733de0f58ae0ed318dbdd8f09868cdbf9f9ad09" integrity sha512-NfBsV/h4dir/8mJwdZz7JFibaKC3E/QdeMEDJhiAE3/eMkoniZ7MjbEMCGXw6MZnZDMN3G9S0mH/6WUIj91dmw== +"@typescript-eslint/types@5.26.0": + version "5.26.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.26.0.tgz#cb204bb154d3c103d9cc4d225f311b08219469f3" + integrity sha512-8794JZFE1RN4XaExLWLI2oSXsVImNkl79PzTOOWt9h0UHROwJedNOD2IJyfL0NbddFllcktGIO2aOu10avQQyA== + "@typescript-eslint/typescript-estree@5.23.0": version "5.23.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.23.0.tgz#dca5f10a0a85226db0796e8ad86addc9aee52065" @@ -2256,15 +2269,28 @@ semver "^7.3.5" tsutils "^3.21.0" -"@typescript-eslint/utils@5.23.0": - version "5.23.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.23.0.tgz#4691c3d1b414da2c53d8943310df36ab1c50648a" - integrity sha512-dbgaKN21drqpkbbedGMNPCtRPZo1IOUr5EI9Jrrh99r5UW5Q0dz46RKXeSBoPV+56R6dFKpbrdhgUNSJsDDRZA== +"@typescript-eslint/typescript-estree@5.26.0": + version "5.26.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.26.0.tgz#16cbceedb0011c2ed4f607255f3ee1e6e43b88c3" + integrity sha512-EyGpw6eQDsfD6jIqmXP3rU5oHScZ51tL/cZgFbFBvWuCwrIptl+oueUZzSmLtxFuSOQ9vDcJIs+279gnJkfd1w== + dependencies: + "@typescript-eslint/types" "5.26.0" + "@typescript-eslint/visitor-keys" "5.26.0" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.26.0": + version "5.26.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.26.0.tgz#896b8480eb124096e99c8b240460bb4298afcfb4" + integrity sha512-PJFwcTq2Pt4AMOKfe3zQOdez6InIDOjUJJD3v3LyEtxHGVVRK3Vo7Dd923t/4M9hSH2q2CLvcTdxlLPjcIk3eg== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.23.0" - "@typescript-eslint/types" "5.23.0" - "@typescript-eslint/typescript-estree" "5.23.0" + "@typescript-eslint/scope-manager" "5.26.0" + "@typescript-eslint/types" "5.26.0" + "@typescript-eslint/typescript-estree" "5.26.0" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -2276,6 +2302,14 @@ "@typescript-eslint/types" "5.23.0" eslint-visitor-keys "^3.0.0" +"@typescript-eslint/visitor-keys@5.26.0": + version "5.26.0" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.26.0.tgz#7195f756e367f789c0e83035297c45b417b57f57" + integrity sha512-wei+ffqHanYDOQgg/fS6Hcar6wAWv0CUPQ3TZzOWd2BLfgP539rb49bwua8WRAs7R6kOSLn82rfEu2ro6Llt8Q== + dependencies: + "@typescript-eslint/types" "5.26.0" + eslint-visitor-keys "^3.3.0" + "@webassemblyjs/ast@1.11.1": version "1.11.1" resolved "https://registry.yarnpkg.com/@webassemblyjs/ast/-/ast-1.11.1.tgz#2bfd767eae1a6996f432ff7e8d7fc75679c0b6a7" @@ -4340,7 +4374,7 @@ debug@3.1.0, debug@~3.1.0: dependencies: ms "2.0.0" -debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2: +debug@4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== @@ -6339,7 +6373,7 @@ globalthis@^1.0.1: dependencies: define-properties "^1.1.3" -globby@^11.0.1, globby@^11.0.4: +globby@^11.0.1, globby@^11.0.4, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -6878,7 +6912,7 @@ ignore-walk@^3.0.1: dependencies: minimatch "^3.0.4" -ignore@^5.1.8, ignore@^5.2.0: +ignore@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== From 58ffb38d74837dc5d7ce31cb986150ea6bfa86f4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 11:16:48 -0400 Subject: [PATCH 05/62] Bump @pmmmwh/react-refresh-webpack-plugin from 0.5.5 to 0.5.7 (#5436) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index b31a5a8f44..0743efbc38 100644 --- a/package.json +++ b/package.json @@ -282,7 +282,7 @@ "@material-ui/core": "^4.12.3", "@material-ui/icons": "^4.11.2", "@material-ui/lab": "^4.0.0-alpha.60", - "@pmmmwh/react-refresh-webpack-plugin": "^0.5.5", + "@pmmmwh/react-refresh-webpack-plugin": "^0.5.7", "@sentry/types": "^6.19.7", "@testing-library/dom": "^7.31.2", "@testing-library/jest-dom": "^5.16.4", diff --git a/yarn.lock b/yarn.lock index 492cff8d19..f2aff02221 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1027,10 +1027,10 @@ resolved "https://registry.yarnpkg.com/@panva/asn1.js/-/asn1.js-1.0.0.tgz#dd55ae7b8129e02049f009408b97c61ccf9032f6" integrity sha512-UdkG3mLEqXgnlKsWanWcgb6dOjUzJ+XC5f+aWw30qrtjxeNUSfKX1cd5FBzOaXQumoe9nIqeZUvrRJS03HCCtw== -"@pmmmwh/react-refresh-webpack-plugin@^0.5.5": - version "0.5.5" - resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.5.tgz#e77aac783bd079f548daa0a7f080ab5b5a9741ca" - integrity sha512-RbG7h6TuP6nFFYKJwbcToA1rjC1FyPg25NR2noAZ0vKI+la01KTSRPkuVPE+U88jXv7javx2JHglUcL1MHcshQ== +"@pmmmwh/react-refresh-webpack-plugin@^0.5.7": + version "0.5.7" + resolved "https://registry.yarnpkg.com/@pmmmwh/react-refresh-webpack-plugin/-/react-refresh-webpack-plugin-0.5.7.tgz#58f8217ba70069cc6a73f5d7e05e85b458c150e2" + integrity sha512-bcKCAzF0DV2IIROp9ZHkRJa6O4jy7NlnHdWL3GmcUxYWNjLXkK5kfELELwEfSP5hXPfVL/qOGMAROuMQb9GG8Q== dependencies: ansi-html-community "^0.0.8" common-path-prefix "^3.0.0" From 199cd5766108a03e845d068e85799b470a903a70 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 15:55:28 -0400 Subject: [PATCH 06/62] Bump immer from 9.0.12 to 9.0.14 (#5377) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 0743efbc38..a5d29c0c43 100644 --- a/package.json +++ b/package.json @@ -229,7 +229,7 @@ "handlebars": "^4.7.7", "history": "^4.10.1", "http-proxy": "^1.18.1", - "immer": "^9.0.12", + "immer": "^9.0.14", "joi": "^17.6.0", "js-yaml": "^4.1.0", "jsdom": "^16.7.0", diff --git a/yarn.lock b/yarn.lock index f2aff02221..2a6369b083 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6927,10 +6927,10 @@ immediate@~3.0.5: resolved "https://registry.yarnpkg.com/immediate/-/immediate-3.0.6.tgz#9db1dbd0faf8de6fbe0f5dd5e56bb606280de69b" integrity sha1-nbHb0Pr43m++D13V5Wu2BigN5ps= -immer@^9.0.12: - version "9.0.12" - resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.12.tgz#2d33ddf3ee1d247deab9d707ca472c8c942a0f20" - integrity sha512-lk7UNmSbAukB5B6dh9fnh5D0bJTOFKxVg2cyJWTYrWRfhLrLMBquONcUs3aFq507hNoIZEDDh8lb8UtOizSMhA== +immer@^9.0.14: + version "9.0.14" + resolved "https://registry.yarnpkg.com/immer/-/immer-9.0.14.tgz#e05b83b63999d26382bb71676c9d827831248a48" + integrity sha512-ubBeqQutOSLIFCUBN03jGeOS6a3DoYlSYwYJTa+gSKEZKU5redJIqkIdZ3JVv/4RZpfcXdAWH5zCNLWPRv2WDw== immutable@^4.0.0: version "4.0.0" From 6e358d752ffaf6ed7e81eb8a19749f4895be5c25 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 25 May 2022 15:58:45 -0400 Subject: [PATCH 07/62] Bump eslint from 8.15.0 to 8.16.0 (#5446) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 30 +++++++++++++++--------------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/package.json b/package.json index a5d29c0c43..4a3335f211 100644 --- a/package.json +++ b/package.json @@ -357,7 +357,7 @@ "electron-notarize": "^0.3.0", "esbuild": "^0.14.38", "esbuild-loader": "^2.18.0", - "eslint": "^8.14.0", + "eslint": "^8.16.0", "eslint-plugin-header": "^3.1.1", "eslint-plugin-import": "^2.26.0", "eslint-plugin-react": "^7.29.4", diff --git a/yarn.lock b/yarn.lock index 2a6369b083..751fea7c43 100644 --- a/yarn.lock +++ b/yarn.lock @@ -481,15 +481,15 @@ resolved "https://registry.yarnpkg.com/@emotion/weak-memoize/-/weak-memoize-0.2.5.tgz#8eed982e2ee6f7f4e44c253e12962980791efd46" integrity sha512-6U71C2Wp7r5XtFtQzYrW5iKFT67OixrSxjI4MptCHzdSVlgabczzqLe0ZSgnub/5Kp4hSbpDB1tMytZY9pwxxA== -"@eslint/eslintrc@^1.2.3": - version "1.2.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.2.3.tgz#fcaa2bcef39e13d6e9e7f6271f4cc7cae1174886" - integrity sha512-uGo44hIwoLGNyduRpjdEpovcbMdd+Nv7amtmJxnKmI8xj6yd5LncmSwDa5NgX/41lIFJtkjD6YdVfgEzPfJ5UA== +"@eslint/eslintrc@^1.3.0": + version "1.3.0" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-1.3.0.tgz#29f92c30bb3e771e4a2048c95fa6855392dfac4f" + integrity sha512-UWW0TMTmk2d7hLcWD1/e2g5HDM/HQ3csaLSqXCfqwh4uNDuNqlaKWXmEsL4Cs41Z0KnILNvwbHAah3C2yt06kw== dependencies: ajv "^6.12.4" debug "^4.3.2" espree "^9.3.2" - globals "^13.9.0" + globals "^13.15.0" ignore "^5.2.0" import-fresh "^3.2.1" js-yaml "^4.1.0" @@ -5413,12 +5413,12 @@ eslint-visitor-keys@^3.0.0, eslint-visitor-keys@^3.3.0: resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.3.0.tgz#f6480fa6b1f30efe2d1968aa8ac745b862469826" integrity sha512-mQ+suqKJVyeuwGYHAdjMFqjCyfl8+Ldnxuyp3ldiMBFKkvytrXUZWaiPCEav8qDHKty44bD+qV1IP4T+w+xXRA== -eslint@^8.14.0: - version "8.15.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.15.0.tgz#fea1d55a7062da48d82600d2e0974c55612a11e9" - integrity sha512-GG5USZ1jhCu8HJkzGgeK8/+RGnHaNYZGrGDzUtigK3BsGESW/rs2az23XqE0WVwDxy1VRvvjSSGu5nB0Bu+6SA== +eslint@^8.16.0: + version "8.16.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.16.0.tgz#6d936e2d524599f2a86c708483b4c372c5d3bbae" + integrity sha512-MBndsoXY/PeVTDJeWsYj7kLZ5hQpJOfMYLsF6LicLHQWbRDG19lK5jOix4DPl8yY4SUFcE3txy86OzFLWT+yoA== dependencies: - "@eslint/eslintrc" "^1.2.3" + "@eslint/eslintrc" "^1.3.0" "@humanwhocodes/config-array" "^0.9.2" ajv "^6.10.0" chalk "^4.0.0" @@ -5436,7 +5436,7 @@ eslint@^8.14.0: file-entry-cache "^6.0.1" functional-red-black-tree "^1.0.1" glob-parent "^6.0.1" - globals "^13.6.0" + globals "^13.15.0" ignore "^5.2.0" import-fresh "^3.0.0" imurmurhash "^0.1.4" @@ -6359,10 +6359,10 @@ globals@^11.1.0: resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== -globals@^13.6.0, globals@^13.9.0: - version "13.14.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-13.14.0.tgz#daf3ff9b4336527cf56e98330b6f64bea9aff9df" - integrity sha512-ERO68sOYwm5UuLvSJTY7w7NP2c8S4UcXs3X1GBX8cwOr+ShOcDBbCY5mH4zxz0jsYCdJ8ve8Mv9n2YGJMB1aeg== +globals@^13.15.0: + version "13.15.0" + resolved "https://registry.yarnpkg.com/globals/-/globals-13.15.0.tgz#38113218c907d2f7e98658af246cef8b77e90bac" + integrity sha512-bpzcOlgDhMG070Av0Vy5Owklpv1I6+j96GhUI7Rh7IzDCKLzboflLrrfqMu8NquDbiR4EOQk7XzJwqVJxicxog== dependencies: type-fest "^0.20.2" From 7381533ded1c17956e48f3aec60d3632054f399b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 08:43:20 -0400 Subject: [PATCH 08/62] Bump @types/node from 14.18.17 to 14.18.18 (#5454) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 13 ++++--------- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index 4a3335f211..aaa99f1df4 100644 --- a/package.json +++ b/package.json @@ -310,7 +310,7 @@ "@types/md5-file": "^4.0.2", "@types/mini-css-extract-plugin": "^2.4.0", "@types/mock-fs": "^4.13.1", - "@types/node": "14.18.17", + "@types/node": "14.18.18", "@types/node-fetch": "^2.6.1", "@types/npm": "^2.0.32", "@types/proper-lockfile": "^4.1.2", diff --git a/yarn.lock b/yarn.lock index 751fea7c43..27f02e9df2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1734,21 +1734,16 @@ resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.31.tgz#a5bb84ecfa27eec5e1c802c6bbf8139bdb163a5d" integrity sha512-AR0x5HbXGqkEx9CadRH3EBYx/VkiUgZIhP4wvPn/+5KIsgpNoyFaRlVe0Zlx9gRtg8fA06a9tskE2MSN7TcG4Q== -"@types/node@14.18.17": - version "14.18.17" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.17.tgz#37d3c01043fd09f3f17ffa8c17062bbb580f9558" - integrity sha512-oajWz4kOajqpKJMPgnCvBajPq8QAvl2xIWoFjlAJPKGu6n7pjov5SxGE45a+0RxHDoo4ycOMoZw1SCOWtDERbw== +"@types/node@14.18.18", "@types/node@^14.6.2": + version "14.18.18" + resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.18.tgz#5c9503030df484ccffcbb935ea9a9e1d6fad1a20" + integrity sha512-B9EoJFjhqcQ9OmQrNorItO+OwEOORNn3S31WuiHvZY/dm9ajkB7AKD/8toessEtHHNL+58jofbq7hMMY9v4yig== "@types/node@^10.12.0": version "10.17.60" resolved "https://registry.yarnpkg.com/@types/node/-/node-10.17.60.tgz#35f3d6213daed95da7f0f73e75bcc6980e90597b" integrity sha512-F0KIgDJfy2nA3zMLmWGKxcH2ZVEtCZXHHdOQs2gSaQ27+lNeEfGxzkIw90aXswATX7AZ33tahPbzy6KAfUreVw== -"@types/node@^14.6.2": - version "14.18.16" - resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.16.tgz#878f670ba3f00482bf859b6550b6010610fc54b5" - integrity sha512-X3bUMdK/VmvrWdoTkz+VCn6nwKwrKCFTHtqwBIaQJNx4RUIBBUFXM00bqPz/DsDd+Icjmzm6/tyYZzeGVqb6/Q== - "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" From f690898dc8a1820551de89f9a3159ed165733e67 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 08:46:24 -0400 Subject: [PATCH 09/62] Bump react-router-dom from 5.3.1 to 5.3.3 (#5452) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/package.json b/package.json index aaa99f1df4..b6f82ea80e 100644 --- a/package.json +++ b/package.json @@ -387,7 +387,7 @@ "react-beautiful-dnd": "^13.1.0", "react-refresh": "^0.12.0", "react-refresh-typescript": "^2.0.4", - "react-router-dom": "^5.3.1", + "react-router-dom": "^5.3.3", "react-select": "^5.3.2", "react-select-event": "^5.5.0", "react-table": "^7.7.0", diff --git a/yarn.lock b/yarn.lock index 27f02e9df2..291629c515 100644 --- a/yarn.lock +++ b/yarn.lock @@ -10943,23 +10943,23 @@ react-refresh@^0.12.0: resolved "https://registry.yarnpkg.com/react-refresh/-/react-refresh-0.12.0.tgz#28ac0a2c30ef2bb3433d5fd0621e69a6d774c3a4" integrity sha512-suLIhrU2IHKL5JEKR/fAwJv7bbeq4kJ+pJopf77jHwuR+HmJS/HbrPIGsTBUVfw7tXPOmYv7UJ7PCaN49e8x4A== -react-router-dom@^5.3.1: - version "5.3.1" - resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.3.1.tgz#0151baf2365c5fcd8493f6ec9b9b31f34d0f8ae1" - integrity sha512-f0pj/gMAbv9e8gahTmCEY20oFhxhrmHwYeIwH5EO5xu0qme+wXtsdB8YfUOAZzUz4VaXmb58m3ceiLtjMhqYmQ== +react-router-dom@^5.3.3: + version "5.3.3" + resolved "https://registry.yarnpkg.com/react-router-dom/-/react-router-dom-5.3.3.tgz#8779fc28e6691d07afcaf98406d3812fe6f11199" + integrity sha512-Ov0tGPMBgqmbu5CDmN++tv2HQ9HlWDuWIIqn4b88gjlAN5IHI+4ZUZRcpz9Hl0azFIwihbLDYw1OiHGRo7ZIng== dependencies: "@babel/runtime" "^7.12.13" history "^4.9.0" loose-envify "^1.3.1" prop-types "^15.6.2" - react-router "5.3.1" + react-router "5.3.3" tiny-invariant "^1.0.2" tiny-warning "^1.0.0" -react-router@5.3.1, react-router@^5.2.0: - version "5.3.1" - resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.3.1.tgz#b13e84a016c79b9e80dde123ca4112c4f117e3cf" - integrity sha512-v+zwjqb7bakqgF+wMVKlAPTca/cEmPOvQ9zt7gpSNyPXau1+0qvuYZ5BWzzNDP1y6s15zDwgb9rPN63+SIniRQ== +react-router@5.3.3, react-router@^5.2.0: + version "5.3.3" + resolved "https://registry.yarnpkg.com/react-router/-/react-router-5.3.3.tgz#8e3841f4089e728cf82a429d92cdcaa5e4a3a288" + integrity sha512-mzQGUvS3bM84TnbtMYR8ZjKnuPJ71IjSzR+DE6UkUqvN4czWIqEs17yLL8xkAycv4ev0AiN+IGrWu88vJs/p2w== dependencies: "@babel/runtime" "^7.12.13" history "^4.9.0" From 34e62c71c04c3cca5504d0e32546d61d951ba067 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 08:46:41 -0400 Subject: [PATCH 10/62] Bump fork-ts-checker-webpack-plugin from 6.5.0 to 6.5.2 (#5372) Bumps [fork-ts-checker-webpack-plugin](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin) from 6.5.0 to 6.5.2. - [Release notes](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/releases) - [Changelog](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/blob/main/CHANGELOG.md) - [Commits](https://github.com/TypeStrong/fork-ts-checker-webpack-plugin/compare/v6.5.0...v6.5.2) --- updated-dependencies: - dependency-name: fork-ts-checker-webpack-plugin dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 127 ++++++++++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 121 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index b6f82ea80e..5b1ae54d4a 100644 --- a/package.json +++ b/package.json @@ -364,7 +364,7 @@ "eslint-plugin-react-hooks": "^4.5.0", "eslint-plugin-unused-imports": "^2.0.0", "flex.box": "^3.4.4", - "fork-ts-checker-webpack-plugin": "^6.5.0", + "fork-ts-checker-webpack-plugin": "^6.5.2", "gunzip-maybe": "^1.4.2", "html-webpack-plugin": "^5.5.0", "identity-obj-proxy": "^3.0.0", diff --git a/yarn.lock b/yarn.lock index 291629c515..04455e65b1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -31,7 +31,14 @@ resolved "https://registry.yarnpkg.com/@async-fn/jest/-/jest-1.6.0.tgz#48980e6f07c4d0d72b468b8b57a1b3be8473a746" integrity sha512-Jm4kf9qQSzcOZIyiI13C4EM4euSLORA8O4JTOWwy7SwaUr8lhVOn0nVbNLx9jnP35JTYeLsLZHfAyZLhYDIl2g== -"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.16.7", "@babel/code-frame@^7.8.3": +"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.10.1", "@babel/code-frame@^7.10.4", "@babel/code-frame@^7.8.3": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.0.tgz#0dfc80309beec8411e65e706461c408b0bb9b431" + integrity sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA== + dependencies: + "@babel/highlight" "^7.16.0" + +"@babel/code-frame@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.7.tgz#44416b6bd7624b998f5b1af5d470856c40138789" integrity sha512-iAXqUn8IIeBTNd72xsFlgaXHkMBMt6y4HJp1tIaK465CWLT/fG1aqB7ykr95gHHmlBdGbFeWWfyB4NJJ0nmeIg== @@ -43,7 +50,29 @@ resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.17.10.tgz#711dc726a492dfc8be8220028b1b92482362baab" integrity sha512-GZt/TCsG70Ms19gfZO1tM4CVnXsPgEPBCpJu+Qz3L0LUDsY5nZqFZglIoPC1kIYOtNBZlrnFT+klg12vFGZXrw== -"@babel/core@^7.1.0", "@babel/core@^7.12.3", "@babel/core@^7.7.5": +"@babel/core@^7.1.0", "@babel/core@^7.7.5": + version "7.10.2" + resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.10.2.tgz#bd6786046668a925ac2bd2fd95b579b92a23b36a" + integrity sha512-KQmV9yguEjQsXqyOUGKjS4+3K8/DlOCE2pZcq4augdQmtTy5iv5EHtmMSJ7V4c1BIPjuwtZYqYLCq9Ga+hGBRQ== + dependencies: + "@babel/code-frame" "^7.10.1" + "@babel/generator" "^7.10.2" + "@babel/helper-module-transforms" "^7.10.1" + "@babel/helpers" "^7.10.1" + "@babel/parser" "^7.10.2" + "@babel/template" "^7.10.1" + "@babel/traverse" "^7.10.1" + "@babel/types" "^7.10.2" + convert-source-map "^1.7.0" + debug "^4.1.0" + gensync "^1.0.0-beta.1" + json5 "^2.1.2" + lodash "^4.17.13" + resolve "^1.3.2" + semver "^5.4.1" + source-map "^0.5.0" + +"@babel/core@^7.12.3": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.17.10.tgz#74ef0fbf56b7dfc3f198fc2d927f4f03e12f4b05" integrity sha512-liKoppandF3ZcBnIYFjfSDHZLKdLHGJRkoWtG8zQyGJBQfIYobpnVGI5+pLBNtS6psFLDzyq8+h5HiVljW9PNA== @@ -64,6 +93,15 @@ json5 "^2.2.1" semver "^6.3.0" +"@babel/generator@^7.10.2", "@babel/generator@^7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.2.tgz#33873d6f89b21efe2da63fe554460f3df1c5880d" + integrity sha512-W1lG5vUwFvfMd8HVXqdfbuG7RuaSrTCCD8cl8fP8wOivdbtbIg2Db3IWUcgvfxKbbn6ZBGYRW/Zk1MIwK49mgw== + dependencies: + "@babel/types" "^7.18.2" + "@jridgewell/gen-mapping" "^0.3.0" + jsesc "^2.5.1" + "@babel/generator@^7.17.10": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.17.10.tgz#c281fa35b0c349bbe9d02916f4ae08fc85ed7189" @@ -90,6 +128,11 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-environment-visitor@^7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.2.tgz#8a6d2dedb53f6bf248e31b4baf38739ee4a637bd" + integrity sha512-14GQKWkX9oJzPiQQ7/J36FTXcD4kSp8egKjO9nINlSKiHITRA9q/R74qu8S9xlc/b/yjsJItQUeeh3xnGN0voQ== + "@babel/helper-function-name@^7.17.9": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.17.9.tgz#136fcd54bc1da82fcb47565cf16fd8e444b1ff12" @@ -112,6 +155,20 @@ dependencies: "@babel/types" "^7.16.7" +"@babel/helper-module-transforms@^7.10.1": + version "7.18.0" + resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.0.tgz#baf05dec7a5875fb9235bd34ca18bad4e21221cd" + integrity sha512-kclUYSUBIjlvnzN2++K9f2qzYKFgjmnmjwL4zlmU5f8ZtzgWe8s0rUPSTGy2HmK4P8T52MQsS+HTQAgZd3dMEA== + dependencies: + "@babel/helper-environment-visitor" "^7.16.7" + "@babel/helper-module-imports" "^7.16.7" + "@babel/helper-simple-access" "^7.17.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/helper-validator-identifier" "^7.16.7" + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.18.0" + "@babel/types" "^7.18.0" + "@babel/helper-module-transforms@^7.17.7": version "7.17.7" resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.17.7.tgz#3943c7f777139e7954a5355c815263741a9c1cbd" @@ -155,6 +212,15 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.16.7.tgz#b203ce62ce5fe153899b617c08957de860de4d23" integrity sha512-TRtenOuRUVo9oIQGPC5G9DgK4743cdxvtOw0weQNpZXaS16SCBi5MNjZF8vba3ETURjZpTbVn7Vvcf2eAwFozQ== +"@babel/helpers@^7.10.1": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.2.tgz#970d74f0deadc3f5a938bfa250738eb4ac889384" + integrity sha512-j+d+u5xT5utcQSzrh9p+PaJX94h++KN+ng9b9WEJq7pkUPAd61FGqhjuUEdfknb3E/uDBb7ruwEeKkIxNJPIrg== + dependencies: + "@babel/template" "^7.16.7" + "@babel/traverse" "^7.18.2" + "@babel/types" "^7.18.2" + "@babel/helpers@^7.17.9": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.17.9.tgz#b2af120821bfbe44f9907b1826e168e819375a1a" @@ -164,6 +230,15 @@ "@babel/traverse" "^7.17.9" "@babel/types" "^7.17.0" +"@babel/highlight@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.0.tgz#6ceb32b2ca4b8f5f361fb7fd821e3fddf4a1725a" + integrity sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g== + dependencies: + "@babel/helper-validator-identifier" "^7.15.7" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/highlight@^7.16.7": version "7.17.9" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.17.9.tgz#61b2ee7f32ea0454612def4fccdae0de232b73e3" @@ -178,6 +253,11 @@ resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.17.10.tgz#873b16db82a8909e0fbd7f115772f4b739f6ce78" integrity sha512-n2Q6i+fnJqzOaq2VkdXxy2TCPCWQZHiCo0XqmrCvDWcZQKRyZzYi4Z0yxlBuN0w+r2ZHmre+Q087DSrw3pbJDQ== +"@babel/parser@^7.10.2", "@babel/parser@^7.18.0": + version "7.18.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.3.tgz#39e99c7b0c4c56cef4d1eed8de9f506411c2ebc2" + integrity sha512-rL50YcEuHbbauAFAysNsJA4/f89fGTOBRNs9P81sniKnKAr4xULe5AecolcsKbi88xu0ByWYDj/S1AJ3FSFuSQ== + "@babel/plugin-syntax-async-generators@^7.8.4": version "7.8.4" resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz#a983fb1aeb2ec3f6ed042a210f640e90e786fe0d" @@ -284,7 +364,7 @@ dependencies: regenerator-runtime "^0.13.4" -"@babel/template@^7.16.7", "@babel/template@^7.3.3": +"@babel/template@^7.10.1", "@babel/template@^7.16.7", "@babel/template@^7.3.3": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.7.tgz#8d126c8701fde4d66b264b3eba3d96f07666d155" integrity sha512-I8j/x8kHUrbYRTUxXrrMbfCa7jxkE7tZre39x3kjr9hvI82cK1FfqLygotcWN5kdPGWcLdWMHpSBavse5tWw3w== @@ -309,6 +389,22 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.10.1", "@babel/traverse@^7.18.0", "@babel/traverse@^7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.2.tgz#b77a52604b5cc836a9e1e08dca01cba67a12d2e8" + integrity sha512-9eNwoeovJ6KH9zcCNnENY7DMFwTU9JdGCFtqNLfUAqtUHRCOsTOqWoffosP8vKmNYeSBUv3yVJXjfd8ucwOjUA== + dependencies: + "@babel/code-frame" "^7.16.7" + "@babel/generator" "^7.18.2" + "@babel/helper-environment-visitor" "^7.18.2" + "@babel/helper-function-name" "^7.17.9" + "@babel/helper-hoist-variables" "^7.16.7" + "@babel/helper-split-export-declaration" "^7.16.7" + "@babel/parser" "^7.18.0" + "@babel/types" "^7.18.2" + debug "^4.1.0" + globals "^11.1.0" + "@babel/types@^7.0.0", "@babel/types@^7.16.7", "@babel/types@^7.17.0", "@babel/types@^7.17.10", "@babel/types@^7.3.0", "@babel/types@^7.3.3": version "7.17.10" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.17.10.tgz#d35d7b4467e439fcf06d195f8100e0fea7fc82c4" @@ -317,6 +413,14 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" +"@babel/types@^7.10.1", "@babel/types@^7.10.2", "@babel/types@^7.18.0", "@babel/types@^7.18.2": + version "7.18.2" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.2.tgz#191abfed79ebe6f4242f643a9a5cbaa36b10b091" + integrity sha512-0On6B8A4/+mFUto5WERt3EEuG1NznDirvwca1O8UwXQHVY8g3R7OzYgxXdOfMwLO08UrpUD/2+3Bclyq+/C94Q== + dependencies: + "@babel/helper-validator-identifier" "^7.16.7" + to-fast-properties "^2.0.0" + "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -813,6 +917,15 @@ "@jridgewell/set-array" "^1.0.0" "@jridgewell/sourcemap-codec" "^1.4.10" +"@jridgewell/gen-mapping@^0.3.0": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.1.tgz#cf92a983c83466b8c0ce9124fadeaf09f7c66ea9" + integrity sha512-GcHwniMlA2z+WFPWuY8lp3fsza0I8xPFMWL5+n8LYyP6PSvPrXf4+n8stDHZY2DM0zy9sVkRDy1jDI4XGzYVqg== + dependencies: + "@jridgewell/set-array" "^1.0.0" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.9" + "@jridgewell/resolve-uri@^3.0.3": version "3.0.7" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.7.tgz#30cd49820a962aff48c8fffc5cd760151fca61fe" @@ -1647,9 +1760,9 @@ integrity sha512-3YP80IxxFJB4b5tYC2SUPwkg0XQLiu0nWvhRgEatgjf+29IcWO9X1k8xRv5DGssJ/lCrjYTjQPcobJr2yWIVuQ== "@types/json-schema@*", "@types/json-schema@^7.0.4", "@types/json-schema@^7.0.5", "@types/json-schema@^7.0.8", "@types/json-schema@^7.0.9": - version "7.0.11" - resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" - integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== + version "7.0.9" + resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.9.tgz#97edc9037ea0c38585320b28964dde3b39e4660d" + integrity sha512-qcUXuemtEu+E5wZSJHNxUXeCZhAfXKQ41D+duX+VYPde7xyEVZci+/oXKJL13tnRs9lR2pr4fod59GT6/X1/yQ== "@types/json5@^0.0.29": version "0.0.29" @@ -5967,7 +6080,7 @@ forever-agent@~0.6.1: resolved "https://registry.yarnpkg.com/forever-agent/-/forever-agent-0.6.1.tgz#fbc71f0c41adeb37f96c577ad1ed42d8fdacca91" integrity sha1-+8cfDEGt6zf5bFd60e1C2P2sypE= -fork-ts-checker-webpack-plugin@^6.5.0: +fork-ts-checker-webpack-plugin@^6.5.2: version "6.5.2" resolved "https://registry.yarnpkg.com/fork-ts-checker-webpack-plugin/-/fork-ts-checker-webpack-plugin-6.5.2.tgz#4f67183f2f9eb8ba7df7177ce3cf3e75cdafb340" integrity sha512-m5cUmF30xkZ7h4tWUgTAcEaKmUW7tfyUyTqNNOz7OxWJ0v1VWKTcOvH8FWHUwSjlW/356Ijc9vi3XfcPstpQKA== From c8cf300e9b0ca20e66510cdadd599ed96a3899da Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 26 May 2022 09:21:30 -0400 Subject: [PATCH 11/62] Bump concurrently from 7.1.0 to 7.2.1 (#5464) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- package.json | 2 +- yarn.lock | 51 ++++++++++++++++++++++----------------------------- 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/package.json b/package.json index 5b1ae54d4a..610ee7d886 100644 --- a/package.json +++ b/package.json @@ -348,7 +348,7 @@ "cli-progress": "^3.11.0", "color": "^3.2.1", "command-line-args": "^5.2.1", - "concurrently": "^7.1.0", + "concurrently": "^7.2.1", "css-loader": "^6.7.1", "deepdash": "^5.3.9", "dompurify": "^2.3.6", diff --git a/yarn.lock b/yarn.lock index 04455e65b1..817aa4542b 100644 --- a/yarn.lock +++ b/yarn.lock @@ -202,7 +202,7 @@ dependencies: "@babel/types" "^7.16.7" -"@babel/helper-validator-identifier@^7.16.7": +"@babel/helper-validator-identifier@^7.15.7", "@babel/helper-validator-identifier@^7.16.7": version "7.16.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.16.7.tgz#e8c602438c4a8195751243da9031d1607d247cad" integrity sha512-hsEnFemeiW4D08A5gUAZxLBTXpZ39P+a+DGDsHw1yxqyQ/jzFEnxf5uTEGp+3bzAbNOxU1paTgYS4ECU/IgfDw== @@ -413,7 +413,7 @@ "@babel/helper-validator-identifier" "^7.16.7" to-fast-properties "^2.0.0" -"@babel/types@^7.10.1", "@babel/types@^7.10.2", "@babel/types@^7.18.0", "@babel/types@^7.18.2": +"@babel/types@^7.10.2", "@babel/types@^7.18.0", "@babel/types@^7.18.2": version "7.18.2" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.2.tgz#191abfed79ebe6f4242f643a9a5cbaa36b10b091" integrity sha512-0On6B8A4/+mFUto5WERt3EEuG1NznDirvwca1O8UwXQHVY8g3R7OzYgxXdOfMwLO08UrpUD/2+3Bclyq+/C94Q== @@ -4070,19 +4070,20 @@ concat-stream@^1.5.0, concat-stream@^1.6.2: readable-stream "^2.2.2" typedarray "^0.0.6" -concurrently@^7.1.0: - version "7.1.0" - resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-7.1.0.tgz#477b49b8cfc630bb491f9b02e9ed7fb7bff02942" - integrity sha512-Bz0tMlYKZRUDqJlNiF/OImojMB9ruKUz6GCfmhFnSapXgPe+3xzY4byqoKG9tUZ7L2PGEUjfLPOLfIX3labnmw== +concurrently@^7.2.1: + version "7.2.1" + resolved "https://registry.yarnpkg.com/concurrently/-/concurrently-7.2.1.tgz#88b144060443403060aad46f837dd17451f7e55e" + integrity sha512-7cab/QyqipqghrVr9qZmoWbidu0nHsmxrpNqQ7r/67vfl1DWJElexehQnTH1p+87tDkihaAjM79xTZyBQh7HLw== dependencies: chalk "^4.1.0" date-fns "^2.16.1" lodash "^4.17.21" rxjs "^6.6.3" + shell-quote "^1.7.3" spawn-command "^0.0.2-1" supports-color "^8.1.0" tree-kill "^1.2.2" - yargs "^16.2.0" + yargs "^17.3.1" conf@^7.1.2: version "7.1.2" @@ -6300,7 +6301,7 @@ genfun@^5.0.0: resolved "https://registry.yarnpkg.com/genfun/-/genfun-5.0.0.tgz#9dd9710a06900a5c4a5bf57aca5da4e52fe76537" integrity sha512-KGDOARWVga7+rnB3z9Sd2Letx515owfk0hSxHGuqjANb1M+x2bGZGqHLiozPsYMdM2OubeMni/Hpwmjq6qIUhA== -gensync@^1.0.0-beta.2: +gensync@^1.0.0-beta.1, gensync@^1.0.0-beta.2: version "1.0.0-beta.2" resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== @@ -8843,7 +8844,7 @@ lodash.without@~4.4.0: resolved "https://registry.yarnpkg.com/lodash.without/-/lodash.without-4.4.0.tgz#3cd4574a00b67bae373a94b748772640507b7aac" integrity sha1-PNRXSgC2e643OpS3SHcmQFB7eqw= -lodash@4.x, lodash@^4.17.10, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: +lodash@4.x, lodash@^4.17.10, lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.20, lodash@^4.17.21, lodash@^4.17.4, lodash@^4.7.0: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg== @@ -11509,7 +11510,7 @@ resolve-url@^0.2.1: resolved "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a" integrity sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo= -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.9.0: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.12.0, resolve@^1.18.1, resolve@^1.20.0, resolve@^1.22.0, resolve@^1.3.2, resolve@^1.9.0: version "1.22.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.0.tgz#5e0b8c67c15df57a89bdbabe603a002f21731198" integrity sha512-Hhtrw0nLeSrFQ7phPp4OOcVjLPIeMnRlr5mcnVuMe7M/7eBn98A3hmFRLoFo3DLZkivSYwhRUJTyPyWAk56WLw== @@ -11936,6 +11937,11 @@ shell-env@^3.0.1: execa "^1.0.0" strip-ansi "^5.2.0" +shell-quote@^1.7.3: + version "1.7.3" + resolved "https://registry.yarnpkg.com/shell-quote/-/shell-quote-1.7.3.tgz#aa40edac170445b9a431e17bb62c0b881b9c4123" + integrity sha512-Vpfqwm4EnqGdlsBFNmHhxhElJYrdfcxPThu+ryKS5J8L/fhAwLazFZtq+S+TWZ9ANj2piSQLGj6NQg+lKPmxrw== + shelljs@^0.8.5: version "0.8.5" resolved "https://registry.yarnpkg.com/shelljs/-/shelljs-0.8.5.tgz#de055408d8361bed66c669d2f000538ced8ee20c" @@ -12150,7 +12156,7 @@ source-map-url@^0.4.0: resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56" integrity sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw== -source-map@^0.5.6, source-map@^0.5.7: +source-map@^0.5.0, source-map@^0.5.6, source-map@^0.5.7: version "0.5.7" resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc" integrity sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w= @@ -14019,7 +14025,7 @@ yaml@^1.10.0, yaml@^1.10.2, yaml@^1.7.2: resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.2.tgz#2301c5ffbf12b467de8da2333a459e29e7920e4b" integrity sha512-r3vXyErRCYJ7wg28yvBY5VSoAF8ZvlcW9/BwUzEtUsjvX/DKs24dIkuwjtuprwJJHsbyUbLApepYTR1BN4uHrg== -yargs-parser@20.x, yargs-parser@^20.2.2: +yargs-parser@20.x: version "20.2.9" resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.9.tgz#2eb7dc3b0289718fc295f362753845c41a0c94ee" integrity sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w== @@ -14086,23 +14092,10 @@ yargs@^15.4.1: y18n "^4.0.0" yargs-parser "^18.1.2" -yargs@^16.2.0: - version "16.2.0" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66" - integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw== - dependencies: - cliui "^7.0.2" - escalade "^3.1.1" - get-caller-file "^2.0.5" - require-directory "^2.1.1" - string-width "^4.2.0" - y18n "^5.0.5" - yargs-parser "^20.2.2" - -yargs@^17.0.1: - version "17.4.1" - resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.4.1.tgz#ebe23284207bb75cee7c408c33e722bfb27b5284" - integrity sha512-WSZD9jgobAg3ZKuCQZSa3g9QOJeCCqLoLAykiWgmXnDo9EPnn4RPf5qVTtzgOx66o6/oqhcA5tHtJXpG8pMt3g== +yargs@^17.0.1, yargs@^17.3.1: + version "17.5.1" + resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e" + integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA== dependencies: cliui "^7.0.2" escalade "^3.1.1" From 41d4daded7b569f39c768de893f6383d6b7b8b33 Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Thu, 26 May 2022 06:46:50 -0700 Subject: [PATCH 12/62] Fix crash when using an inline svg Icon (#5450) --- src/renderer/components/icon/icon.tsx | 94 ++++++++++++++++++++++++--- types/mocks.d.ts | 6 +- webpack/renderer.ts | 2 +- 3 files changed, 90 insertions(+), 12 deletions(-) diff --git a/src/renderer/components/icon/icon.tsx b/src/renderer/components/icon/icon.tsx index 60cf06f9a6..084b75d804 100644 --- a/src/renderer/components/icon/icon.tsx +++ b/src/renderer/components/icon/icon.tsx @@ -12,7 +12,57 @@ import type { LocationDescriptor } from "history"; import { cssNames } from "../../utils"; import { withTooltip } from "../tooltip"; import isNumber from "lodash/isNumber"; -import { decode } from "../../../common/utils/base64"; +import Configuration from "./configuration.svg"; +import Crane from "./crane.svg"; +import Group from "./group.svg"; +import Helm from "./helm.svg"; +import Install from "./install.svg"; +import Kube from "./kube.svg"; +import LensLogo from "./lens-logo.svg"; +import License from "./license.svg"; +import LogoLens from "./logo-lens.svg"; +import Logout from "./logout.svg"; +import Nodes from "./nodes.svg"; +import PushOff from "./push_off.svg"; +import PushPin from "./push_pin.svg"; +import Spinner from "./spinner.svg"; +import Ssh from "./ssh.svg"; +import Storage from "./storage.svg"; +import Terminal from "./terminal.svg"; +import User from "./user.svg"; +import Users from "./users.svg"; +import Wheel from "./wheel.svg"; +import Workloads from "./workloads.svg"; + +/** + * Mapping between the local file names and the svgs + * + * Because we only really want a fixed list of bundled icons, this is safer so that consumers of + * `` cannot pass in a `../some/path`. + */ +const localSvgIcons = new Map([ + ["configuration", Configuration], + ["crane", Crane], + ["group", Group], + ["helm", Helm], + ["install", Install], + ["kube", Kube], + ["lens-logo", LensLogo], + ["license", License], + ["logo-lens", LogoLens], + ["logout", Logout], + ["nodes", Nodes], + ["push_off", PushOff], + ["push_pin", PushPin], + ["spinner", Spinner], + ["ssh", Ssh], + ["storage", Storage], + ["terminal", Terminal], + ["user", User], + ["users", Users], + ["wheel", Wheel], + ["workloads", Workloads], +]); export interface BaseIconProps { /** @@ -21,7 +71,28 @@ export interface BaseIconProps { material?: string; /** - * Either an SVG data URL or one of the following strings + * Either an SVG XML or one of the following names + * - configuration + * - crane + * - group + * - helm + * - install + * - kube + * - lens-logo + * - license + * - logo-lens + * - logout + * - nodes + * - push_off + * - push_pin + * - spinner + * - ssh + * - storage + * - terminal + * - user + * - users + * - wheel + * - workloads */ svg?: string; @@ -78,8 +149,8 @@ export interface BaseIconProps { export interface IconProps extends React.HTMLAttributes, BaseIconProps {} export function isSvg(content: string): boolean { - // data-url for raw svg-icon - return String(content).includes("svg+xml"); + // source code of the asset + return String(content).includes(" { @@ -131,13 +202,16 @@ const RawIcon = withTooltip((props: IconProps) => { // render as inline svg-icon if (typeof svg === "string") { - const dataUrlPrefix = "data:image/svg+xml;base64,"; - const svgIconDataUrl = svg.startsWith(dataUrlPrefix) ? svg : require(`./${svg}.svg`); - const svgIconText = typeof svgIconDataUrl == "string" // decode xml from data-url - ? decode(svgIconDataUrl.replace(dataUrlPrefix, "")) - : ""; + const svgIconText = isSvg(svg) + ? svg + : localSvgIcons.get(svg) ?? ""; - iconContent = ; + iconContent = ( + + ); } // render as material-icon diff --git a/types/mocks.d.ts b/types/mocks.d.ts index 17dba848b7..4d3e378937 100644 --- a/types/mocks.d.ts +++ b/types/mocks.d.ts @@ -25,7 +25,11 @@ declare module "*.scss" { // Declare everything what's bundled as webpack's type="asset/resource" // Should be mocked for tests support in jestConfig.moduleNameMapper (currently in "/package.json") -declare module "*.svg"; +declare module "*.svg" { + const content: string; + export = content; +} + declare module "*.jpg"; declare module "*.png"; declare module "*.eot"; diff --git a/webpack/renderer.ts b/webpack/renderer.ts index bb38b284d4..c8c87e856f 100755 --- a/webpack/renderer.ts +++ b/webpack/renderer.ts @@ -132,7 +132,7 @@ export function iconsAndImagesWebpackRules(): webpack.RuleSetRule[] { return [ { test: /\.svg$/, - type: "asset/inline", // data:image/svg+xml;base64,... + type: "asset/source", // exports the source code of the asset, so we get XML }, { test: /\.(jpg|png|ico)$/, From 938d34739fb849e2d6acb5c6692c39645d48a6be Mon Sep 17 00:00:00 2001 From: Roman Date: Fri, 27 May 2022 15:16:11 +0300 Subject: [PATCH 13/62] fix: app-crash with multiple usages of monaco-editor component (#5479) how to reproduce: open one pod on monaco editor (ie edit), and then try to open another pod details (or try to edit it as well) --- .../components/monaco-editor/monaco-editor.tsx | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/renderer/components/monaco-editor/monaco-editor.tsx b/src/renderer/components/monaco-editor/monaco-editor.tsx index 781ac32ae4..4869cb4f48 100644 --- a/src/renderer/components/monaco-editor/monaco-editor.tsx +++ b/src/renderer/components/monaco-editor/monaco-editor.tsx @@ -16,7 +16,6 @@ import { UserStore } from "../../../common/user-store"; import type { ThemeStore } from "../../themes/store"; import { withInjectables } from "@ogre-tools/injectable-react"; import themeStoreInjectable from "../../themes/store.injectable"; -import logger from "../../../main/logger"; export type MonacoEditorId = string; @@ -66,6 +65,11 @@ class NonInjectedMonacoEditor extends React.Component Date: Fri, 27 May 2022 15:52:57 +0300 Subject: [PATCH 14/62] Remove deprecated nodeSelectorTerms from cluster metrics manifests (#5474) Signed-off-by: Lauri Nevala --- .../metrics-cluster-feature/resources/03-statefulset.yml.hb | 5 ----- .../resources/10-node-exporter-ds.yml.hb | 5 ----- .../resources/14-kube-state-metrics-deployment.yml.hb | 5 ----- 3 files changed, 15 deletions(-) diff --git a/extensions/metrics-cluster-feature/resources/03-statefulset.yml.hb b/extensions/metrics-cluster-feature/resources/03-statefulset.yml.hb index cc177204a3..288cd553b1 100644 --- a/extensions/metrics-cluster-feature/resources/03-statefulset.yml.hb +++ b/extensions/metrics-cluster-feature/resources/03-statefulset.yml.hb @@ -24,11 +24,6 @@ spec: operator: In values: - linux - - matchExpressions: - - key: beta.kubernetes.io/os - operator: In - values: - - linux # <%- if config.node_selector -%> # nodeSelector: # <%- node_selector.to_h.each do |key, value| -%> diff --git a/extensions/metrics-cluster-feature/resources/10-node-exporter-ds.yml.hb b/extensions/metrics-cluster-feature/resources/10-node-exporter-ds.yml.hb index 2ff46d8d0b..c02fb93321 100644 --- a/extensions/metrics-cluster-feature/resources/10-node-exporter-ds.yml.hb +++ b/extensions/metrics-cluster-feature/resources/10-node-exporter-ds.yml.hb @@ -30,11 +30,6 @@ spec: operator: In values: - linux - - matchExpressions: - - key: beta.kubernetes.io/os - operator: In - values: - - linux securityContext: runAsNonRoot: true runAsUser: 65534 diff --git a/extensions/metrics-cluster-feature/resources/14-kube-state-metrics-deployment.yml.hb b/extensions/metrics-cluster-feature/resources/14-kube-state-metrics-deployment.yml.hb index 5eaefe2cf9..0174d5c8f4 100644 --- a/extensions/metrics-cluster-feature/resources/14-kube-state-metrics-deployment.yml.hb +++ b/extensions/metrics-cluster-feature/resources/14-kube-state-metrics-deployment.yml.hb @@ -23,11 +23,6 @@ spec: operator: In values: - linux - - matchExpressions: - - key: beta.kubernetes.io/os - operator: In - values: - - linux serviceAccountName: kube-state-metrics containers: - name: kube-state-metrics From 72ae7173c258dadc244b2fbae4d80d176a59800e Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 30 May 2022 07:58:00 -0700 Subject: [PATCH 15/62] Fix crash in ProjectedVolume component (#5467) --- src/common/k8s-api/endpoints/pod.api.ts | 94 ++++--- .../__snapshots__/projected.test.tsx.snap | 229 ++++++++++++++++++ .../volumes/variants/projected.test.tsx | 197 +++++++++++++++ .../details/volumes/variants/projected.tsx | 16 +- src/renderer/utils/display-mode.ts | 11 + src/renderer/utils/index.ts | 1 + 6 files changed, 504 insertions(+), 44 deletions(-) create mode 100644 src/renderer/components/+workloads-pods/details/volumes/variants/__snapshots__/projected.test.tsx.snap create mode 100644 src/renderer/components/+workloads-pods/details/volumes/variants/projected.test.tsx create mode 100644 src/renderer/utils/display-mode.ts diff --git a/src/common/k8s-api/endpoints/pod.api.ts b/src/common/k8s-api/endpoints/pod.api.ts index 7b0bf55e9e..8e3aa51559 100644 --- a/src/common/k8s-api/endpoints/pod.api.ts +++ b/src/common/k8s-api/endpoints/pod.api.ts @@ -445,46 +445,62 @@ export interface PortworxVolumeSource { readOnly?: boolean; } +export interface KeyToPath { + key: string; + path: string; + mode?: number; +} + +export interface ConfigMapProjection { + name: string; + items?: KeyToPath[]; + optional?: boolean; +} + +export interface ObjectFieldSelector { + fieldPath: string; + apiVersion?: string; +} + +export interface ResourceFieldSelector { + resource: string; + containerName?: string; + divisor?: string; +} + +export interface DownwardAPIVolumeFile { + path: string; + fieldRef?: ObjectFieldSelector; + resourceFieldRef?: ResourceFieldSelector; + mode?: number; +} + +export interface DownwardAPIProjection { + items?: DownwardAPIVolumeFile[]; +} + +export interface SecretProjection { + name: string; + items?: KeyToPath[]; + optional?: boolean; +} + +export interface ServiceAccountTokenProjection { + audience?: string; + expirationSeconds?: number; + path: string; +} + +export interface VolumeProjection { + secret?: SecretProjection; + downwardAPI?: DownwardAPIProjection; + configMap?: ConfigMapProjection; + serviceAccountToken?: ServiceAccountTokenProjection; +} + export interface ProjectedSource { - sources: { - secret?: { - name: string; - items?: { - key: string; - path: string; - mode?: number; - }[]; - }; - downwardAPI?: { - items?: { - path: string; - fieldRef?: { - fieldPath: string; - apiVersion?: string; - }; - resourceFieldRef?: { - resource: string; - containerName?: string; - }; - mode?: number; - }[]; - }; - configMap?: { - name: string; - items?: { - key: string; - path: string; - mode?: number; - }[]; - optional?: boolean; - }; - serviceAccountToken?: { - audience?: string; - expirationSeconds?: number; - path: string; - }; - }[]; - defaultMode: number; + sources?: VolumeProjection[]; + defaultMode?: number; } export interface QuobyteSource { diff --git a/src/renderer/components/+workloads-pods/details/volumes/variants/__snapshots__/projected.test.tsx.snap b/src/renderer/components/+workloads-pods/details/volumes/variants/__snapshots__/projected.test.tsx.snap new file mode 100644 index 0000000000..ef0d3dd261 --- /dev/null +++ b/src/renderer/components/+workloads-pods/details/volumes/variants/__snapshots__/projected.test.tsx.snap @@ -0,0 +1,229 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` renders 1`] = ` + +
+
+ + Sources + + +
+
+ +`; + +exports[` renders a secret source including overriding mode 1`] = ` + +
+
+ + Default Mount Mode + + + 0o777 + +
+
+ + Sources + + +
+ Secret +
+
+ + Name + + + my-projected-secret + +
+
+ + Items + + +
    +
  • + foo⇢/bar + (0o666) +
  • +
+
+
+
+
+
+ +`; + +exports[` renders a secret source, when provided 1`] = ` + +
+
+ + Default Mount Mode + + + 0o777 + +
+
+ + Sources + + +
+ Secret +
+
+ + Name + + + my-projected-secret + +
+
+ + Items + + +
    +
  • + foo⇢/bar +
  • +
+
+
+
+
+
+ +`; + +exports[` renders default mount mode in octal when provided 1`] = ` + +
+
+ + Default Mount Mode + + + 0o777 + +
+
+ + Sources + + +
+
+ +`; + +exports[` renders when no sources array provided 1`] = ` + +
+
+ + Default Mount Mode + + + 0o777 + +
+
+ + Sources + + +
+
+ +`; diff --git a/src/renderer/components/+workloads-pods/details/volumes/variants/projected.test.tsx b/src/renderer/components/+workloads-pods/details/volumes/variants/projected.test.tsx new file mode 100644 index 0000000000..24405bc1a9 --- /dev/null +++ b/src/renderer/components/+workloads-pods/details/volumes/variants/projected.test.tsx @@ -0,0 +1,197 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ + +import { render } from "@testing-library/react"; +import React from "react"; +import type { ProjectedSource } from "../../../../../../common/k8s-api/endpoints"; +import { Pod } from "../../../../../../common/k8s-api/endpoints"; +import { Projected } from "./projected"; + +describe("", () => { + it("renders", () => { + const projectedVolume: ProjectedSource = { }; + const projectedVolumeName = "my-projected"; + const pod = new Pod({ + apiVersion: "v1", + kind: "Pod", + metadata: { + name: "my-pod", + namespace: "default", + resourceVersion: "1", + uid: "123", + selfLink: "/api/v1/pod/default/my-pod", + }, + spec: { + volumes: [{ + name: projectedVolumeName, + projected: projectedVolume, + }], + }, + }); + const result = render(( + + )); + + expect(result.baseElement).toMatchSnapshot(); + }); + + it("renders default mount mode in octal when provided", () => { + const projectedVolume: ProjectedSource = { + defaultMode: 0o777, + sources: [], + }; + const projectedVolumeName = "my-projected"; + const pod = new Pod({ + apiVersion: "v1", + kind: "Pod", + metadata: { + name: "my-pod", + namespace: "default", + resourceVersion: "1", + uid: "123", + selfLink: "/api/v1/pod/default/my-pod", + }, + spec: { + volumes: [{ + name: projectedVolumeName, + projected: projectedVolume, + }], + }, + }); + const result = render(( + + )); + + expect(result.baseElement).toMatchSnapshot(); + }); + + it("renders when no sources array provided", () => { + const projectedVolume: ProjectedSource = { + defaultMode: 0o777, + }; + const projectedVolumeName = "my-projected"; + const pod = new Pod({ + apiVersion: "v1", + kind: "Pod", + metadata: { + name: "my-pod", + namespace: "default", + resourceVersion: "1", + uid: "123", + selfLink: "/api/v1/pod/default/my-pod", + }, + spec: { + volumes: [{ + name: projectedVolumeName, + projected: projectedVolume, + }], + }, + }); + const result = render(( + + )); + + expect(result.baseElement).toMatchSnapshot(); + }); + + it("renders a secret source, when provided", () => { + const projectedVolume: ProjectedSource = { + defaultMode: 0o777, + sources: [{ + secret: { + name: "my-projected-secret", + items: [{ + key: "foo", + path: "/bar", + }], + }, + }], + }; + const projectedVolumeName = "my-projected"; + const pod = new Pod({ + apiVersion: "v1", + kind: "Pod", + metadata: { + name: "my-pod", + namespace: "default", + resourceVersion: "1", + uid: "123", + selfLink: "/api/v1/pod/default/my-pod", + }, + spec: { + volumes: [{ + name: projectedVolumeName, + projected: projectedVolume, + }], + }, + }); + const result = render(( + + )); + + expect(result.baseElement).toMatchSnapshot(); + expect(result.getByText("foo⇢/bar", { exact: false })).toBeTruthy(); + }); + + it("renders a secret source including overriding mode", () => { + const projectedVolume: ProjectedSource = { + defaultMode: 0o777, + sources: [{ + secret: { + name: "my-projected-secret", + items: [{ + key: "foo", + path: "/bar", + mode: 0o666, + }], + }, + }], + }; + const projectedVolumeName = "my-projected"; + const pod = new Pod({ + apiVersion: "v1", + kind: "Pod", + metadata: { + name: "my-pod", + namespace: "default", + resourceVersion: "1", + uid: "123", + selfLink: "/api/v1/pod/default/my-pod", + }, + spec: { + volumes: [{ + name: projectedVolumeName, + projected: projectedVolume, + }], + }, + }); + const result = render(( + + )); + + expect(result.baseElement).toMatchSnapshot(); + expect(result.getByText("(0o666)", { exact: false })).toBeTruthy(); + }); +}); diff --git a/src/renderer/components/+workloads-pods/details/volumes/variants/projected.tsx b/src/renderer/components/+workloads-pods/details/volumes/variants/projected.tsx index cd725f1c67..c7ca22c87f 100644 --- a/src/renderer/components/+workloads-pods/details/volumes/variants/projected.tsx +++ b/src/renderer/components/+workloads-pods/details/volumes/variants/projected.tsx @@ -4,18 +4,21 @@ */ import React from "react"; +import { displayMode } from "../../../../../utils"; import { DrawerItem, DrawerTitle } from "../../../../drawer"; import type { VolumeVariantComponent } from "../variant-helpers"; export const Projected: VolumeVariantComponent<"projected"> = ( ({ variant: { sources, defaultMode }}) => ( <> - - {`0o${defaultMode.toString(8)}`} - + {typeof defaultMode === "number" && ( + + {displayMode(defaultMode)} + + )} { - sources.map(({ secret, downwardAPI, configMap, serviceAccountToken }, index) => ( + sources?.map(({ secret, downwardAPI, configMap, serviceAccountToken }, index) => ( {secret && ( <> @@ -25,9 +28,12 @@ export const Projected: VolumeVariantComponent<"projected"> = (
    - {secret.items?.map(({ key, path }) => ( + {secret.items?.map(({ key, path, mode }) => (
  • {`${key}⇢${path}`} + {typeof mode === "number" && ( + ` (${displayMode(mode)})` + )}
  • ))}
diff --git a/src/renderer/utils/display-mode.ts b/src/renderer/utils/display-mode.ts new file mode 100644 index 0000000000..e0d2be5d88 --- /dev/null +++ b/src/renderer/utils/display-mode.ts @@ -0,0 +1,11 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ + +/** + * Format `mode` in octal notation + */ +export function displayMode(mode: number): string { + return `0o${mode.toString(8)}`; +} diff --git a/src/renderer/utils/index.ts b/src/renderer/utils/index.ts index 8f41c54e57..fee7dfc56d 100755 --- a/src/renderer/utils/index.ts +++ b/src/renderer/utils/index.ts @@ -10,6 +10,7 @@ export * from "../../common/event-emitter"; export * from "./cssNames"; export * from "./cssVar"; export * from "./display-booleans"; +export * from "./display-mode"; export * from "./interval"; export * from "./isMiddleClick"; export * from "./isReactNode"; From 827cb8a886ee875476ccd88934d2aa8fa32ba4de Mon Sep 17 00:00:00 2001 From: Sebastian Malton Date: Mon, 30 May 2022 08:01:08 -0700 Subject: [PATCH 16/62] Fix crash in (#5501) --- package.json | 3 + src/common/k8s-api/endpoints/pod.api.ts | 4 +- src/jest-after-env.setup.ts | 5 + .../__snapshots__/ceph-fs.test.tsx.snap | 229 ++++++++++++++++++ .../variants/__tests__/ceph-fs.test.tsx | 116 +++++++++ .../details/volumes/variants/ceph-fs.tsx | 4 +- 6 files changed, 358 insertions(+), 3 deletions(-) create mode 100644 src/jest-after-env.setup.ts create mode 100644 src/renderer/components/+workloads-pods/details/volumes/variants/__tests__/__snapshots__/ceph-fs.test.tsx.snap create mode 100644 src/renderer/components/+workloads-pods/details/volumes/variants/__tests__/ceph-fs.test.tsx diff --git a/package.json b/package.json index 610ee7d886..9b4896ae81 100644 --- a/package.json +++ b/package.json @@ -72,6 +72,9 @@ "/src/jest.setup.ts", "jest-canvas-mock" ], + "setupFilesAfterEnv": [ + "/src/jest-after-env.setup.ts" + ], "globals": { "ts-jest": { "isolatedModules": true diff --git a/src/common/k8s-api/endpoints/pod.api.ts b/src/common/k8s-api/endpoints/pod.api.ts index 8e3aa51559..fbacf4fb07 100644 --- a/src/common/k8s-api/endpoints/pod.api.ts +++ b/src/common/k8s-api/endpoints/pod.api.ts @@ -294,8 +294,10 @@ export interface CephfsSource { secretRef?: SecretReference; /** * Whether the filesystem is used as readOnly. + * + * @default false */ - readOnly: boolean; + readOnly?: boolean; } export interface CinderSource { diff --git a/src/jest-after-env.setup.ts b/src/jest-after-env.setup.ts new file mode 100644 index 0000000000..b9ee36c4cf --- /dev/null +++ b/src/jest-after-env.setup.ts @@ -0,0 +1,5 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ +import "@testing-library/jest-dom/extend-expect"; diff --git a/src/renderer/components/+workloads-pods/details/volumes/variants/__tests__/__snapshots__/ceph-fs.test.tsx.snap b/src/renderer/components/+workloads-pods/details/volumes/variants/__tests__/__snapshots__/ceph-fs.test.tsx.snap new file mode 100644 index 0000000000..627b2fb1a3 --- /dev/null +++ b/src/renderer/components/+workloads-pods/details/volumes/variants/__tests__/__snapshots__/ceph-fs.test.tsx.snap @@ -0,0 +1,229 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[` should render 'false' for Readonly when false is provided 1`] = ` +
+
+ + Monitors + + +
    + +
+
+ + Mount Path + + + / + +
+
+ + Username + + + admin + +
+
+ + Secret Filepath + + + /etc/ceph/user.secret + +
+
+ + Readonly + + + false + +
+
+`; + +exports[` should render 'false' for Readonly when not provided 1`] = ` +
+
+ + Monitors + + +
    + +
+
+ + Mount Path + + + / + +
+
+ + Username + + + admin + +
+
+ + Secret Filepath + + + /etc/ceph/user.secret + +
+
+ + Readonly + + + false + +
+
+`; + +exports[` should render 'true' for Readonly when true is provided 1`] = ` +
+
+ + Monitors + + +
    + +
+
+ + Mount Path + + + / + +
+
+ + Username + + + admin + +
+
+ + Secret Filepath + + + /etc/ceph/user.secret + +
+
+ + Readonly + + + true + +
+
+`; diff --git a/src/renderer/components/+workloads-pods/details/volumes/variants/__tests__/ceph-fs.test.tsx b/src/renderer/components/+workloads-pods/details/volumes/variants/__tests__/ceph-fs.test.tsx new file mode 100644 index 0000000000..5555332328 --- /dev/null +++ b/src/renderer/components/+workloads-pods/details/volumes/variants/__tests__/ceph-fs.test.tsx @@ -0,0 +1,116 @@ +/** + * Copyright (c) OpenLens Authors. All rights reserved. + * Licensed under MIT License. See LICENSE in root directory for more information. + */ + +import { render } from "@testing-library/react"; +import React from "react"; +import type { CephfsSource } from "../../../../../../../common/k8s-api/endpoints"; +import { Pod } from "../../../../../../../common/k8s-api/endpoints"; +import { CephFs } from "../ceph-fs"; + +describe("", () => { + it("should render 'false' for Readonly when not provided", () => { + const cephfsName = "my-ceph"; + const cephfsVolume: CephfsSource = { + monitors: [], + }; + const pod = new Pod({ + apiVersion: "v1", + kind: "Pod", + metadata: { + name: "my-pod", + namespace: "default", + resourceVersion: "1", + uid: "123", + selfLink: "/api/v1/pod/default/my-pod", + }, + spec: { + volumes: [{ + name: cephfsName, + cephfs: cephfsVolume, + }], + }, + }); + const result = render(( + + )); + + expect(result.container).toMatchSnapshot(); + expect(result.getByTestId("cephfs-readonly")).toHaveTextContent("false"); + }); + + it("should render 'false' for Readonly when false is provided", () => { + const cephfsName = "my-ceph"; + const cephfsVolume: CephfsSource = { + monitors: [], + readOnly: false, + }; + const pod = new Pod({ + apiVersion: "v1", + kind: "Pod", + metadata: { + name: "my-pod", + namespace: "default", + resourceVersion: "1", + uid: "123", + selfLink: "/api/v1/pod/default/my-pod", + }, + spec: { + volumes: [{ + name: cephfsName, + cephfs: cephfsVolume, + }], + }, + }); + const result = render(( + + )); + + expect(result.container).toMatchSnapshot(); + expect(result.getByTestId("cephfs-readonly")).toHaveTextContent("false"); + }); + + it("should render 'true' for Readonly when true is provided", () => { + const cephfsName = "my-ceph"; + const cephfsVolume: CephfsSource = { + monitors: [], + readOnly: true, + }; + const pod = new Pod({ + apiVersion: "v1", + kind: "Pod", + metadata: { + name: "my-pod", + namespace: "default", + resourceVersion: "1", + uid: "123", + selfLink: "/api/v1/pod/default/my-pod", + }, + spec: { + volumes: [{ + name: cephfsName, + cephfs: cephfsVolume, + }], + }, + }); + const result = render(( + + )); + + expect(result.container).toMatchSnapshot(); + expect(result.getByTestId("cephfs-readonly")).toHaveTextContent("true"); + }); +}); diff --git a/src/renderer/components/+workloads-pods/details/volumes/variants/ceph-fs.tsx b/src/renderer/components/+workloads-pods/details/volumes/variants/ceph-fs.tsx index 0b44e7d355..a723f7be92 100644 --- a/src/renderer/components/+workloads-pods/details/volumes/variants/ceph-fs.tsx +++ b/src/renderer/components/+workloads-pods/details/volumes/variants/ceph-fs.tsx @@ -10,7 +10,7 @@ import type { VolumeVariantComponent } from "../variant-helpers"; import { LocalRef } from "../variant-helpers"; export const CephFs: VolumeVariantComponent<"cephfs"> = ( - ({ pod, variant: { monitors, path = "/", user = "admin", secretFile = "/etc/ceph/user.secret", secretRef, readOnly }}) => ( + ({ pod, variant: { monitors, path = "/", user = "admin", secretFile = "/etc/ceph/user.secret", secretRef, readOnly = false }}) => ( <>