Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently Cordova returns a 501 for git+http fetching. This enables the ability to reference git+http. It would be nice if this could be applied to Cordova 7, since we aren't moving to 8 yet. It definitely needs to be in 8 since nofetch is no longer supported. (I assume it's just a matter of updating the package.json dependency in cordova-lib?)
Also, I tried writing a test for this. However the unit tests are actually more like functional tests and hitting real endpoints. I don't have a git+http endpoint to test with that isn't GitHub (the GitHub one is picked up by the hostedGitInfo logic). So, I tested with my internal one that was the root of this problem. I'll post the code here and you can decide how to integrate it into a test (perhaps mocking is in order). This is part of the "test trimID method for npm and git". What I actually want to test is JUST the trim method, so if it was exposed for testing, we wouldn't even have to make the fetch call per se, just verify the trimID function is working properly.