Skip to content

Commit

Permalink
fix(npm): fallback to homepage instead of repo url (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
PierreDemailly authored Mar 10, 2024
1 parent 50f8528 commit 84d5798
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ async function getNpmRepository(repository: string, version: string): Promise<st
const repo = packageVersion.repository;
const repoUrl = typeof repo === "string" ? repo : repo?.url;

return repositoryFromUrl(homepage ?? repoUrl ?? "");
return repositoryFromUrl(repoUrl ?? homepage ?? "");
}

async function retrieveRepositoryOnGithub(owner: string, repo: string): Promise<string> {
Expand Down

0 comments on commit 84d5798

Please sign in to comment.