message: Fix get latest package version from github
diff: import { Logger } from "../../logger";
  -
  -const axios = require("axios");
  +import semver = require("semver");
  +import axios from "axios";
  export default class githubPackageSource implements IPackageSource {
  public async getLatestVersion(packageName: string) {
  - let latestVersion = "";
  + let latestVersion = "0.0.0";
  try {
  const urlGitHub = "https://api.github.com/repos/" + packageName + "/releases";
  const response = await axios.get(urlGitHub);
  - latestVersion = response.data
  + response.data
  .map((release: any) => release.tag_name)
  - .find(
  - (version: string) => !version.toLowerCase().includes("preview") && !version.toLowerCase().includes("-rc")
  - );
  -
  - //ASP.NET version start with 'v', remove this
  - latestVersion = latestVersion.replace("v", "");
  + .forEach((item: string) => {
  + const version = semver.valid(item);
  + if (version && !semver.prerelease(version) && semver.gt(version, latestVersion)) {
  + latestVersion = version;
  + }
  + });
  } catch (error) {
  Logger.appendError("EXTENSION", `Error getting latest version of ${packageName} package from GitHub:`, error);
  }
  