From 8afe9251dc367dc87cc938fa5c52d6353adb7b1a Mon Sep 17 00:00:00 2001 From: f1ames Date: Wed, 29 Nov 2023 13:40:33 +0100 Subject: [PATCH 1/3] chore: migrate to SARIF fork --- package.json | 2 +- src/commands/show-panel.ts | 2 +- src/test/run-test.ts | 2 +- src/utils/sarif-watcher.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 0987ac6..014ca22 100644 --- a/package.json +++ b/package.json @@ -124,7 +124,7 @@ } }, "extensionDependencies": [ - "ms-sarifvscode.sarif-viewer" + "kubeshop.monokle-sarif" ], "scripts": { "vscode:prepublish": "rimraf out && npm run esbuild-base -- --minify", diff --git a/src/commands/show-panel.ts b/src/commands/show-panel.ts index a871ca3..23dd04e 100644 --- a/src/commands/show-panel.ts +++ b/src/commands/show-panel.ts @@ -12,7 +12,7 @@ export function getShowPanelCommand() { status: 'started' }); - const sarifExtension = extensions.getExtension('MS-SarifVSCode.sarif-viewer'); + const sarifExtension = extensions.getExtension('Kubeshop.monokle-sarif'); if (!sarifExtension.isActive) { await sarifExtension.activate(); diff --git a/src/test/run-test.ts b/src/test/run-test.ts index 1966127..7c259bf 100644 --- a/src/test/run-test.ts +++ b/src/test/run-test.ts @@ -51,7 +51,7 @@ async function runSuite( // Use cp.spawn / cp.exec for custom setup spawnSync( cliPath, - [...args, '--install-extension', 'ms-sarifvscode.sarif-viewer@3.3.8'], + [...args, '--install-extension', 'kubeshop.monokle-sarif@0.1.0'], { encoding: 'utf-8', stdio: 'inherit' diff --git a/src/utils/sarif-watcher.ts b/src/utils/sarif-watcher.ts index 88493c1..8455b1d 100644 --- a/src/utils/sarif-watcher.ts +++ b/src/utils/sarif-watcher.ts @@ -47,7 +47,7 @@ export class SarifWatcher { } protected async getSarifApi() { - const sarifExtension = extensions.getExtension('MS-SarifVSCode.sarif-viewer'); + const sarifExtension = extensions.getExtension('Kubeshop.monokle-sarif'); if (!sarifExtension.isActive) { await sarifExtension.activate(); From ec999abde52443496c5a2e6353e2ac1f19a08cda Mon Sep 17 00:00:00 2001 From: f1ames Date: Wed, 29 Nov 2023 13:49:13 +0100 Subject: [PATCH 2/3] chore: update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2eec26f..55cb64d 100644 --- a/README.md +++ b/README.md @@ -152,7 +152,7 @@ This extension contributes the following settings: A core component of Monokle extension and dependency is [`@monokle/validation` library](https://github.com/kubeshop/monokle-core/tree/main/packages/validation). -Monokle extension also uses [SARIF Viewer](https://marketplace.visualstudio.com/items?itemName=MS-SarifVSCode.sarif-viewer) extension as dependency. It should be installed automatically when installing Monokle extension. +Monokle extension depends on [Monokle SARIF Viewer](https://marketplace.visualstudio.com/items?itemName=Kubeshop.monokle-sarif) extension. It should be installed automatically when installing Monokle extension. ## Questions and contributing From e97b14f8200be575feddda09cfe7081feb73e418 Mon Sep 17 00:00:00 2001 From: f1ames Date: Thu, 30 Nov 2023 09:20:39 +0100 Subject: [PATCH 3/3] fix: remove workaround code for #16 --- src/extension.ts | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/extension.ts b/src/extension.ts index 9eebd96..d721a90 100644 --- a/src/extension.ts +++ b/src/extension.ts @@ -63,10 +63,6 @@ async function runActivation(context: ExtensionContext) { await globals.setDefaultOrigin(); - // Pre-configure SARIF extension (workaround for #16). - workspace.getConfiguration('sarif-viewer').update('connectToGithubCodeScanning', 'off'); - workspace.getConfiguration('sarif-viewer.explorer').update('openWhenNoResults', false); - const statusBarItem = window.createStatusBarItem(StatusBarAlignment.Left, 25); statusBarItem.text = STATUS_BAR_TEXTS.DEFAULT; statusBarItem.tooltip = getTooltipContentDefault();