Skip to content

Commit

Permalink
chore(git): Adjust to new parse-git-url API
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Apr 12, 2018
1 parent 94a1fb6 commit 542031e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
9 changes: 3 additions & 6 deletions src/git/url_prefix.js
Expand Up @@ -58,12 +58,9 @@ function getGithubURLPrefix(root: string) {
sha = head;
}
if (sha) {
return (
gitUrlParse(getRemoteOrigin.sync(root)).toString('https') +
'/blob/' +
sha.trim() +
'/'
);
const parsed = gitUrlParse(getRemoteOrigin.sync(root));
parsed.git_suffix = false; // eslint-disable-line
return parsed.toString('https') + '/blob/' + sha.trim() + '/';
}
} catch (e) {
return null;
Expand Down
11 changes: 8 additions & 3 deletions yarn.lock
Expand Up @@ -2620,11 +2620,12 @@ git-up@^2.0.0:
is-ssh "^1.3.0"
parse-url "^1.3.0"

git-url-parse@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-8.0.0.tgz#249430c84e6b11ebae630136f50d7993eb03e211"
git-url-parse@^9.0.0:
version "9.0.0"
resolved "https://registry.yarnpkg.com/git-url-parse/-/git-url-parse-9.0.0.tgz#a82a36acc3544c77ed0984d6488b37fbcfbec24d"
dependencies:
git-up "^2.0.0"
parse-domain "^2.0.0"

gitconfiglocal@^1.0.0:
version "1.0.0"
Expand Down Expand Up @@ -4775,6 +4776,10 @@ parents@^1.0.0:
dependencies:
path-platform "~0.11.15"

parse-domain@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/parse-domain/-/parse-domain-2.0.0.tgz#e9f42f697c30f7c2051dc5c55ff4d8a80da7943c"

parse-entities@^1.0.2, parse-entities@^1.1.0:
version "1.1.1"
resolved "https://registry.yarnpkg.com/parse-entities/-/parse-entities-1.1.1.tgz#8112d88471319f27abae4d64964b122fe4e1b890"
Expand Down

0 comments on commit 542031e

Please sign in to comment.