Skip to content

Commit ad81d24

Browse files
committed
⬆️ 11.0.0 🎉
1 parent fc916a8 commit ad81d24

File tree

3 files changed

+26
-28
lines changed

3 files changed

+26
-28
lines changed

lib/index.js

+1
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ const gitUp = require("git-up");
3535
*/
3636
function gitUrlParse(url) {
3737

38+
debugger
3839
if (typeof url !== "string") {
3940
throw new Error("The url must be a string.");
4041
}

package.json

+3-6
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "git-url-parse",
3-
"version": "10.1.0",
3+
"version": "11.0.0",
44
"description": "A high level git url parser for common git providers.",
55
"main": "lib/index.js",
66
"scripts": {
@@ -29,12 +29,9 @@
2929
"test": "test"
3030
},
3131
"dependencies": {
32-
"git-up": "^2.0.0"
32+
"git-up": "^4.0.0"
3333
},
3434
"devDependencies": {
35-
"browserify": "^13.0.1",
36-
"dist-it": "^2.0.0",
37-
"namy": "^1.2.3",
3835
"tester": "^1.3.1"
3936
},
4037
"files": [
@@ -52,4 +49,4 @@
5249
"bloggify.json",
5350
"bloggify/"
5451
]
55-
}
52+
}

test/index.js

+22-22
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,14 @@ const gitUrlParse = require("..")
55

66
// Constants
77
const URLS = {
8-
ssh: "[email protected]:IonicaBizau/git-url-parse"
9-
, https: "https://github.com/IonicaBizau/git-url-parse"
10-
, ftp: "ftp://github.com/IonicaBizau/git-url-parse"
11-
, ftps: "ftps://github.com/IonicaBizau/git-url-parse"
12-
, gitSsh: "git+ssh://[email protected]/IonicaBizau/git-url-parse"
13-
, ref: "https://github.com/IonicaBizau/git-url-parse/blob/master/test/index.js"
14-
, shorthand: "IonicaBizau/git-url-parse"
15-
, commit: "https://github.com/IonicaBizau/git-url-parse/commit/9c6443245ace92d237b7b274d4606a616e071c4e"
8+
ssh: "[email protected]:42IonicaBizau/git-url-parse"
9+
, https: "https://github.com/42IonicaBizau/git-url-parse"
10+
, ftp: "ftp://github.com/42IonicaBizau/git-url-parse"
11+
, ftps: "ftps://github.com/42IonicaBizau/git-url-parse"
12+
, gitSsh: "git+ssh://[email protected]/42IonicaBizau/git-url-parse"
13+
, ref: "https://github.com/42IonicaBizau/git-url-parse/blob/master/test/index.js"
14+
, shorthand: "42IonicaBizau/git-url-parse"
15+
, commit: "https://github.com/42IonicaBizau/git-url-parse/commit/9c6443245ace92d237b7b274d4606a616e071c4e"
1616
};
1717

