src/vs/platform/extensionManagement/common/extensionGalleryService.ts/AbstractExtensionGalleryService/getCompatibleExtension
class AbstractExtensionGalleryService:	async getCompatibleExtension(extension: IGalleryExtension, includePreRelease: boolean, targetPlatform: TargetPlatform): Promise<IGalleryExtension | null> {
		if (isNotWebExtensionInWebTargetPlatform(extension.allTargetPlatforms, targetPlatform)) {
			return null;
		}
		if (await this.isExtensionCompatible(extension, includePreRelease, targetPlatform)) {
			return extension;
		}
		const query = new Query()
			.withFlags(Flags.IncludeVersions)
			.withPage(1, 1)
			.withFilter(FilterType.ExtensionId, extension.identifier.uuid);
		const { extensions } = await this.queryGalleryExtensions(query, { targetPlatform, compatible: true, includePreRelease }, CancellationToken.None);
		return extensions[0] || null;
	}