Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support git+http(s) versions #89

Open
Sohalt opened this issue Aug 9, 2021 · 2 comments · May be fixed by #94
Open

Support git+http(s) versions #89

Sohalt opened this issue Aug 9, 2021 · 2 comments · May be fixed by #94

Comments

@Sohalt
Copy link
Contributor

Sohalt commented Aug 9, 2021

Is your feature request related to a problem? Please describe.
Some projects have dependencies that are not part of the npm registry and are not hosted on GitHub, but instead are specified using the git+http(s) scheme. An example would be https://gitlab.com/openengiadina/geopub/-/blob/v0.2.0/package-lock.json#L769
It's currently not possible to use npmlock2nix with these lockfiles.

Describe the solution you'd like
Support git+http(s) urls for specifying versions.

Describe alternatives you've considered
both not very practical:

  • Mirror the dependency on GitHub
  • upload the dependency on npm
@andir
Copy link
Collaborator

andir commented Aug 11, 2021

I think we are hallf way there with #88 being merged. We will have to write a bit more elaborate URL parsing/handling code. In this case we probably want to use git with the HTTPS protocol as seen in the URI. This means the URL check has to become smarter and we will have different flavors of it.

The makeGithubSource function has to be generalized into handling generic git+http(s) URLs while keeping the GitHub specific code for that special GitHub syntax.

Does NPM have a gitlab: prefix for GitLab sources just as they have one for GitHub?

@Sohalt
Copy link
Contributor Author

Sohalt commented Aug 11, 2021

Does NPM have a gitlab: prefix for GitLab sources just as they have one for GitHub?

Doesn't look like it https://docs.npmjs.com/cli/v7/configuring-npm/package-json#dependencies

@Sohalt Sohalt linked a pull request Aug 13, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants