From ba82b4b37505c8da59c715931e40693bec04c1f0 Mon Sep 17 00:00:00 2001 From: Stan Lo Date: Mon, 19 Aug 2024 19:00:25 +0100 Subject: [PATCH] Address feedback --- vscode/src/issueDiagnosingHelper.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/vscode/src/issueDiagnosingHelper.ts b/vscode/src/issueDiagnosingHelper.ts index 31d3558987..16ce682f41 100644 --- a/vscode/src/issueDiagnosingHelper.ts +++ b/vscode/src/issueDiagnosingHelper.ts @@ -31,16 +31,13 @@ async function collectDiagnosticInfo( const extensions = await getPublicExtensions(); return { - // eslint-disable-next-line @typescript-eslint/naming-convention + /* eslint-disable @typescript-eslint/naming-convention */ "VS Code Version": vscodeVersion, - // eslint-disable-next-line @typescript-eslint/naming-convention "Ruby LSP Extension Version": rubyLspExtensionVersion, - // eslint-disable-next-line @typescript-eslint/naming-convention "Ruby LSP Server Version": rubyLspVersion, - // eslint-disable-next-line @typescript-eslint/naming-convention "Ruby LSP Addons": rubyLspAddons, - // eslint-disable-next-line @typescript-eslint/naming-convention "Installed Extensions": extensions, + /* eslint-enable @typescript-eslint/naming-convention */ }; } @@ -52,9 +49,15 @@ async function getPublicExtensions(): Promise { return false; } - // Check for marketplace identifier - const galleryExtension = ext.packageJSON?.extensionPack?.[0] ?? ext.id; - return galleryExtension.includes("."); + // Assume if an extension doesn't have a license, it's private and should not be listed + if ( + ext.packageJSON.license === "UNLICENSED" || + !ext.packageJSON.license + ) { + return false; + } + + return true; }) .map((ext) => `${ext.packageJSON.name} (${ext.packageJSON.version})`); }