prettier 2.0.4 → 2.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.js CHANGED
@@ -2,17 +2,17 @@
2
2
 
3
3
  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
4
4
 
5
- var fs$2 = _interopDefault(require('fs'));
6
- var path$1 = _interopDefault(require('path'));
7
- var os = _interopDefault(require('os'));
8
- var tty = _interopDefault(require('tty'));
9
- var assert = _interopDefault(require('assert'));
10
- var util$2 = _interopDefault(require('util'));
11
- var stream$5 = _interopDefault(require('stream'));
12
- var events = _interopDefault(require('events'));
5
+ var fs$3 = _interopDefault(require('fs'));
6
+ var path$2 = _interopDefault(require('path'));
7
+ var os$1 = _interopDefault(require('os'));
8
+ var tty$1 = _interopDefault(require('tty'));
9
+ var assert$1 = _interopDefault(require('assert'));
10
+ var util$3 = _interopDefault(require('util'));
11
+ var stream$6 = _interopDefault(require('stream'));
12
+ var events$1 = _interopDefault(require('events'));
13
13
 
14
14
  var name = "prettier";
15
- var version = "2.0.4";
15
+ var version = "2.0.5";
16
16
  var description = "Prettier is an opinionated code formatter";
17
17
  var bin = "./bin/prettier.js";
18
18
  var repository = "prettier/prettier";
