bluwy / publint

Lint packaging errors
https://publint.dev
MIT License
955 stars 21 forks source link

Invalid github icon link for `"repository"` shortcut syntax #109

Open hi-ogawa opened 3 weeks ago

hi-ogawa commented 3 weeks ago

I spotted a dead link on https://publint.dev/z3-solver@4.13.0 which uses "repository": "github:Z3Prover/z3". The icon link currently goes to https://github.com/github:Z3Prover/z3.

I'm not sure how common this is but it looks like npm supports a few shortcuts for github:, gitlab: etc... https://docs.npmjs.com/cli/v10/configuring-npm/package-json#repository

bluwy commented 3 weeks ago

Looks like we need to use a more proper parser to fix this. I tried https://github.com/npm/hosted-git-info but the API works awkwardly again where it can't parse from the shorthand, and it's beefy. I don't know if there's other libraries that can do the same out there, or we have to write one ourselves.

bluwy commented 2 weeks ago

Note to self, there's also https://www.npmjs.com/package/git-url-parse but still kinda beefy