From 71bb8ddd3996b509d8aa866962cb3c29f2157c6b Mon Sep 17 00:00:00 2001 From: Chidozie Ononiwu Date: Fri, 19 Mar 2021 14:29:16 -0700 Subject: [PATCH] Cleanup eng\scripts\Language-Settings.ps1 --- eng/scripts/Language-Settings.ps1 | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/eng/scripts/Language-Settings.ps1 b/eng/scripts/Language-Settings.ps1 index 46f06dde8f40..ae7a91654cb3 100644 --- a/eng/scripts/Language-Settings.ps1 +++ b/eng/scripts/Language-Settings.ps1 @@ -15,17 +15,14 @@ function Confirm-NodeInstallation } } -function Get-javascript-PackageInfoFromRepo ($pkgPath, $serviceDirectory, $pkgName) +function Get-javascript-PackageInfoFromRepo ($pkgPath, $serviceDirectory) { $projectPath = Join-Path $pkgPath "package.json" if (Test-Path $projectPath) { $projectJson = Get-Content $projectPath | ConvertFrom-Json $jsStylePkgName = $projectJson.name.Replace("@", "").Replace("/", "-") - if ($pkgName -and ($pkgName -ne $jsStylePkgName -and $pkgName -ne $projectJson.name)) - { - return $null - } + $pkgProp = [PackageProps]::new($projectJson.name, $projectJson.version, $pkgPath, $serviceDirectory) $pkgProp.SdkType = $projectJson.psobject.properties['sdk-type'].value if ($projectJson.name.StartsWith("@azure/arm")) @@ -260,7 +257,7 @@ function Find-javascript-Artifacts-For-Apireview($artifactDir, $packageName = "" return $packages } -function SetPackageVersion ($PackageName, $Version, $ServiceDirectory = $null, $ReleaseDate, $BuildType = $null, $GroupId = $null) +function SetPackageVersion ($PackageName, $Version, $ReleaseDate) { if ($null -eq $ReleaseDate) {