src/vs/workbench/services/extensionManagement/browser/webExtensionsScannerService.ts/WebExtensionsScannerService/scanInstalledExtensions
class WebExtensionsScannerService:	private async scanInstalledExtensions(scanOptions?: ScanOptions): Promise<IScannedExtension[]> {
		let installedExtensions = await this.readInstalledExtensions();
		installedExtensions.sort((a, b) => a.identifier.id < b.identifier.id ? -1 : a.identifier.id > b.identifier.id ? 1 : semver.rcompare(a.version, b.version));
		const result = new Map<string, IScannedExtension>();
		for (const webExtension of installedExtensions) {
			const existing = result.get(webExtension.identifier.id.toLowerCase());
			if (existing && semver.gt(existing.manifest.version, webExtension.version)) {
				continue;
			}
			try {
				const extension = await this.toScannedExtension(webExtension, false);
				if (extension.isValid || !scanOptions?.skipInvalidExtensions) {
					result.set(extension.identifier.id.toLowerCase(), extension);
				}
			} catch (error) {
				if (scanOptions?.bailOut) {
					throw error;
				} else {
					this.logService.error(error, 'Error while scanning user extension', webExtension.identifier.id);
				}
			}
		}
		return [...result.values()];
	}