diff options
author | isaacs <i@izs.me> | 2019-10-08 02:34:36 +0300 |
---|---|---|
committer | isaacs <i@izs.me> | 2019-10-08 02:34:37 +0300 |
commit | f46edae9450b707650a0efab09aa1e9295a18070 (patch) | |
tree | b00277b51c574a23b0c1f7dfd1038d69b1d54843 /node_modules/hosted-git-info | |
parent | f3299acd0b4249500e940776aca77cc6c0977263 (diff) |
hosted-git-info@2.8.5
Diffstat (limited to 'node_modules/hosted-git-info')
-rw-r--r-- | node_modules/hosted-git-info/CHANGELOG.md | 21 | ||||
-rw-r--r-- | node_modules/hosted-git-info/git-host-info.js | 2 | ||||
-rw-r--r-- | node_modules/hosted-git-info/git-host.js | 4 | ||||
-rw-r--r-- | node_modules/hosted-git-info/index.js | 11 | ||||
-rw-r--r-- | node_modules/hosted-git-info/package.json | 28 |
5 files changed, 43 insertions, 23 deletions
diff --git a/node_modules/hosted-git-info/CHANGELOG.md b/node_modules/hosted-git-info/CHANGELOG.md index 9eedbb80b..479f24b64 100644 --- a/node_modules/hosted-git-info/CHANGELOG.md +++ b/node_modules/hosted-git-info/CHANGELOG.md @@ -2,6 +2,27 @@ All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines. +<a name="2.8.5"></a> +## [2.8.5](https://github.com/npm/hosted-git-info/compare/v2.8.4...v2.8.5) (2019-10-07) + + +### Bug Fixes + +* updated pathmatch for gitlab ([e8325b5](https://github.com/npm/hosted-git-info/commit/e8325b5)), closes [#51](https://github.com/npm/hosted-git-info/issues/51) +* updated pathmatch for gitlab ([ffe056f](https://github.com/npm/hosted-git-info/commit/ffe056f)) + + + +<a name="2.8.4"></a> +## [2.8.4](https://github.com/npm/hosted-git-info/compare/v2.8.3...v2.8.4) (2019-08-12) + + + +<a name="2.8.3"></a> +## [2.8.3](https://github.com/npm/hosted-git-info/compare/v2.8.2...v2.8.3) (2019-08-12) + + + <a name="2.8.2"></a> ## [2.8.2](https://github.com/npm/hosted-git-info/compare/v2.8.1...v2.8.2) (2019-08-05) diff --git a/node_modules/hosted-git-info/git-host-info.js b/node_modules/hosted-git-info/git-host-info.js index d81be2050..8147e3348 100644 --- a/node_modules/hosted-git-info/git-host-info.js +++ b/node_modules/hosted-git-info/git-host-info.js @@ -25,7 +25,7 @@ var gitHosts = module.exports = { 'bugstemplate': 'https://{domain}/{user}/{project}/issues', 'httpstemplate': 'git+https://{auth@}{domain}/{user}/{projectPath}.git{#committish}', 'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}', - 'pathmatch': /^[/]([^/]+)[/](.+?)(?:[.]git|[/])?$/ + 'pathmatch': /^[/]([^/]+)[/]((?!.*(\/-\/|\/repository\/archive\.tar\.gz\?=.*|\/repository\/[^/]+\/archive.tar.gz$)).*?)(?:[.]git|[/])?$/ }, gist: { 'protocols': [ 'git', 'git+ssh', 'git+https', 'ssh', 'https' ], diff --git a/node_modules/hosted-git-info/git-host.js b/node_modules/hosted-git-info/git-host.js index ee5bb1af0..9616fbaa6 100644 --- a/node_modules/hosted-git-info/git-host.js +++ b/node_modules/hosted-git-info/git-host.js @@ -9,8 +9,8 @@ var extend = Object.assign || function _extend (target, source) { // Don't do anything if source isn't an object if (source === null || typeof source !== 'object') return target - const keys = Object.keys(source) - let i = keys.length + var keys = Object.keys(source) + var i = keys.length while (i--) { target[keys[i]] = source[keys[i]] } diff --git a/node_modules/hosted-git-info/index.js b/node_modules/hosted-git-info/index.js index adae4604c..fc959cb04 100644 --- a/node_modules/hosted-git-info/index.js +++ b/node_modules/hosted-git-info/index.js @@ -2,8 +2,6 @@ var url = require('url') var gitHosts = require('./git-host-info.js') var GitHost = module.exports = require('./git-host.js') -var LRU = require('lru-cache') -var cache = new LRU({max: 1000}) var protocolToRepresentationMap = { 'git+ssh:': 'sshurl', @@ -24,15 +22,17 @@ var authProtocols = { 'git+http:': true } +var cache = {} + module.exports.fromUrl = function (giturl, opts) { if (typeof giturl !== 'string') return var key = giturl + JSON.stringify(opts || {}) - if (!cache.has(key)) { - cache.set(key, fromUrl(giturl, opts)) + if (!(key in cache)) { + cache[key] = fromUrl(giturl, opts) } - return cache.get(key) + return cache[key] } function fromUrl (giturl, opts) { @@ -64,6 +64,7 @@ function fromUrl (giturl, opts) { var pathmatch = gitHostInfo.pathmatch var matched = parsed.path.match(pathmatch) if (!matched) return + /* istanbul ignore else */ if (matched[1] !== null && matched[1] !== undefined) { user = decodeURIComponent(matched[1].replace(/^:/, '')) } diff --git a/node_modules/hosted-git-info/package.json b/node_modules/hosted-git-info/package.json index 86e7ba59a..458b323a4 100644 --- a/node_modules/hosted-git-info/package.json +++ b/node_modules/hosted-git-info/package.json @@ -1,19 +1,19 @@ { - "_from": "hosted-git-info@2.8.2", - "_id": "hosted-git-info@2.8.2", + "_from": "hosted-git-info@2.8.5", + "_id": "hosted-git-info@2.8.5", "_inBundle": false, - "_integrity": "sha512-CyjlXII6LMsPMyUzxpTt8fzh5QwzGqPmQXgY/Jyf4Zfp27t/FvfhwoE/8laaMUcMy816CkWF20I7NeQhwwY88w==", + "_integrity": "sha512-kssjab8CvdXfcXMXVcvsXum4Hwdq9XGtRD3TteMEvEbq0LXyiNQr6AprqKqfeaDXze7SxWvRxdpwE6ku7ikLkg==", "_location": "/hosted-git-info", "_phantomChildren": {}, "_requested": { "type": "version", "registry": true, - "raw": "hosted-git-info@2.8.2", + "raw": "hosted-git-info@2.8.5", "name": "hosted-git-info", "escapedName": "hosted-git-info", - "rawSpec": "2.8.2", + "rawSpec": "2.8.5", "saveSpec": null, - "fetchSpec": "2.8.2" + "fetchSpec": "2.8.5" }, "_requiredBy": [ "#USER", @@ -21,9 +21,9 @@ "/normalize-package-data", "/npm-package-arg" ], - "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.2.tgz", - "_shasum": "a35c3f355ac1249f1093c0c2a542ace8818c171a", - "_spec": "hosted-git-info@2.8.2", + "_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.5.tgz", + "_shasum": "759cfcf2c4d156ade59b0b2dfabddc42a6b9c70c", + "_spec": "hosted-git-info@2.8.5", "_where": "/Users/isaacs/dev/npm/cli", "author": { "name": "Rebecca Turner", @@ -34,9 +34,6 @@ "url": "https://github.com/npm/hosted-git-info/issues" }, "bundleDependencies": false, - "dependencies": { - "lru-cache": "^5.1.1" - }, "deprecated": false, "description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab", "devDependencies": { @@ -64,11 +61,12 @@ "url": "git+https://github.com/npm/hosted-git-info.git" }, "scripts": { - "postrelease": "npm publish && git push --follow-tags", + "postrelease": "npm publish --tag=ancient-legacy-fixes && git push --follow-tags", "prerelease": "npm t", "pretest": "standard", "release": "standard-version -s", - "test": "tap -J --100 --no-esm test/*.js" + "test": "tap -J --100 --no-esm test/*.js", + "test:coverage": "tap --coverage-report=html -J --100 --no-esm test/*.js" }, - "version": "2.8.2" + "version": "2.8.5" } |