1
0
mirror of https://github.com/S2-/gitlit synced 2025-08-04 05:10:05 +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

52
app/node_modules/glob/sync.js generated vendored
View File

@@ -2,7 +2,6 @@ module.exports = globSync
globSync.GlobSync = GlobSync
var fs = require('fs')
var rp = require('fs.realpath')
var minimatch = require('minimatch')
var Minimatch = minimatch.Minimatch
var Glob = require('./glob.js').Glob
@@ -16,7 +15,6 @@ var alphasorti = common.alphasorti
var setopts = common.setopts
var ownProp = common.ownProp
var childrenIgnored = common.childrenIgnored
var isIgnored = common.isIgnored
function globSync (pattern, options) {
if (typeof options === 'function' || arguments.length === 3)
@@ -59,7 +57,7 @@ GlobSync.prototype._finish = function () {
for (var p in matchset) {
try {
p = self._makeAbs(p)
var real = rp.realpathSync(p, self.realpathCache)
var real = fs.realpathSync(p, self.realpathCache)
set[real] = true
} catch (er) {
if (er.syscall === 'stat')
@@ -188,7 +186,7 @@ GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index,
if (e.charAt(0) === '/' && !this.nomount) {
e = path.join(this.root, e)
}
this._emitMatch(index, e)
this.matches[index][e] = true
}
// This was the last one, and no stats were needed
return
@@ -210,29 +208,20 @@ GlobSync.prototype._processReaddir = function (prefix, read, abs, remain, index,
GlobSync.prototype._emitMatch = function (index, e) {
if (isIgnored(this, e))
return
var abs = this._makeAbs(e)
if (this.mark)
e = this._mark(e)
if (this.absolute) {
e = abs
}
if (this.matches[index][e])
return
if (this.nodir) {
var c = this.cache[abs]
var c = this.cache[this._makeAbs(e)]
if (c === 'DIR' || Array.isArray(c))
return
}
this.matches[index][e] = true
if (this.stat)
this._stat(e)
}
@@ -250,18 +239,16 @@ GlobSync.prototype._readdirInGlobStar = function (abs) {
try {
lstat = fs.lstatSync(abs)
} catch (er) {
if (er.code === 'ENOENT') {
// lstat failed, doesn't exist
return null
}
// lstat failed, doesn't exist
return null
}
var isSym = lstat && lstat.isSymbolicLink()
var isSym = lstat.isSymbolicLink()
this.symlinks[abs] = isSym
// If it's not a symlink or a dir, then it's definitely a regular file.
// don't bother doing a readdir in that case.
if (!isSym && lstat && !lstat.isDirectory())
if (!isSym && !lstat.isDirectory())
this.cache[abs] = 'FILE'
else
entries = this._readdir(abs, false)
@@ -318,14 +305,7 @@ GlobSync.prototype._readdirError = function (f, er) {
switch (er.code) {
case 'ENOTSUP': // https://github.com/isaacs/node-glob/issues/205
case 'ENOTDIR': // totally normal. means it *does* exist.
var abs = this._makeAbs(f)
this.cache[abs] = 'FILE'
if (abs === this.cwdAbs) {
var error = new Error(er.code + ' invalid cwd ' + this.cwd)
error.path = this.cwd
error.code = er.code
throw error
}
this.cache[this._makeAbs(f)] = 'FILE'
break
case 'ENOENT': // not terribly unusual
@@ -411,7 +391,7 @@ GlobSync.prototype._processSimple = function (prefix, index) {
prefix = prefix.replace(/\\/g, '/')
// Mark this as a match
this._emitMatch(index, prefix)
this.matches[index][prefix] = true
}
// Returns either 'DIR', 'FILE', or false
@@ -446,13 +426,10 @@ GlobSync.prototype._stat = function (f) {
try {
lstat = fs.lstatSync(abs)
} catch (er) {
if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
this.statCache[abs] = false
return false
}
return false
}
if (lstat && lstat.isSymbolicLink()) {
if (lstat.isSymbolicLink()) {
try {
stat = fs.statSync(abs)
} catch (er) {
@@ -465,13 +442,10 @@ GlobSync.prototype._stat = function (f) {
this.statCache[abs] = stat
var c = true
if (stat)
c = stat.isDirectory() ? 'DIR' : 'FILE'
var c = stat.isDirectory() ? 'DIR' : 'FILE'
this.cache[abs] = this.cache[abs] || c
if (needDir && c === 'FILE')
if (needDir && c !== 'DIR')
return false
return c