Skip to content

Commit 49ac50c

Browse files
weshaggardCopilot
authored andcommitted
Apply suggestion from @Copilot
Co-authored-by: Copilot <[email protected]>
1 parent 58cad4a commit 49ac50c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eng/common/scripts/Verify-Links.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function ProcessCratesIoLink([System.Uri]$linkUri, $path) {
163163
function ProcessNpmLink([System.Uri]$linkUri) {
164164
# npmjs.com started using Cloudflare which returns 403 and we need to instead check the registry api for existence checks
165165
# https://github.com/orgs/community/discussions/174098#discussioncomment-14461226
166-
$apiUrl = $linkUri.ToString().Replace("https://www.npmjs.com/package/", "https://registry.npmjs.org/")
166+
$apiUrl = $linkUri.ToString() -replace '^https?://(www\.)?npmjs\.com/package/', 'https://registry.npmjs.org/'
167167

168168
return ProcessStandardLink ([System.Uri]$apiUrl)
169169
}

0 commit comments

Comments
 (0)