add sidebar with logo

This commit is contained in:
2023-11-25 22:13:57 -05:00
parent 6ef22d88f9
commit 0190a553ba
30496 changed files with 579293 additions and 3701404 deletions
-3
View File
@@ -276,9 +276,6 @@ the filesystem.
* `absolute` Set to true to always receive absolute paths for matched
files. Unlike `realpath`, this also affects the values returned in
the `match` event.
* `fs` File-system object with Node's `fs` API. By default, the built-in
`fs` module will be used. Set to a volume provided by a library like
`memfs` to avoid using the "real" file-system.
## Comparisons to other fnmatch/glob implementations
-4
View File
@@ -10,7 +10,6 @@ function ownProp (obj, field) {
return Object.prototype.hasOwnProperty.call(obj, field)
}
var fs = require("fs")
var path = require("path")
var minimatch = require("minimatch")
var isAbsolute = require("path-is-absolute")
@@ -76,7 +75,6 @@ function setopts (self, pattern, options) {
self.stat = !!options.stat
self.noprocess = !!options.noprocess
self.absolute = !!options.absolute
self.fs = options.fs || fs
self.maxLength = options.maxLength || Infinity
self.cache = options.cache || Object.create(null)
@@ -110,8 +108,6 @@ function setopts (self, pattern, options) {
// Note that they are not supported in Glob itself anyway.
options.nonegate = true
options.nocomment = true
// always treat \ in patterns as escapes, not path separators
options.allowWindowsEscape = false
self.minimatch = new Minimatch(pattern, options)
self.options = self.minimatch.options
Generated Vendored
+6 -8
View File
@@ -40,6 +40,7 @@
module.exports = glob
var fs = require('fs')
var rp = require('fs.realpath')
var minimatch = require('minimatch')
var Minimatch = minimatch.Minimatch
@@ -342,10 +343,7 @@ Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
var read
if (prefix === null)
read = '.'
else if (isAbsolute(prefix) ||
isAbsolute(pattern.map(function (p) {
return typeof p === 'string' ? p : '[*]'
}).join('/'))) {
else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
if (!prefix || !isAbsolute(prefix))
prefix = '/' + prefix
read = prefix
@@ -503,7 +501,7 @@ Glob.prototype._readdirInGlobStar = function (abs, cb) {
var lstatcb = inflight(lstatkey, lstatcb_)
if (lstatcb)
self.fs.lstat(abs, lstatcb)
fs.lstat(abs, lstatcb)
function lstatcb_ (er, lstat) {
if (er && er.code === 'ENOENT')
@@ -544,7 +542,7 @@ Glob.prototype._readdir = function (abs, inGlobStar, cb) {
}
var self = this
self.fs.readdir(abs, readdirCb(this, abs, cb))
fs.readdir(abs, readdirCb(this, abs, cb))
}
function readdirCb (self, abs, cb) {
@@ -748,13 +746,13 @@ Glob.prototype._stat = function (f, cb) {
var self = this
var statcb = inflight('stat\0' + abs, lstatcb_)
if (statcb)
self.fs.lstat(abs, statcb)
fs.lstat(abs, statcb)
function lstatcb_ (er, lstat) {
if (lstat && lstat.isSymbolicLink()) {
// If it's a symlink, then treat it as the target, unless
// the target does not exist, then treat it as a file.
return self.fs.stat(abs, function (er, stat) {
return fs.stat(abs, function (er, stat) {
if (er)
self._stat2(f, abs, null, lstat, cb)
else
+2 -6
View File
@@ -2,10 +2,7 @@
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "glob",
"description": "a little globber",
"version": "7.2.3",
"publishConfig": {
"tag": "v7-legacy"
},
"version": "7.1.7",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
@@ -23,12 +20,11 @@
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.1.1",
"minimatch": "^3.0.4",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
"devDependencies": {
"memfs": "^3.2.0",
"mkdirp": "0",
"rimraf": "^2.2.8",
"tap": "^15.0.6",
Generated Vendored
+8 -10
View File
@@ -1,6 +1,7 @@
module.exports = globSync
globSync.GlobSync = GlobSync
var fs = require('fs')
var rp = require('fs.realpath')
var minimatch = require('minimatch')
var Minimatch = minimatch.Minimatch
@@ -48,7 +49,7 @@ function GlobSync (pattern, options) {
}
GlobSync.prototype._finish = function () {
assert.ok(this instanceof GlobSync)
assert(this instanceof GlobSync)
if (this.realpath) {
var self = this
this.matches.forEach(function (matchset, index) {
@@ -72,7 +73,7 @@ GlobSync.prototype._finish = function () {
GlobSync.prototype._process = function (pattern, index, inGlobStar) {
assert.ok(this instanceof GlobSync)
assert(this instanceof GlobSync)
// Get the first [n] parts of pattern that are all strings.
var n = 0
@@ -109,10 +110,7 @@ GlobSync.prototype._process = function (pattern, index, inGlobStar) {
var read
if (prefix === null)
read = '.'
else if (isAbsolute(prefix) ||
isAbsolute(pattern.map(function (p) {
return typeof p === 'string' ? p : '[*]'
}).join('/'))) {
else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
if (!prefix || !isAbsolute(prefix))
prefix = '/' + prefix
read = prefix
@@ -248,7 +246,7 @@ GlobSync.prototype._readdirInGlobStar = function (abs) {
var lstat
var stat
try {
lstat = this.fs.lstatSync(abs)
lstat = fs.lstatSync(abs)
} catch (er) {
if (er.code === 'ENOENT') {
// lstat failed, doesn't exist
@@ -285,7 +283,7 @@ GlobSync.prototype._readdir = function (abs, inGlobStar) {
}
try {
return this._readdirEntries(abs, this.fs.readdirSync(abs))
return this._readdirEntries(abs, fs.readdirSync(abs))
} catch (er) {
this._readdirError(abs, er)
return null
@@ -444,7 +442,7 @@ GlobSync.prototype._stat = function (f) {
if (!stat) {
var lstat
try {
lstat = this.fs.lstatSync(abs)
lstat = fs.lstatSync(abs)
} catch (er) {
if (er && (er.code === 'ENOENT' || er.code === 'ENOTDIR')) {
this.statCache[abs] = false
@@ -454,7 +452,7 @@ GlobSync.prototype._stat = function (f) {
if (lstat && lstat.isSymbolicLink()) {
try {
stat = this.fs.statSync(abs)
stat = fs.statSync(abs)
} catch (er) {
stat = lstat
}