Skip to content

Commit

Permalink
Fix github registry metadata fetching (close #821)
Browse files Browse the repository at this point in the history
  • Loading branch information
GianlucaGuarini committed Apr 25, 2024
1 parent c537282 commit 66bdde0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion server/npm.go
Expand Up @@ -249,9 +249,11 @@ func fetchPackageInfo(name string, version string) (info NpmPackageInfo, err err
}

isFullVersion := regexpFullVersion.MatchString(version)
if isFullVersion && !isJsrScope {
isGithubRegistry := strings.Contains(url, "npm.pkg.github.com")
if isFullVersion && !isJsrScope && !isGithubRegistry {
url += "/" + version
}

req, err := http.NewRequest("GET", url, nil)
if err != nil {
return
Expand Down

0 comments on commit 66bdde0

Please sign in to comment.