Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deps: glob@8.0.3 #4971

Merged
merged 1 commit into from Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 8 additions & 6 deletions node_modules/glob/common.js
Expand Up @@ -13,7 +13,7 @@ function ownProp (obj, field) {
var fs = require("fs")
var path = require("path")
var minimatch = require("minimatch")
var isAbsolute = require("path-is-absolute")
var isAbsolute = require("path").isAbsolute
var Minimatch = minimatch.Minimatch

function alphasort (a, b) {
Expand Down Expand Up @@ -88,24 +88,26 @@ function setopts (self, pattern, options) {
self.changedCwd = false
var cwd = process.cwd()
if (!ownProp(options, "cwd"))
self.cwd = cwd
self.cwd = path.resolve(cwd)
else {
self.cwd = path.resolve(options.cwd)
self.changedCwd = self.cwd !== cwd
}

self.root = options.root || path.resolve(self.cwd, "/")
self.root = path.resolve(self.root)
if (process.platform === "win32")
self.root = self.root.replace(/\\/g, "/")

// TODO: is an absolute `cwd` supposed to be resolved against `root`?
// e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
if (process.platform === "win32")
self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
self.nomount = !!options.nomount

if (process.platform === "win32") {
self.root = self.root.replace(/\\/g, "/")
self.cwd = self.cwd.replace(/\\/g, "/")
self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
}

// disable comments and negation in Minimatch.
// Note that they are not supported in Glob itself anyway.
options.nonegate = true
Expand Down
2 changes: 1 addition & 1 deletion node_modules/glob/glob.js
Expand Up @@ -47,7 +47,7 @@ var inherits = require('inherits')
var EE = require('events').EventEmitter
var path = require('path')
var assert = require('assert')
var isAbsolute = require('path-is-absolute')
var isAbsolute = require('path').isAbsolute
var globSync = require('./sync.js')
var common = require('./common.js')
var setopts = common.setopts
Expand Down
5 changes: 2 additions & 3 deletions node_modules/glob/package.json
Expand Up @@ -2,7 +2,7 @@
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "glob",
"description": "a little globber",
"version": "8.0.1",
"version": "8.0.3",
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
Expand All @@ -21,8 +21,7 @@
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^5.0.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
"once": "^1.3.0"
},
"devDependencies": {
"memfs": "^3.2.0",
Expand Down
6 changes: 3 additions & 3 deletions node_modules/glob/sync.js
Expand Up @@ -8,7 +8,7 @@ var Glob = require('./glob.js').Glob
var util = require('util')
var path = require('path')
var assert = require('assert')
var isAbsolute = require('path-is-absolute')
var isAbsolute = require('path').isAbsolute
var common = require('./common.js')
var setopts = common.setopts
var ownProp = common.ownProp
Expand Down Expand Up @@ -48,7 +48,7 @@ function GlobSync (pattern, options) {
}

GlobSync.prototype._finish = function () {
assert(this instanceof GlobSync)
assert.ok(this instanceof GlobSync)
if (this.realpath) {
var self = this
this.matches.forEach(function (matchset, index) {
Expand All @@ -72,7 +72,7 @@ GlobSync.prototype._finish = function () {


GlobSync.prototype._process = function (pattern, index, inGlobStar) {
assert(this instanceof GlobSync)
assert.ok(this instanceof GlobSync)

// Get the first [n] parts of pattern that are all strings.
var n = 0
Expand Down
2 changes: 2 additions & 0 deletions node_modules/node-gyp/node_modules/glob/common.js
Expand Up @@ -110,6 +110,8 @@ 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
Expand Down
5 changes: 4 additions & 1 deletion node_modules/node-gyp/node_modules/glob/glob.js
Expand Up @@ -342,7 +342,10 @@ Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
var read
if (prefix === null)
read = '.'
else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
else if (isAbsolute(prefix) ||
isAbsolute(pattern.map(function (p) {
return typeof p === 'string' ? p : '[*]'
}).join('/'))) {
if (!prefix || !isAbsolute(prefix))
prefix = '/' + prefix
read = prefix
Expand Down
7 changes: 5 additions & 2 deletions node_modules/node-gyp/node_modules/glob/package.json
Expand Up @@ -2,7 +2,10 @@
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "glob",
"description": "a little globber",
"version": "7.2.0",
"version": "7.2.3",
"publishConfig": {
"tag": "v7-legacy"
},
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
Expand All @@ -20,7 +23,7 @@
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
Expand Down
9 changes: 6 additions & 3 deletions node_modules/node-gyp/node_modules/glob/sync.js
Expand Up @@ -48,7 +48,7 @@ function GlobSync (pattern, options) {
}

GlobSync.prototype._finish = function () {
assert(this instanceof GlobSync)
assert.ok(this instanceof GlobSync)
if (this.realpath) {
var self = this
this.matches.forEach(function (matchset, index) {
Expand All @@ -72,7 +72,7 @@ GlobSync.prototype._finish = function () {


GlobSync.prototype._process = function (pattern, index, inGlobStar) {
assert(this instanceof GlobSync)
assert.ok(this instanceof GlobSync)

// Get the first [n] parts of pattern that are all strings.
var n = 0
Expand Down Expand Up @@ -109,7 +109,10 @@ GlobSync.prototype._process = function (pattern, index, inGlobStar) {
var read
if (prefix === null)
read = '.'
else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
else if (isAbsolute(prefix) ||
isAbsolute(pattern.map(function (p) {
return typeof p === 'string' ? p : '[*]'
}).join('/'))) {
if (!prefix || !isAbsolute(prefix))
prefix = '/' + prefix
read = prefix
Expand Down
2 changes: 2 additions & 0 deletions node_modules/rimraf/node_modules/glob/common.js
Expand Up @@ -110,6 +110,8 @@ 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
Expand Down
5 changes: 4 additions & 1 deletion node_modules/rimraf/node_modules/glob/glob.js
Expand Up @@ -342,7 +342,10 @@ Glob.prototype._process = function (pattern, index, inGlobStar, cb) {
var read
if (prefix === null)
read = '.'
else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
else if (isAbsolute(prefix) ||
isAbsolute(pattern.map(function (p) {
return typeof p === 'string' ? p : '[*]'
}).join('/'))) {
if (!prefix || !isAbsolute(prefix))
prefix = '/' + prefix
read = prefix
Expand Down
7 changes: 5 additions & 2 deletions node_modules/rimraf/node_modules/glob/package.json
Expand Up @@ -2,7 +2,10 @@
"author": "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me/)",
"name": "glob",
"description": "a little globber",
"version": "7.2.0",
"version": "7.2.3",
"publishConfig": {
"tag": "v7-legacy"
},
"repository": {
"type": "git",
"url": "git://github.com/isaacs/node-glob.git"
Expand All @@ -20,7 +23,7 @@
"fs.realpath": "^1.0.0",
"inflight": "^1.0.4",
"inherits": "2",
"minimatch": "^3.0.4",
"minimatch": "^3.1.1",
"once": "^1.3.0",
"path-is-absolute": "^1.0.0"
},
Expand Down
9 changes: 6 additions & 3 deletions node_modules/rimraf/node_modules/glob/sync.js
Expand Up @@ -48,7 +48,7 @@ function GlobSync (pattern, options) {
}

GlobSync.prototype._finish = function () {
assert(this instanceof GlobSync)
assert.ok(this instanceof GlobSync)
if (this.realpath) {
var self = this
this.matches.forEach(function (matchset, index) {
Expand All @@ -72,7 +72,7 @@ GlobSync.prototype._finish = function () {


GlobSync.prototype._process = function (pattern, index, inGlobStar) {
assert(this instanceof GlobSync)
assert.ok(this instanceof GlobSync)

// Get the first [n] parts of pattern that are all strings.
var n = 0
Expand Down Expand Up @@ -109,7 +109,10 @@ GlobSync.prototype._process = function (pattern, index, inGlobStar) {
var read
if (prefix === null)
read = '.'
else if (isAbsolute(prefix) || isAbsolute(pattern.join('/'))) {
else if (isAbsolute(prefix) ||
isAbsolute(pattern.map(function (p) {
return typeof p === 'string' ? p : '[*]'
}).join('/'))) {
if (!prefix || !isAbsolute(prefix))
prefix = '/' + prefix
read = prefix
Expand Down