@@ -5063,7 +5063,7 @@ function ownProp (obj, field) {
5063
5063
var fs = __nccwpck_require__(7147)
5064
5064
var path = __nccwpck_require__(1017)
5065
5065
var minimatch = __nccwpck_require__(3973)
5066
- var isAbsolute = __nccwpck_require__(8714 )
5066
+ var isAbsolute = ( __nccwpck_require__(1017).isAbsolute )
5067
5067
var Minimatch = minimatch.Minimatch
5068
5068
5069
5069
function alphasort (a, b) {
@@ -5138,24 +5138,26 @@ function setopts (self, pattern, options) {
5138
5138
self.changedCwd = false
5139
5139
var cwd = process.cwd()
5140
5140
if (!ownProp(options, "cwd"))
5141
- self.cwd = cwd
5141
+ self.cwd = path.resolve( cwd)
5142
5142
else {
5143
5143
self.cwd = path.resolve(options.cwd)
5144
5144
self.changedCwd = self.cwd !== cwd
5145
5145
}
5146
5146
5147
5147
self.root = options.root || path.resolve(self.cwd, "/")
5148
5148
self.root = path.resolve(self.root)
5149
- if (process.platform === "win32")
5150
- self.root = self.root.replace(/\\/g, "/")
5151
5149
5152
5150
// TODO: is an absolute `cwd` supposed to be resolved against `root`?
5153
5151
// e.g. { cwd: '/test', root: __dirname } === path.join(__dirname, '/test')
5154
5152
self.cwdAbs = isAbsolute(self.cwd) ? self.cwd : makeAbs(self, self.cwd)
5155
- if (process.platform === "win32")
5156
- self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
5157
5153
self.nomount = !!options.nomount
5158
5154
5155
+ if (process.platform === "win32") {
5156
+ self.root = self.root.replace(/\\/g, "/")
5157
+ self.cwd = self.cwd.replace(/\\/g, "/")
5158
+ self.cwdAbs = self.cwdAbs.replace(/\\/g, "/")
5159
+ }
5160
+
5159
5161
// disable comments and negation in Minimatch.
5160
5162
// Note that they are not supported in Glob itself anyway.
5161
5163
options.nonegate = true
@@ -5342,7 +5344,7 @@ var inherits = __nccwpck_require__(4124)
5342
5344
var EE = (__nccwpck_require__(2361).EventEmitter)
5343
5345
var path = __nccwpck_require__(1017)
5344
5346
var assert = __nccwpck_require__(9491)
5345
- var isAbsolute = __nccwpck_require__(8714 )
5347
+ var isAbsolute = ( __nccwpck_require__(1017).isAbsolute )
5346
5348
var globSync = __nccwpck_require__(9010)
5347
5349
var common = __nccwpck_require__(7625)
5348
5350
var setopts = common.setopts
@@ -6100,7 +6102,7 @@ var Glob = (__nccwpck_require__(1957).Glob)
6100
6102
var util = __nccwpck_require__(3837)
6101
6103
var path = __nccwpck_require__(1017)
6102
6104
var assert = __nccwpck_require__(9491)
6103
- var isAbsolute = __nccwpck_require__(8714 )
6105
+ var isAbsolute = ( __nccwpck_require__(1017).isAbsolute )
6104
6106
var common = __nccwpck_require__(7625)
6105
6107
var setopts = common.setopts
6106
6108
var ownProp = common.ownProp
@@ -6140,7 +6142,7 @@ function GlobSync (pattern, options) {
6140
6142
}
6141
6143
6142
6144
GlobSync.prototype._finish = function () {
6143
- assert(this instanceof GlobSync)
6145
+ assert.ok (this instanceof GlobSync)
6144
6146
if (this.realpath) {
6145
6147
var self = this
6146
6148
this.matches.forEach(function (matchset, index) {
@@ -6164,7 +6166,7 @@ GlobSync.prototype._finish = function () {
6164
6166
6165
6167
6166
6168
GlobSync.prototype._process = function (pattern, index, inGlobStar) {
6167
- assert(this instanceof GlobSync)
6169
+ assert.ok (this instanceof GlobSync)
6168
6170
6169
6171
// Get the first [n] parts of pattern that are all strings.
6170
6172
var n = 0
@@ -9877,6 +9879,11 @@ class Minimatch {
9877
9879
this.options = options
9878
9880
this.set = []
9879
9881
this.pattern = pattern
9882
+ this.windowsPathsNoEscape = !!options.windowsPathsNoEscape ||
9883
+ options.allowWindowsEscape === false
9884
+ if (this.windowsPathsNoEscape) {
9885
+ this.pattern = this.pattern.replace(/\\/g, '/')
9886
+ }
9880
9887
this.regexp = null
9881
9888
this.negate = false
9882
9889
this.comment = false
@@ -12364,34 +12371,6 @@ function onceStrict (fn) {
12364
12371
}
12365
12372
12366
12373
12367
- /***/ }),
12368
-
12369
- /***/ 8714:
12370
- /***/ ((module) => {
12371
-
12372
- "use strict";
12373
-
12374
-
12375
- function posix(path) {
12376
- return path.charAt(0) === '/';
12377
- }
12378
-
12379
- function win32(path) {
12380
- // https://github.com/nodejs/node/blob/b3fcc245fb25539909ef1d5eaa01dbf92e168633/lib/path.js#L56
12381
- var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/;
12382
- var result = splitDeviceRe.exec(path);
12383
- var device = result[1] || '';
12384
- var isUnc = Boolean(device && device.charAt(1) !== ':');
12385
-
12386
- // UNC paths are always absolute
12387
- return Boolean(result[2] || isUnc);
12388
- }
12389
-
12390
- module.exports = process.platform === 'win32' ? win32 : posix;
12391
- module.exports.posix = posix;
12392
- module.exports.win32 = win32;
12393
-
12394
-
12395
12374
/***/ }),
12396
12375
12397
12376
/***/ 5118:
0 commit comments