From 580257f0241bc65c83a76d38402a3ef6273f29f1 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 17 May 2024 17:05:04 +0000 Subject: [PATCH 1/3] Bump CLI version from v2.17.2 to v2.17.3 for integration tests --- extensions/ql-vscode/supported_cli_versions.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/ql-vscode/supported_cli_versions.json b/extensions/ql-vscode/supported_cli_versions.json index 923dc9e6a..f559ee87e 100644 --- a/extensions/ql-vscode/supported_cli_versions.json +++ b/extensions/ql-vscode/supported_cli_versions.json @@ -1,5 +1,5 @@ [ - "v2.17.2", + "v2.17.3", "v2.16.6", "v2.15.5", "v2.14.6", From d8a7dcd7d2696595c50fc249a5b6da0e82734336 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 17 May 2024 15:53:59 -0700 Subject: [PATCH 2/3] Bump react-dom and @types/react-dom in /extensions/ql-vscode (#3614) Bumps [react-dom](https://github.com/facebook/react/tree/HEAD/packages/react-dom) and [@types/react-dom](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/react-dom). These dependencies needed to be updated together. Updates `react-dom` from 18.2.0 to 18.3.1 - [Release notes](https://github.com/facebook/react/releases) - [Changelog](https://github.com/facebook/react/blob/main/CHANGELOG.md) - [Commits](https://github.com/facebook/react/commits/v18.3.1/packages/react-dom) Updates `@types/react-dom` from 18.2.18 to 18.3.0 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/react-dom) --- updated-dependencies: - dependency-name: react-dom dependency-type: direct:production update-type: version-update:semver-minor - dependency-name: "@types/react-dom" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- extensions/ql-vscode/package-lock.json | 26 +++++++++++++------------- extensions/ql-vscode/package.json | 4 ++-- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/extensions/ql-vscode/package-lock.json b/extensions/ql-vscode/package-lock.json index a9c49290d..903d7047a 100644 --- a/extensions/ql-vscode/package-lock.json +++ b/extensions/ql-vscode/package-lock.json @@ -30,7 +30,7 @@ "node-fetch": "^2.6.7", "p-queue": "^8.0.1", "react": "^18.3.1", - "react-dom": "^18.2.0", + "react-dom": "^18.3.1", "semver": "^7.6.2", "source-map": "^0.7.4", "source-map-support": "^0.5.21", @@ -84,7 +84,7 @@ "@types/node": "18.18.*", "@types/node-fetch": "^2.5.2", "@types/react": "^18.3.1", - "@types/react-dom": "^18.2.18", + "@types/react-dom": "^18.3.0", "@types/sarif": "^2.1.2", "@types/semver": "^7.5.8", "@types/stream-json": "^1.7.1", @@ -7817,9 +7817,9 @@ } }, "node_modules/@types/react-dom": { - "version": "18.2.18", - "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.2.18.tgz", - "integrity": "sha512-TJxDm6OfAX2KJWJdMEVTwWke5Sc/E/RlnPGvGfS0W7+6ocy2xhDVQVh/KvC2Uf7kACs+gDytdusDSdWfWkaNzw==", + "version": "18.3.0", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-18.3.0.tgz", + "integrity": "sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==", "dev": true, "dependencies": { "@types/react": "*" @@ -24891,15 +24891,15 @@ "dev": true }, "node_modules/react-dom": { - "version": "18.2.0", - "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.2.0.tgz", - "integrity": "sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==", + "version": "18.3.1", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-18.3.1.tgz", + "integrity": "sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==", "dependencies": { "loose-envify": "^1.1.0", - "scheduler": "^0.23.0" + "scheduler": "^0.23.2" }, "peerDependencies": { - "react": "^18.2.0" + "react": "^18.3.1" } }, "node_modules/react-element-to-jsx-string": { @@ -25917,9 +25917,9 @@ } }, "node_modules/scheduler": { - "version": "0.23.0", - "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.0.tgz", - "integrity": "sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==", + "version": "0.23.2", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.23.2.tgz", + "integrity": "sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==", "dependencies": { "loose-envify": "^1.1.0" } diff --git a/extensions/ql-vscode/package.json b/extensions/ql-vscode/package.json index 2126ef240..8e6368c0e 100644 --- a/extensions/ql-vscode/package.json +++ b/extensions/ql-vscode/package.json @@ -1988,7 +1988,7 @@ "node-fetch": "^2.6.7", "p-queue": "^8.0.1", "react": "^18.3.1", - "react-dom": "^18.2.0", + "react-dom": "^18.3.1", "semver": "^7.6.2", "source-map": "^0.7.4", "source-map-support": "^0.5.21", @@ -2042,7 +2042,7 @@ "@types/node": "18.18.*", "@types/node-fetch": "^2.5.2", "@types/react": "^18.3.1", - "@types/react-dom": "^18.2.18", + "@types/react-dom": "^18.3.0", "@types/sarif": "^2.1.2", "@types/semver": "^7.5.8", "@types/stream-json": "^1.7.1", From 673ea13af83ec9c84ac6396b6cabe7f38f4e32d9 Mon Sep 17 00:00:00 2001 From: Robert Date: Wed, 22 May 2024 10:42:47 +0100 Subject: [PATCH 3/3] Remove the enableGhecDr flag --- extensions/ql-vscode/src/config.ts | 5 --- .../ql-vscode/src/variant-analysis/ghec-dr.ts | 14 ++------ .../variant-analysis/ghec-dr.test.ts | 35 +++---------------- 3 files changed, 7 insertions(+), 47 deletions(-) diff --git a/extensions/ql-vscode/src/config.ts b/extensions/ql-vscode/src/config.ts index 82807531f..8f4d6fe37 100644 --- a/extensions/ql-vscode/src/config.ts +++ b/extensions/ql-vscode/src/config.ts @@ -680,11 +680,6 @@ export function getVariantAnalysisDefaultResultsSort(): SortKey { */ const ACTION_BRANCH = new Setting("actionBranch", VARIANT_ANALYSIS_SETTING); -export const VARIANT_ANALYSIS_ENABLE_GHEC_DR = new Setting( - "enableGhecDr", - VARIANT_ANALYSIS_SETTING, -); - export function getActionBranch(): string { return ACTION_BRANCH.getValue() || "main"; } diff --git a/extensions/ql-vscode/src/variant-analysis/ghec-dr.ts b/extensions/ql-vscode/src/variant-analysis/ghec-dr.ts index 0340b594f..c5a8ed06c 100644 --- a/extensions/ql-vscode/src/variant-analysis/ghec-dr.ts +++ b/extensions/ql-vscode/src/variant-analysis/ghec-dr.ts @@ -1,18 +1,10 @@ -import { - VARIANT_ANALYSIS_ENABLE_GHEC_DR, - hasEnterpriseUri, - hasGhecDrUri, -} from "../config"; +import { hasEnterpriseUri, hasGhecDrUri } from "../config"; /** * Determines whether MRVA should be enabled or not for the current GitHub host. + * MRVA is enabled on github.com and GHEC-DR. * This is based on the `github-enterprise.uri` setting. */ export function isVariantAnalysisEnabledForGitHubHost(): boolean { - return ( - // MRVA is always enabled on github.com - !hasEnterpriseUri() || - // MRVA can be enabled on GHEC-DR using a feature flag - (hasGhecDrUri() && !!VARIANT_ANALYSIS_ENABLE_GHEC_DR.getValue()) - ); + return !hasEnterpriseUri() || hasGhecDrUri(); } diff --git a/extensions/ql-vscode/test/vscode-tests/minimal-workspace/variant-analysis/ghec-dr.test.ts b/extensions/ql-vscode/test/vscode-tests/minimal-workspace/variant-analysis/ghec-dr.test.ts index 2bad6bdcc..ae857e300 100644 --- a/extensions/ql-vscode/test/vscode-tests/minimal-workspace/variant-analysis/ghec-dr.test.ts +++ b/extensions/ql-vscode/test/vscode-tests/minimal-workspace/variant-analysis/ghec-dr.test.ts @@ -1,16 +1,13 @@ import { ConfigurationTarget } from "vscode"; -import { - VARIANT_ANALYSIS_ENABLE_GHEC_DR, - VSCODE_GITHUB_ENTERPRISE_URI_SETTING, -} from "../../../../src/config"; +import { VSCODE_GITHUB_ENTERPRISE_URI_SETTING } from "../../../../src/config"; import { isVariantAnalysisEnabledForGitHubHost } from "../../../../src/variant-analysis/ghec-dr"; describe("checkVariantAnalysisEnabled", () => { - it("returns cleanly when no enterprise URI is set", async () => { + it("returns true when no enterprise URI is set", async () => { expect(isVariantAnalysisEnabledForGitHubHost()).toBe(true); }); - it("returns false when GHES enterprise URI is set and variant analysis feature flag is not set", async () => { + it("returns false when GHES enterprise URI is set", async () => { await VSCODE_GITHUB_ENTERPRISE_URI_SETTING.updateValue( "https://github.example.com", ConfigurationTarget.Global, @@ -18,35 +15,11 @@ describe("checkVariantAnalysisEnabled", () => { expect(isVariantAnalysisEnabledForGitHubHost()).toBe(false); }); - it("returns false when GHES enterprise URI is set and variant analysis feature flag is set", async () => { - await VSCODE_GITHUB_ENTERPRISE_URI_SETTING.updateValue( - "https://github.example.com", - ConfigurationTarget.Global, - ); - await VARIANT_ANALYSIS_ENABLE_GHEC_DR.updateValue( - "true", - ConfigurationTarget.Global, - ); - expect(isVariantAnalysisEnabledForGitHubHost()).toBe(false); - }); - - it("returns false when GHEC-DR URI is set and variant analysis feature flag is not set", async () => { + it("returns true when a GHEC-DR URI is set", async () => { await VSCODE_GITHUB_ENTERPRISE_URI_SETTING.updateValue( "https://example.ghe.com", ConfigurationTarget.Global, ); - expect(isVariantAnalysisEnabledForGitHubHost()).toBe(false); - }); - - it("returns true when GHEC-DR URI is set and variant analysis feature flag is set", async () => { - await VSCODE_GITHUB_ENTERPRISE_URI_SETTING.updateValue( - "https://example.ghe.com", - ConfigurationTarget.Global, - ); - await VARIANT_ANALYSIS_ENABLE_GHEC_DR.updateValue( - "true", - ConfigurationTarget.Global, - ); expect(isVariantAnalysisEnabledForGitHubHost()).toBe(true); }); });