It seems that parsing a URL which contains the word "blob" in the repo path section of the URL results in an incorrect parse.
Example: Adding this test to test/index.js results in a failure:
test.should("handle 'blob' in repo path", () => {
var res = gitUrlParse("https://github.com/owner/id/tree/main/pkg/blob/data.yaml");
test.expect(res.source).toBe("github.com");
test.expect(res.owner).toBe("owner");
test.expect(res.name).toBe("id");
test.expect(res.toString()).toBe("https://gist.github.com/owner/id");
});
Error: Expected 'owner/id/tree/main' to be 'owner'
Note: I ended up here from backstage/backstage#25246
It seems that parsing a URL which contains the word "blob" in the repo path section of the URL results in an incorrect parse.
Example: Adding this test to
test/index.jsresults in a failure:Error: Expected 'owner/id/tree/main' to be 'owner'Note: I ended up here from backstage/backstage#25246