@hutson/parse-repository-url
Advanced tools
Comparing version 3.0.1 to 3.0.2
@@ -31,9 +31,7 @@ { | ||
"scripts": { | ||
"dev": "docker run --rm --user node -v \"$(pwd)\":/app -w /app -it node:6 sh -c \"yarn install; yarn test; bash\"", | ||
"test": "eslint src/ && nyc mocha --opts mocha.opts src/**/*.spec.js" | ||
"test": "semistandard 'src/**/*.js' && nyc mocha --opts mocha.opts src/**/*.spec.js" | ||
}, | ||
"version": "3.0.1", | ||
"version": "3.0.2", | ||
"devDependencies": { | ||
"@hutson/conventional-changelog-config": "^2.0.0", | ||
"@hutson/eslint-config": "^3.0.0", | ||
"@hutson/nyc-config": "^2.0.0", | ||
@@ -43,7 +41,7 @@ "chai": "^4.2.0", | ||
"debug": "^4.1.0", | ||
"eslint": "^5.7.0", | ||
"mocha": "^5.2.0", | ||
"npm-publish-git-tag": "^3.0.0", | ||
"nyc": "^13.1.0", | ||
"semantic-release-gitlab": "^7.0.10" | ||
"semantic-release-gitlab": "^7.0.10", | ||
"semistandard": "^13.0.1" | ||
}, | ||
@@ -50,0 +48,0 @@ "readme": "ERROR: No README data found!", |
'use strict'; | ||
const {parse} = require(`url`); | ||
const { parse } = require(`url`); | ||
@@ -19,3 +19,3 @@ const URL_PATTERNS = new RegExp(/^\/?:?([/\w-.]+)\/([\w-.]+)\/?$/); | ||
const format = matches => { | ||
return {browse: createBrowseURL(parsedURL, matches), domain: parsedURL.host, project: matches[2] || null, type: getType(parsedURL), user: matches[1] || null}; | ||
return { browse: createBrowseURL(parsedURL, matches), domain: parsedURL.host, project: matches[2] || null, type: getType(parsedURL), user: matches[1] || null }; | ||
}; | ||
@@ -38,3 +38,3 @@ | ||
function getType(parsedURL) { | ||
function getType (parsedURL) { | ||
if (typeof parsedURL.host !== `string`) { | ||
@@ -54,3 +54,3 @@ return null; | ||
function createBrowseURL(parsedURL, matches) { | ||
function createBrowseURL (parsedURL, matches) { | ||
const protocol = parsedURL.protocol === `http:` ? `http:` : `https:`; | ||
@@ -57,0 +57,0 @@ const browseURL = `${protocol}//${parsedURL.host}/${matches[1]}/${matches[2]}`; |
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
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
10
0
20590