Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRebecca Turner <me@re-becca.org>2017-04-21 00:48:04 +0300
committerRebecca Turner <me@re-becca.org>2017-04-21 01:53:10 +0300
commitebde4ea3363dfc154c53bd537189503863c9b3a4 (patch)
tree12d1f3bdee6d38528c525f78afe346f2ce0e15cd /node_modules
parent2afa9240ce5b391671ed5416464f2882d18a94bc (diff)
hosted-git-info@2.4.2
Fix a bug in handling scp style URLs, eg git+https://github.com:foo/repo.git#master Credit: @iarna
Diffstat (limited to 'node_modules')
-rw-r--r--node_modules/hosted-git-info/index.js2
-rw-r--r--node_modules/hosted-git-info/package.json55
2 files changed, 41 insertions, 16 deletions
diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js
index a3fc25b83..8577ffb76 100644
--- a/node_modules/hosted-git-info/index.js
+++ b/node_modules/hosted-git-info/index.js
@@ -52,7 +52,7 @@ module.exports.fromUrl = function (giturl, opts) {
var pathmatch = gitHostInfo.pathmatch
var matched = parsed.path.match(pathmatch)
if (!matched) return
- if (matched[1] != null) user = decodeURIComponent(matched[1])
+ if (matched[1] != null) user = decodeURIComponent(matched[1].replace(/^:/, ''))
if (matched[2] != null) project = decodeURIComponent(matched[2])
defaultRepresentation = protocolToRepresentation(parsed.protocol)
}
diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json
index c1c321c51..d43b9a550 100644
--- a/node_modules/hosted-git-info/package.json
+++ b/node_modules/hosted-git-info/package.json
@@ -2,29 +2,39 @@
"_args": [
[
{
- "raw": "hosted-git-info@2.4.1",
+ "raw": "hosted-git-info@2.4.2",
"scope": null,
"escapedName": "hosted-git-info",
"name": "hosted-git-info",
- "rawSpec": "2.4.1",
- "spec": "2.4.1",
+ "rawSpec": "2.4.2",
+ "spec": "2.4.2",
"type": "version"
},
"/Users/rebecca/code/npm"
]
],
- "_from": "hosted-git-info@2.4.1",
- "_hasShrinkwrap": false,
- "_id": "hosted-git-info@2.4.1",
+ "_from": "hosted-git-info@2.4.2",
+ "_id": "hosted-git-info@2.4.2",
+ "_inCache": true,
"_location": "/hosted-git-info",
+ "_nodeVersion": "7.7.4",
+ "_npmOperationalInternal": {
+ "host": "packages-12-west.internal.npmjs.com",
+ "tmp": "tmp/hosted-git-info-2.4.2.tgz_1492124098717_0.3664245803374797"
+ },
+ "_npmUser": {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ },
+ "_npmVersion": "4.5.0",
"_phantomChildren": {},
"_requested": {
- "raw": "hosted-git-info@2.4.1",
+ "raw": "hosted-git-info@2.4.2",
"scope": null,
"escapedName": "hosted-git-info",
"name": "hosted-git-info",
- "rawSpec": "2.4.1",
- "spec": "2.4.1",
+ "rawSpec": "2.4.2",
+ "spec": "2.4.2",
"type": "version"
},
"_requiredBy": [
@@ -33,10 +43,10 @@
"/normalize-package-data",
"/npm-package-arg"
],
- "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.1.tgz",
- "_shasum": "4b0445e41c004a8bd1337773a4ff790ca40318c8",
+ "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.2.tgz",
+ "_shasum": "0076b9f46a270506ddbaaea56496897460612a67",
"_shrinkwrap": null,
- "_spec": "hosted-git-info@2.4.1",
+ "_spec": "hosted-git-info@2.4.2",
"_where": "/Users/rebecca/code/npm",
"author": {
"name": "Rebecca Turner",
@@ -54,14 +64,15 @@
},
"directories": {},
"dist": {
- "shasum": "4b0445e41c004a8bd1337773a4ff790ca40318c8",
- "tarball": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.1.tgz"
+ "shasum": "0076b9f46a270506ddbaaea56496897460612a67",
+ "tarball": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.4.2.tgz"
},
"files": [
"index.js",
"git-host.js",
"git-host-info.js"
],
+ "gitHead": "91fb3adc2c3c7c024f7fb4e34a1510db0f7625ed",
"homepage": "https://github.com/npm/hosted-git-info",
"keywords": [
"git",
@@ -71,6 +82,20 @@
],
"license": "ISC",
"main": "index.js",
+ "maintainers": [
+ {
+ "name": "iarna",
+ "email": "me@re-becca.org"
+ },
+ {
+ "name": "othiym23",
+ "email": "ogd@aoaioxxysz.net"
+ },
+ {
+ "name": "zkat",
+ "email": "kat@sykosomatic.org"
+ }
+ ],
"name": "hosted-git-info",
"optionalDependencies": {},
"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",
@@ -82,5 +107,5 @@
"scripts": {
"test": "standard && tap -J --coverage test/*.js"
},
- "version": "2.4.1"
+ "version": "2.4.2"
}