diff --git a/node_modules/hosted-git-info/CHANGELOG.md b/node_modules/hosted-git-info/CHANGELOG.md
index 08f3529de7db2..3ffcacacc575c 100644
--- a/node_modules/hosted-git-info/CHANGELOG.md
+++ b/node_modules/hosted-git-info/CHANGELOG.md
@@ -2,6 +2,16 @@
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
+
+## [3.0.8](https://github.com/npm/hosted-git-info/compare/v3.0.7...v3.0.8) (2021-01-28)
+
+
+### Bug Fixes
+
+* simplify the regular expression for shortcut matching ([bede0dc](https://github.com/npm/hosted-git-info/commit/bede0dc)), closes [#76](https://github.com/npm/hosted-git-info/issues/76)
+
+
+
## [3.0.7](https://github.com/npm/hosted-git-info/compare/v3.0.6...v3.0.7) (2020-10-15)
diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js
index 0b08be1553cae..8b3eaba3da7fb 100644
--- a/node_modules/hosted-git-info/index.js
+++ b/node_modules/hosted-git-info/index.js
@@ -41,7 +41,7 @@ function fromUrl (giturl, opts) {
isGitHubShorthand(giturl) ? 'github:' + giturl : giturl
)
var parsed = parseGitUrl(url)
- var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)'))
+ var shortcutMatch = url.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/)
var matches = Object.keys(gitHosts).map(function (gitHostName) {
try {
var gitHostInfo = gitHosts[gitHostName]
@@ -55,7 +55,7 @@ function fromUrl (giturl, opts) {
var defaultRepresentation = null
if (shortcutMatch && shortcutMatch[1] === gitHostName) {
user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2])
- project = decodeURIComponent(shortcutMatch[3])
+ project = decodeURIComponent(shortcutMatch[3].replace(/\.git$/, ''))
defaultRepresentation = 'shortcut'
} else {
if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return
diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json
index 2a0062c8d253c..32712269f0427 100644
--- a/node_modules/hosted-git-info/package.json
+++ b/node_modules/hosted-git-info/package.json
@@ -1,6 +1,6 @@
{
"name": "hosted-git-info",
- "version": "3.0.7",
+ "version": "3.0.8",
"description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
"main": "index.js",
"repository": {
diff --git a/package-lock.json b/package-lock.json
index 494edb3c4b09a..736403aedd670 100644
--- a/package-lock.json
+++ b/package-lock.json
@@ -376,7 +376,7 @@
"columnify": "~1.5.4",
"glob": "^7.1.4",
"graceful-fs": "^4.2.3",
- "hosted-git-info": "^3.0.6",
+ "hosted-git-info": "^3.0.8",
"ini": "^2.0.0",
"init-package-json": "^2.0.1",
"is-cidr": "^4.0.2",
@@ -3378,9 +3378,9 @@
}
},
"node_modules/hosted-git-info": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.7.tgz",
- "integrity": "sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ==",
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz",
+ "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==",
"inBundle": true,
"dependencies": {
"lru-cache": "^6.0.0"
@@ -11933,9 +11933,9 @@
}
},
"hosted-git-info": {
- "version": "3.0.7",
- "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.7.tgz",
- "integrity": "sha512-fWqc0IcuXs+BmE9orLDyVykAG9GJtGLGuZAAqgcckPgv5xad4AcXGIv8galtQvlwutxSlaMcdw7BUtq2EIvqCQ==",
+ "version": "3.0.8",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-3.0.8.tgz",
+ "integrity": "sha512-aXpmwoOhRBrw6X3j0h5RloK4x1OzsxMPyxqIHyNfSe2pypkVTZFpEiRoSipPEPlMrh0HW/XsjkJ5WgnCirpNUw==",
"requires": {
"lru-cache": "^6.0.0"
}
diff --git a/package.json b/package.json
index 808f33714cac2..17e29bec38314 100644
--- a/package.json
+++ b/package.json
@@ -60,7 +60,7 @@
"columnify": "~1.5.4",
"glob": "^7.1.4",
"graceful-fs": "^4.2.3",
- "hosted-git-info": "^3.0.6",
+ "hosted-git-info": "^3.0.8",
"ini": "^2.0.0",
"init-package-json": "^2.0.1",
"is-cidr": "^4.0.2",