Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion eng/common/scripts/modules/Package-Properties.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,16 @@ function Extract-JsPkgProps ($pkgPath, $serviceName, $pkgName)
if (Test-Path $projectPath)
{
$projectJson = Get-Content $projectPath | ConvertFrom-Json
$jsStylePkgName = $pkgName.replace("azure-", "@azure/")
$jsStylePkgName = ""
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this code is used any more. You should be able to update https://github.com/Azure/azure-sdk-for-js/blob/master/eng/scripts/Language-Settings.ps1.

if ($pkgName.StartsWith("azure-"))
{
$jsStylePkgName = $pkgName.replace("azure-", "@azure/")
}
else if ($pkgName.StartsWith("microsoft-"))
{
$jsStylePkgName = $pkgName.replace("microsoft-", "@microsoft/")
}

if ($projectJson.name -eq "$jsStylePkgName")
{
return [PackageProps]::new($projectJson.name, $projectJson.version, $pkgPath, $serviceName)
Expand Down
10 changes: 8 additions & 2 deletions eng/common/scripts/update-docs-metadata.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ function GetAdjustedReadmeContent($pkgInfo, $lang){
$service = ""

# the namespace is not expected to be present for js.
$pkgId = $pkgInfo.PackageId.Replace("@azure/", "")
$pkgId = $pkgInfo.PackageId.Replace("@azure/", "").Replace("@microsoft/", "")

try {
$metadata = GetMetaData -lang $lang
Expand Down Expand Up @@ -112,7 +112,13 @@ if ($pkgs) {
$rdSuffix = "-pre"
}

$readmeName = "$($packageInfo.PackageId.Replace('azure-','').Replace('Azure.', '').Replace('@azure/', '').ToLower())-readme$rdSuffix.md"
$packageId = $packageInfo.PackageId
# JS opentelemetry has "azure-" word inside package name and this should not be replaced
if ( $packageId.StartsWith("azure-"))
{
$packageId = $packageId.Replace("azure-", "")
}
$readmeName = "$($packageId.Replace('Azure.', '').Replace('@azure/', '').Replace('@microsoft/', '').ToLower())-readme$rdSuffix.md"
$readmeLocation = Join-Path $DocRepoLocation $DocRepoContentLocation $readmeName

if ($packageInfo.ReadmeContent) {
Expand Down