1818
tester.describe("parse urls", test => {
@@ -22,9 +22,9 @@ tester.describe("parse urls", test => {
2222
var res = gitUrlParse(URLS.ssh);
2323
test.expect(res.protocol).toBe("ssh");
2424
test.expect(res.source).toBe("github.com");
25-
test.expect(res.owner).toBe("IonicaBizau");
25+
test.expect(res.owner).toBe("42IonicaBizau");
2626
test.expect(res.name).toBe("git-url-parse");
27-
test.expect(res.full_name).toBe("IonicaBizau/git-url-parse");
27+
test.expect(res.full_name).toBe("42IonicaBizau/git-url-parse");
2828
test.expect(res.href).toBe(URLS.ssh);
2929
test.expect(res.toString("https")).toBe(URLS.https);
3030
test.expect(res.toString("git+ssh")).toBe(URLS.gitSsh);
@@ -41,7 +41,7 @@ tester.describe("parse urls", test => {
4141
var res = gitUrlParse(URLS.ftp);
4242
test.expect(res.protocol).toBe("ftp");
4343
test.expect(res.source).toBe("github.com");
44-
test.expect(res.owner).toBe("IonicaBizau");
44+
test.expect(res.owner).toBe("42IonicaBizau");
4545
test.expect(res.name).toBe("git-url-parse");
4646
test.expect(res.href).toBe(URLS.ftp);
4747
test.expect(res.toString("https")).toBe(URLS.https);
@@ -54,7 +54,7 @@ tester.describe("parse urls", test => {
5454
var res = gitUrlParse(URLS.ftps);
5555
test.expect(res.protocol).toBe("ftps");
5656
test.expect(res.source).toBe("github.com");
57-
test.expect(res.owner).toBe("IonicaBizau");
57+
test.expect(res.owner).toBe("42IonicaBizau");
5858
test.expect(res.name).toBe("git-url-parse");
5959
test.expect(res.href).toBe(URLS.ftps);
6060
test.expect(res.toString("https")).toBe(URLS.https);
@@ -67,7 +67,7 @@ tester.describe("parse urls", test => {
6767
var res = gitUrlParse(URLS.https);
6868
test.expect(res.protocol).toBe("https");
6969
test.expect(res.source).toBe("github.com");
70-
test.expect(res.owner).toBe("IonicaBizau");
70+
test.expect(res.owner).toBe("42IonicaBizau");
7171
test.expect(res.name).toBe("git-url-parse");
7272
test.expect(res.href).toBe(URLS.https);
7373
test.expect(res.toString("https")).toBe(URLS.https);
@@ -77,10 +77,10 @@ tester.describe("parse urls", test => {
7777

7878
// HTTPS with ending slash
7979
test.should("parse https urls with ending slash", () => {
80-
var res = gitUrlParse("https://github.com/IonicaBizau/git-url-parse/");
80+
var res = gitUrlParse("https://github.com/42IonicaBizau/git-url-parse/");
8181
test.expect(res.protocol).toBe("https");
8282
test.expect(res.source).toBe("github.com");
83-
test.expect(res.owner).toBe("IonicaBizau");
83+
test.expect(res.owner).toBe("42IonicaBizau");
8484
test.expect(res.name).toBe("git-url-parse");
8585
test.expect(res.toString("https")).toBe(URLS.https);
8686
test.expect(res.toString("git+ssh")).toBe(URLS.gitSsh);
@@ -92,7 +92,7 @@ tester.describe("parse urls", test => {
9292
var res = gitUrlParse(URLS.gitSsh);
9393
test.expect(res.protocol).toBe("ssh");
9494
test.expect(res.source).toBe("github.com");
95-
test.expect(res.owner).toBe("IonicaBizau");
95+
test.expect(res.owner).toBe("42IonicaBizau");
9696
test.expect(res.name).toBe("git-url-parse");
9797
test.expect(res.toString("https")).toBe(URLS.https);
9898
test.expect(res.toString("git+ssh")).toBe(URLS.gitSsh);
@@ -101,10 +101,10 @@ tester.describe("parse urls", test => {
101101

102102
// HTTPS with basic auth
103103
test.should("parse https urls with basic auth", () => {
104-
var res = gitUrlParse("https://user:[email protected]/IonicaBizau/git-url-parse");
104+
var res = gitUrlParse("https://user:[email protected]/42IonicaBizau/git-url-parse");
105105
test.expect(res.protocol).toBe("https");
106106
test.expect(res.source).toBe("github.com");
107-
test.expect(res.owner).toBe("IonicaBizau");
107+
test.expect(res.owner).toBe("42IonicaBizau");
108108
test.expect(res.name).toBe("git-url-parse");
109109
test.expect(res.user).toBe("user:password");
110110
});
@@ -193,7 +193,7 @@ tester.describe("parse urls", test => {
193193
var res = gitUrlParse(URLS.ref);
194194
test.expect(res.protocol).toBe("https");
195195
test.expect(res.source).toBe("github.com");
196-
test.expect(res.owner).toBe("IonicaBizau");
196+
test.expect(res.owner).toBe("42IonicaBizau");
197197
test.expect(res.name).toBe("git-url-parse");
198198
test.expect(res.href).toBe(URLS.ref);
199199
test.expect(res.ref).toBe("master");
@@ -214,11 +214,11 @@ tester.describe("parse urls", test => {
214214
// shorthand urls
215215
test.should("parse shorthand urls", () => {
216216
var res = gitUrlParse(URLS.shorthand);
217-
test.expect(res.owner).toBe("IonicaBizau");
217+
test.expect(res.owner).toBe("42IonicaBizau");
218218
test.expect(res.name).toBe("git-url-parse");
219219
test.expect(res.href).toBe(URLS.shorthand);
220-
test.expect(res.full_name).toBe("IonicaBizau/git-url-parse");
221-
test.expect(res.pathname).toBe("IonicaBizau/git-url-parse");
220+
test.expect(res.full_name).toBe("42IonicaBizau/git-url-parse");
221+
test.expect(res.pathname).toBe("42IonicaBizau/git-url-parse");
222222
});
223223

224224
test.should("parse subdomains", () => {

0 commit comments

Comments
 (0)