hosted-git-info
Advanced tools
Comparing version 3.0.7 to 3.0.8
@@ -5,2 +5,12 @@ # Change Log | ||
<a name="3.0.8"></a> | ||
## [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) | ||
<a name="3.0.7"></a> | ||
@@ -7,0 +17,0 @@ ## [3.0.7](https://github.com/npm/hosted-git-info/compare/v3.0.6...v3.0.7) (2020-10-15) |
@@ -44,3 +44,3 @@ 'use strict' | ||
var parsed = parseGitUrl(url) | ||
var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)')) | ||
var shortcutMatch = url.match(/^([^:]+):(?:[^@]+@)?(?:([^/]*)\/)?([^#]+)/) | ||
var matches = Object.keys(gitHosts).map(function (gitHostName) { | ||
@@ -59,3 +59,3 @@ try { | ||
user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2]) | ||
project = decodeURIComponent(shortcutMatch[3]) | ||
project = decodeURIComponent(shortcutMatch[3].replace(/\.git$/, '')) | ||
defaultRepresentation = 'shortcut' | ||
@@ -62,0 +62,0 @@ } else { |
{ | ||
"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", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
26435
1