Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
parent
38b61682c5
commit
e428909cc7
@ -163,7 +163,7 @@ function ProcessCratesIoLink([System.Uri]$linkUri, $path) {
|
||||
function ProcessNpmLink([System.Uri]$linkUri) {
|
||||
# npmjs.com started using Cloudflare which returns 403 and we need to instead check the registry api for existence checks
|
||||
# https://github.com/orgs/community/discussions/174098#discussioncomment-14461226
|
||||
$apiUrl = $linkUri.ToString().Replace("https://www.npmjs.com/package/", "https://registry.npmjs.org/")
|
||||
$apiUrl = $linkUri.ToString() -replace '^https?://(www\.)?npmjs\.com/package/', 'https://registry.npmjs.org/'
|
||||
|
||||
return ProcessStandardLink ([System.Uri]$apiUrl)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user