@@ -74,6 +74,7 @@ var dependencies = {
74
74
  "regexp-util": "1.2.2",
75
75
  "remark-math": "1.0.6",
76
76
  "remark-parse": "5.0.0",
77
+ resolve: "1.16.1",
77
78
  semver: "7.1.3",
78
79
  srcset: "2.0.1",
79
80
  "string-width": "4.2.0",
@@ -109,7 +110,7 @@ var devDependencies = {
109
110
  "jest-snapshot-serializer-ansi": "1.0.0",
110
111
  "jest-snapshot-serializer-raw": "1.1.0",
111
112
  "jest-watch-typeahead": "0.5.0",
112
- prettier: "2.0.3",
113
+ prettier: "2.0.4",
113
114
  rimraf: "3.0.2",
114
115
  rollup: "2.3.2",
115
116
  "rollup-plugin-babel": "4.4.0",
@@ -127,7 +128,8 @@ var scripts = {
127
128
  prepublishOnly: "echo \"Error: must publish from dist/\" && exit 1",
128
129
  "prepare-release": "yarn && yarn build && yarn test:dist",
129
130
  test: "jest",
130
- "test:dist": "node ./scripts/test-dist.js",
131
+ "test:dist": "cross-env NODE_ENV=production jest",
132
+ "test:dist-standalone": "cross-env NODE_ENV=production TEST_STANDALONE=1 jest tests/",
131
133
  "test:integration": "jest tests_integration",
132
134
  "perf:repeat": "yarn && yarn build && cross-env NODE_ENV=production node ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
133
135
  "perf:repeat-inspect": "yarn && yarn build && cross-env NODE_ENV=production node --inspect-brk ./dist/bin-prettier.js --debug-repeat ${PERF_REPEAT:-1000} --loglevel debug ${PERF_FILE:-./index.js} > /dev/null",
@@ -1744,7 +1746,7 @@ class LineByLine {
1744
1746
  if (typeof file === 'number') {
1745
1747
  this.fd = file;
1746
1748
  } else {
1747
- this.fd = fs$2.openSync(file, 'r');
1749
+ this.fd = fs$3.openSync(file, 'r');
1748
1750
  }
1749
1751
 
1750
1752
  this.options = options;
@@ -1774,7 +1776,7 @@ class LineByLine {
1774
1776
  }
1775
1777
 
1776
1778
  close() {
1777
- fs$2.closeSync(this.fd);
1779
+ fs$3.closeSync(this.fd);
1778
1780
  this.fd = null;
1779
1781
  }
1780
1782
 
@@ -1812,7 +1814,7 @@ class LineByLine {
1812
1814
 
1813
1815
  do {
1814
1816
  const readBuffer = new Buffer(this.options.readChunk);
1815
- bytesRead = fs$2.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition);
1817
+ bytesRead = fs$3.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition);
1816
1818
  totalBytesRead = totalBytesRead + bytesRead;
1817
1819
  this.fdPosition = this.fdPosition + bytesRead;
1818
1820
  buffers.push(readBuffer);
@@ -4787,7 +4789,7 @@ function supportsColor(stream) {
4787
4789
  // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
4788
4790
  // release that supports 256 colors. Windows 10 build 14931 is the first release
4789
4791
  // that supports 16m/TrueColor.
4790
- const osRelease = os.release().split('.');
4792
+ const osRelease = os$1.release().split('.');
4791
4793
 
4792
4794
  if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
4793
4795
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
@@ -7714,7 +7716,7 @@ function supportsColor$1(haveStream, streamIsTTY) {
7714
7716
  if (process.platform === 'win32') {
7715
7717
  // Windows 10 build 10586 is the first Windows release that supports 256 colors.
7716
7718
  // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
7717
- const osRelease = os.release().split('.');
7719
+ const osRelease = os$1.release().split('.');
7718
7720
 
7719
7721
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
7720
7722
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
@@ -7778,8 +7780,8 @@ function getSupportLevel$1(stream) {
7778
7780
 
7779
7781
  var supportsColor_1$1 = {
7780
7782
  supportsColor: getSupportLevel$1,
7781
- stdout: translateLevel$1(supportsColor$1(true, tty.isatty(1))),
7782
- stderr: translateLevel$1(supportsColor$1(true, tty.isatty(2)))
7783
+ stdout: translateLevel$1(supportsColor$1(true, tty$1.isatty(1))),
7784
+ stderr: translateLevel$1(supportsColor$1(true, tty$1.isatty(2)))
7783
7785
  };
7784
7786
 
7785
7787
  const stringReplaceAll = (string, substring, replacer) => {
@@ -10487,7 +10489,7 @@ function supportsColor$2(stream) {
10487
10489
  // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
10488
10490
  // release that supports 256 colors. Windows 10 build 14931 is the first release
10489
10491
  // that supports 16m/TrueColor.
10490
- const osRelease = os.release().split('.');
10492
+ const osRelease = os$1.release().split('.');
10491
10493
 
10492
10494
  if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
10493
10495
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
@@ -11331,7 +11333,7 @@ function resolveParser(opts, parsers) {
11331
11333
  {
11332
11334
  try {
11333
11335
  return {
11334
- parse: require(path$1.resolve(process.cwd(), opts.parser)),
11336
+ parse: require(path$2.resolve(process.cwd(), opts.parser)),
11335
11337
  astFormat: "estree",
11336
11338
  locStart: locStart$1,
11337
11339
  locEnd: locEnd$1
@@ -11487,7 +11489,7 @@ function getInterpreter(filepath) {
11487
11489
  let fd;
11488
11490
 
11489
11491
  try {
11490
- fd = fs$2.openSync(filepath, "r");
11492
+ fd = fs$3.openSync(filepath, "r");
11491
11493
  } catch (err) {
11492
11494
  // istanbul ignore next
11493
11495
  return "";
@@ -11519,14 +11521,14 @@ function getInterpreter(filepath) {
11519
11521
  try {
11520
11522
  // There are some weird cases where paths are missing, causing Jest
11521
11523
  // failures. It's unclear what these correspond to in the real world.
11522
- fs$2.closeSync(fd);
11524
+ fs$3.closeSync(fd);
11523
11525
  } catch (err) {// nop
11524
11526
  }
11525
11527
  }
11526
11528
  }
11527
11529
 
11528
11530
  function inferParser(filepath, plugins) {
11529
- const filename = path$1.basename(filepath).toLowerCase();
11531
+ const filename = path$2.basename(filepath).toLowerCase();
11530
11532
  const languages = getSupportInfo$1({
11531
11533
  plugins
11532
11534
  }).languages.filter(language => language.since !== null); // If the file has no extension, we can try to infer the language from the
@@ -14032,8 +14034,8 @@ function breakTies(tiesToBreak, text, options) {
14032
14034
 
14033
14035
  for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) {
14034
14036
  const comment = tiesToBreak[indexOfFirstLeadingComment - 1];
14035
- assert.strictEqual(comment.precedingNode, precedingNode);
14036
- assert.strictEqual(comment.followingNode, followingNode);
14037
+ assert$1.strictEqual(comment.precedingNode, precedingNode);
14038
+ assert$1.strictEqual(comment.followingNode, followingNode);
14037
14039
  const gap = text.slice(options.locEnd(comment), gapEndPos);
14038
14040
 
14039
14041
  if (gapRegExp.test(gap)) {
@@ -14541,7 +14543,7 @@ function printAstToDoc(ast, options, alignmentSize = 0) {
14541
14543
  }
14542
14544
 
14543
14545
  function callPluginPrintFunction(path, options, printPath, args) {
14544
- assert.ok(path instanceof fastPath);
14546
+ assert$1.ok(path instanceof fastPath);
14545
14547
  const node = path.getValue();
14546
14548
  const {
14547
14549
  printer
@@ -15400,7 +15402,7 @@ var ignore = options => new IgnoreBase(options);
15400
15402
 
15401
15403
  function getFileContentOrNull(filename) {
15402
15404
  return new Promise((resolve, reject) => {
15403
- fs$2.readFile(filename, "utf8", (error, data) => {
15405
+ fs$3.readFile(filename, "utf8", (error, data) => {
15404
15406
  if (error && error.code !== "ENOENT") {
15405
15407
  reject(createError(filename, error));
15406
15408
  } else {
@@ -15417,7 +15419,7 @@ function getFileContentOrNull(filename) {
15417
15419
 
15418
15420
  getFileContentOrNull.sync = function (filename) {
15419
15421
  try {
15420
- return fs$2.readFileSync(filename, "utf8");
15422
+ return fs$3.readFileSync(filename, "utf8");
15421
15423
  } catch (error) {
15422
15424
  if (error && error.code === "ENOENT") {
15423
15425
  return null;
@@ -15440,7 +15442,7 @@ var getFileContentOrNull_1 = getFileContentOrNull;
15440
15442
 
15441
15443
 
15442
15444
  async function createIgnorer(ignorePath, withNodeModules) {
15443
- const ignoreContent = ignorePath ? await getFileContentOrNull_1(path$1.resolve(ignorePath)) : null;
15445
+ const ignoreContent = ignorePath ? await getFileContentOrNull_1(path$2.resolve(ignorePath)) : null;
15444
15446
  return _createIgnorer(ignoreContent, withNodeModules);
15445
15447
  }
15446
15448
  /**
@@ -15450,7 +15452,7 @@ async function createIgnorer(ignorePath, withNodeModules) {
15450
15452
 
15451
15453
 
15452
15454
  createIgnorer.sync = function (ignorePath, withNodeModules) {
15453
- const ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path$1.resolve(ignorePath));
15455
+ const ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path$2.resolve(ignorePath));
15454
15456
  return _createIgnorer(ignoreContent, withNodeModules);
15455
15457
  };
15456
15458
  /**
@@ -15728,7 +15730,7 @@ var path = {
15728
15730
  };
15729
15731
 
15730
15732
  try {
15731
- path = path$1;
15733
+ path = path$2;
15732
15734
  } catch (er) {}
15733
15735
 
15734
15736
  var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
@@ -19154,7 +19156,7 @@ LRUCache.prototype.inspect = function (n, opts) {
19154
19156
  str += ',';
19155
19157
  }
19156
19158
 
19157
- str += '\n max: ' + util$2.inspect(max, opts);
19159
+ str += '\n max: ' + util$3.inspect(max, opts);
19158
19160
  extras = true;
19159
19161
  }
19160
19162
 
@@ -19165,7 +19167,7 @@ LRUCache.prototype.inspect = function (n, opts) {
19165
19167
  str += ',';
19166
19168
  }
19167
19169
 
19168
- str += '\n maxAge: ' + util$2.inspect(maxAge, opts);
19170
+ str += '\n maxAge: ' + util$3.inspect(maxAge, opts);
19169
19171
  extras = true;
19170
19172
  }
19171
19173
 
@@ -19176,7 +19178,7 @@ LRUCache.prototype.inspect = function (n, opts) {
19176
19178
  str += ',';
19177
19179
  }
19178
19180
 
19179
- str += '\n length: ' + util$2.inspect(this[LENGTH], opts);
19181
+ str += '\n length: ' + util$3.inspect(this[LENGTH], opts);
19180
19182
  extras = true;
19181
19183
  }
19182
19184
 
@@ -19193,7 +19195,7 @@ LRUCache.prototype.inspect = function (n, opts) {
19193
19195
  str += '\n ';
19194
19196
  }
19195
19197
 
19196
- var key = util$2.inspect(item.key).split('\n').join('\n ');
19198
+ var key = util$3.inspect(item.key).split('\n').join('\n ');
19197
19199
  var val = {
19198
19200
  value: item.value
19199
19201
  };
@@ -19210,7 +19212,7 @@ LRUCache.prototype.inspect = function (n, opts) {
19210
19212
  val.stale = true;
19211
19213
  }
19212
19214
 
19213
- val = util$2.inspect(val, opts).split('\n').join('\n ');
19215
+ val = util$3.inspect(val, opts).split('\n').join('\n ');
19214
19216
  str += key + ' => ' + val;
19215
19217
  });
19216
19218
 
@@ -20269,7 +20271,7 @@ var fnmatch = createCommonjsModule(function (module, exports) {
20269
20271
  }
20270
20272
 
20271
20273
  if (options.matchBase && pattern.length === 1) {
20272
- file = path$1.basename(file.join("/")).split("/");
20274
+ file = path$2.basename(file.join("/")).split("/");
20273
20275
  }
20274
20276
 
20275
20277
  if (options.debug) {
@@ -20594,7 +20596,7 @@ var ini = createCommonjsModule(function (module, exports) {
20594
20596
  value: true
20595
20597
  });
20596
20598
 
20597
- var fs = __importStar(fs$2);
20599
+ var fs = __importStar(fs$3);
20598
20600
  /**
20599
20601
  * define the possible values:
20600
20602
  * section: [section]
@@ -20924,9 +20926,9 @@ var src = createCommonjsModule(function (module, exports) {
20924
20926
  value: true
20925
20927
  });
20926
20928
 
20927
- var fs = __importStar(fs$2);
20929
+ var fs = __importStar(fs$3);
20928
20930
 
20929
- var path = __importStar(path$1);
20931
+ var path = __importStar(path$2);
20930
20932
 
20931
20933
  var semver = __importStar(semver$2);
20932
20934
 
@@ -21293,14 +21295,14 @@ function markerExists(files, markers) {
21293
21295
  }
21294
21296
 
21295
21297
  function traverseFolder(directory, levels, markers) {
21296
- var files = fs$2.readdirSync(directory);
21298
+ var files = fs$3.readdirSync(directory);
21297
21299
 
21298
21300
  if (levels === 0) {
21299
21301
  return null;
21300
21302
  } else if (markerExists(files, markers)) {
21301
21303
  return directory;
21302
21304
  } else {
21303
- return traverseFolder(path$1.resolve(directory, '..'), levels - 1, markers);
21305
+ return traverseFolder(path$2.resolve(directory, '..'), levels - 1, markers);
21304
21306
  }
21305
21307
  }
21306
21308
 
@@ -21326,11 +21328,11 @@ const maybeParse = (filePath, parse) => {
21326
21328
  // it, which is possible, for example, when the path is given via
21327
21329
  // --stdin-filepath. So, first, traverse up until we find an existing
21328
21330
  // directory.
21329
- let dirPath = path$1.dirname(path$1.resolve(filePath));
21330
- const fsRoot = path$1.parse(dirPath).root;
21331
+ let dirPath = path$2.dirname(path$2.resolve(filePath));
21332
+ const fsRoot = path$2.parse(dirPath).root;
21331
21333
 
21332
- while (dirPath !== fsRoot && !fs$2.existsSync(dirPath)) {
21333
- dirPath = path$1.dirname(dirPath);
21334
+ while (dirPath !== fsRoot && !fs$3.existsSync(dirPath)) {
21335
+ dirPath = path$2.dirname(dirPath);
21334
21336
  }
21335
21337
 
21336
21338
  const root = findProjectRoot(dirPath);
@@ -21817,7 +21819,7 @@ function isList(obj) {
21817
21819
  let _custom;
21818
21820
 
21819
21821
  try {
21820
- const utilInspect = util$2.inspect;
21822
+ const utilInspect = util$3.inspect;
21821
21823
  _custom = utilInspect.custom;
21822
21824
  } catch (_) {}
21823
21825
  /* eval require not available in transpiled bundle */
@@ -23256,18 +23258,961 @@ var loadToml = function (filePath, content) {
23256
23258
  }
23257
23259
  };
23258
23260
 
23259
- let {
23260
- resolve
23261
- } = eval("require"); // In the VS Code extension `require` is overridden and `require.resolve` doesn't support the 2nd argument.
23261
+ var caller = function () {
23262
+ // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
23263
+ var origPrepareStackTrace = Error.prepareStackTrace;
23262
23264
 
23263
- if (resolve.length === 1) {
23264
- const Module = require("module");
23265
+ Error.prepareStackTrace = function (_, stack) {
23266
+ return stack;
23267
+ };
23268
+
23269
+ var stack = new Error().stack;
23270
+ Error.prepareStackTrace = origPrepareStackTrace;
23271
+ return stack[2].getFileName();
23272
+ };
23273
+
23274
+ var pathParse = createCommonjsModule(function (module) {
23275
+
23276
+ var isWindows = process.platform === 'win32'; // Regex to split a windows path into three parts: [*, device, slash,
23277
+ // tail] windows-only
23278
+
23279
+ var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; // Regex to split the tail part of the above into [*, dir, basename, ext]
23280
+
23281
+ var splitTailRe = /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
23282
+ var win32 = {}; // Function to split a filename into [root, dir, basename, ext]
23283
+
23284
+ function win32SplitPath(filename) {
23285
+ // Separate device+slash from tail
23286
+ var result = splitDeviceRe.exec(filename),
23287
+ device = (result[1] || '') + (result[2] || ''),
23288
+ tail = result[3] || ''; // Split the tail into dir, basename and extension
23289
+
23290
+ var result2 = splitTailRe.exec(tail),
23291
+ dir = result2[1],
23292
+ basename = result2[2],
23293
+ ext = result2[3];
23294
+ return [device, dir, basename, ext];
23295
+ }
23296
+
23297
+ win32.parse = function (pathString) {
23298
+ if (typeof pathString !== 'string') {
23299
+ throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
23300
+ }
23301
+
23302
+ var allParts = win32SplitPath(pathString);
23303
+
23304
+ if (!allParts || allParts.length !== 4) {
23305
+ throw new TypeError("Invalid path '" + pathString + "'");
23306
+ }
23307
+
23308
+ return {
23309
+ root: allParts[0],
23310
+ dir: allParts[0] + allParts[1].slice(0, -1),
23311
+ base: allParts[2],
23312
+ ext: allParts[3],
23313
+ name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
23314
+ };
23315
+ }; // Split a filename into [root, dir, basename, ext], unix version
23316
+ // 'root' is just a slash, or nothing.
23317
+
23318
+
23319
+ var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
23320
+ var posix = {};
23321
+
23322
+ function posixSplitPath(filename) {
23323
+ return splitPathRe.exec(filename).slice(1);
23324
+ }
23325
+
23326
+ posix.parse = function (pathString) {
23327
+ if (typeof pathString !== 'string') {
23328
+ throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
23329
+ }
23330
+
23331
+ var allParts = posixSplitPath(pathString);
23332
+
23333
+ if (!allParts || allParts.length !== 4) {
23334
+ throw new TypeError("Invalid path '" + pathString + "'");
23335
+ }
23336
+
23337
+ allParts[1] = allParts[1] || '';
23338
+ allParts[2] = allParts[2] || '';
23339
+ allParts[3] = allParts[3] || '';
23340
+ return {
23341
+ root: allParts[0],
23342
+ dir: allParts[0] + allParts[1].slice(0, -1),
23343
+ base: allParts[2],
23344
+ ext: allParts[3],
23345
+ name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
23346
+ };
23347
+ };
23348
+
23349
+ if (isWindows) module.exports = win32.parse;else
23350
+ /* posix */
23351
+ module.exports = posix.parse;
23352
+ module.exports.posix = posix.parse;
23353
+ module.exports.win32 = win32.parse;
23354
+ });
23355
+ var pathParse_1 = pathParse.posix;
23356
+ var pathParse_2 = pathParse.win32;
23357
+
23358
+ var parse$2 = path$2.parse || pathParse;
23359
+
23360
+ var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
23361
+ var prefix = '/';
23362
+
23363
+ if (/^([A-Za-z]:)/.test(absoluteStart)) {
23364
+ prefix = '';
23365
+ } else if (/^\\\\/.test(absoluteStart)) {
23366
+ prefix = '\\\\';
23367
+ }
23368
+
23369
+ var paths = [absoluteStart];
23370
+ var parsed = parse$2(absoluteStart);
23371
+
23372
+ while (parsed.dir !== paths[paths.length - 1]) {
23373
+ paths.push(parsed.dir);
23374
+ parsed = parse$2(parsed.dir);
23375
+ }
23376
+
23377
+ return paths.reduce(function (dirs, aPath) {
23378
+ return dirs.concat(modules.map(function (moduleDir) {
23379
+ return path$2.resolve(prefix, aPath, moduleDir);
23380
+ }));
23381
+ }, []);
23382
+ };
23383
+
23384
+ var nodeModulesPaths = function nodeModulesPaths(start, opts, request) {
23385
+ var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ['node_modules'];
23386
+
23387
+ if (opts && typeof opts.paths === 'function') {
23388
+ return opts.paths(request, start, function () {
23389
+ return getNodeModulesDirs(start, modules);
23390
+ }, opts);
23391
+ }
23392
+
23393
+ var dirs = getNodeModulesDirs(start, modules);
23394
+ return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
23395
+ };
23396
+
23397
+ var normalizeOptions$2 = function (x, opts) {
23398
+ /**
23399
+ * This file is purposefully a passthrough. It's expected that third-party
23400
+ * environments will override it at runtime in order to inject special logic
23401
+ * into `resolve` (by manipulating the options). One such example is the PnP
23402
+ * code path in Yarn.
23403
+ */
23404
+ return opts || {};
23405
+ };
23406
+
23407
+ var assert = true;
23408
+ var async_hooks = ">= 8";
23409
+ var buffer_ieee754 = "< 0.9.7";
23410
+ var buffer = true;
23411
+ var child_process = true;
23412
+ var cluster = true;
23413
+ var console$1 = true;
23414
+ var constants$1 = true;
23415
+ var crypto = true;
23416
+ var _debug_agent = ">= 1 && < 8";
23417
+ var _debugger = "< 8";
23418
+ var dgram = true;
23419
+ var dns = true;
23420
+ var domain = true;
23421
+ var events = true;
23422
+ var freelist = "< 6";
23423
+ var fs = true;
23424
+ var _http_agent = ">= 0.11.1";
23425
+ var _http_client = ">= 0.11.1";
23426
+ var _http_common = ">= 0.11.1";
23427
+ var _http_incoming = ">= 0.11.1";
23428
+ var _http_outgoing = ">= 0.11.1";
23429
+ var _http_server = ">= 0.11.1";
23430
+ var http = true;
23431
+ var http2 = ">= 8.8";
23432
+ var https = true;
23433
+ var inspector = ">= 8.0.0";
23434
+ var _linklist = "< 8";
23435
+ var module$1 = true;
23436
+ var net = true;
23437
+ var os = true;
23438
+ var path$1 = true;
23439
+ var perf_hooks = ">= 8.5";
23440
+ var process$1 = ">= 1";
23441
+ var punycode = true;
23442
+ var querystring = true;
23443
+ var readline = true;
23444
+ var repl = true;
23445
+ var smalloc = ">= 0.11.5 && < 3";
23446
+ var _stream_duplex = ">= 0.9.4";
23447
+ var _stream_transform = ">= 0.9.4";
23448
+ var _stream_wrap = ">= 1.4.1";
23449
+ var _stream_passthrough = ">= 0.9.4";
23450
+ var _stream_readable = ">= 0.9.4";
23451
+ var _stream_writable = ">= 0.9.4";
23452
+ var stream = true;
23453
+ var string_decoder = true;
23454
+ var sys = true;
23455
+ var timers = true;
23456
+ var _tls_common = ">= 0.11.13";
23457
+ var _tls_legacy = ">= 0.11.3 && < 10";
23458
+ var _tls_wrap = ">= 0.11.3";
23459
+ var tls = true;
23460
+ var trace_events = ">= 10";
23461
+ var tty = true;
23462
+ var url = true;
23463
+ var util$2 = true;
23464
+ var v8 = ">= 1";
23465
+ var vm = true;
23466
+ var wasi = ">= 13.4 && < 13.5";
23467
+ var worker_threads = ">= 11.7";
23468
+ var zlib = true;
23469
+ var core$1 = {
23470
+ assert: assert,
23471
+ async_hooks: async_hooks,
23472
+ buffer_ieee754: buffer_ieee754,
23473
+ buffer: buffer,
23474
+ child_process: child_process,
23475
+ cluster: cluster,
23476
+ console: console$1,
23477
+ constants: constants$1,
23478
+ crypto: crypto,
23479
+ _debug_agent: _debug_agent,
23480
+ _debugger: _debugger,
23481
+ dgram: dgram,
23482
+ dns: dns,
23483
+ domain: domain,
23484
+ events: events,
23485
+ freelist: freelist,
23486
+ fs: fs,
23487
+ "fs/promises": [
23488
+ ">= 10 && < 10.1",
23489
+ ">= 14"
23490
+ ],
23491
+ _http_agent: _http_agent,
23492
+ _http_client: _http_client,
23493
+ _http_common: _http_common,
23494
+ _http_incoming: _http_incoming,
23495
+ _http_outgoing: _http_outgoing,
23496
+ _http_server: _http_server,
23497
+ http: http,
23498
+ http2: http2,
23499
+ https: https,
23500
+ inspector: inspector,
23501
+ _linklist: _linklist,
23502
+ module: module$1,
23503
+ net: net,
23504
+ "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
23505
+ "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
23506
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
23507
+ os: os,
23508
+ path: path$1,
23509
+ perf_hooks: perf_hooks,
23510
+ process: process$1,
23511
+ punycode: punycode,
23512
+ querystring: querystring,
23513
+ readline: readline,
23514
+ repl: repl,
23515
+ smalloc: smalloc,
23516
+ _stream_duplex: _stream_duplex,
23517
+ _stream_transform: _stream_transform,
23518
+ _stream_wrap: _stream_wrap,
23519
+ _stream_passthrough: _stream_passthrough,
23520
+ _stream_readable: _stream_readable,
23521
+ _stream_writable: _stream_writable,
23522
+ stream: stream,
23523
+ string_decoder: string_decoder,
23524
+ sys: sys,
23525
+ timers: timers,
23526
+ _tls_common: _tls_common,
23527
+ _tls_legacy: _tls_legacy,
23528
+ _tls_wrap: _tls_wrap,
23529
+ tls: tls,
23530
+ trace_events: trace_events,
23531
+ tty: tty,
23532
+ url: url,
23533
+ util: util$2,
23534
+ "v8/tools/arguments": ">= 10 && < 12",
23535
+ "v8/tools/codemap": [
23536
+ ">= 4.4.0 && < 5",
23537
+ ">= 5.2.0 && < 12"
23538
+ ],
23539
+ "v8/tools/consarray": [
23540
+ ">= 4.4.0 && < 5",
23541
+ ">= 5.2.0 && < 12"
23542
+ ],
23543
+ "v8/tools/csvparser": [
23544
+ ">= 4.4.0 && < 5",
23545
+ ">= 5.2.0 && < 12"
23546
+ ],
23547
+ "v8/tools/logreader": [
23548
+ ">= 4.4.0 && < 5",
23549
+ ">= 5.2.0 && < 12"
23550
+ ],
23551
+ "v8/tools/profile_view": [
23552
+ ">= 4.4.0 && < 5",
23553
+ ">= 5.2.0 && < 12"
23554
+ ],
23555
+ "v8/tools/splaytree": [
23556
+ ">= 4.4.0 && < 5",
23557
+ ">= 5.2.0 && < 12"
23558
+ ],
23559
+ v8: v8,
23560
+ vm: vm,
23561
+ wasi: wasi,
23562
+ worker_threads: worker_threads,
23563
+ zlib: zlib
23564
+ };
23565
+
23566
+ var core$2 = /*#__PURE__*/Object.freeze({
23567
+ __proto__: null,
23568
+ assert: assert,
23569
+ async_hooks: async_hooks,
23570
+ buffer_ieee754: buffer_ieee754,
23571
+ buffer: buffer,
23572
+ child_process: child_process,
23573
+ cluster: cluster,
23574
+ console: console$1,
23575
+ constants: constants$1,
23576
+ crypto: crypto,
23577
+ _debug_agent: _debug_agent,
23578
+ _debugger: _debugger,
23579
+ dgram: dgram,
23580
+ dns: dns,
23581
+ domain: domain,
23582
+ events: events,
23583
+ freelist: freelist,
23584
+ fs: fs,
23585
+ _http_agent: _http_agent,
23586
+ _http_client: _http_client,
23587
+ _http_common: _http_common,
23588
+ _http_incoming: _http_incoming,
23589
+ _http_outgoing: _http_outgoing,
23590
+ _http_server: _http_server,
23591
+ http: http,
23592
+ http2: http2,
23593
+ https: https,
23594
+ inspector: inspector,
23595
+ _linklist: _linklist,
23596
+ module: module$1,
23597
+ net: net,
23598
+ os: os,
23599
+ path: path$1,
23600
+ perf_hooks: perf_hooks,
23601
+ process: process$1,
23602
+ punycode: punycode,
23603
+ querystring: querystring,
23604
+ readline: readline,
23605
+ repl: repl,
23606
+ smalloc: smalloc,
23607
+ _stream_duplex: _stream_duplex,
23608
+ _stream_transform: _stream_transform,
23609
+ _stream_wrap: _stream_wrap,
23610
+ _stream_passthrough: _stream_passthrough,
23611
+ _stream_readable: _stream_readable,
23612
+ _stream_writable: _stream_writable,
23613
+ stream: stream,
23614
+ string_decoder: string_decoder,
23615
+ sys: sys,
23616
+ timers: timers,
23617
+ _tls_common: _tls_common,
23618
+ _tls_legacy: _tls_legacy,
23619
+ _tls_wrap: _tls_wrap,
23620
+ tls: tls,
23621
+ trace_events: trace_events,
23622
+ tty: tty,
23623
+ url: url,
23624
+ util: util$2,
23625
+ v8: v8,
23626
+ vm: vm,
23627
+ wasi: wasi,
23628
+ worker_threads: worker_threads,
23629
+ zlib: zlib,
23630
+ 'default': core$1
23631
+ });
23632
+
23633
+ var data = getCjsExportFromNamespace(core$2);
23634
+
23635
+ var current = process.versions && process.versions.node && process.versions.node.split('.') || [];
23636
+
23637
+ function specifierIncluded(specifier) {
23638
+ var parts = specifier.split(' ');
23639
+ var op = parts.length > 1 ? parts[0] : '=';
23640
+ var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
23641
+
23642
+ for (var i = 0; i < 3; ++i) {
23643
+ var cur = Number(current[i] || 0);
23644
+ var ver = Number(versionParts[i] || 0);
23645
+
23646
+ if (cur === ver) {
23647
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
23648
+ }
23649
+
23650
+ if (op === '<') {
23651
+ return cur < ver;
23652
+ } else if (op === '>=') {
23653
+ return cur >= ver;
23654
+ } else {
23655
+ return false;
23656
+ }
23657
+ }
23658
+
23659
+ return op === '>=';
23660
+ }
23661
+
23662
+ function matchesRange(range) {
23663
+ var specifiers = range.split(/ ?&& ?/);
23664
+
23665
+ if (specifiers.length === 0) {
23666
+ return false;
23667
+ }
23668
+
23669
+ for (var i = 0; i < specifiers.length; ++i) {
23670
+ if (!specifierIncluded(specifiers[i])) {
23671
+ return false;
23672
+ }
23673
+ }
23674
+
23675
+ return true;
23676
+ }
23677
+
23678
+ function versionIncluded(specifierValue) {
23679
+ if (typeof specifierValue === 'boolean') {
23680
+ return specifierValue;
23681
+ }
23682
+
23683
+ if (specifierValue && typeof specifierValue === 'object') {
23684
+ for (var i = 0; i < specifierValue.length; ++i) {
23685
+ if (matchesRange(specifierValue[i])) {
23686
+ return true;
23687
+ }
23688
+ }
23689
+
23690
+ return false;
23691
+ }
23692
+
23693
+ return matchesRange(specifierValue);
23694
+ }
23695
+
23696
+ var core$3 = {};
23697
+
23698
+ for (var mod in data) {
23699
+ // eslint-disable-line no-restricted-syntax
23700
+ if (Object.prototype.hasOwnProperty.call(data, mod)) {
23701
+ core$3[mod] = versionIncluded(data[mod]);
23702
+ }
23703
+ }
23704
+
23705
+ var core_1 = core$3;
23706
+
23707
+ var isCore = function isCore(x) {
23708
+ return Object.prototype.hasOwnProperty.call(core_1, x);
23709
+ };
23710
+
23711
+ var realpath = fs$3.realpath && typeof fs$3.realpath.native === 'function' ? fs$3.realpath.native : fs$3.realpath;
23712
+
23713
+ var defaultIsFile = function isFile(file, cb) {
23714
+ fs$3.stat(file, function (err, stat) {
23715
+ if (!err) {
23716
+ return cb(null, stat.isFile() || stat.isFIFO());
23717
+ }
23718
+
23719
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
23720
+ return cb(err);
23721
+ });
23722
+ };
23723
+
23724
+ var defaultIsDir = function isDirectory(dir, cb) {
23725
+ fs$3.stat(dir, function (err, stat) {
23726
+ if (!err) {
23727
+ return cb(null, stat.isDirectory());
23728
+ }
23729
+
23730
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
23731
+ return cb(err);
23732
+ });
23733
+ };
23734
+
23735
+ var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts, cb) {
23736
+ if (opts && opts.preserveSymlinks === false) {
23737
+ realpath(x, function (realPathErr, realPath) {
23738
+ if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);else cb(null, realPathErr ? x : realPath);
23739
+ });
23740
+ } else {
23741
+ cb(null, x);
23742
+ }
23743
+ };
23744
+
23745
+ var getPackageCandidates = function getPackageCandidates(x, start, opts) {
23746
+ var dirs = nodeModulesPaths(start, opts, x);
23747
+
23748
+ for (var i = 0; i < dirs.length; i++) {
23749
+ dirs[i] = path$2.join(dirs[i], x);
23750
+ }
23751
+
23752
+ return dirs;
23753
+ };
23754
+
23755
+ var async = function resolve(x, options, callback) {
23756
+ var cb = callback;
23757
+ var opts = options;
23758
+
23759
+ if (typeof options === 'function') {
23760
+ cb = opts;
23761
+ opts = {};
23762
+ }
23763
+
23764
+ if (typeof x !== 'string') {
23765
+ var err = new TypeError('Path must be a string.');
23766
+ return process.nextTick(function () {
23767
+ cb(err);
23768
+ });
23769
+ }
23770
+
23771
+ opts = normalizeOptions$2(x, opts);
23772
+ var isFile = opts.isFile || defaultIsFile;
23773
+ var isDirectory = opts.isDirectory || defaultIsDir;
23774
+ var readFile = opts.readFile || fs$3.readFile;
23775
+ var packageIterator = opts.packageIterator;
23776
+ var extensions = opts.extensions || ['.js'];
23777
+ var basedir = opts.basedir || path$2.dirname(caller());
23778
+ var parent = opts.filename || basedir;
23779
+ opts.paths = opts.paths || []; // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
23780
+
23781
+ var absoluteStart = path$2.resolve(basedir);
23782
+ maybeUnwrapSymlink(absoluteStart, opts, function (err, realStart) {
23783
+ if (err) cb(err);else init(realStart);
23784
+ });
23785
+ var res;
23786
+
23787
+ function init(basedir) {
23788
+ if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
23789
+ res = path$2.resolve(basedir, x);
23790
+ if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
23791
+
23792
+ if (/\/$/.test(x) && res === basedir) {
23793
+ loadAsDirectory(res, opts.package, onfile);
23794
+ } else loadAsFile(res, opts.package, onfile);
23795
+ } else if (isCore(x)) {
23796
+ return cb(null, x);
23797
+ } else loadNodeModules(x, basedir, function (err, n, pkg) {
23798
+ if (err) cb(err);else if (n) {
23799
+ return maybeUnwrapSymlink(n, opts, function (err, realN) {
23800
+ if (err) {
23801
+ cb(err);
23802
+ } else {
23803
+ cb(null, realN, pkg);
23804
+ }
23805
+ });
23806
+ } else {
23807
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
23808
+ moduleError.code = 'MODULE_NOT_FOUND';
23809
+ cb(moduleError);
23810
+ }
23811
+ });
23812
+ }
23813
+
23814
+ function onfile(err, m, pkg) {
23815
+ if (err) cb(err);else if (m) cb(null, m, pkg);else loadAsDirectory(res, function (err, d, pkg) {
23816
+ if (err) cb(err);else if (d) {
23817
+ maybeUnwrapSymlink(d, opts, function (err, realD) {
23818
+ if (err) {
23819
+ cb(err);
23820
+ } else {
23821
+ cb(null, realD, pkg);
23822
+ }
23823
+ });
23824
+ } else {
23825
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
23826
+ moduleError.code = 'MODULE_NOT_FOUND';
23827
+ cb(moduleError);
23828
+ }
23829
+ });
23830
+ }
23831
+
23832
+ function loadAsFile(x, thePackage, callback) {
23833
+ var loadAsFilePackage = thePackage;
23834
+ var cb = callback;
23835
+
23836
+ if (typeof loadAsFilePackage === 'function') {
23837
+ cb = loadAsFilePackage;
23838
+ loadAsFilePackage = undefined;
23839
+ }
23840
+
23841
+ var exts = [''].concat(extensions);
23842
+ load(exts, x, loadAsFilePackage);
23843
+
23844
+ function load(exts, x, loadPackage) {
23845
+ if (exts.length === 0) return cb(null, undefined, loadPackage);
23846
+ var file = x + exts[0];
23847
+ var pkg = loadPackage;
23848
+ if (pkg) onpkg(null, pkg);else loadpkg(path$2.dirname(file), onpkg);
23849
+
23850
+ function onpkg(err, pkg_, dir) {
23851
+ pkg = pkg_;
23852
+ if (err) return cb(err);
23853
+
23854
+ if (dir && pkg && opts.pathFilter) {
23855
+ var rfile = path$2.relative(dir, file);
23856
+ var rel = rfile.slice(0, rfile.length - exts[0].length);
23857
+ var r = opts.pathFilter(pkg, x, rel);
23858
+ if (r) return load([''].concat(extensions.slice()), path$2.resolve(dir, r), pkg);
23859
+ }
23860
+
23861
+ isFile(file, onex);
23862
+ }
23863
+
23864
+ function onex(err, ex) {
23865
+ if (err) return cb(err);
23866
+ if (ex) return cb(null, file, pkg);
23867
+ load(exts.slice(1), x, pkg);
23868
+ }
23869
+ }
23870
+ }
23871
+
23872
+ function loadpkg(dir, cb) {
23873
+ if (dir === '' || dir === '/') return cb(null);
23874
+
23875
+ if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
23876
+ return cb(null);
23877
+ }
23878
+
23879
+ if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null);
23880
+ maybeUnwrapSymlink(dir, opts, function (unwrapErr, pkgdir) {
23881
+ if (unwrapErr) return loadpkg(path$2.dirname(dir), cb);
23882
+ var pkgfile = path$2.join(pkgdir, 'package.json');
23883
+ isFile(pkgfile, function (err, ex) {
23884
+ // on err, ex is false
23885
+ if (!ex) return loadpkg(path$2.dirname(dir), cb);
23886
+ readFile(pkgfile, function (err, body) {
23887
+ if (err) cb(err);
23888
+
23889
+ try {
23890
+ var pkg = JSON.parse(body);
23891
+ } catch (jsonErr) {}
23892
+
23893
+ if (pkg && opts.packageFilter) {
23894
+ pkg = opts.packageFilter(pkg, pkgfile);
23895
+ }
23896
+
23897
+ cb(null, pkg, dir);
23898
+ });
23899
+ });
23900
+ });
23901
+ }
23902
+
23903
+ function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
23904
+ var cb = callback;
23905
+ var fpkg = loadAsDirectoryPackage;
23906
+
23907
+ if (typeof fpkg === 'function') {
23908
+ cb = fpkg;
23909
+ fpkg = opts.package;
23910
+ }
23911
+
23912
+ maybeUnwrapSymlink(x, opts, function (unwrapErr, pkgdir) {
23913
+ if (unwrapErr) return cb(unwrapErr);
23914
+ var pkgfile = path$2.join(pkgdir, 'package.json');
23915
+ isFile(pkgfile, function (err, ex) {
23916
+ if (err) return cb(err);
23917
+ if (!ex) return loadAsFile(path$2.join(x, 'index'), fpkg, cb);
23918
+ readFile(pkgfile, function (err, body) {
23919
+ if (err) return cb(err);
23920
+
23921
+ try {
23922
+ var pkg = JSON.parse(body);
23923
+ } catch (jsonErr) {}
23924
+
23925
+ if (pkg && opts.packageFilter) {
23926
+ pkg = opts.packageFilter(pkg, pkgfile);
23927
+ }
23928
+
23929
+ if (pkg && pkg.main) {
23930
+ if (typeof pkg.main !== 'string') {
23931
+ var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
23932
+ mainError.code = 'INVALID_PACKAGE_MAIN';
23933
+ return cb(mainError);
23934
+ }
23265
23935
 
23266
- const createRequire = Module.createRequire || Module.createRequireFromPath;
23267
- resolve = createRequire(__dirname).resolve;
23936
+ if (pkg.main === '.' || pkg.main === './') {
23937
+ pkg.main = 'index';
23938
+ }
23939
+
23940
+ loadAsFile(path$2.resolve(x, pkg.main), pkg, function (err, m, pkg) {
23941
+ if (err) return cb(err);
23942
+ if (m) return cb(null, m, pkg);
23943
+ if (!pkg) return loadAsFile(path$2.join(x, 'index'), pkg, cb);
23944
+ var dir = path$2.resolve(x, pkg.main);
23945
+ loadAsDirectory(dir, pkg, function (err, n, pkg) {
23946
+ if (err) return cb(err);
23947
+ if (n) return cb(null, n, pkg);
23948
+ loadAsFile(path$2.join(x, 'index'), pkg, cb);
23949
+ });
23950
+ });
23951
+ return;
23952
+ }
23953
+
23954
+ loadAsFile(path$2.join(x, '/index'), pkg, cb);
23955
+ });
23956
+ });
23957
+ });
23958
+ }
23959
+
23960
+ function processDirs(cb, dirs) {
23961
+ if (dirs.length === 0) return cb(null, undefined);
23962
+ var dir = dirs[0];
23963
+ isDirectory(path$2.dirname(dir), isdir);
23964
+
23965
+ function isdir(err, isdir) {
23966
+ if (err) return cb(err);
23967
+ if (!isdir) return processDirs(cb, dirs.slice(1));
23968
+ loadAsFile(dir, opts.package, onfile);
23969
+ }
23970
+
23971
+ function onfile(err, m, pkg) {
23972
+ if (err) return cb(err);
23973
+ if (m) return cb(null, m, pkg);
23974
+ loadAsDirectory(dir, opts.package, ondir);
23975
+ }
23976
+
23977
+ function ondir(err, n, pkg) {
23978
+ if (err) return cb(err);
23979
+ if (n) return cb(null, n, pkg);
23980
+ processDirs(cb, dirs.slice(1));
23981
+ }
23982
+ }
23983
+
23984
+ function loadNodeModules(x, start, cb) {
23985
+ var thunk = function () {
23986
+ return getPackageCandidates(x, start, opts);
23987
+ };
23988
+
23989
+ processDirs(cb, packageIterator ? packageIterator(x, start, thunk, opts) : thunk());
23990
+ }
23991
+ };
23992
+
23993
+ var realpath$1 = fs$3.realpathSync && typeof fs$3.realpathSync.native === 'function' ? fs$3.realpathSync.native : fs$3.realpathSync;
23994
+
23995
+ var defaultIsFile$1 = function isFile(file) {
23996
+ try {
23997
+ var stat = fs$3.statSync(file);
23998
+ } catch (e) {
23999
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
24000
+ throw e;
24001
+ }
24002
+
24003
+ return stat.isFile() || stat.isFIFO();
24004
+ };
24005
+
24006
+ var defaultIsDir$1 = function isDirectory(dir) {
24007
+ try {
24008
+ var stat = fs$3.statSync(dir);
24009
+ } catch (e) {
24010
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
24011
+ throw e;
24012
+ }
24013
+
24014
+ return stat.isDirectory();
24015
+ };
24016
+
24017
+ var maybeUnwrapSymlink$1 = function maybeUnwrapSymlink(x, opts) {
24018
+ if (opts && opts.preserveSymlinks === false) {
24019
+ try {
24020
+ return realpath$1(x);
24021
+ } catch (realPathErr) {
24022
+ if (realPathErr.code !== 'ENOENT') {
24023
+ throw realPathErr;
24024
+ }
24025
+ }
24026
+ }
24027
+
24028
+ return x;
24029
+ };
24030
+
24031
+ var getPackageCandidates$1 = function getPackageCandidates(x, start, opts) {
24032
+ var dirs = nodeModulesPaths(start, opts, x);
24033
+
24034
+ for (var i = 0; i < dirs.length; i++) {
24035
+ dirs[i] = path$2.join(dirs[i], x);
24036
+ }
24037
+
24038
+ return dirs;
24039
+ };
24040
+
24041
+ var sync = function resolveSync(x, options) {
24042
+ if (typeof x !== 'string') {
24043
+ throw new TypeError('Path must be a string.');
24044
+ }
24045
+
24046
+ var opts = normalizeOptions$2(x, options);
24047
+ var isFile = opts.isFile || defaultIsFile$1;
24048
+ var readFileSync = opts.readFileSync || fs$3.readFileSync;
24049
+ var isDirectory = opts.isDirectory || defaultIsDir$1;
24050
+ var packageIterator = opts.packageIterator;
24051
+ var extensions = opts.extensions || ['.js'];
24052
+ var basedir = opts.basedir || path$2.dirname(caller());
24053
+ var parent = opts.filename || basedir;
24054
+ opts.paths = opts.paths || []; // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
24055
+
24056
+ var absoluteStart = maybeUnwrapSymlink$1(path$2.resolve(basedir), opts);
24057
+
24058
+ if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
24059
+ var res = path$2.resolve(absoluteStart, x);
24060
+ if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
24061
+ var m = loadAsFileSync(res) || loadAsDirectorySync(res);
24062
+ if (m) return maybeUnwrapSymlink$1(m, opts);
24063
+ } else if (isCore(x)) {
24064
+ return x;
24065
+ } else {
24066
+ var n = loadNodeModulesSync(x, absoluteStart);
24067
+ if (n) return maybeUnwrapSymlink$1(n, opts);
24068
+ }
24069
+
24070
+ var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
24071
+ err.code = 'MODULE_NOT_FOUND';
24072
+ throw err;
24073
+
24074
+ function loadAsFileSync(x) {
24075
+ var pkg = loadpkg(path$2.dirname(x));
24076
+
24077
+ if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
24078
+ var rfile = path$2.relative(pkg.dir, x);
24079
+ var r = opts.pathFilter(pkg.pkg, x, rfile);
24080
+
24081
+ if (r) {
24082
+ x = path$2.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
24083
+ }
24084
+ }
24085
+
24086
+ if (isFile(x)) {
24087
+ return x;
24088
+ }
24089
+
24090
+ for (var i = 0; i < extensions.length; i++) {
24091
+ var file = x + extensions[i];
24092
+
24093
+ if (isFile(file)) {
24094
+ return file;
24095
+ }
24096
+ }
24097
+ }
24098
+
24099
+ function loadpkg(dir) {
24100
+ if (dir === '' || dir === '/') return;
24101
+
24102
+ if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
24103
+ return;
24104
+ }
24105
+
24106
+ if (/[/\\]node_modules[/\\]*$/.test(dir)) return;
24107
+ var pkgfile = path$2.join(maybeUnwrapSymlink$1(dir, opts), 'package.json');
24108
+
24109
+ if (!isFile(pkgfile)) {
24110
+ return loadpkg(path$2.dirname(dir));
24111
+ }
24112
+
24113
+ var body = readFileSync(pkgfile);
24114
+
24115
+ try {
24116
+ var pkg = JSON.parse(body);
24117
+ } catch (jsonErr) {}
24118
+
24119
+ if (pkg && opts.packageFilter) {
24120
+ // v2 will pass pkgfile
24121
+ pkg = opts.packageFilter(pkg,
24122
+ /*pkgfile,*/
24123
+ dir); // eslint-disable-line spaced-comment
24124
+ }
24125
+
24126
+ return {
24127
+ pkg: pkg,
24128
+ dir: dir
24129
+ };
24130
+ }
24131
+
24132
+ function loadAsDirectorySync(x) {
24133
+ var pkgfile = path$2.join(maybeUnwrapSymlink$1(x, opts), '/package.json');
24134
+
24135
+ if (isFile(pkgfile)) {
24136
+ try {
24137
+ var body = readFileSync(pkgfile, 'UTF8');
24138
+ var pkg = JSON.parse(body);
24139
+ } catch (e) {}
24140
+
24141
+ if (pkg && opts.packageFilter) {
24142
+ // v2 will pass pkgfile
24143
+ pkg = opts.packageFilter(pkg,
24144
+ /*pkgfile,*/
24145
+ x); // eslint-disable-line spaced-comment
24146
+ }
24147
+
24148
+ if (pkg && pkg.main) {
24149
+ if (typeof pkg.main !== 'string') {
24150
+ var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
24151
+ mainError.code = 'INVALID_PACKAGE_MAIN';
24152
+ throw mainError;
24153
+ }
24154
+
24155
+ if (pkg.main === '.' || pkg.main === './') {
24156
+ pkg.main = 'index';
24157
+ }
24158
+
24159
+ try {
24160
+ var m = loadAsFileSync(path$2.resolve(x, pkg.main));
24161
+ if (m) return m;
24162
+ var n = loadAsDirectorySync(path$2.resolve(x, pkg.main));
24163
+ if (n) return n;
24164
+ } catch (e) {}
24165
+ }
24166
+ }
24167
+
24168
+ return loadAsFileSync(path$2.join(x, '/index'));
24169
+ }
24170
+
24171
+ function loadNodeModulesSync(x, start) {
24172
+ var thunk = function () {
24173
+ return getPackageCandidates$1(x, start, opts);
24174
+ };
24175
+
24176
+ var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();
24177
+
24178
+ for (var i = 0; i < dirs.length; i++) {
24179
+ var dir = dirs[i];
24180
+
24181
+ if (isDirectory(path$2.dirname(dir))) {
24182
+ var m = loadAsFileSync(dir);
24183
+ if (m) return m;
24184
+ var n = loadAsDirectorySync(dir);
24185
+ if (n) return n;
24186
+ }
24187
+ }
24188
+ }
24189
+ };
24190
+
24191
+ async.core = core_1;
24192
+ async.isCore = isCore;
24193
+ async.sync = sync;
24194
+ var resolve = async;
24195
+
24196
+ // eslint-disable-next-line prefer-destructuring
24197
+
24198
+
24199
+ let resolve$1 = require.resolve; // In the VS Code and Atom extensions `require` is overridden and `require.resolve` doesn't support the 2nd argument.
24200
+
24201
+ if (resolve$1.length === 1 || process.env.PRETTIER_FALLBACK_RESOLVE) {
24202
+ resolve$1 = (id, options) => {
24203
+ let basedir;
24204
+
24205
+ if (options && options.paths && options.paths.length === 1) {
24206
+ basedir = options.paths[0];
24207
+ }
24208
+
24209
+ return resolve.sync(id, {
24210
+ basedir
24211
+ });
24212
+ };
23268
24213
  }
23269
24214
 
23270
- var resolve_1 = resolve;
24215
+ var resolve_1 = resolve$1;
23271
24216
 
23272
24217
  const getExplorerMemoized = mem_1(opts => {
23273
24218
  const cosmiconfig = thirdParty["cosmiconfig" + (opts.sync ? "Sync" : "")];
@@ -23276,7 +24221,7 @@ const getExplorerMemoized = mem_1(opts => {
23276
24221
  transform: result => {
23277
24222
  if (result && result.config) {
23278
24223
  if (typeof result.config === "string") {
23279
- const dir = path$1.dirname(result.filepath);
24224
+ const dir = path$2.dirname(result.filepath);
23280
24225
 
23281
24226
  try {
23282
24227
  const modulePath = resolve_1(result.config, {
@@ -23340,7 +24285,7 @@ function _resolveConfig(filePath, opts, sync) {
23340
24285
  ["plugins", "pluginSearchDirs"].forEach(optionName => {
23341
24286
  if (Array.isArray(merged[optionName])) {
23342
24287
  merged[optionName] = merged[optionName].map(value => typeof value === "string" && value.startsWith(".") // relative path
23343
- ? path$1.resolve(path$1.dirname(result.filepath), value) : value);
24288
+ ? path$2.resolve(path$2.dirname(result.filepath), value) : value);
23344
24289
  }
23345
24290
  });
23346
24291
 
@@ -23400,7 +24345,7 @@ function mergeOverrides(configResult, filePath) {
23400
24345
  options = _objectWithoutPropertiesLoose(_ref, ["overrides"]);
23401
24346
 
23402
24347
  if (filePath && overrides) {
23403
- const relativeFilePath = path$1.relative(path$1.dirname(configPath), filePath);
24348
+ const relativeFilePath = path$2.relative(path$2.dirname(configPath), filePath);
23404
24349
 
23405
24350
  for (const override of overrides) {
23406
24351
  if (pathMatchesGlobs(relativeFilePath, override.files, override.excludeFiles)) {
@@ -23515,7 +24460,7 @@ function _getFileInfo({
23515
24460
  }
23516
24461
 
23517
24462
  function normalizeFilePath(filePath, ignorePath) {
23518
- return ignorePath ? path$1.relative(path$1.dirname(ignorePath), filePath) : filePath;
24463
+ return ignorePath ? path$2.relative(path$2.dirname(ignorePath), filePath) : filePath;
23519
24464
  }
23520
24465
 
23521
24466
  var getFileInfo_1 = getFileInfo;
@@ -26933,7 +27878,7 @@ var arrayUnion = (...arguments_) => {
26933
27878
  */
26934
27879
 
26935
27880
 
26936
- const PassThrough = stream$5.PassThrough;
27881
+ const PassThrough = stream$6.PassThrough;
26937
27882
  const slice = Array.prototype.slice;
26938
27883
  var merge2_1 = merge2;
26939
27884
 
@@ -27082,7 +28027,7 @@ var errno = createCommonjsModule(function (module, exports) {
27082
28027
  unwrapExports(errno);
27083
28028
  var errno_1 = errno.isEnoentCodeError;
27084
28029
 
27085
- var fs = createCommonjsModule(function (module, exports) {
28030
+ var fs$1 = createCommonjsModule(function (module, exports) {
27086
28031
 
27087
28032
  Object.defineProperty(exports, "__esModule", {
27088
28033
  value: true
@@ -27108,8 +28053,8 @@ var fs = createCommonjsModule(function (module, exports) {
27108
28053
 
27109
28054
  exports.createDirentFromStats = createDirentFromStats;
27110
28055
  });
27111
- unwrapExports(fs);
27112
- var fs_1 = fs.createDirentFromStats;
28056
+ unwrapExports(fs$1);
28057
+ var fs_1 = fs$1.createDirentFromStats;
27113
28058
 
27114
28059
  var path_1 = createCommonjsModule(function (module, exports) {
27115
28060
 
@@ -27130,7 +28075,7 @@ var path_1 = createCommonjsModule(function (module, exports) {
27130
28075
  exports.unixify = unixify;
27131
28076
 
27132
28077
  function makeAbsolute(cwd, filepath) {
27133
- return path$1.resolve(cwd, filepath);
28078
+ return path$2.resolve(cwd, filepath);
27134
28079
  }
27135
28080
 
27136
28081
  exports.makeAbsolute = makeAbsolute;
@@ -27237,8 +28182,8 @@ var isGlob = function isGlob(str, options) {
27237
28182
  return false;
27238
28183
  };
27239
28184
 
27240
- var pathPosixDirname = path$1.posix.dirname;
27241
- var isWin32 = os.platform() === 'win32';
28185
+ var pathPosixDirname = path$2.posix.dirname;
28186
+ var isWin32 = os$1.platform() === 'win32';
27242
28187
  var slash = '/';
27243
28188
  var backslash = /\\/g;
27244
28189
  var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
@@ -27874,7 +28819,7 @@ const toRegex = (start, end, options) => {
27874
28819
  };
27875
28820
 
27876
28821
  const rangeError = (...args) => {
27877
- return new RangeError('Invalid range arguments: ' + util$2.inspect(...args));
28822
+ return new RangeError('Invalid range arguments: ' + util$3.inspect(...args));
27878
28823
  };
27879
28824
 
27880
28825
  const invalidRange = (start, end, options) => {
@@ -28185,7 +29130,7 @@ const expand$1 = (ast, options = {}) => {
28185
29130
 
28186
29131
  var expand_1 = expand$1;
28187
29132
 
28188
- var constants$1 = {
29133
+ var constants$2 = {
28189
29134
  MAX_LENGTH: 1024 * 64,
28190
29135
  // Digits
28191
29136
  CHAR_0: '0',
@@ -28369,12 +29314,12 @@ const {
28369
29314
  /* ' */
28370
29315
  CHAR_NO_BREAK_SPACE,
28371
29316
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
28372
- } = constants$1;
29317
+ } = constants$2;
28373
29318
  /**
28374
29319
  * parse
28375
29320
  */
28376
29321
 
28377
- const parse$2 = (input, options = {}) => {
29322
+ const parse$3 = (input, options = {}) => {
28378
29323
  if (typeof input !== 'string') {
28379
29324
  throw new TypeError('Expected a string');
28380
29325
  }
@@ -28724,7 +29669,7 @@ const parse$2 = (input, options = {}) => {
28724
29669
  return ast;
28725
29670
  };
28726
29671
 
28727
- var parse_1 = parse$2;
29672
+ var parse_1 = parse$3;
28728
29673
 
28729
29674
  /**
28730
29675
  * Expand the given pattern or create a regex-compatible string.
@@ -28967,7 +29912,7 @@ const POSIX_REGEX_SOURCE = {
28967
29912
  word: 'A-Za-z0-9_',
28968
29913
  xdigit: 'A-Fa-f0-9'
28969
29914
  };
28970
- var constants$2 = {
29915
+ var constants$3 = {
28971
29916
  MAX_LENGTH: 1024 * 64,
28972
29917
  POSIX_REGEX_SOURCE,
28973
29918
  // regular expressions
@@ -29115,7 +30060,7 @@ var constants$2 = {
29115
30060
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
29116
30061
 
29117
30062
  /* \uFEFF */
29118
- SEP: path$1.sep,
30063
+ SEP: path$2.sep,
29119
30064
 
29120
30065
  /**
29121
30066
  * Create EXTGLOB_CHARS
@@ -29167,7 +30112,7 @@ var utils$3 = createCommonjsModule(function (module, exports) {
29167
30112
  REGEX_REMOVE_BACKSLASH,
29168
30113
  REGEX_SPECIAL_CHARS,
29169
30114
  REGEX_SPECIAL_CHARS_GLOBAL
29170
- } = constants$2;
30115
+ } = constants$3;
29171
30116
 
29172
30117
  exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
29173
30118
 
@@ -29200,7 +30145,7 @@ var utils$3 = createCommonjsModule(function (module, exports) {
29200
30145
  return options.windows;
29201
30146
  }
29202
30147
 
29203
- return win32 === true || path$1.sep === '\\';
30148
+ return win32 === true || path$2.sep === '\\';
29204
30149
  };
29205
30150
 
29206
30151
  exports.escapeLast = (input, char, lastIdx) => {
@@ -29291,7 +30236,7 @@ const {
29291
30236
  CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET$1
29292
30237
  /* ] */
29293
30238
 
29294
- } = constants$2;
30239
+ } = constants$3;
29295
30240
 
29296
30241
  const isPathSeparator = code => {
29297
30242
  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
@@ -29683,7 +30628,7 @@ const {
29683
30628
  REGEX_NON_SPECIAL_CHARS,
29684
30629
  REGEX_SPECIAL_CHARS_BACKREF,
29685
30630
  REPLACEMENTS
29686
- } = constants$2;
30631
+ } = constants$3;
29687
30632
  /**
29688
30633
  * Helpers
29689
30634
  */
@@ -29721,7 +30666,7 @@ const syntaxError = (type, char) => {
29721
30666
  */
29722
30667
 
29723
30668
 
29724
- const parse$3 = (input, options) => {
30669
+ const parse$4 = (input, options) => {
29725
30670
  if (typeof input !== 'string') {
29726
30671
  throw new TypeError('Expected a string');
29727
30672
  }
@@ -29744,8 +30689,8 @@ const parse$3 = (input, options) => {
29744
30689
  const capture = opts.capture ? '' : '?:';
29745
30690
  const win32 = utils$3.isWindows(options); // create constants based on platform, for windows or posix
29746
30691
 
29747
- const PLATFORM_CHARS = constants$2.globChars(win32);
29748
- const EXTGLOB_CHARS = constants$2.extglobChars(PLATFORM_CHARS);
30692
+ const PLATFORM_CHARS = constants$3.globChars(win32);
30693
+ const EXTGLOB_CHARS = constants$3.extglobChars(PLATFORM_CHARS);
29749
30694
  const {
29750
30695
  DOT_LITERAL,
29751
30696
  PLUS_LITERAL,
@@ -30801,7 +31746,7 @@ const parse$3 = (input, options) => {
30801
31746
  */
30802
31747
 
30803
31748
 
30804
- parse$3.fastpaths = (input, options) => {
31749
+ parse$4.fastpaths = (input, options) => {
30805
31750
  const opts = Object.assign({}, options);
30806
31751
  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH$3, opts.maxLength) : MAX_LENGTH$3;
30807
31752
  const len = input.length;
@@ -30823,7 +31768,7 @@ parse$3.fastpaths = (input, options) => {
30823
31768
  NO_DOTS_SLASH,
30824
31769
  STAR,
30825
31770
  START_ANCHOR
30826
- } = constants$2.globChars(win32);
31771
+ } = constants$3.globChars(win32);
30827
31772
  const nodot = opts.dot ? NO_DOTS : NO_DOT;
30828
31773
  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
30829
31774
  const capture = opts.capture ? '' : '?:';
@@ -30889,7 +31834,7 @@ parse$3.fastpaths = (input, options) => {
30889
31834
  return source;
30890
31835
  };
30891
31836
 
30892
- var parse_1$1 = parse$3;
31837
+ var parse_1$1 = parse$4;
30893
31838
 
30894
31839
  const isObject$2 = val => val && typeof val === 'object' && !Array.isArray(val);
30895
31840
  /**
@@ -31079,7 +32024,7 @@ picomatch.test = (input, regex, options, {
31079
32024
 
31080
32025
  picomatch.matchBase = (input, glob, options, posix = utils$3.isWindows(options)) => {
31081
32026
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
31082
- return regex.test(path$1.basename(input));
32027
+ return regex.test(path$2.basename(input));
31083
32028
  };
31084
32029
  /**
31085
32030
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -31254,7 +32199,7 @@ picomatch.toRegex = (source, options) => {
31254
32199
  */
31255
32200
 
31256
32201
 
31257
- picomatch.constants = constants$2;
32202
+ picomatch.constants = constants$3;
31258
32203
  /**
31259
32204
  * Expose "picomatch"
31260
32205
  */
@@ -31448,7 +32393,7 @@ micromatch.not = (list, patterns, options = {}) => {
31448
32393
 
31449
32394
  micromatch.contains = (str, pattern, options) => {
31450
32395
  if (typeof str !== 'string') {
31451
- throw new TypeError(`Expected a string: "${util$2.inspect(str)}"`);
32396
+ throw new TypeError(`Expected a string: "${util$3.inspect(str)}"`);
31452
32397
  }
31453
32398
 
31454
32399
  if (Array.isArray(pattern)) {
@@ -31603,7 +32548,7 @@ micromatch.every = (list, patterns, options) => {
31603
32548
 
31604
32549
  micromatch.all = (str, patterns, options) => {
31605
32550
  if (typeof str !== 'string') {
31606
- throw new TypeError(`Expected a string: "${util$2.inspect(str)}"`);
32551
+ throw new TypeError(`Expected a string: "${util$3.inspect(str)}"`);
31607
32552
  }
31608
32553
 
31609
32554
  return [].concat(patterns).every(p => picomatch$1(p, options)(str));
@@ -31846,7 +32791,7 @@ var pattern = createCommonjsModule(function (module, exports) {
31846
32791
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
31847
32792
 
31848
32793
  function isAffectDepthOfReadingPattern(pattern) {
31849
- const basename = path$1.basename(pattern);
32794
+ const basename = path$2.basename(pattern);
31850
32795
  return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
31851
32796
  }
31852
32797
 
@@ -31921,7 +32866,7 @@ var pattern_16 = pattern.makeRe;
31921
32866
  var pattern_17 = pattern.convertPatternsToRe;
31922
32867
  var pattern_18 = pattern.matchAny;
31923
32868
 
31924
- var stream = createCommonjsModule(function (module, exports) {
32869
+ var stream$1 = createCommonjsModule(function (module, exports) {
31925
32870
 
31926
32871
  Object.defineProperty(exports, "__esModule", {
31927
32872
  value: true
@@ -31943,8 +32888,8 @@ var stream = createCommonjsModule(function (module, exports) {
31943
32888
  streams.forEach(stream => stream.emit('close'));
31944
32889
  }
31945
32890
  });
31946
- unwrapExports(stream);
31947
- var stream_1 = stream.merge;
32891
+ unwrapExports(stream$1);
32892
+ var stream_1 = stream$1.merge;
31948
32893
 
31949
32894
  var string$1 = createCommonjsModule(function (module, exports) {
31950
32895
 
@@ -31975,10 +32920,10 @@ var utils$4 = createCommonjsModule(function (module, exports) {
31975
32920
  });
31976
32921
  exports.array = array$2;
31977
32922
  exports.errno = errno;
31978
- exports.fs = fs;
32923
+ exports.fs = fs$1;
31979
32924
  exports.path = path_1;
31980
32925
  exports.pattern = pattern;
31981
- exports.stream = stream;
32926
+ exports.stream = stream$1;
31982
32927
  exports.string = string$1;
31983
32928
  });
31984
32929
  unwrapExports(utils$4);
@@ -32086,7 +33031,7 @@ var tasks_5 = tasks.groupPatternsByBaseDirectory;
32086
33031
  var tasks_6 = tasks.convertPatternGroupsToTasks;
32087
33032
  var tasks_7 = tasks.convertPatternGroupToTask;
32088
33033
 
32089
- var async = createCommonjsModule(function (module, exports) {
33034
+ var async$1 = createCommonjsModule(function (module, exports) {
32090
33035
 
32091
33036
  Object.defineProperty(exports, "__esModule", {
32092
33037
  value: true
@@ -32130,10 +33075,10 @@ var async = createCommonjsModule(function (module, exports) {
32130
33075
  callback(null, result);
32131
33076
  }
32132
33077
  });
32133
- unwrapExports(async);
32134
- var async_1 = async.read;
33078
+ unwrapExports(async$1);
33079
+ var async_1 = async$1.read;
32135
33080
 
32136
- var sync = createCommonjsModule(function (module, exports) {
33081
+ var sync$1 = createCommonjsModule(function (module, exports) {
32137
33082
 
32138
33083
  Object.defineProperty(exports, "__esModule", {
32139
33084
  value: true
@@ -32165,8 +33110,8 @@ var sync = createCommonjsModule(function (module, exports) {
32165
33110
 
32166
33111
  exports.read = read;
32167
33112
  });
32168
- unwrapExports(sync);
32169
- var sync_1 = sync.read;
33113
+ unwrapExports(sync$1);
33114
+ var sync_1 = sync$1.read;
32170
33115
 
32171
33116
  var fs_1$1 = createCommonjsModule(function (module, exports) {
32172
33117
 
@@ -32174,10 +33119,10 @@ var fs_1$1 = createCommonjsModule(function (module, exports) {
32174
33119
  value: true
32175
33120
  });
32176
33121
  exports.FILE_SYSTEM_ADAPTER = {
32177
- lstat: fs$2.lstat,
32178
- stat: fs$2.stat,
32179
- lstatSync: fs$2.lstatSync,
32180
- statSync: fs$2.statSync
33122
+ lstat: fs$3.lstat,
33123
+ stat: fs$3.stat,
33124
+ lstatSync: fs$3.lstatSync,
33125
+ statSync: fs$3.statSync
32181
33126
  };
32182
33127
 
32183
33128
  function createFileSystemAdapter(fsMethods) {
@@ -32228,17 +33173,17 @@ var out = createCommonjsModule(function (module, exports) {
32228
33173
 
32229
33174
  function stat(path, optionsOrSettingsOrCallback, callback) {
32230
33175
  if (typeof optionsOrSettingsOrCallback === 'function') {
32231
- return async.read(path, getSettings(), optionsOrSettingsOrCallback);
33176
+ return async$1.read(path, getSettings(), optionsOrSettingsOrCallback);
32232
33177
  }
32233
33178
 
32234
- async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
33179
+ async$1.read(path, getSettings(optionsOrSettingsOrCallback), callback);
32235
33180
  }
32236
33181
 
32237
33182
  exports.stat = stat;
32238
33183
 
32239
33184
  function statSync(path, optionsOrSettings) {
32240
33185
  const settings = getSettings(optionsOrSettings);
32241
- return sync.read(path, settings);
33186
+ return sync$1.read(path, settings);
32242
33187
  }
32243
33188
 
32244
33189
  exports.statSync = statSync;
@@ -32310,7 +33255,7 @@ function runParallel(tasks, cb) {
32310
33255
  isSync = false;
32311
33256
  }
32312
33257
 
32313
- var constants$3 = createCommonjsModule(function (module, exports) {
33258
+ var constants$4 = createCommonjsModule(function (module, exports) {
32314
33259
 
32315
33260
  Object.defineProperty(exports, "__esModule", {
32316
33261
  value: true
@@ -32328,10 +33273,10 @@ var constants$3 = createCommonjsModule(function (module, exports) {
32328
33273
 
32329
33274
  exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
32330
33275
  });
32331
- unwrapExports(constants$3);
32332
- var constants_1 = constants$3.IS_SUPPORT_READDIR_WITH_FILE_TYPES;
33276
+ unwrapExports(constants$4);
33277
+ var constants_1 = constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES;
32333
33278
 
32334
- var fs$1 = createCommonjsModule(function (module, exports) {
33279
+ var fs$2 = createCommonjsModule(function (module, exports) {
32335
33280
 
32336
33281
  Object.defineProperty(exports, "__esModule", {
32337
33282
  value: true
@@ -32357,27 +33302,27 @@ var fs$1 = createCommonjsModule(function (module, exports) {
32357
33302
 
32358
33303
  exports.createDirentFromStats = createDirentFromStats;
32359
33304
  });
32360
- unwrapExports(fs$1);
32361
- var fs_1$2 = fs$1.createDirentFromStats;
33305
+ unwrapExports(fs$2);
33306
+ var fs_1$2 = fs$2.createDirentFromStats;
32362
33307
 
32363
33308
  var utils$5 = createCommonjsModule(function (module, exports) {
32364
33309
 
32365
33310
  Object.defineProperty(exports, "__esModule", {
32366
33311
  value: true
32367
33312
  });
32368
- exports.fs = fs$1;
33313
+ exports.fs = fs$2;
32369
33314
  });
32370
33315
  unwrapExports(utils$5);
32371
33316
  var utils_1$5 = utils$5.fs;
32372
33317
 
32373
- var async$1 = createCommonjsModule(function (module, exports) {
33318
+ var async$2 = createCommonjsModule(function (module, exports) {
32374
33319
 
32375
33320
  Object.defineProperty(exports, "__esModule", {
32376
33321
  value: true
32377
33322
  });
32378
33323
 
32379
33324
  function read(directory, settings, callback) {
32380
- if (!settings.stats && constants$3.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
33325
+ if (!settings.stats && constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
32381
33326
  return readdirWithFileTypes(directory, settings, callback);
32382
33327
  }
32383
33328
 
@@ -32483,19 +33428,19 @@ var async$1 = createCommonjsModule(function (module, exports) {
32483
33428
  callback(null, result);
32484
33429
  }
32485
33430
  });
32486
- unwrapExports(async$1);
32487
- var async_1$1 = async$1.read;
32488
- var async_2 = async$1.readdirWithFileTypes;
32489
- var async_3 = async$1.readdir;
33431
+ unwrapExports(async$2);
33432
+ var async_1$1 = async$2.read;
33433
+ var async_2 = async$2.readdirWithFileTypes;
33434
+ var async_3 = async$2.readdir;
32490
33435
 
32491
- var sync$1 = createCommonjsModule(function (module, exports) {
33436
+ var sync$2 = createCommonjsModule(function (module, exports) {
32492
33437
 
32493
33438
  Object.defineProperty(exports, "__esModule", {
32494
33439
  value: true
32495
33440
  });
32496
33441
 
32497
33442
  function read(directory, settings) {
32498
- if (!settings.stats && constants$3.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
33443
+ if (!settings.stats && constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
32499
33444
  return readdirWithFileTypes(directory, settings);
32500
33445
  }
32501
33446
 
@@ -32553,10 +33498,10 @@ var sync$1 = createCommonjsModule(function (module, exports) {
32553
33498
 
32554
33499
  exports.readdir = readdir;
32555
33500
  });
32556
- unwrapExports(sync$1);
32557
- var sync_1$1 = sync$1.read;
32558
- var sync_2 = sync$1.readdirWithFileTypes;
32559
- var sync_3 = sync$1.readdir;
33501
+ unwrapExports(sync$2);
33502
+ var sync_1$1 = sync$2.read;
33503
+ var sync_2 = sync$2.readdirWithFileTypes;
33504
+ var sync_3 = sync$2.readdir;
32560
33505
 
32561
33506
  var fs_1$3 = createCommonjsModule(function (module, exports) {
32562
33507
 
@@ -32564,12 +33509,12 @@ var fs_1$3 = createCommonjsModule(function (module, exports) {
32564
33509
  value: true
32565
33510
  });
32566
33511
  exports.FILE_SYSTEM_ADAPTER = {
32567
- lstat: fs$2.lstat,
32568
- stat: fs$2.stat,
32569
- lstatSync: fs$2.lstatSync,
32570
- statSync: fs$2.statSync,
32571
- readdir: fs$2.readdir,
32572
- readdirSync: fs$2.readdirSync
33512
+ lstat: fs$3.lstat,
33513
+ stat: fs$3.stat,
33514
+ lstatSync: fs$3.lstatSync,
33515
+ statSync: fs$3.statSync,
33516
+ readdir: fs$3.readdir,
33517
+ readdirSync: fs$3.readdirSync
32573
33518
  };
32574
33519
 
32575
33520
  function createFileSystemAdapter(fsMethods) {
@@ -32597,7 +33542,7 @@ var settings$1 = createCommonjsModule(function (module, exports) {
32597
33542
  this._options = _options;
32598
33543
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
32599
33544
  this.fs = fs_1$3.createFileSystemAdapter(this._options.fs);
32600
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$1.sep);
33545
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$2.sep);
32601
33546
  this.stats = this._getValue(this._options.stats, false);
32602
33547
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
32603
33548
  this.fsStatSettings = new out.Settings({
@@ -32626,17 +33571,17 @@ var out$1 = createCommonjsModule(function (module, exports) {
32626
33571
 
32627
33572
  function scandir(path, optionsOrSettingsOrCallback, callback) {
32628
33573
  if (typeof optionsOrSettingsOrCallback === 'function') {
32629
- return async$1.read(path, getSettings(), optionsOrSettingsOrCallback);
33574
+ return async$2.read(path, getSettings(), optionsOrSettingsOrCallback);
32630
33575
  }
32631
33576
 
32632
- async$1.read(path, getSettings(optionsOrSettingsOrCallback), callback);
33577
+ async$2.read(path, getSettings(optionsOrSettingsOrCallback), callback);
32633
33578
  }
32634
33579
 
32635
33580
  exports.scandir = scandir;
32636
33581
 
32637
33582
  function scandirSync(path, optionsOrSettings) {
32638
33583
  const settings = getSettings(optionsOrSettings);
32639
- return sync$1.read(path, settings);
33584
+ return sync$2.read(path, settings);
32640
33585
  }
32641
33586
 
32642
33587
  exports.scandirSync = scandirSync;
@@ -32918,7 +33863,7 @@ var reader = createCommonjsModule(function (module, exports) {
32918
33863
  });
32919
33864
  unwrapExports(reader);
32920
33865
 
32921
- var async$2 = createCommonjsModule(function (module, exports) {
33866
+ var async$3 = createCommonjsModule(function (module, exports) {
32922
33867
 
32923
33868
  Object.defineProperty(exports, "__esModule", {
32924
33869
  value: true
@@ -32929,7 +33874,7 @@ var async$2 = createCommonjsModule(function (module, exports) {
32929
33874
  super(_root, _settings);
32930
33875
  this._settings = _settings;
32931
33876
  this._scandir = out$1.scandir;
32932
- this._emitter = new events.EventEmitter();
33877
+ this._emitter = new events$1.EventEmitter();
32933
33878
  this._queue = queue(this._worker.bind(this), this._settings.concurrency);
32934
33879
  this._isFatalError = false;
32935
33880
  this._isDestroyed = false;
@@ -33038,9 +33983,9 @@ var async$2 = createCommonjsModule(function (module, exports) {
33038
33983
 
33039
33984
  exports.default = AsyncReader;
33040
33985
  });
33041
- unwrapExports(async$2);
33986
+ unwrapExports(async$3);
33042
33987
 
33043
- var async$3 = createCommonjsModule(function (module, exports) {
33988
+ var async$4 = createCommonjsModule(function (module, exports) {
33044
33989
 
33045
33990
  Object.defineProperty(exports, "__esModule", {
33046
33991
  value: true
@@ -33050,7 +33995,7 @@ var async$3 = createCommonjsModule(function (module, exports) {
33050
33995
  constructor(_root, _settings) {
33051
33996
  this._root = _root;
33052
33997
  this._settings = _settings;
33053
- this._reader = new async$2.default(this._root, this._settings);
33998
+ this._reader = new async$3.default(this._root, this._settings);
33054
33999
  this._storage = new Set();
33055
34000
  }
33056
34001
 
@@ -33082,9 +34027,9 @@ var async$3 = createCommonjsModule(function (module, exports) {
33082
34027
  callback(null, entries);
33083
34028
  }
33084
34029
  });
33085
- unwrapExports(async$3);
34030
+ unwrapExports(async$4);
33086
34031
 
33087
- var stream$1 = createCommonjsModule(function (module, exports) {
34032
+ var stream$2 = createCommonjsModule(function (module, exports) {
33088
34033
 
33089
34034
  Object.defineProperty(exports, "__esModule", {
33090
34035
  value: true
@@ -33094,8 +34039,8 @@ var stream$1 = createCommonjsModule(function (module, exports) {
33094
34039
  constructor(_root, _settings) {
33095
34040
  this._root = _root;
33096
34041
  this._settings = _settings;
33097
- this._reader = new async$2.default(this._root, this._settings);
33098
- this._stream = new stream$5.Readable({
34042
+ this._reader = new async$3.default(this._root, this._settings);
34043
+ this._stream = new stream$6.Readable({
33099
34044
  objectMode: true,
33100
34045
  read: () => {},
33101
34046
  destroy: this._reader.destroy.bind(this._reader)
@@ -33124,9 +34069,9 @@ var stream$1 = createCommonjsModule(function (module, exports) {
33124
34069
 
33125
34070
  exports.default = StreamProvider;
33126
34071
  });
33127
- unwrapExports(stream$1);
34072
+ unwrapExports(stream$2);
33128
34073
 
33129
- var sync$2 = createCommonjsModule(function (module, exports) {
34074
+ var sync$3 = createCommonjsModule(function (module, exports) {
33130
34075
 
33131
34076
  Object.defineProperty(exports, "__esModule", {
33132
34077
  value: true
@@ -33205,9 +34150,9 @@ var sync$2 = createCommonjsModule(function (module, exports) {
33205
34150
 
33206
34151
  exports.default = SyncReader;
33207
34152
  });
33208
- unwrapExports(sync$2);
34153
+ unwrapExports(sync$3);
33209
34154
 
33210
- var sync$3 = createCommonjsModule(function (module, exports) {
34155
+ var sync$4 = createCommonjsModule(function (module, exports) {
33211
34156
 
33212
34157
  Object.defineProperty(exports, "__esModule", {
33213
34158
  value: true
@@ -33217,7 +34162,7 @@ var sync$3 = createCommonjsModule(function (module, exports) {
33217
34162
  constructor(_root, _settings) {
33218
34163
  this._root = _root;
33219
34164
  this._settings = _settings;
33220
- this._reader = new sync$2.default(this._root, this._settings);
34165
+ this._reader = new sync$3.default(this._root, this._settings);
33221
34166
  }
33222
34167
 
33223
34168
  read() {
@@ -33228,7 +34173,7 @@ var sync$3 = createCommonjsModule(function (module, exports) {
33228
34173
 
33229
34174
  exports.default = SyncProvider;
33230
34175
  });
33231
- unwrapExports(sync$3);
34176
+ unwrapExports(sync$4);
33232
34177
 
33233
34178
  var settings$2 = createCommonjsModule(function (module, exports) {
33234
34179
 
@@ -33244,7 +34189,7 @@ var settings$2 = createCommonjsModule(function (module, exports) {
33244
34189
  this.deepFilter = this._getValue(this._options.deepFilter, null);
33245
34190
  this.entryFilter = this._getValue(this._options.entryFilter, null);
33246
34191
  this.errorFilter = this._getValue(this._options.errorFilter, null);
33247
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$1.sep);
34192
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$2.sep);
33248
34193
  this.fsScandirSettings = new out$1.Settings({
33249
34194
  followSymbolicLinks: this._options.followSymbolicLinks,
33250
34195
  fs: this._options.fs,
@@ -33273,17 +34218,17 @@ var out$2 = createCommonjsModule(function (module, exports) {
33273
34218
 
33274
34219
  function walk(directory, optionsOrSettingsOrCallback, callback) {
33275
34220
  if (typeof optionsOrSettingsOrCallback === 'function') {
33276
- return new async$3.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
34221
+ return new async$4.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
33277
34222
  }
33278
34223
 
33279
- new async$3.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
34224
+ new async$4.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
33280
34225
  }
33281
34226
 
33282
34227
  exports.walk = walk;
33283
34228
 
33284
34229
  function walkSync(directory, optionsOrSettings) {
33285
34230
  const settings = getSettings(optionsOrSettings);
33286
- const provider = new sync$3.default(directory, settings);
34231
+ const provider = new sync$4.default(directory, settings);
33287
34232
  return provider.read();
33288
34233
  }
33289
34234
 
@@ -33291,7 +34236,7 @@ var out$2 = createCommonjsModule(function (module, exports) {
33291
34236
 
33292
34237
  function walkStream(directory, optionsOrSettings) {
33293
34238
  const settings = getSettings(optionsOrSettings);
33294
- const provider = new stream$1.default(directory, settings);
34239
+ const provider = new stream$2.default(directory, settings);
33295
34240
  return provider.read();
33296
34241
  }
33297
34242
 
@@ -33328,7 +34273,7 @@ var reader$1 = createCommonjsModule(function (module, exports) {
33328
34273
  }
33329
34274
 
33330
34275
  _getFullEntryPath(filepath) {
33331
- return path$1.resolve(this._settings.cwd, filepath);
34276
+ return path$2.resolve(this._settings.cwd, filepath);
33332
34277
  }
33333
34278
 
33334
34279
  _makeEntry(stats, pattern) {
@@ -33355,7 +34300,7 @@ var reader$1 = createCommonjsModule(function (module, exports) {
33355
34300
  });
33356
34301
  unwrapExports(reader$1);
33357
34302
 
33358
- var stream$2 = createCommonjsModule(function (module, exports) {
34303
+ var stream$3 = createCommonjsModule(function (module, exports) {
33359
34304
 
33360
34305
  Object.defineProperty(exports, "__esModule", {
33361
34306
  value: true
@@ -33374,7 +34319,7 @@ var stream$2 = createCommonjsModule(function (module, exports) {
33374
34319
 
33375
34320
  static(patterns, options) {
33376
34321
  const filepaths = patterns.map(this._getFullEntryPath, this);
33377
- const stream = new stream$5.PassThrough({
34322
+ const stream = new stream$6.PassThrough({
33378
34323
  objectMode: true
33379
34324
  });
33380
34325
 
@@ -33421,7 +34366,7 @@ var stream$2 = createCommonjsModule(function (module, exports) {
33421
34366
 
33422
34367
  exports.default = ReaderStream;
33423
34368
  });
33424
- unwrapExports(stream$2);
34369
+ unwrapExports(stream$3);
33425
34370
 
33426
34371
  var matcher = createCommonjsModule(function (module, exports) {
33427
34372
 
@@ -33781,7 +34726,7 @@ var provider = createCommonjsModule(function (module, exports) {
33781
34726
  }
33782
34727
 
33783
34728
  _getRootDirectory(task) {
33784
- return path$1.resolve(this._settings.cwd, task.base);
34729
+ return path$2.resolve(this._settings.cwd, task.base);
33785
34730
  }
33786
34731
 
33787
34732
  _getReaderOptions(task) {
@@ -33820,7 +34765,7 @@ var provider = createCommonjsModule(function (module, exports) {
33820
34765
  });
33821
34766
  unwrapExports(provider);
33822
34767
 
33823
- var async$4 = createCommonjsModule(function (module, exports) {
34768
+ var async$5 = createCommonjsModule(function (module, exports) {
33824
34769
 
33825
34770
  Object.defineProperty(exports, "__esModule", {
33826
34771
  value: true
@@ -33829,7 +34774,7 @@ var async$4 = createCommonjsModule(function (module, exports) {
33829
34774
  class ProviderAsync extends provider.default {
33830
34775
  constructor() {
33831
34776
  super(...arguments);
33832
- this._reader = new stream$2.default(this._settings);
34777
+ this._reader = new stream$3.default(this._settings);
33833
34778
  }
33834
34779
 
33835
34780
  read(task) {
@@ -33858,9 +34803,9 @@ var async$4 = createCommonjsModule(function (module, exports) {
33858
34803
 
33859
34804
  exports.default = ProviderAsync;
33860
34805
  });
33861
- unwrapExports(async$4);
34806
+ unwrapExports(async$5);
33862
34807
 
33863
- var stream$3 = createCommonjsModule(function (module, exports) {
34808
+ var stream$4 = createCommonjsModule(function (module, exports) {
33864
34809
 
33865
34810
  Object.defineProperty(exports, "__esModule", {
33866
34811
  value: true
@@ -33869,7 +34814,7 @@ var stream$3 = createCommonjsModule(function (module, exports) {
33869
34814
  class ProviderStream extends provider.default {
33870
34815
  constructor() {
33871
34816
  super(...arguments);
33872
- this._reader = new stream$2.default(this._settings);
34817
+ this._reader = new stream$3.default(this._settings);
33873
34818
  }
33874
34819
 
33875
34820
  read(task) {
@@ -33878,7 +34823,7 @@ var stream$3 = createCommonjsModule(function (module, exports) {
33878
34823
  const options = this._getReaderOptions(task);
33879
34824
 
33880
34825
  const source = this.api(root, task, options);
33881
- const destination = new stream$5.Readable({
34826
+ const destination = new stream$6.Readable({
33882
34827
  objectMode: true,
33883
34828
  read: () => {}
33884
34829
  });
@@ -33899,9 +34844,9 @@ var stream$3 = createCommonjsModule(function (module, exports) {
33899
34844
 
33900
34845
  exports.default = ProviderStream;
33901
34846
  });
33902
- unwrapExports(stream$3);
34847
+ unwrapExports(stream$4);
33903
34848
 
33904
- var sync$4 = createCommonjsModule(function (module, exports) {
34849
+ var sync$5 = createCommonjsModule(function (module, exports) {
33905
34850
 
33906
34851
  Object.defineProperty(exports, "__esModule", {
33907
34852
  value: true
@@ -33958,9 +34903,9 @@ var sync$4 = createCommonjsModule(function (module, exports) {
33958
34903
 
33959
34904
  exports.default = ReaderSync;
33960
34905
  });
33961
- unwrapExports(sync$4);
34906
+ unwrapExports(sync$5);
33962
34907
 
33963
- var sync$5 = createCommonjsModule(function (module, exports) {
34908
+ var sync$6 = createCommonjsModule(function (module, exports) {
33964
34909
 
33965
34910
  Object.defineProperty(exports, "__esModule", {
33966
34911
  value: true
@@ -33969,7 +34914,7 @@ var sync$5 = createCommonjsModule(function (module, exports) {
33969
34914
  class ProviderSync extends provider.default {
33970
34915
  constructor() {
33971
34916
  super(...arguments);
33972
- this._reader = new sync$4.default(this._settings);
34917
+ this._reader = new sync$5.default(this._settings);
33973
34918
  }
33974
34919
 
33975
34920
  read(task) {
@@ -33993,21 +34938,21 @@ var sync$5 = createCommonjsModule(function (module, exports) {
33993
34938
 
33994
34939
  exports.default = ProviderSync;
33995
34940
  });
33996
- unwrapExports(sync$5);
34941
+ unwrapExports(sync$6);
33997
34942
 
33998
34943
  var settings$3 = createCommonjsModule(function (module, exports) {
33999
34944
 
34000
34945
  Object.defineProperty(exports, "__esModule", {
34001
34946
  value: true
34002
34947
  });
34003
- const CPU_COUNT = os.cpus().length;
34948
+ const CPU_COUNT = os$1.cpus().length;
34004
34949
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
34005
- lstat: fs$2.lstat,
34006
- lstatSync: fs$2.lstatSync,
34007
- stat: fs$2.stat,
34008
- statSync: fs$2.statSync,
34009
- readdir: fs$2.readdir,
34010
- readdirSync: fs$2.readdirSync
34950
+ lstat: fs$3.lstat,
34951
+ lstatSync: fs$3.lstatSync,
34952
+ stat: fs$3.stat,
34953
+ statSync: fs$3.statSync,
34954
+ readdir: fs$3.readdir,
34955
+ readdirSync: fs$3.readdirSync
34011
34956
  };
34012
34957
 
34013
34958
  class Settings {
@@ -34061,7 +35006,7 @@ var settings_1 = settings$3.DEFAULT_FILE_SYSTEM_ADAPTER;
34061
35006
 
34062
35007
  async function FastGlob(source, options) {
34063
35008
  assertPatternsInput(source);
34064
- const works = getWorks(source, async$4.default, options);
35009
+ const works = getWorks(source, async$5.default, options);
34065
35010
  const result = await Promise.all(works);
34066
35011
  return utils$4.array.flatten(result);
34067
35012
  } // https://github.com/typescript-eslint/typescript-eslint/issues/60
@@ -34071,7 +35016,7 @@ async function FastGlob(source, options) {
34071
35016
  (function (FastGlob) {
34072
35017
  function sync(source, options) {
34073
35018
  assertPatternsInput(source);
34074
- const works = getWorks(source, sync$5.default, options);
35019
+ const works = getWorks(source, sync$6.default, options);
34075
35020
  return utils$4.array.flatten(works);
34076
35021
  }
34077
35022
 
@@ -34079,7 +35024,7 @@ async function FastGlob(source, options) {
34079
35024
 
34080
35025
  function stream(source, options) {
34081
35026
  assertPatternsInput(source);
34082
- const works = getWorks(source, stream$3.default, options);
35027
+ const works = getWorks(source, stream$4.default, options);
34083
35028
  /**
34084
35029
  * The stream returned by the provider cannot work with an asynchronous iterator.
34085
35030
  * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
@@ -34137,7 +35082,7 @@ var out$3 = FastGlob;
34137
35082
 
34138
35083
  const {
34139
35084
  promisify
34140
- } = util$2;
35085
+ } = util$3;
34141
35086
 
34142
35087
  async function isType(fsStatType, statsMethodName, filePath) {
34143
35088
  if (typeof filePath !== 'string') {
@@ -34145,7 +35090,7 @@ async function isType(fsStatType, statsMethodName, filePath) {
34145
35090
  }
34146
35091
 
34147
35092
  try {
34148
- const stats = await promisify(fs$2[fsStatType])(filePath);
35093
+ const stats = await promisify(fs$3[fsStatType])(filePath);
34149
35094
  return stats[statsMethodName]();
34150
35095
  } catch (error) {
34151
35096
  if (error.code === 'ENOENT') {
@@ -34162,7 +35107,7 @@ function isTypeSync(fsStatType, statsMethodName, filePath) {
34162
35107
  }
34163
35108
 
34164
35109
  try {
34165
- return fs$2[fsStatType](filePath)[statsMethodName]();
35110
+ return fs$3[fsStatType](filePath)[statsMethodName]();
34166
35111
  } catch (error) {
34167
35112
  if (error.code === 'ENOENT') {
34168
35113
  return false;
@@ -34191,11 +35136,11 @@ const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(
34191
35136
 
34192
35137
  const getPath = (filepath, cwd) => {
34193
35138
  const pth = filepath[0] === '!' ? filepath.slice(1) : filepath;
34194
- return path$1.isAbsolute(pth) ? pth : path$1.join(cwd, pth);
35139
+ return path$2.isAbsolute(pth) ? pth : path$2.join(cwd, pth);
34195
35140
  };
34196
35141
 
34197
35142
  const addExtensions = (file, extensions) => {
34198
- if (path$1.extname(file)) {
35143
+ if (path$2.extname(file)) {
34199
35144
  return `**/${file}`;
34200
35145
  }
34201
35146
 
@@ -34212,18 +35157,18 @@ const getGlob = (directory, options) => {
34212
35157
  }
34213
35158
 
34214
35159
  if (options.files && options.extensions) {
34215
- return options.files.map(x => path$1.posix.join(directory, addExtensions(x, options.extensions)));
35160
+ return options.files.map(x => path$2.posix.join(directory, addExtensions(x, options.extensions)));
34216
35161
  }
34217
35162
 
34218
35163
  if (options.files) {
34219
- return options.files.map(x => path$1.posix.join(directory, `**/${x}`));
35164
+ return options.files.map(x => path$2.posix.join(directory, `**/${x}`));
34220
35165
  }
34221
35166
 
34222
35167
  if (options.extensions) {
34223
- return [path$1.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];
35168
+ return [path$2.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];
34224
35169
  }
34225
35170
 
34226
- return [path$1.posix.join(directory, '**')];
35171
+ return [path$2.posix.join(directory, '**')];
34227
35172
  };
34228
35173
 
34229
35174
  var dirGlob = async (input, options) => {
@@ -34242,7 +35187,7 @@ var dirGlob = async (input, options) => {
34242
35187
  return [].concat.apply([], globs); // eslint-disable-line prefer-spread
34243
35188
  };
34244
35189
 
34245
- var sync$6 = (input, options) => {
35190
+ var sync$7 = (input, options) => {
34246
35191
  options = Object.assign({
34247
35192
  cwd: process.cwd()
34248
35193
  }, options);
@@ -34254,7 +35199,7 @@ var sync$6 = (input, options) => {
34254
35199
  const globs = [].concat(input).map(x => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x);
34255
35200
  return [].concat.apply([], globs); // eslint-disable-line prefer-spread
34256
35201
  };
34257
- dirGlob.sync = sync$6;
35202
+ dirGlob.sync = sync$7;
34258
35203
 
34259
35204
  // A simple implementation of make-array
34260
35205
  function makeArray(subject) {
@@ -34665,20 +35610,20 @@ var slash$1 = path => {
34665
35610
 
34666
35611
  const {
34667
35612
  promisify: promisify$1
34668
- } = util$2;
35613
+ } = util$3;
34669
35614
  const DEFAULT_IGNORE = ['**/node_modules/**', '**/flow-typed/**', '**/coverage/**', '**/.git'];
34670
- const readFileP = promisify$1(fs$2.readFile);
35615
+ const readFileP = promisify$1(fs$3.readFile);
34671
35616
 
34672
35617
  const mapGitIgnorePatternTo = base => ignore => {
34673
35618
  if (ignore.startsWith('!')) {
34674
- return '!' + path$1.posix.join(base, ignore.slice(1));
35619
+ return '!' + path$2.posix.join(base, ignore.slice(1));
34675
35620
  }
34676
35621
 
34677
- return path$1.posix.join(base, ignore);
35622
+ return path$2.posix.join(base, ignore);
34678
35623
  };
34679
35624
 
34680
35625
  const parseGitIgnore = (content, options) => {
34681
- const base = slash$1(path$1.relative(options.cwd, path$1.dirname(options.fileName)));
35626
+ const base = slash$1(path$2.relative(options.cwd, path$2.dirname(options.fileName)));
34682
35627
  return content.split(/\r?\n/).filter(Boolean).filter(line => !line.startsWith('#')).map(mapGitIgnorePatternTo(base));
34683
35628
  };
34684
35629
 
@@ -34693,7 +35638,7 @@ const reduceIgnore = files => {
34693
35638
  };
34694
35639
 
34695
35640
  const ensureAbsolutePathForCwd = (cwd, p) => {
34696
- if (path$1.isAbsolute(p)) {
35641
+ if (path$2.isAbsolute(p)) {
34697
35642
  if (p.startsWith(cwd)) {
34698
35643
  return p;
34699
35644
  }
@@ -34701,15 +35646,15 @@ const ensureAbsolutePathForCwd = (cwd, p) => {
34701
35646
  throw new Error(`Path ${p} is not in cwd ${cwd}`);
34702
35647
  }
34703
35648
 
34704
- return path$1.join(cwd, p);
35649
+ return path$2.join(cwd, p);
34705
35650
  };
34706
35651
 
34707
35652
  const getIsIgnoredPredecate = (ignores, cwd) => {
34708
- return p => ignores.ignores(slash$1(path$1.relative(cwd, ensureAbsolutePathForCwd(cwd, p))));
35653
+ return p => ignores.ignores(slash$1(path$2.relative(cwd, ensureAbsolutePathForCwd(cwd, p))));
34709
35654
  };
34710
35655
 
34711
35656
  const getFile = async (file, cwd) => {
34712
- const filePath = path$1.join(cwd, file);
35657
+ const filePath = path$2.join(cwd, file);
34713
35658
  const content = await readFileP(filePath, 'utf8');
34714
35659
  return {
34715
35660
  cwd,
@@ -34719,8 +35664,8 @@ const getFile = async (file, cwd) => {
34719
35664
  };
34720
35665
 
34721
35666
  const getFileSync = (file, cwd) => {
34722
- const filePath = path$1.join(cwd, file);
34723
- const content = fs$2.readFileSync(filePath, 'utf8');
35667
+ const filePath = path$2.join(cwd, file);
35668
+ const content = fs$3.readFileSync(filePath, 'utf8');
34724
35669
  return {
34725
35670
  cwd,
34726
35671
  filePath,
@@ -34728,7 +35673,7 @@ const getFileSync = (file, cwd) => {
34728
35673
  };
34729
35674
  };
34730
35675
 
34731
- const normalizeOptions$2 = ({
35676
+ const normalizeOptions$3 = ({
34732
35677
  ignore = [],
34733
35678
  cwd = slash$1(process.cwd())
34734
35679
  } = {}) => {
@@ -34739,7 +35684,7 @@ const normalizeOptions$2 = ({
34739
35684
  };
34740
35685
 
34741
35686
  var gitignore = async options => {
34742
- options = normalizeOptions$2(options);
35687
+ options = normalizeOptions$3(options);
34743
35688
  const paths = await out$3('**/.gitignore', {
34744
35689
  ignore: DEFAULT_IGNORE.concat(options.ignore),
34745
35690
  cwd: options.cwd
@@ -34749,8 +35694,8 @@ var gitignore = async options => {
34749
35694
  return getIsIgnoredPredecate(ignores, options.cwd);
34750
35695
  };
34751
35696
 
34752
- var sync$7 = options => {
34753
- options = normalizeOptions$2(options);
35697
+ var sync$8 = options => {
35698
+ options = normalizeOptions$3(options);
34754
35699
  const paths = out$3.sync('**/.gitignore', {
34755
35700
  ignore: DEFAULT_IGNORE.concat(options.ignore),
34756
35701
  cwd: options.cwd
@@ -34759,11 +35704,11 @@ var sync$7 = options => {
34759
35704
  const ignores = reduceIgnore(files);
34760
35705
  return getIsIgnoredPredecate(ignores, options.cwd);
34761
35706
  };
34762
- gitignore.sync = sync$7;
35707
+ gitignore.sync = sync$8;
34763
35708
 
34764
35709
  const {
34765
35710
  Transform
34766
- } = stream$5;
35711
+ } = stream$6;
34767
35712
 
34768
35713
  class ObjectTransform extends Transform {
34769
35714
  constructor() {
@@ -34836,7 +35781,7 @@ const checkCwdOption = (options = {}) => {
34836
35781
  let stat;
34837
35782
 
34838
35783
  try {
34839
- stat = fs$2.statSync(options.cwd);
35784
+ stat = fs$3.statSync(options.cwd);
34840
35785
  } catch (_) {
34841
35786
  return;
34842
35787
  }
@@ -34846,7 +35791,7 @@ const checkCwdOption = (options = {}) => {
34846
35791
  }
34847
35792
  };
34848
35793
 
34849
- const getPathString = p => p.stats instanceof fs$2.Stats ? p.path : p;
35794
+ const getPathString = p => p.stats instanceof fs$3.Stats ? p.path : p;
34850
35795
 
34851
35796
  const generateGlobTasks = (patterns, taskOptions) => {
34852
35797
  patterns = arrayUnion([].concat(patterns));
@@ -34941,7 +35886,7 @@ var globby$1 = async (patterns, options) => {
34941
35886
  return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_)));
34942
35887
  };
34943
35888
 
34944
- var sync$8 = (patterns, options) => {
35889
+ var sync$9 = (patterns, options) => {
34945
35890
  const globTasks = generateGlobTasks(patterns, options);
34946
35891
  const tasks = globTasks.reduce((tasks, task) => {
34947
35892
  const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
@@ -34951,7 +35896,7 @@ var sync$8 = (patterns, options) => {
34951
35896
  return tasks.reduce((matches, task) => arrayUnion(matches, out$3.sync(task.pattern, task.options)), []).filter(path_ => !filter(path_));
34952
35897
  };
34953
35898
 
34954
- var stream$4 = (patterns, options) => {
35899
+ var stream$5 = (patterns, options) => {
34955
35900
  const globTasks = generateGlobTasks(patterns, options);
34956
35901
  const tasks = globTasks.reduce((tasks, task) => {
34957
35902
  const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
@@ -34968,8 +35913,8 @@ var generateGlobTasks_1 = generateGlobTasks;
34968
35913
  var hasMagic = (patterns, options) => [].concat(patterns).some(pattern => out$3.isDynamicPattern(pattern, options));
34969
35914
 
34970
35915
  var gitignore_1 = gitignore;
34971
- globby$1.sync = sync$8;
34972
- globby$1.stream = stream$4;
35916
+ globby$1.sync = sync$9;
35917
+ globby$1.stream = stream$5;
34973
35918
  globby$1.generateGlobTasks = generateGlobTasks_1;
34974
35919
  globby$1.hasMagic = hasMagic;
34975
35920
  globby$1.gitignore = gitignore_1;
@@ -36171,7 +37116,7 @@ var build = createCommonjsModule(function (module, exports) {
36171
37116
  exports.print = print;
36172
37117
 
36173
37118
  function _os() {
36174
- const data = os;
37119
+ const data = os$1;
36175
37120
 
36176
37121
  _os = function () {
36177
37122
  return data;
@@ -37430,7 +38375,7 @@ function needsParens(path, options) {
37430
38375
  }
37431
38376
 
37432
38377
  if (pp === np && name === "right") {
37433
- assert.strictEqual(parent.right, node);
38378
+ assert$1.strictEqual(parent.right, node);
37434
38379
  return true;
37435
38380
  }
37436
38381
 
@@ -39930,7 +40875,7 @@ function printPathNoParens(path, options, print, args) {
39930
40875
  return nodeStr(n, options);
39931
40876
 
39932
40877
  case "NumberLiteralTypeAnnotation":
39933
- assert.strictEqual(typeof n.value, "number");
40878
+ assert$1.strictEqual(typeof n.value, "number");
39934
40879
 
39935
40880
  if (n.extra != null) {
39936
40881
  return printNumber$1(n.extra.raw);
@@ -40547,7 +41492,7 @@ function printMethod(path, options, print) {
40547
41492
  parts.push("*");
40548
41493
  }
40549
41494
  } else {
40550
- assert.ok(kind === "get" || kind === "set");
41495
+ assert$1.ok(kind === "get" || kind === "set");
40551
41496
  parts.push(kind, " ");
40552
41497
  }
40553
41498
 
@@ -41030,7 +41975,7 @@ function printFlowDeclaration(path, parts) {
41030
41975
  const parentExportDecl = getParentExportDeclaration$1(path);
41031
41976
 
41032
41977
  if (parentExportDecl) {
41033
- assert.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
41978
+ assert$1.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
41034
41979
  } else {
41035
41980
  // If the parent node has type DeclareExportDeclaration, then it
41036
41981
  // will be responsible for printing the "declare" token. Otherwise
@@ -42865,7 +43810,7 @@ const DELIMITER_MAP = {
42865
43810
  "+++": "toml"
42866
43811
  };
42867
43812
 
42868
- function parse$4(text) {
43813
+ function parse$5(text) {
42869
43814
  const delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp$2).join("|");
42870
43815
  const match = text.match( // trailing spaces after delimiters are allowed
42871
43816
  new RegExp(`^(${delimiterRegex})[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)`));
@@ -42888,7 +43833,7 @@ function parse$4(text) {
42888
43833
  };
42889
43834
  }
42890
43835
 
42891
- var frontMatter = parse$4;
43836
+ var frontMatter = parse$5;
42892
43837
 
42893
43838
  function hasPragma$1(text) {
42894
43839
  return pragma.hasPragma(frontMatter(text).content);
@@ -46970,7 +47915,7 @@ var colgroup = [
46970
47915
  "valign",
46971
47916
  "width"
46972
47917
  ];
46973
- var data = [
47918
+ var data$1 = [
46974
47919
  "value"
46975
47920
  ];
46976
47921
  var del$1 = [
@@ -47463,7 +48408,7 @@ var index$1 = {
47463
48408
  caption: caption,
47464
48409
  col: col,
47465
48410
  colgroup: colgroup,
47466
- data: data,
48411
+ data: data$1,
47467
48412
  del: del$1,
47468
48413
  details: details,
47469
48414
  dfn: dfn,
@@ -47546,7 +48491,7 @@ var htmlElementAttributes = /*#__PURE__*/Object.freeze({
47546
48491
  caption: caption,
47547
48492
  col: col,
47548
48493
  colgroup: colgroup,
47549
- data: data,
48494
+ data: data$1,
47550
48495
  del: del$1,
47551
48496
  details: details,
47552
48497
  dfn: dfn,
@@ -48606,7 +49551,7 @@ function deepUnique(array) {
48606
49551
  });
48607
49552
  }
48608
49553
 
48609
- var parse$5 = string => {
49554
+ var parse$6 = string => {
48610
49555
  return deepUnique(string.split(',').map(part => {
48611
49556
  const result = {};
48612
49557
  part.trim().split(/\s+/).forEach((element, index) => {
@@ -48659,7 +49604,7 @@ var stringify$2 = array => {
48659
49604
  };
48660
49605
 
48661
49606
  var srcset = {
48662
- parse: parse$5,
49607
+ parse: parse$6,
48663
49608
  stringify: stringify$2
48664
49609
  };
48665
49610
 
@@ -49234,7 +50179,7 @@ function printOpeningTagStartMarker(node) {
49234
50179
  }
49235
50180
 
49236
50181
  function printOpeningTagEndMarker(node) {
49237
- assert(!node.isSelfClosing);
50182
+ assert$1(!node.isSelfClosing);
49238
50183
 
49239
50184
  switch (node.type) {
49240
50185
  case "ieConditionalComment":
@@ -49253,7 +50198,7 @@ function printOpeningTagEndMarker(node) {
49253
50198
  }
49254
50199
 
49255
50200
  function printClosingTagStartMarker(node, options) {
49256
- assert(!node.isSelfClosing);
50201
+ assert$1(!node.isSelfClosing);
49257
50202
 
49258
50203
  if (shouldNotPrintClosingTag$1(node, options)) {
49259
50204
  return "";
@@ -50601,7 +51546,7 @@ function load(plugins, pluginSearchDirs) {
50601
51546
 
50602
51547
  try {
50603
51548
  // try local files
50604
- requirePath = resolve_1(path$1.resolve(process.cwd(), pluginName));
51549
+ requirePath = resolve_1(path$2.resolve(process.cwd(), pluginName));
50605
51550
  } catch (_) {
50606
51551
  // try node modules
50607
51552
  requirePath = resolve_1(pluginName, {
@@ -50615,8 +51560,8 @@ function load(plugins, pluginSearchDirs) {
50615
51560
  };
50616
51561
  });
50617
51562
  const externalAutoLoadPluginInfos = pluginSearchDirs.map(pluginSearchDir => {
50618
- const resolvedPluginSearchDir = path$1.resolve(process.cwd(), pluginSearchDir);
50619
- const nodeModulesDir = path$1.resolve(resolvedPluginSearchDir, "node_modules"); // In some fringe cases (ex: files "mounted" as virtual directories), the
51563
+ const resolvedPluginSearchDir = path$2.resolve(process.cwd(), pluginSearchDir);
51564
+ const nodeModulesDir = path$2.resolve(resolvedPluginSearchDir, "node_modules"); // In some fringe cases (ex: files "mounted" as virtual directories), the
50620
51565
  // isDirectory(resolvedPluginSearchDir) check might be false even though
50621
51566
  // the node_modules actually exists.
50622
51567
 
@@ -50642,12 +51587,12 @@ function findPluginsInNodeModules(nodeModulesDir) {
50642
51587
  cwd: nodeModulesDir,
50643
51588
  expandDirectories: false
50644
51589
  });
50645
- return pluginPackageJsonPaths.map(path$1.dirname);
51590
+ return pluginPackageJsonPaths.map(path$2.dirname);
50646
51591
  }
50647
51592
 
50648
51593
  function isDirectory$1(dir) {
50649
51594
  try {
50650
- return fs$2.statSync(dir).isDirectory();
51595
+ return fs$3.statSync(dir).isDirectory();
50651
51596
  } catch (e) {
50652
51597
  return false;
50653
51598
  }