publint icon indicating copy to clipboard operation
publint copied to clipboard

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

Open hi-ogawa opened this issue 1 year ago • 2 comments

I spotted a dead link on https://publint.dev/[email protected] 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

hi-ogawa avatar Aug 22 '24 03:08 hi-ogawa

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 avatar Aug 22 '24 08:08 bluwy

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

bluwy avatar Aug 31 '24 19:08 bluwy