EqualMa / gitpkg

use a sub directory of a github repo as yarn / npm dependency directly
https://gitpkg.vercel.app
315 stars 19 forks source link

`git` ≠ GitHub #23

Open toastal opened 3 years ago

toastal commented 3 years ago

Your tool helped me solve an annoying problem trying to use a PR I pushed to a monorepo :+1: (as well as many others). Thanks.

My issue is the name of this tool. While stated clearly in the tag line

GitPkg enables you to use a sub directory in a GitHub repo as Yarn / NPM dependency.

and in

if (domain !== "github.com") {
  return {
    type: "error",
     errorType: "platform-not-supported",
     data,
  };
}

However, the project is called called gitpkg and git ≠ GitHub. The name is a bit misleading and right now isn't as flexible as it could be. Lots of open source projects are on GitLab, SourceHut, custom Gitea instance, et al. Some tooling, like npm, have a GitHub bias that username/repo#HASH is treated as GitHub, but you can still use git+https://gitlab.com/username/repo#HASH. All URLs and code should be fetchable using git instead of GitHub's specific REST API, no?