1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-03 12:50:04 +02:00

update dependencies

This commit is contained in:
s2
2018-10-10 15:11:12 +02:00
parent da4083f574
commit 5c55c54b71
90877 changed files with 339776 additions and 33677 deletions

View File

@@ -2,6 +2,43 @@
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.7.1"></a>
## [2.7.1](https://github.com/npm/hosted-git-info/compare/v2.7.0...v2.7.1) (2018-07-07)
### Bug Fixes
* **index:** Guard against non-string types ([5bc580d](https://github.com/npm/hosted-git-info/commit/5bc580d))
* **parse:** Crash on strings that parse to having no host ([c931482](https://github.com/npm/hosted-git-info/commit/c931482)), closes [#35](https://github.com/npm/hosted-git-info/issues/35)
<a name="2.7.0"></a>
# [2.7.0](https://github.com/npm/hosted-git-info/compare/v2.6.1...v2.7.0) (2018-07-06)
### Bug Fixes
* **github tarball:** update github tarballtemplate ([6efd582](https://github.com/npm/hosted-git-info/commit/6efd582)), closes [#34](https://github.com/npm/hosted-git-info/issues/34)
* **gitlab docs:** switched to lowercase anchors for readmes ([701bcd1](https://github.com/npm/hosted-git-info/commit/701bcd1))
### Features
* **all:** Support www. prefixes on hostnames ([3349575](https://github.com/npm/hosted-git-info/commit/3349575)), closes [#32](https://github.com/npm/hosted-git-info/issues/32)
<a name="2.6.1"></a>
## [2.6.1](https://github.com/npm/hosted-git-info/compare/v2.6.0...v2.6.1) (2018-06-25)
### Bug Fixes
* **Revert:** "compat: remove Object.assign fallback ([#25](https://github.com/npm/hosted-git-info/issues/25))" ([cce5a62](https://github.com/npm/hosted-git-info/commit/cce5a62))
* **Revert:** "git-host: fix forgotten extend()" ([a815ec9](https://github.com/npm/hosted-git-info/commit/a815ec9))
<a name="2.6.0"></a>
# [2.6.0](https://github.com/npm/hosted-git-info/compare/v2.5.0...v2.6.0) (2018-03-07)

View File

@@ -10,7 +10,7 @@ var gitHosts = module.exports = {
'filetemplate': 'https://{auth@}raw.githubusercontent.com/{user}/{project}/{committish}/{path}',
'bugstemplate': 'https://{domain}/{user}/{project}/issues',
'gittemplate': 'git://{auth@}{domain}/{user}/{project}.git{#committish}',
'tarballtemplate': 'https://{domain}/{user}/{project}/archive/{committish}.tar.gz'
'tarballtemplate': 'https://codeload.{domain}/{user}/{project}/tar.gz/{committish}'
},
bitbucket: {
'protocols': [ 'git+ssh', 'git+https', 'ssh', 'https' ],
@@ -22,7 +22,6 @@ var gitHosts = module.exports = {
'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',
'tarballtemplate': 'https://{domain}/{user}/{project}/repository/archive.tar.gz?ref={committish}'
},

View File

@@ -1,5 +1,7 @@
'use strict'
var gitHosts = require('./git-host-info.js')
/* eslint-disable node/no-deprecated-api */
var extend = Object.assign || require('util')._extend
var GitHost = module.exports = function (type, user, auth, project, committish, defaultRepresentation, opts) {
var gitHostInfo = this
@@ -22,9 +24,9 @@ GitHost.prototype.hash = function () {
GitHost.prototype._fill = function (template, opts) {
if (!template) return
var vars = Object.assign({}, opts)
var vars = extend({}, opts)
vars.path = vars.path ? vars.path.replace(/^[/]+/g, '') : ''
opts = Object.assign({}, this.opts, 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]
@@ -49,8 +51,8 @@ GitHost.prototype._fill = function (template, opts) {
} else {
vars['#committish'] = rawComittish ? '#' + rawComittish : ''
vars['/tree/committish'] = vars.committish
? '/' + vars.treepath + '/' + vars.committish
: ''
? '/' + vars.treepath + '/' + vars.committish
: ''
vars['/committish'] = vars.committish ? '/' + vars.committish : ''
vars.committish = vars.committish || 'master'
}
@@ -79,7 +81,7 @@ GitHost.prototype.browse = function (P, F, opts) {
opts = F
F = null
}
return this._fill(this.browsefiletemplate, Object.assign({
return this._fill(this.browsefiletemplate, extend({
fragment: F,
path: P
}, opts))
@@ -117,7 +119,7 @@ GitHost.prototype.tarball = function (opts) {
}
GitHost.prototype.file = function (P, opts) {
return this._fill(this.filetemplate, Object.assign({ path: P }, opts))
return this._fill(this.filetemplate, extend({ path: P }, opts))
}
GitHost.prototype.getDefaultRepresentation = function () {

View File

@@ -26,6 +26,7 @@ var authProtocols = {
var cache = {}
module.exports.fromUrl = function (giturl, opts) {
if (typeof giturl !== 'string') return
var key = giturl + JSON.stringify(opts || {})
if (!(key in cache)) {
@@ -58,7 +59,7 @@ function fromUrl (giturl, opts) {
project = decodeURIComponent(shortcutMatch[3])
defaultRepresentation = 'shortcut'
} else {
if (parsed.host !== gitHostInfo.domain) return
if (parsed.host && parsed.host !== gitHostInfo.domain && parsed.host.replace(/^www[.]/, '') !== gitHostInfo.domain) return
if (!gitHostInfo.protocols_re.test(parsed.protocol)) return
if (!parsed.path) return
var pathmatch = gitHostInfo.pathmatch

View File

@@ -1,33 +1,27 @@
{
"_args": [
[
"hosted-git-info@2.6.0",
"E:\\projects\\p\\gitlit\\app"
]
],
"_development": true,
"_from": "hosted-git-info@2.6.0",
"_id": "hosted-git-info@2.6.0",
"_from": "hosted-git-info@^2.1.4",
"_id": "hosted-git-info@2.7.1",
"_inBundle": false,
"_integrity": "sha512-lIbgIIQA3lz5XaB6vxakj6sDHADJiZadYEJB+FgA+C4nubM1NwcuvUr9EJPmnH1skZqpqUzWborWo8EIUi0Sdw==",
"_integrity": "sha512-7T/BxH19zbcCTa8XkMlbK5lTo1WtgkFi3GvdWEyNuc4Vex7/9Dqbnpsf4JMydcfj9HCg4zUWFTL3Za6lapg5/w==",
"_location": "/hosted-git-info",
"_phantomChildren": {},
"_requested": {
"type": "version",
"type": "range",
"registry": true,
"raw": "hosted-git-info@2.6.0",
"raw": "hosted-git-info@^2.1.4",
"name": "hosted-git-info",
"escapedName": "hosted-git-info",
"rawSpec": "2.6.0",
"rawSpec": "^2.1.4",
"saveSpec": null,
"fetchSpec": "2.6.0"
"fetchSpec": "^2.1.4"
},
"_requiredBy": [
"/normalize-package-data"
],
"_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.6.0.tgz",
"_spec": "2.6.0",
"_where": "E:\\projects\\p\\gitlit\\app",
"_resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.7.1.tgz",
"_shasum": "97f236977bd6e125408930ff6de3eec6281ec047",
"_spec": "hosted-git-info@^2.1.4",
"_where": "E:\\projects\\p\\gitlit\\app\\node_modules\\normalize-package-data",
"author": {
"name": "Rebecca Turner",
"email": "me@re-becca.org",
@@ -36,14 +30,13 @@
"bugs": {
"url": "https://github.com/npm/hosted-git-info/issues"
},
"bundleDependencies": false,
"deprecated": false,
"description": "Provides metadata and conversions from repository urls for Github, Bitbucket and Gitlab",
"devDependencies": {
"standard": "^9.0.2",
"standard": "^11.0.1",
"standard-version": "^4.3.0",
"tap": "^10.3.0"
},
"engines": {
"node": ">=4"
"tap": "^12.0.1"
},
"files": [
"index.js",
@@ -71,5 +64,5 @@
"release": "standard-version -s",
"test": "tap -J --nyc-arg=--all --coverage test"
},
"version": "2.6.0"
"version": "2.7.1"
}