summaryrefslogtreecommitdiff
path: root/deps/npm/node_modules/hosted-git-info
diff options
context:
space:
mode:
Diffstat (limited to 'deps/npm/node_modules/hosted-git-info')
-rw-r--r--deps/npm/node_modules/hosted-git-info/.npmignore2
-rw-r--r--deps/npm/node_modules/hosted-git-info/README.md61
-rw-r--r--deps/npm/node_modules/hosted-git-info/git-host-info.js16
-rw-r--r--deps/npm/node_modules/hosted-git-info/git-host.js84
-rw-r--r--deps/npm/node_modules/hosted-git-info/index.js56
-rw-r--r--deps/npm/node_modules/hosted-git-info/package.json87
6 files changed, 174 insertions, 132 deletions
diff --git a/deps/npm/node_modules/hosted-git-info/.npmignore b/deps/npm/node_modules/hosted-git-info/.npmignore
deleted file mode 100644
index efab07fb1b..0000000000
--- a/deps/npm/node_modules/hosted-git-info/.npmignore
+++ /dev/null
@@ -1,2 +0,0 @@
-test
-.travis.yml
diff --git a/deps/npm/node_modules/hosted-git-info/README.md b/deps/npm/node_modules/hosted-git-info/README.md
index 1db47dd656..f9db5dd959 100644
--- a/deps/npm/node_modules/hosted-git-info/README.md
+++ b/deps/npm/node_modules/hosted-git-info/README.md
@@ -4,11 +4,11 @@ This will let you identify and transform various git hosts URLs between
protocols. It also can tell you what the URL is for the raw path for
particular file for direct access without git.
-## Usage
+## Example
```javascript
var hostedGitInfo = require("hosted-git-info")
-var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git")
+var info = hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git", opts)
/* info looks like:
{
type: "github",
@@ -32,9 +32,39 @@ If it does match, the returned object has properties of:
* info.user -- The name of the user/org on the git host
* info.project -- The name of the project on the git host
-And methods of:
+## Version Contract
+
+The major version will be bumped any time…
+
+* The constructor stops accepting URLs that it previously accepted.
+* A method is removed.
+* A method can no longer accept the number and type of arguments it previously accepted.
+* A method can return a different type than it currently returns.
+
+Implications:
+
+* I do not consider the specific format of the urls returned from, say
+ `.https()` to be a part of the contract. The contract is that it will
+ return a string that can be used to fetch the repo via HTTPS. But what
+ that string looks like, specifically, can change.
+* Dropping support for a hosted git provider would constitute a breaking
+ change.
+
+## Usage
+
+### var info = hostedGitInfo.fromUrl(gitSpecifier[, options])
+
+* *gitSpecifer* is a URL of a git repository or a SCP-style specifier of one.
+* *options* is an optional object. It can have the following properties:
+ * *noCommittish* — If true then committishes won't be included in generated URLs.
+ * *noGitPlus* — If true then `git+` won't be prefixed on URLs.
+
+## Methods
+
+All of the methods take the same options as the `fromUrl` factory. Options
+provided to a method override those provided to the constructor.
-* info.file(path)
+* info.file(path, opts)
Given the path of a file relative to the repository, returns a URL for
directly fetching it from the githost. If no committish was set then
@@ -43,44 +73,48 @@ directly fetching it from the githost. If no committish was set then
For example `hostedGitInfo.fromUrl("git@github.com:npm/hosted-git-info.git#v1.0.0").file("package.json")`
would return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json`
-* info.shortcut()
+* info.shortcut(opts)
eg, `github:npm/hosted-git-info`
-* info.browse()
+* info.browse(opts)
eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`
-* info.bugs()
+* info.bugs(opts)
eg, `https://github.com/npm/hosted-git-info/issues`
-* info.docs()
+* info.docs(opts)
eg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme`
-* info.https()
+* info.https(opts)
eg, `git+https://github.com/npm/hosted-git-info.git`
-* info.sshurl()
+* info.sshurl(opts)
eg, `git+ssh://git@github.com/npm/hosted-git-info.git`
-* info.ssh()
+* info.ssh(opts)
eg, `git@github.com:npm/hosted-git-info.git`
-* info.path()
+* info.path(opts)
eg, `npm/hosted-git-info`
+* info.tarball(opts)
+
+eg, `https://github.com/npm/hosted-git-info/archive/v1.2.0.tar.gz`
+
* info.getDefaultRepresentation()
Returns the default output type. The default output type is based on the
string you passed in to be parsed
-* info.toString()
+* info.toString(opts)
Uses the getDefaultRepresentation to call one of the other methods to get a URL for
this resource. As such `hostedGitInfo.fromUrl(url).toString()` will give
@@ -91,7 +125,6 @@ form of `org/project` will be normalized to `github:org/project`.
SSH connect strings will be normalized into `git+ssh` URLs.
-
## Supported hosts
Currently this supports Github, Bitbucket and Gitlab. Pull requests for
diff --git a/deps/npm/node_modules/hosted-git-info/git-host-info.js b/deps/npm/node_modules/hosted-git-info/git-host-info.js
index 22343335ee..93cf617440 100644
--- a/deps/npm/node_modules/hosted-git-info/git-host-info.js
+++ b/deps/npm/node_modules/hosted-git-info/git-host-info.js
@@ -9,19 +9,22 @@ var gitHosts = module.exports = {
'treepath': 'tree',
'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}',
'bugstemplate': 'https://{domain}/{user}/{project}/issues',
- 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}'
+ 'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}',
+ 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz'
},
bitbucket: {
'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
'domain': 'bitbucket.org',
- 'treepath': 'src'
+ 'treepath': 'src',
+ 'tarballtemplate': 'https://{domain}/{user}/{project}/get/{committish}.tar.gz'
},
gitlab: {
'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
'domain': 'gitlab.com',
'treepath': 'tree',
'docstemplate': 'https://{domain}/{user}/{project}{/tree/committish}#README',
- 'bugstemplate': 'https://{domain}/{user}/{project}/issues'
+ 'bugstemplate': 'https://{domain}/{user}/{project}/issues',
+ 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}'
},
gist: {
'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ],
@@ -36,7 +39,8 @@ var gitHosts = module.exports = {
'docstemplate': 'https://{domain}/{project}{/committish}',
'httpstemplate': 'git+https://{domain}/{project}.git{#committish}',
'shortcuttemplate': '{type}:{project}{#committish}',
- 'pathtemplate': '{project}{#committish}'
+ 'pathtemplate': '{project}{#committish}',
+ 'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz'
}
}
@@ -49,7 +53,7 @@ var gitHostDefaults = {
'filetemplate': 'https://{domain}/{user}/{project}/raw/{committish}/{path}',
'shortcuttemplate': '{type}:{user}/{project}{#committish}',
'pathtemplate': '{user}/{project}{#committish}',
- 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git)?$/
+ 'pathmatch': /^[/]([^/]+)[/]([^/]+?)(?:[.]git|[/])?$/
}
Object.keys(gitHosts).forEach(function (name) {
@@ -59,6 +63,6 @@ Object.keys(gitHosts).forEach(function (name) {
})
gitHosts[name].protocols_re = RegExp('^(' +
gitHosts[name].protocols.map(function (protocol) {
- return protocol.replace(/([\\+*{}()\[\]$^|])/g, '\\$1')
+ return protocol.replace(/([\\+*{}()[\]$^|])/g, '\\$1')
}).join('|') + '):$')
})
diff --git a/deps/npm/node_modules/hosted-git-info/git-host.js b/deps/npm/node_modules/hosted-git-info/git-host.js
index ea31380a4e..4c6641bbf7 100644
--- a/deps/npm/node_modules/hosted-git-info/git-host.js
+++ b/deps/npm/node_modules/hosted-git-info/git-host.js
@@ -1,7 +1,8 @@
'use strict'
var gitHosts = require('./git-host-info.js')
+var extend = Object.assign || require('util')._extend
-var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation) {
+var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) {
var gitHostInfo = this
gitHostInfo.type = type
Object.keys(gitHosts[type]).forEach(function (key) {
@@ -12,6 +13,7 @@ var GitHost = module.exports = function (type, user, auth, project, committish,
gitHostInfo.project = project
gitHostInfo.committish = committish
gitHostInfo.default = defaultRepresentation
+ gitHostInfo.opts = opts || {}
}
GitHost.prototype = {}
@@ -19,9 +21,10 @@ GitHost.prototype.hash = function () {
return this.committish ? '#' + this.committish : ''
}
-GitHost.prototype._fill = function (template, vars) {
+GitHost.prototype._fill = function (template, opts) {
if (!template) return
- if (!vars) vars = {}
+ var vars = extend({}, opts)
+ opts = extend(extend({}, this.opts), opts)
var self = this
Object.keys(this).forEach(function (key) {
if (self[key] != null && vars[key] == null) vars[key] = self[key]
@@ -32,65 +35,80 @@ GitHost.prototype._fill = function (template, vars) {
vars[key] = encodeURIComponent(vars[key])
})
vars['auth@'] = rawAuth ? rawAuth + '@' : ''
- vars['#committish'] = rawComittish ? '#' + rawComittish : ''
- vars['/tree/committish'] = vars.committish
- ? '/' + vars.treepath + '/' + vars.committish
- : ''
- vars['/committish'] = vars.committish ? '/' + vars.committish : ''
- vars.committish = vars.committish || 'master'
+ if (opts.noCommittish) {
+ vars['#committish'] = ''
+ vars['/tree/committish'] = ''
+ vars['/comittish'] = ''
+ vars.comittish = ''
+ } else {
+ vars['#committish'] = rawComittish ? '#' + rawComittish : ''
+ vars['/tree/committish'] = vars.committish
+ ? '/' + vars.treepath + '/' + vars.committish
+ : ''
+ vars['/committish'] = vars.committish ? '/' + vars.committish : ''
+ vars.committish = vars.committish || 'master'
+ }
var res = template
Object.keys(vars).forEach(function (key) {
res = res.replace(new RegExp('[{]' + key + '[}]', 'g'), vars[key])
})
- return res
+ if (opts.noGitPlus) {
+ return res.replace(/^git[+]/, '')
+ } else {
+ return res
+ }
}
-GitHost.prototype.ssh = function () {
- return this._fill(this.sshtemplate)
+GitHost.prototype.ssh = function (opts) {
+ return this._fill(this.sshtemplate, opts)
}
-GitHost.prototype.sshurl = function () {
- return this._fill(this.sshurltemplate)
+GitHost.prototype.sshurl = function (opts) {
+ return this._fill(this.sshurltemplate, opts)
}
-GitHost.prototype.browse = function () {
- return this._fill(this.browsetemplate)
+GitHost.prototype.browse = function (opts) {
+ return this._fill(this.browsetemplate, opts)
}
-GitHost.prototype.docs = function () {
- return this._fill(this.docstemplate)
+GitHost.prototype.docs = function (opts) {
+ return this._fill(this.docstemplate, opts)
}
-GitHost.prototype.bugs = function () {
- return this._fill(this.bugstemplate)
+GitHost.prototype.bugs = function (opts) {
+ return this._fill(this.bugstemplate, opts)
}
-GitHost.prototype.https = function () {
- return this._fill(this.httpstemplate)
+GitHost.prototype.https = function (opts) {
+ return this._fill(this.httpstemplate, opts)
}
-GitHost.prototype.git = function () {
- return this._fill(this.gittemplate)
+GitHost.prototype.git = function (opts) {
+ return this._fill(this.gittemplate, opts)
}
-GitHost.prototype.shortcut = function () {
- return this._fill(this.shortcuttemplate)
+GitHost.prototype.shortcut = function (opts) {
+ return this._fill(this.shortcuttemplate, opts)
}
-GitHost.prototype.path = function () {
- return this._fill(this.pathtemplate)
+GitHost.prototype.path = function (opts) {
+ return this._fill(this.pathtemplate, opts)
}
-GitHost.prototype.file = function (P) {
- return this._fill(this.filetemplate, {
+GitHost.prototype.tarball = function (opts) {
+ return this._fill(this.tarballtemplate, opts)
+}
+
+GitHost.prototype.file = function (P, opts) {
+ return this._fill(this.filetemplate, extend({
path: P.replace(/^[/]+/g, '')
- })
+ }, opts))
}
GitHost.prototype.getDefaultRepresentation = function () {
return this.default
}
-GitHost.prototype.toString = function () {
- return (this[this.default] || this.sshurl).call(this)
+GitHost.prototype.toString = function (opts) {
+ return (this[this.default] || this.sshurl).call(this, opts)
}
diff --git a/deps/npm/node_modules/hosted-git-info/index.js b/deps/npm/node_modules/hosted-git-info/index.js
index 453ce87d38..a3fc25b839 100644
--- a/deps/npm/node_modules/hosted-git-info/index.js
+++ b/deps/npm/node_modules/hosted-git-info/index.js
@@ -23,37 +23,43 @@ var authProtocols = {
'git+http:': true
}
-module.exports.fromUrl = function (giturl) {
+module.exports.fromUrl = function (giturl, opts) {
if (giturl == null || giturl === '') return
var url = fixupUnqualifiedGist(
isGitHubShorthand(giturl) ? 'github:' + giturl : giturl
)
var parsed = parseGitUrl(url)
+ var shortcutMatch = url.match(new RegExp('^([^:]+):(?:(?:[^@:]+(?:[^@]+)?@)?([^/]*))[/](.+?)(?:[.]git)?($|#)'))
var matches = Object.keys(gitHosts).map(function (gitHostName) {
- var gitHostInfo = gitHosts[gitHostName]
- var auth = null
- if (parsed.auth && authProtocols[parsed.protocol]) {
- auth = decodeURIComponent(parsed.auth)
+ try {
+ var gitHostInfo = gitHosts[gitHostName]
+ var auth = null
+ if (parsed.auth && authProtocols[parsed.protocol]) {
+ auth = decodeURIComponent(parsed.auth)
+ }
+ var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null
+ var user = null
+ var project = null
+ var defaultRepresentation = null
+ if (shortcutMatch && shortcutMatch[1] === gitHostName) {
+ user = shortcutMatch[2] && decodeURIComponent(shortcutMatch[2])
+ project = decodeURIComponent(shortcutMatch[3])
+ defaultRepresentation = 'shortcut'
+ } else {
+ if (parsed.host !== gitHostInfo.domain) return
+ if (!gitHostInfo.protocols_re.test(parsed.protocol)) return
+ if (!parsed.path) return
+ var pathmatch = gitHostInfo.pathmatch
+ var matched = parsed.path.match(pathmatch)
+ if (!matched) return
+ if (matched[1] != null) user = decodeURIComponent(matched[1])
+ if (matched[2] != null) project = decodeURIComponent(matched[2])
+ defaultRepresentation = protocolToRepresentation(parsed.protocol)
+ }
+ return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation, opts)
+ } catch (ex) {
+ if (!(ex instanceof URIError)) throw ex
}
- var committish = parsed.hash ? decodeURIComponent(parsed.hash.substr(1)) : null
- var user = null
- var project = null
- var defaultRepresentation = null
- if (parsed.protocol === gitHostName + ':') {
- user = decodeURIComponent(parsed.host)
- project = parsed.path && decodeURIComponent(parsed.path.replace(/^[/](.*?)(?:[.]git)?$/, '$1'))
- defaultRepresentation = 'shortcut'
- } else {
- if (parsed.host !== gitHostInfo.domain) return
- if (!gitHostInfo.protocols_re.test(parsed.protocol)) return
- var pathmatch = gitHostInfo.pathmatch
- var matched = parsed.path.match(pathmatch)
- if (!matched) return
- if (matched[1] != null) user = decodeURIComponent(matched[1])
- if (matched[2] != null) project = decodeURIComponent(matched[2])
- defaultRepresentation = protocolToRepresentation(parsed.protocol)
- }
- return new GitHost(gitHostName, user, auth, project, committish, defaultRepresentation)
}).filter(function (gitHostInfo) { return gitHostInfo })
if (matches.length !== 1) return
return matches[0]
@@ -83,7 +89,7 @@ function fixupUnqualifiedGist (giturl) {
function parseGitUrl (giturl) {
if (typeof giturl !== 'string') giturl = '' + giturl
- var matched = giturl.match(/^([^@]+)@([^:]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/)
+ var matched = giturl.match(/^([^@]+)@([^:/]+):[/]?((?:[^/]+[/])?[^/]+?)(?:[.]git)?(#.*)?$/)
if (!matched) return url.parse(giturl)
return {
protocol: 'git+ssh:',
diff --git a/deps/npm/node_modules/hosted-git-info/package.json b/deps/npm/node_modules/hosted-git-info/package.json
index 7c8475510e..c1c321c51d 100644
--- a/deps/npm/node_modules/hosted-git-info/package.json
+++ b/deps/npm/node_modules/hosted-git-info/package.json
@@ -2,53 +2,45 @@
"_args": [
[
{
- "name": "hosted-git-info",
- "raw": "hosted-git-info@latest",
- "rawSpec": "latest",
+ "raw": "hosted-git-info@2.4.1",
"scope": null,
- "spec": "latest",
- "type": "tag"
+ "escapedName": "hosted-git-info",
+ "name": "hosted-git-info",
+ "rawSpec": "2.4.1",
+ "spec": "2.4.1",
+ "type": "version"
},
- "/Users/zkat/Documents/code/npm"
+ "/Users/rebecca/code/npm"
]
],
- "_from": "hosted-git-info@latest",
- "_id": "hosted-git-info@2.1.5",
- "_inCache": true,
- "_installable": true,
+ "_from": "hosted-git-info@2.4.1",
+ "_hasShrinkwrap": false,
+ "_id": "hosted-git-info@2.4.1",
"_location": "/hosted-git-info",
- "_nodeVersion": "5.10.1",
- "_npmOperationalInternal": {
- "host": "packages-12-west.internal.npmjs.com",
- "tmp": "tmp/hosted-git-info-2.1.5.tgz_1463518889246_0.20443619322031736"
- },
- "_npmUser": {
- "email": "kat@sykosomatic.org",
- "name": "zkat"
- },
- "_npmVersion": "3.9.1",
"_phantomChildren": {},
"_requested": {
- "name": "hosted-git-info",
- "raw": "hosted-git-info@latest",
- "rawSpec": "latest",
+ "raw": "hosted-git-info@2.4.1",
"scope": null,
- "spec": "latest",
- "type": "tag"
+ "escapedName": "hosted-git-info",
+ "name": "hosted-git-info",
+ "rawSpec": "2.4.1",
+ "spec": "2.4.1",
+ "type": "version"
},
"_requiredBy": [
+ "#USER",
"/",
"/normalize-package-data",
"/npm-package-arg"
],
- "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz",
- "_shasum": "0ba81d90da2e25ab34a332e6ec77936e1598118b",
+ "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.1.tgz",
+ "_shasum": "4b0445e41c004a8bd1337773a4ff790ca40318c8",
"_shrinkwrap": null,
- "_spec": "hosted-git-info@latest",
- "_where": "/Users/zkat/Documents/code/npm",
+ "_spec": "hosted-git-info@2.4.1",
+ "_where": "/Users/rebecca/code/npm",
"author": {
- "email": "me@re-becca.org",
"name": "Rebecca Turner",
+ "email": "me@re-becca.org",
"url": "http://re-becca.org"
},
"bugs": {
@@ -57,15 +49,19 @@
"dependencies": {},
"description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
"devDependencies": {
- "standard": "^3.3.2",
- "tap": "^0.4.13"
+ "standard": "^9.0.2",
+ "tap": "^10.3.0"
},
"directories": {},
"dist": {
- "shasum": "0ba81d90da2e25ab34a332e6ec77936e1598118b",
- "tarball": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.1.5.tgz"
+ "shasum": "4b0445e41c004a8bd1337773a4ff790ca40318c8",
+ "tarball": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.1.tgz"
},
- "gitHead": "4e6bb323a97a57c18e6b4b891527e26154d04fbe",
+ "files": [
+ "index.js",
+ "git-host.js",
+ "git-host-info.js"
+ ],
"homepage": "https://github.com/npm/hosted-git-info",
"keywords": [
"git",
@@ -75,29 +71,16 @@
],
"license": "ISC",
"main": "index.js",
- "maintainers": [
- {
- "email": "me@re-becca.org",
- "name": "iarna"
- },
- {
- "email": "ogd@aoaioxxysz.net",
- "name": "othiym23"
- },
- {
- "email": "kat@sykosomatic.org",
- "name": "zkat"
- }
- ],
"name": "hosted-git-info",
"optionalDependencies": {},
- "readme": "ERROR: No README data found!",
+ "readme": "# hosted-git-info\n\nThis will let you identify and transform various git hosts URLs between\nprotocols. It also can tell you what the URL is for the raw path for\nparticular file for direct access without git.\n\n## Example\n\n```javascript\nvar hostedGitInfo = require(\"hosted-git-info\")\nvar info = hostedGitInfo.fromUrl(\"git@github.com:npm/hosted-git-info.git\", opts)\n/* info looks like:\n{\n type: \"github\",\n domain: \"github.com\",\n user: \"npm\",\n project: \"hosted-git-info\"\n}\n*/\n```\n\nIf the URL can't be matched with a git host, `null` will be returned. We\ncan match git, ssh and https urls. Additionally, we can match ssh connect\nstrings (`git@github.com:npm/hosted-git-info`) and shortcuts (eg,\n`github:npm/hosted-git-info`). Github specifically, is detected in the case\nof a third, unprefixed, form: `npm/hosted-git-info`.\n\nIf it does match, the returned object has properties of:\n\n* info.type -- The short name of the service\n* info.domain -- The domain for git protocol use\n* info.user -- The name of the user/org on the git host\n* info.project -- The name of the project on the git host\n\n## Version Contract\n\nThe major version will be bumped any time…\n\n* The constructor stops accepting URLs that it previously accepted.\n* A method is removed.\n* A method can no longer accept the number and type of arguments it previously accepted.\n* A method can return a different type than it currently returns.\n\nImplications:\n\n* I do not consider the specific format of the urls returned from, say\n `.https()` to be a part of the contract. The contract is that it will\n return a string that can be used to fetch the repo via HTTPS. But what\n that string looks like, specifically, can change.\n* Dropping support for a hosted git provider would constitute a breaking\n change.\n\n## Usage\n\n### var info = hostedGitInfo.fromUrl(gitSpecifier[, options])\n\n* *gitSpecifer* is a URL of a git repository or a SCP-style specifier of one.\n* *options* is an optional object. It can have the following properties:\n * *noCommittish* — If true then committishes won't be included in generated URLs.\n * *noGitPlus* — If true then `git+` won't be prefixed on URLs.\n\n## Methods\n\nAll of the methods take the same options as the `fromUrl` factory. Options\nprovided to a method override those provided to the constructor.\n\n* info.file(path, opts)\n\nGiven the path of a file relative to the repository, returns a URL for\ndirectly fetching it from the githost. If no committish was set then\n`master` will be used as the default.\n\nFor example `hostedGitInfo.fromUrl(\"git@github.com:npm/hosted-git-info.git#v1.0.0\").file(\"package.json\")`\nwould return `https://raw.githubusercontent.com/npm/hosted-git-info/v1.0.0/package.json`\n\n* info.shortcut(opts)\n\neg, `github:npm/hosted-git-info`\n\n* info.browse(opts)\n\neg, `https://github.com/npm/hosted-git-info/tree/v1.2.0`\n\n* info.bugs(opts)\n\neg, `https://github.com/npm/hosted-git-info/issues`\n\n* info.docs(opts)\n\neg, `https://github.com/npm/hosted-git-info/tree/v1.2.0#readme`\n\n* info.https(opts)\n\neg, `git+https://github.com/npm/hosted-git-info.git`\n\n* info.sshurl(opts)\n\neg, `git+ssh://git@github.com/npm/hosted-git-info.git`\n\n* info.ssh(opts)\n\neg, `git@github.com:npm/hosted-git-info.git`\n\n* info.path(opts)\n\neg, `npm/hosted-git-info`\n\n* info.tarball(opts)\n\neg, `https://github.com/npm/hosted-git-info/archive/v1.2.0.tar.gz`\n\n* info.getDefaultRepresentation()\n\nReturns the default output type. The default output type is based on the\nstring you passed in to be parsed\n\n* info.toString(opts)\n\nUses the getDefaultRepresentation to call one of the other methods to get a URL for\nthis resource. As such `hostedGitInfo.fromUrl(url).toString()` will give\nyou a normalized version of the URL that still uses the same protocol.\n\nShortcuts will still be returned as shortcuts, but the special case github\nform of `org/project` will be normalized to `github:org/project`.\n\nSSH connect strings will be normalized into `git+ssh` URLs.\n\n## Supported hosts\n\nCurrently this supports Github, Bitbucket and Gitlab. Pull requests for\nadditional hosts welcome.\n\n",
+ "readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/npm/hosted-git-info.git"
},
"scripts": {
- "test": "standard && tap test/*.js"
+ "test": "standard && tap -J --coverage test/*.js"
},
- "version": "2.1.5"
+ "version": "2.4.1"
}