From 542031e06ca0ba4bf1cff4d81097cf76b3b82ea9 Mon Sep 17 00:00:00 2001 From: Tom MacWright Date: Thu, 12 Apr 2018 12:58:12 -0700 Subject: [PATCH] chore(git): Adjust to new parse-git-url API --- src/git/url_prefix.js | 9 +++------ yarn.lock | 11 ++++++++--- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/git/url_prefix.js b/src/git/url_prefix.js index 46cd178ee..e5de3cbee 100644 --- a/src/git/url_prefix.js +++ b/src/git/url_prefix.js @@ -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; diff --git a/yarn.lock b/yarn.lock index 1d51bb639..e52b5f188 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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" @@ -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"