diff options
author | Rebecca Turner <me@re-becca.org> | 2017-06-27 01:13:50 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2017-06-27 01:23:36 +0300 |
commit | 265c2544c8ded10854909243482e6437ed03c261 (patch) | |
tree | 93a9b9f4f340e373f70b320bceaec6da536a4414 /node_modules | |
parent | d1977a5000c33e0070d8b0fbc60d1689dca056ac (diff) |
hosted-git-info@2.5.0
Diffstat (limited to 'node_modules')
-rw-r--r-- | node_modules/hosted-git-info/index.js | 12 | ||||
-rw-r--r-- | node_modules/hosted-git-info/package.json | 31 |
2 files changed, 26 insertions, 17 deletions
diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js index 8577ffb76..9055ab185 100644 --- a/node_modules/hosted-git-info/index.js +++ b/node_modules/hosted-git-info/index.js @@ -23,7 +23,19 @@ var authProtocols = { 'git+http:': true } +var cache = {} + module.exports.fromUrl = function (giturl, opts) { + var key = giturl + JSON.stringify(opts || {}) + + if (!(key in cache)) { + cache[key] = fromUrl(giturl, opts) + } + + return cache[key] +} + +function fromUrl (giturl, opts) { if (giturl == null || giturl === '') return var url = fixupUnqualifiedGist( isGitHubShorthand(giturl) ? 'github:' + giturl : giturl diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json index b6c1b5e29..de691a86c 100644 --- a/node_modules/hosted-git-info/package.json +++ b/node_modules/hosted-git-info/package.json @@ -1,40 +1,39 @@ { - "_from": "hosted-git-info@~2.4.2", - "_id": "hosted-git-info@2.4.2", - "_integrity": "sha1-AHa59GonBQbduq6lZJaJdGBhKmc=", + "_from": "hosted-git-info@2.5.0", + "_id": "hosted-git-info@2.5.0", + "_inBundle": false, + "_integrity": "sha512-pNgbURSuab90KbTqvRPsseaTxOJCZBD0a7t+haSN33piP9cCM4l0CqdzAif2hUqm716UovKB2ROmiabGAKVXyg==", "_location": "/hosted-git-info", "_phantomChildren": {}, "_requested": { - "type": "range", + "type": "version", "registry": true, - "raw": "hosted-git-info@~2.4.2", + "raw": "hosted-git-info@2.5.0", "name": "hosted-git-info", "escapedName": "hosted-git-info", - "rawSpec": "~2.4.2", + "rawSpec": "2.5.0", "saveSpec": null, - "fetchSpec": "~2.4.2" + "fetchSpec": "2.5.0" }, "_requiredBy": [ + "#USER", "/", "/normalize-package-data", "/npm-package-arg" ], - "_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.2", - "_where": "/Users/zkat/Documents/code/npm", + "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.5.0.tgz", + "_shasum": "6d60e34b3abbc8313062c3b798ef8d901a07af3c", + "_spec": "hosted-git-info@2.5.0", + "_where": "/Users/rebecca/code/npm", "author": { "name": "Rebecca Turner", "email": "me@re-becca.org", "url": "http://re-becca.org" }, - "bin": null, "bugs": { "url": "https://github.com/npm/hosted-git-info/issues" }, "bundleDependencies": false, - "dependencies": {}, "deprecated": false, "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", "devDependencies": { @@ -56,8 +55,6 @@ "license": "ISC", "main": "index.js", "name": "hosted-git-info", - "optionalDependencies": {}, - "peerDependencies": {}, "repository": { "type": "git", "url": "git+https://github.com/npm/hosted-git-info.git" @@ -65,5 +62,5 @@ "scripts": { "test": "standard && tap -J --coverage test/*.js" }, - "version": "2.4.2" + "version": "2.5.0" } |