src/vs/platform/extensionManagement/common/extensionGalleryService.ts/AbstractExtensionGalleryService/isValidVersion
class AbstractExtensionGalleryService:	private async isValidVersion(rawGalleryExtensionVersion: IRawGalleryExtensionVersion, versionType: 'release' | 'prerelease' | 'any', compatible: boolean, allTargetPlatforms: TargetPlatform[], targetPlatform: TargetPlatform): Promise<boolean> {
		if (!isTargetPlatformCompatible(getTargetPlatformForExtensionVersion(rawGalleryExtensionVersion), allTargetPlatforms, targetPlatform)) {
			return false;
		}

		if (versionType !== 'any' && isPreReleaseVersion(rawGalleryExtensionVersion) !== (versionType === 'prerelease')) {
			return false;
		}

		if (compatible) {
			const engine = await this.getEngine(rawGalleryExtensionVersion);
			if (!isEngineValid(engine, this.productService.version, this.productService.date)) {
				return false;
			}
		}

		return true;
	}