diff --git a/tools/apiview/parsers/js-api-parser/export.ts b/tools/apiview/parsers/js-api-parser/export.ts index 8c35451dfb8..b9f311bda5d 100644 --- a/tools/apiview/parsers/js-api-parser/export.ts +++ b/tools/apiview/parsers/js-api-parser/export.ts @@ -120,10 +120,10 @@ function getReleaseTag(item: ApiItem & {releaseTag?: ReleaseTag}): "alpha" | "be const apiModel = new ApiModel(); const fileName = process.argv[2]; -var versionString = ""; +var PackageversionString = ""; if (fileName.includes("_")) { - versionString = fileName.split("_").pop().replace(".api.json", ""); + PackageversionString = fileName.split("_").pop().replace(".api.json", ""); } apiModel.loadPackage(fileName); @@ -139,17 +139,18 @@ for (const modelPackage of apiModel.packages) { } var name = apiModel.packages[0].name; -if (versionString != "") +if (PackageversionString != "") { - name += "(" +versionString + ")"; + name += "(" +PackageversionString + ")"; } var apiViewFile: IApiViewFile = { Name: name, Navigation: navigation, Tokens: builder.tokens, PackageName: apiModel.packages[0].name, - VersionString: "1.0.5", - Language: "JavaScript" + VersionString: "1.0.7", + Language: "JavaScript", + PackageVersion: PackageversionString } writeFile(process.argv[3], JSON.stringify(apiViewFile), err => { diff --git a/tools/apiview/parsers/js-api-parser/models.ts b/tools/apiview/parsers/js-api-parser/models.ts index 37abaed4bd6..d403ad38a8d 100644 --- a/tools/apiview/parsers/js-api-parser/models.ts +++ b/tools/apiview/parsers/js-api-parser/models.ts @@ -18,6 +18,7 @@ export declare interface IApiViewFile { PackageName: string; VersionString: string; Language: string; + PackageVersion: string; } export declare interface IApiViewToken { diff --git a/tools/apiview/parsers/js-api-parser/package.json b/tools/apiview/parsers/js-api-parser/package.json index f48b85de30b..e943e423963 100644 --- a/tools/apiview/parsers/js-api-parser/package.json +++ b/tools/apiview/parsers/js-api-parser/package.json @@ -1,6 +1,6 @@ { "name": "@azure-tools/ts-genapi", - "version": "1.0.6", + "version": "1.0.7", "description": "", "main": "index.js", "publishConfig": {