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

fix(resolve): use nodejs implementation of url parse instead of WHATWG URL in case of support git+ssh protocol #5487

Closed
wants to merge 1 commit into from

Conversation

Delagen
Copy link

@Delagen Delagen commented Sep 9, 2022

Use nodejs implementation of url parse instead of WHATWG URL in case of support git+ssh protocol

References

Closes #5278

@Delagen Delagen requested a review from a team as a code owner September 9, 2022 13:25
Copy link

@frank-dspeed frank-dspeed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM++++

@fritzy
Copy link
Contributor

fritzy commented Sep 14, 2022

@Delagen can you add a test to show this working with currently unsupported URL types?

@Delagen
Copy link
Author

Delagen commented Sep 14, 2022

@fritzy I think I will spend too much time trying understand how tests work in this project

I found details it not work only with non github url
For example: private Gitlab

#works
npm i git+ssh://git@github.com:chalk/chalk.git#v5.0.1

#fail
npm i git+ssh://git@git.own.com:group/repo.git#branch

npm ERR! code ERR_INVALID_URL
npm ERR! Invalid URL

Seems it does not support colon inside
npm i git+ssh://git@git.own.com/group/repo.git#branch
Works

@frank-dspeed
Copy link

@Delagen good point the npm project is since long time not in shape anymore i also did no pull requests for all the issues any more as i do not aggree with the overall project handling my suggestion is download .patch files from github and let this issue open then write that you need help with the pull request and some one who is familar with the project will jump in.

i created for my self a new npm package under my @scrope and there i put simply inside the package.json the git patches after install that is a good method to not be blocked by the npm project management it self. hope it helps you

@lukekarrys
Copy link
Member

Thanks for the PR to fix this. We didn't want to land something using a deprecated Node API, so I was able to add a method to our package that we use for parsing git host shorthands, so it can also parse urls: npm/hosted-git-info#176

This should land as part of #5758 which will fully close this bug.

@frank-dspeed
Copy link

frank-dspeed commented Oct 27, 2022

in general as this is needed i only want to leave a comment for the next generation. If you find such issues again never do a package for that rule of thumb if your package maintainance code is more then 200% of your own code create a new file in a existing repo most best create a folder that you call /modules/module-name/module-name.js

call it a day.

About the down voter

He has a other mindset then me you do not need to give that much attention it is his private war for keeping the things like there where in the 1970th he also is fame for the quote: treat ram as infinite in JS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: needs tests requires tests before merging
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] git+ssh does not work with version 8.16
4 participants