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/bin-prettier.js CHANGED
@@ -3,15 +3,15 @@
3
3
 
4
4
  function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }
5
5
 
6
- var fs$2 = _interopDefault(require('fs'));
7
- var path$1 = _interopDefault(require('path'));
8
- var os = _interopDefault(require('os'));
9
- var tty = _interopDefault(require('tty'));
10
- var assert = _interopDefault(require('assert'));
11
- var util$3 = _interopDefault(require('util'));
12
- var stream$5 = _interopDefault(require('stream'));
13
- var events = _interopDefault(require('events'));
14
- var readline = _interopDefault(require('readline'));
6
+ var fs$3 = _interopDefault(require('fs'));
7
+ var path$2 = _interopDefault(require('path'));
8
+ var os$1 = _interopDefault(require('os'));
9
+ var tty$1 = _interopDefault(require('tty'));
10
+ var assert$1 = _interopDefault(require('assert'));
11
+ var util$4 = _interopDefault(require('util'));
12
+ var stream$6 = _interopDefault(require('stream'));
13
+ var events$1 = _interopDefault(require('events'));
14
+ var readline$1 = _interopDefault(require('readline'));
15
15
 
16
16
  var semverCompare = function cmp(a, b) {
17
17
  var pa = a.split('.');
@@ -50,7 +50,7 @@ var pleaseUpgradeNode = function pleaseUpgradeNode(pkg, opts) {
50
50
  };
51
51
 
52
52
  var name = "prettier";
53
- var version = "2.0.4";
53
+ var version = "2.0.5";
54
54
  var description = "Prettier is an opinionated code formatter";
55
55
  var bin = "./bin/prettier.js";
56
56
  var repository = "prettier/prettier";
@@ -112,6 +112,7 @@ var dependencies = {
112
112
  "regexp-util": "1.2.2",
113
113
  "remark-math": "1.0.6",
114
114
  "remark-parse": "5.0.0",
115
+ resolve: "1.16.1",
115
116
  semver: "7.1.3",
116
117
  srcset: "2.0.1",
117
118
  "string-width": "4.2.0",
@@ -147,7 +148,7 @@ var devDependencies = {
147
148
  "jest-snapshot-serializer-ansi": "1.0.0",
148
149
  "jest-snapshot-serializer-raw": "1.1.0",
149
150
  "jest-watch-typeahead": "0.5.0",
150
- prettier: "2.0.3",
151
+ prettier: "2.0.4",
151
152
  rimraf: "3.0.2",
152
153
  rollup: "2.3.2",
153
154
  "rollup-plugin-babel": "4.4.0",
@@ -165,7 +166,8 @@ var scripts = {
165
166
  prepublishOnly: "echo \"Error: must publish from dist/\" && exit 1",
166
167
  "prepare-release": "yarn && yarn build && yarn test:dist",
167
168
  test: "jest",
168
- "test:dist": "node ./scripts/test-dist.js",
169
+ "test:dist": "cross-env NODE_ENV=production jest",
170
+ "test:dist-standalone": "cross-env NODE_ENV=production TEST_STANDALONE=1 jest tests/",
169
171
  "test:integration": "jest tests_integration",
170
172
  "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",
171
173
  "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",
@@ -1782,7 +1784,7 @@ class LineByLine {
1782
1784
  if (typeof file === 'number') {
1783
1785
  this.fd = file;
1784
1786
  } else {
1785
- this.fd = fs$2.openSync(file, 'r');
1787
+ this.fd = fs$3.openSync(file, 'r');
1786
1788
  }
1787
1789
 
1788
1790
  this.options = options;
@@ -1812,7 +1814,7 @@ class LineByLine {
1812
1814
  }
1813
1815
 
1814
1816
  close() {
1815
- fs$2.closeSync(this.fd);
1817
+ fs$3.closeSync(this.fd);
1816
1818
  this.fd = null;
1817
1819
  }
1818
1820
 
@@ -1850,7 +1852,7 @@ class LineByLine {
1850
1852
 
1851
1853
  do {
1852
1854
  const readBuffer = new Buffer(this.options.readChunk);
1853
- bytesRead = fs$2.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition);
1855
+ bytesRead = fs$3.readSync(this.fd, readBuffer, 0, this.options.readChunk, this.fdPosition);
1854
1856
  totalBytesRead = totalBytesRead + bytesRead;
1855
1857
  this.fdPosition = this.fdPosition + bytesRead;
1856
1858
  buffers.push(readBuffer);
@@ -4827,7 +4829,7 @@ function supportsColor(stream) {
4827
4829
  // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
4828
4830
  // release that supports 256 colors. Windows 10 build 14931 is the first release
4829
4831
  // that supports 16m/TrueColor.
4830
- const osRelease = os.release().split('.');
4832
+ const osRelease = os$1.release().split('.');
4831
4833
 
4832
4834
  if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
4833
4835
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
@@ -7754,7 +7756,7 @@ function supportsColor$1(haveStream, streamIsTTY) {
7754
7756
  if (process.platform === 'win32') {
7755
7757
  // Windows 10 build 10586 is the first Windows release that supports 256 colors.
7756
7758
  // Windows 10 build 14931 is the first release that supports 16m/TrueColor.
7757
- const osRelease = os.release().split('.');
7759
+ const osRelease = os$1.release().split('.');
7758
7760
 
7759
7761
  if (Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
7760
7762
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
@@ -7818,8 +7820,8 @@ function getSupportLevel$1(stream) {
7818
7820
 
7819
7821
  var supportsColor_1$1 = {
7820
7822
  supportsColor: getSupportLevel$1,
7821
- stdout: translateLevel$1(supportsColor$1(true, tty.isatty(1))),
7822
- stderr: translateLevel$1(supportsColor$1(true, tty.isatty(2)))
7823
+ stdout: translateLevel$1(supportsColor$1(true, tty$1.isatty(1))),
7824
+ stderr: translateLevel$1(supportsColor$1(true, tty$1.isatty(2)))
7823
7825
  };
7824
7826
 
7825
7827
  const stringReplaceAll = (string, substring, replacer) => {
@@ -10527,7 +10529,7 @@ function supportsColor$2(stream) {
10527
10529
  // release, and Node.js 7 is not. Windows 10 build 10586 is the first Windows
10528
10530
  // release that supports 256 colors. Windows 10 build 14931 is the first release
10529
10531
  // that supports 16m/TrueColor.
10530
- const osRelease = os.release().split('.');
10532
+ const osRelease = os$1.release().split('.');
10531
10533
 
10532
10534
  if (Number(process.versions.node.split('.')[0]) >= 8 && Number(osRelease[0]) >= 10 && Number(osRelease[2]) >= 10586) {
10533
10535
  return Number(osRelease[2]) >= 14931 ? 3 : 2;
@@ -11371,7 +11373,7 @@ function resolveParser(opts, parsers) {
11371
11373
  {
11372
11374
  try {
11373
11375
  return {
11374
- parse: require(path$1.resolve(process.cwd(), opts.parser)),
11376
+ parse: require(path$2.resolve(process.cwd(), opts.parser)),
11375
11377
  astFormat: "estree",
11376
11378
  locStart: locStart$1,
11377
11379
  locEnd: locEnd$1
@@ -11527,7 +11529,7 @@ function getInterpreter(filepath) {
11527
11529
  let fd;
11528
11530
 
11529
11531
  try {
11530
- fd = fs$2.openSync(filepath, "r");
11532
+ fd = fs$3.openSync(filepath, "r");
11531
11533
  } catch (err) {
11532
11534
  // istanbul ignore next
11533
11535
  return "";
@@ -11559,14 +11561,14 @@ function getInterpreter(filepath) {
11559
11561
  try {
11560
11562
  // There are some weird cases where paths are missing, causing Jest
11561
11563
  // failures. It's unclear what these correspond to in the real world.
11562
- fs$2.closeSync(fd);
11564
+ fs$3.closeSync(fd);
11563
11565
  } catch (err) {// nop
11564
11566
  }
11565
11567
  }
11566
11568
  }
11567
11569
 
11568
11570
  function inferParser(filepath, plugins) {
11569
- const filename = path$1.basename(filepath).toLowerCase();
11571
+ const filename = path$2.basename(filepath).toLowerCase();
11570
11572
  const languages = getSupportInfo$1({
11571
11573
  plugins
11572
11574
  }).languages.filter(language => language.since !== null); // If the file has no extension, we can try to infer the language from the
@@ -14072,8 +14074,8 @@ function breakTies(tiesToBreak, text, options) {
14072
14074
 
14073
14075
  for (indexOfFirstLeadingComment = tieCount; indexOfFirstLeadingComment > 0; --indexOfFirstLeadingComment) {
14074
14076
  const comment = tiesToBreak[indexOfFirstLeadingComment - 1];
14075
- assert.strictEqual(comment.precedingNode, precedingNode);
14076
- assert.strictEqual(comment.followingNode, followingNode);
14077
+ assert$1.strictEqual(comment.precedingNode, precedingNode);
14078
+ assert$1.strictEqual(comment.followingNode, followingNode);
14077
14079
  const gap = text.slice(options.locEnd(comment), gapEndPos);
14078
14080
 
14079
14081
  if (gapRegExp.test(gap)) {
@@ -14581,7 +14583,7 @@ function printAstToDoc(ast, options, alignmentSize = 0) {
14581
14583
  }
14582
14584
 
14583
14585
  function callPluginPrintFunction(path, options, printPath, args) {
14584
- assert.ok(path instanceof fastPath);
14586
+ assert$1.ok(path instanceof fastPath);
14585
14587
  const node = path.getValue();
14586
14588
  const {
14587
14589
  printer
@@ -15442,7 +15444,7 @@ var ignore = options => new IgnoreBase(options);
15442
15444
 
15443
15445
  function getFileContentOrNull(filename) {
15444
15446
  return new Promise((resolve, reject) => {
15445
- fs$2.readFile(filename, "utf8", (error, data) => {
15447
+ fs$3.readFile(filename, "utf8", (error, data) => {
15446
15448
  if (error && error.code !== "ENOENT") {
15447
15449
  reject(createError(filename, error));
15448
15450
  } else {
@@ -15459,7 +15461,7 @@ function getFileContentOrNull(filename) {
15459
15461
 
15460
15462
  getFileContentOrNull.sync = function (filename) {
15461
15463
  try {
15462
- return fs$2.readFileSync(filename, "utf8");
15464
+ return fs$3.readFileSync(filename, "utf8");
15463
15465
  } catch (error) {
15464
15466
  if (error && error.code === "ENOENT") {
15465
15467
  return null;
@@ -15482,7 +15484,7 @@ var getFileContentOrNull_1 = getFileContentOrNull;
15482
15484
 
15483
15485
 
15484
15486
  async function createIgnorer(ignorePath, withNodeModules) {
15485
- const ignoreContent = ignorePath ? await getFileContentOrNull_1(path$1.resolve(ignorePath)) : null;
15487
+ const ignoreContent = ignorePath ? await getFileContentOrNull_1(path$2.resolve(ignorePath)) : null;
15486
15488
  return _createIgnorer(ignoreContent, withNodeModules);
15487
15489
  }
15488
15490
  /**
@@ -15492,7 +15494,7 @@ async function createIgnorer(ignorePath, withNodeModules) {
15492
15494
 
15493
15495
 
15494
15496
  createIgnorer.sync = function (ignorePath, withNodeModules) {
15495
- const ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path$1.resolve(ignorePath));
15497
+ const ignoreContent = !ignorePath ? null : getFileContentOrNull_1.sync(path$2.resolve(ignorePath));
15496
15498
  return _createIgnorer(ignoreContent, withNodeModules);
15497
15499
  };
15498
15500
  /**
@@ -15770,7 +15772,7 @@ var path = {
15770
15772
  };
15771
15773
 
15772
15774
  try {
15773
- path = path$1;
15775
+ path = path$2;
15774
15776
  } catch (er) {}
15775
15777
 
15776
15778
  var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
@@ -19196,7 +19198,7 @@ LRUCache.prototype.inspect = function (n, opts) {
19196
19198
  str += ',';
19197
19199
  }
19198
19200
 
19199
- str += '\n max: ' + util$3.inspect(max, opts);
19201
+ str += '\n max: ' + util$4.inspect(max, opts);
19200
19202
  extras = true;
19201
19203
  }
19202
19204
 
@@ -19207,7 +19209,7 @@ LRUCache.prototype.inspect = function (n, opts) {
19207
19209
  str += ',';
19208
19210
  }
19209
19211
 
19210
- str += '\n maxAge: ' + util$3.inspect(maxAge, opts);
19212
+ str += '\n maxAge: ' + util$4.inspect(maxAge, opts);
19211
19213
  extras = true;
19212
19214
  }
19213
19215
 
@@ -19218,7 +19220,7 @@ LRUCache.prototype.inspect = function (n, opts) {
19218
19220
  str += ',';
19219
19221
  }
19220
19222
 
19221
- str += '\n length: ' + util$3.inspect(this[LENGTH], opts);
19223
+ str += '\n length: ' + util$4.inspect(this[LENGTH], opts);
19222
19224
  extras = true;
19223
19225
  }
19224
19226
 
@@ -19235,7 +19237,7 @@ LRUCache.prototype.inspect = function (n, opts) {
19235
19237
  str += '\n ';
19236
19238
  }
19237
19239
 
19238
- var key = util$3.inspect(item.key).split('\n').join('\n ');
19240
+ var key = util$4.inspect(item.key).split('\n').join('\n ');
19239
19241
  var val = {
19240
19242
  value: item.value
19241
19243
  };
@@ -19252,7 +19254,7 @@ LRUCache.prototype.inspect = function (n, opts) {
19252
19254
  val.stale = true;
19253
19255
  }
19254
19256
 
19255
- val = util$3.inspect(val, opts).split('\n').join('\n ');
19257
+ val = util$4.inspect(val, opts).split('\n').join('\n ');
19256
19258
  str += key + ' => ' + val;
19257
19259
  });
19258
19260
 
@@ -20311,7 +20313,7 @@ var fnmatch = createCommonjsModule(function (module, exports) {
20311
20313
  }
20312
20314
 
20313
20315
  if (options.matchBase && pattern.length === 1) {
20314
- file = path$1.basename(file.join("/")).split("/");
20316
+ file = path$2.basename(file.join("/")).split("/");
20315
20317
  }
20316
20318
 
20317
20319
  if (options.debug) {
@@ -20636,7 +20638,7 @@ var ini = createCommonjsModule(function (module, exports) {
20636
20638
  value: true
20637
20639
  });
20638
20640
 
20639
- var fs = __importStar(fs$2);
20641
+ var fs = __importStar(fs$3);
20640
20642
  /**
20641
20643
  * define the possible values:
20642
20644
  * section: [section]
@@ -20966,9 +20968,9 @@ var src = createCommonjsModule(function (module, exports) {
20966
20968
  value: true
20967
20969
  });
20968
20970
 
20969
- var fs = __importStar(fs$2);
20971
+ var fs = __importStar(fs$3);
20970
20972
 
20971
- var path = __importStar(path$1);
20973
+ var path = __importStar(path$2);
20972
20974
 
20973
20975
  var semver = __importStar(semver$2);
20974
20976
 
@@ -21335,14 +21337,14 @@ function markerExists(files, markers) {
21335
21337
  }
21336
21338
 
21337
21339
  function traverseFolder(directory, levels, markers) {
21338
- var files = fs$2.readdirSync(directory);
21340
+ var files = fs$3.readdirSync(directory);
21339
21341
 
21340
21342
  if (levels === 0) {
21341
21343
  return null;
21342
21344
  } else if (markerExists(files, markers)) {
21343
21345
  return directory;
21344
21346
  } else {
21345
- return traverseFolder(path$1.resolve(directory, '..'), levels - 1, markers);
21347
+ return traverseFolder(path$2.resolve(directory, '..'), levels - 1, markers);
21346
21348
  }
21347
21349
  }
21348
21350
 
@@ -21368,11 +21370,11 @@ const maybeParse = (filePath, parse) => {
21368
21370
  // it, which is possible, for example, when the path is given via
21369
21371
  // --stdin-filepath. So, first, traverse up until we find an existing
21370
21372
  // directory.
21371
- let dirPath = path$1.dirname(path$1.resolve(filePath));
21372
- const fsRoot = path$1.parse(dirPath).root;
21373
+ let dirPath = path$2.dirname(path$2.resolve(filePath));
21374
+ const fsRoot = path$2.parse(dirPath).root;
21373
21375
 
21374
- while (dirPath !== fsRoot && !fs$2.existsSync(dirPath)) {
21375
- dirPath = path$1.dirname(dirPath);
21376
+ while (dirPath !== fsRoot && !fs$3.existsSync(dirPath)) {
21377
+ dirPath = path$2.dirname(dirPath);
21376
21378
  }
21377
21379
 
21378
21380
  const root = findProjectRoot(dirPath);
@@ -23298,18 +23300,961 @@ var loadToml = function (filePath, content) {
23298
23300
  }
23299
23301
  };
23300
23302
 
23301
- let {
23302
- resolve
23303
- } = eval("require"); // In the VS Code extension `require` is overridden and `require.resolve` doesn't support the 2nd argument.
23303
+ var caller = function () {
23304
+ // see https://code.google.com/p/v8/wiki/JavaScriptStackTraceApi
23305
+ var origPrepareStackTrace = Error.prepareStackTrace;
23304
23306
 
23305
- if (resolve.length === 1) {
23306
- const Module = require("module");
23307
+ Error.prepareStackTrace = function (_, stack) {
23308
+ return stack;
23309
+ };
23310
+
23311
+ var stack = new Error().stack;
23312
+ Error.prepareStackTrace = origPrepareStackTrace;
23313
+ return stack[2].getFileName();
23314
+ };
23315
+
23316
+ var pathParse = createCommonjsModule(function (module) {
23317
+
23318
+ var isWindows = process.platform === 'win32'; // Regex to split a windows path into three parts: [*, device, slash,
23319
+ // tail] windows-only
23320
+
23321
+ var splitDeviceRe = /^([a-zA-Z]:|[\\\/]{2}[^\\\/]+[\\\/]+[^\\\/]+)?([\\\/])?([\s\S]*?)$/; // Regex to split the tail part of the above into [*, dir, basename, ext]
23322
+
23323
+ var splitTailRe = /^([\s\S]*?)((?:\.{1,2}|[^\\\/]+?|)(\.[^.\/\\]*|))(?:[\\\/]*)$/;
23324
+ var win32 = {}; // Function to split a filename into [root, dir, basename, ext]
23325
+
23326
+ function win32SplitPath(filename) {
23327
+ // Separate device+slash from tail
23328
+ var result = splitDeviceRe.exec(filename),
23329
+ device = (result[1] || '') + (result[2] || ''),
23330
+ tail = result[3] || ''; // Split the tail into dir, basename and extension
23331
+
23332
+ var result2 = splitTailRe.exec(tail),
23333
+ dir = result2[1],
23334
+ basename = result2[2],
23335
+ ext = result2[3];
23336
+ return [device, dir, basename, ext];
23337
+ }
23338
+
23339
+ win32.parse = function (pathString) {
23340
+ if (typeof pathString !== 'string') {
23341
+ throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
23342
+ }
23343
+
23344
+ var allParts = win32SplitPath(pathString);
23345
+
23346
+ if (!allParts || allParts.length !== 4) {
23347
+ throw new TypeError("Invalid path '" + pathString + "'");
23348
+ }
23349
+
23350
+ return {
23351
+ root: allParts[0],
23352
+ dir: allParts[0] + allParts[1].slice(0, -1),
23353
+ base: allParts[2],
23354
+ ext: allParts[3],
23355
+ name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
23356
+ };
23357
+ }; // Split a filename into [root, dir, basename, ext], unix version
23358
+ // 'root' is just a slash, or nothing.
23359
+
23360
+
23361
+ var splitPathRe = /^(\/?|)([\s\S]*?)((?:\.{1,2}|[^\/]+?|)(\.[^.\/]*|))(?:[\/]*)$/;
23362
+ var posix = {};
23363
+
23364
+ function posixSplitPath(filename) {
23365
+ return splitPathRe.exec(filename).slice(1);
23366
+ }
23367
+
23368
+ posix.parse = function (pathString) {
23369
+ if (typeof pathString !== 'string') {
23370
+ throw new TypeError("Parameter 'pathString' must be a string, not " + typeof pathString);
23371
+ }
23372
+
23373
+ var allParts = posixSplitPath(pathString);
23374
+
23375
+ if (!allParts || allParts.length !== 4) {
23376
+ throw new TypeError("Invalid path '" + pathString + "'");
23377
+ }
23378
+
23379
+ allParts[1] = allParts[1] || '';
23380
+ allParts[2] = allParts[2] || '';
23381
+ allParts[3] = allParts[3] || '';
23382
+ return {
23383
+ root: allParts[0],
23384
+ dir: allParts[0] + allParts[1].slice(0, -1),
23385
+ base: allParts[2],
23386
+ ext: allParts[3],
23387
+ name: allParts[2].slice(0, allParts[2].length - allParts[3].length)
23388
+ };
23389
+ };
23390
+
23391
+ if (isWindows) module.exports = win32.parse;else
23392
+ /* posix */
23393
+ module.exports = posix.parse;
23394
+ module.exports.posix = posix.parse;
23395
+ module.exports.win32 = win32.parse;
23396
+ });
23397
+ var pathParse_1 = pathParse.posix;
23398
+ var pathParse_2 = pathParse.win32;
23399
+
23400
+ var parse$2 = path$2.parse || pathParse;
23401
+
23402
+ var getNodeModulesDirs = function getNodeModulesDirs(absoluteStart, modules) {
23403
+ var prefix = '/';
23404
+
23405
+ if (/^([A-Za-z]:)/.test(absoluteStart)) {
23406
+ prefix = '';
23407
+ } else if (/^\\\\/.test(absoluteStart)) {
23408
+ prefix = '\\\\';
23409
+ }
23410
+
23411
+ var paths = [absoluteStart];
23412
+ var parsed = parse$2(absoluteStart);
23413
+
23414
+ while (parsed.dir !== paths[paths.length - 1]) {
23415
+ paths.push(parsed.dir);
23416
+ parsed = parse$2(parsed.dir);
23417
+ }
23418
+
23419
+ return paths.reduce(function (dirs, aPath) {
23420
+ return dirs.concat(modules.map(function (moduleDir) {
23421
+ return path$2.resolve(prefix, aPath, moduleDir);
23422
+ }));
23423
+ }, []);
23424
+ };
23425
+
23426
+ var nodeModulesPaths = function nodeModulesPaths(start, opts, request) {
23427
+ var modules = opts && opts.moduleDirectory ? [].concat(opts.moduleDirectory) : ['node_modules'];
23428
+
23429
+ if (opts && typeof opts.paths === 'function') {
23430
+ return opts.paths(request, start, function () {
23431
+ return getNodeModulesDirs(start, modules);
23432
+ }, opts);
23433
+ }
23434
+
23435
+ var dirs = getNodeModulesDirs(start, modules);
23436
+ return opts && opts.paths ? dirs.concat(opts.paths) : dirs;
23437
+ };
23438
+
23439
+ var normalizeOptions$2 = function (x, opts) {
23440
+ /**
23441
+ * This file is purposefully a passthrough. It's expected that third-party
23442
+ * environments will override it at runtime in order to inject special logic
23443
+ * into `resolve` (by manipulating the options). One such example is the PnP
23444
+ * code path in Yarn.
23445
+ */
23446
+ return opts || {};
23447
+ };
23448
+
23449
+ var assert = true;
23450
+ var async_hooks = ">= 8";
23451
+ var buffer_ieee754 = "< 0.9.7";
23452
+ var buffer = true;
23453
+ var child_process = true;
23454
+ var cluster = true;
23455
+ var console$1 = true;
23456
+ var constants$1 = true;
23457
+ var crypto = true;
23458
+ var _debug_agent = ">= 1 && < 8";
23459
+ var _debugger = "< 8";
23460
+ var dgram = true;
23461
+ var dns = true;
23462
+ var domain = true;
23463
+ var events = true;
23464
+ var freelist = "< 6";
23465
+ var fs = true;
23466
+ var _http_agent = ">= 0.11.1";
23467
+ var _http_client = ">= 0.11.1";
23468
+ var _http_common = ">= 0.11.1";
23469
+ var _http_incoming = ">= 0.11.1";
23470
+ var _http_outgoing = ">= 0.11.1";
23471
+ var _http_server = ">= 0.11.1";
23472
+ var http = true;
23473
+ var http2 = ">= 8.8";
23474
+ var https = true;
23475
+ var inspector = ">= 8.0.0";
23476
+ var _linklist = "< 8";
23477
+ var module$1 = true;
23478
+ var net = true;
23479
+ var os = true;
23480
+ var path$1 = true;
23481
+ var perf_hooks = ">= 8.5";
23482
+ var process$1 = ">= 1";
23483
+ var punycode = true;
23484
+ var querystring = true;
23485
+ var readline = true;
23486
+ var repl = true;
23487
+ var smalloc = ">= 0.11.5 && < 3";
23488
+ var _stream_duplex = ">= 0.9.4";
23489
+ var _stream_transform = ">= 0.9.4";
23490
+ var _stream_wrap = ">= 1.4.1";
23491
+ var _stream_passthrough = ">= 0.9.4";
23492
+ var _stream_readable = ">= 0.9.4";
23493
+ var _stream_writable = ">= 0.9.4";
23494
+ var stream = true;
23495
+ var string_decoder = true;
23496
+ var sys = true;
23497
+ var timers = true;
23498
+ var _tls_common = ">= 0.11.13";
23499
+ var _tls_legacy = ">= 0.11.3 && < 10";
23500
+ var _tls_wrap = ">= 0.11.3";
23501
+ var tls = true;
23502
+ var trace_events = ">= 10";
23503
+ var tty = true;
23504
+ var url = true;
23505
+ var util$2 = true;
23506
+ var v8 = ">= 1";
23507
+ var vm = true;
23508
+ var wasi = ">= 13.4 && < 13.5";
23509
+ var worker_threads = ">= 11.7";
23510
+ var zlib = true;
23511
+ var core$1 = {
23512
+ assert: assert,
23513
+ async_hooks: async_hooks,
23514
+ buffer_ieee754: buffer_ieee754,
23515
+ buffer: buffer,
23516
+ child_process: child_process,
23517
+ cluster: cluster,
23518
+ console: console$1,
23519
+ constants: constants$1,
23520
+ crypto: crypto,
23521
+ _debug_agent: _debug_agent,
23522
+ _debugger: _debugger,
23523
+ dgram: dgram,
23524
+ dns: dns,
23525
+ domain: domain,
23526
+ events: events,
23527
+ freelist: freelist,
23528
+ fs: fs,
23529
+ "fs/promises": [
23530
+ ">= 10 && < 10.1",
23531
+ ">= 14"
23532
+ ],
23533
+ _http_agent: _http_agent,
23534
+ _http_client: _http_client,
23535
+ _http_common: _http_common,
23536
+ _http_incoming: _http_incoming,
23537
+ _http_outgoing: _http_outgoing,
23538
+ _http_server: _http_server,
23539
+ http: http,
23540
+ http2: http2,
23541
+ https: https,
23542
+ inspector: inspector,
23543
+ _linklist: _linklist,
23544
+ module: module$1,
23545
+ net: net,
23546
+ "node-inspect/lib/_inspect": ">= 7.6.0 && < 12",
23547
+ "node-inspect/lib/internal/inspect_client": ">= 7.6.0 && < 12",
23548
+ "node-inspect/lib/internal/inspect_repl": ">= 7.6.0 && < 12",
23549
+ os: os,
23550
+ path: path$1,
23551
+ perf_hooks: perf_hooks,
23552
+ process: process$1,
23553
+ punycode: punycode,
23554
+ querystring: querystring,
23555
+ readline: readline,
23556
+ repl: repl,
23557
+ smalloc: smalloc,
23558
+ _stream_duplex: _stream_duplex,
23559
+ _stream_transform: _stream_transform,
23560
+ _stream_wrap: _stream_wrap,
23561
+ _stream_passthrough: _stream_passthrough,
23562
+ _stream_readable: _stream_readable,
23563
+ _stream_writable: _stream_writable,
23564
+ stream: stream,
23565
+ string_decoder: string_decoder,
23566
+ sys: sys,
23567
+ timers: timers,
23568
+ _tls_common: _tls_common,
23569
+ _tls_legacy: _tls_legacy,
23570
+ _tls_wrap: _tls_wrap,
23571
+ tls: tls,
23572
+ trace_events: trace_events,
23573
+ tty: tty,
23574
+ url: url,
23575
+ util: util$2,
23576
+ "v8/tools/arguments": ">= 10 && < 12",
23577
+ "v8/tools/codemap": [
23578
+ ">= 4.4.0 && < 5",
23579
+ ">= 5.2.0 && < 12"
23580
+ ],
23581
+ "v8/tools/consarray": [
23582
+ ">= 4.4.0 && < 5",
23583
+ ">= 5.2.0 && < 12"
23584
+ ],
23585
+ "v8/tools/csvparser": [
23586
+ ">= 4.4.0 && < 5",
23587
+ ">= 5.2.0 && < 12"
23588
+ ],
23589
+ "v8/tools/logreader": [
23590
+ ">= 4.4.0 && < 5",
23591
+ ">= 5.2.0 && < 12"
23592
+ ],
23593
+ "v8/tools/profile_view": [
23594
+ ">= 4.4.0 && < 5",
23595
+ ">= 5.2.0 && < 12"
23596
+ ],
23597
+ "v8/tools/splaytree": [
23598
+ ">= 4.4.0 && < 5",
23599
+ ">= 5.2.0 && < 12"
23600
+ ],
23601
+ v8: v8,
23602
+ vm: vm,
23603
+ wasi: wasi,
23604
+ worker_threads: worker_threads,
23605
+ zlib: zlib
23606
+ };
23607
+
23608
+ var core$2 = /*#__PURE__*/Object.freeze({
23609
+ __proto__: null,
23610
+ assert: assert,
23611
+ async_hooks: async_hooks,
23612
+ buffer_ieee754: buffer_ieee754,
23613
+ buffer: buffer,
23614
+ child_process: child_process,
23615
+ cluster: cluster,
23616
+ console: console$1,
23617
+ constants: constants$1,
23618
+ crypto: crypto,
23619
+ _debug_agent: _debug_agent,
23620
+ _debugger: _debugger,
23621
+ dgram: dgram,
23622
+ dns: dns,
23623
+ domain: domain,
23624
+ events: events,
23625
+ freelist: freelist,
23626
+ fs: fs,
23627
+ _http_agent: _http_agent,
23628
+ _http_client: _http_client,
23629
+ _http_common: _http_common,
23630
+ _http_incoming: _http_incoming,
23631
+ _http_outgoing: _http_outgoing,
23632
+ _http_server: _http_server,
23633
+ http: http,
23634
+ http2: http2,
23635
+ https: https,
23636
+ inspector: inspector,
23637
+ _linklist: _linklist,
23638
+ module: module$1,
23639
+ net: net,
23640
+ os: os,
23641
+ path: path$1,
23642
+ perf_hooks: perf_hooks,
23643
+ process: process$1,
23644
+ punycode: punycode,
23645
+ querystring: querystring,
23646
+ readline: readline,
23647
+ repl: repl,
23648
+ smalloc: smalloc,
23649
+ _stream_duplex: _stream_duplex,
23650
+ _stream_transform: _stream_transform,
23651
+ _stream_wrap: _stream_wrap,
23652
+ _stream_passthrough: _stream_passthrough,
23653
+ _stream_readable: _stream_readable,
23654
+ _stream_writable: _stream_writable,
23655
+ stream: stream,
23656
+ string_decoder: string_decoder,
23657
+ sys: sys,
23658
+ timers: timers,
23659
+ _tls_common: _tls_common,
23660
+ _tls_legacy: _tls_legacy,
23661
+ _tls_wrap: _tls_wrap,
23662
+ tls: tls,
23663
+ trace_events: trace_events,
23664
+ tty: tty,
23665
+ url: url,
23666
+ util: util$2,
23667
+ v8: v8,
23668
+ vm: vm,
23669
+ wasi: wasi,
23670
+ worker_threads: worker_threads,
23671
+ zlib: zlib,
23672
+ 'default': core$1
23673
+ });
23674
+
23675
+ var data = getCjsExportFromNamespace(core$2);
23676
+
23677
+ var current = process.versions && process.versions.node && process.versions.node.split('.') || [];
23678
+
23679
+ function specifierIncluded(specifier) {
23680
+ var parts = specifier.split(' ');
23681
+ var op = parts.length > 1 ? parts[0] : '=';
23682
+ var versionParts = (parts.length > 1 ? parts[1] : parts[0]).split('.');
23683
+
23684
+ for (var i = 0; i < 3; ++i) {
23685
+ var cur = Number(current[i] || 0);
23686
+ var ver = Number(versionParts[i] || 0);
23687
+
23688
+ if (cur === ver) {
23689
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
23690
+ }
23691
+
23692
+ if (op === '<') {
23693
+ return cur < ver;
23694
+ } else if (op === '>=') {
23695
+ return cur >= ver;
23696
+ } else {
23697
+ return false;
23698
+ }
23699
+ }
23700
+
23701
+ return op === '>=';
23702
+ }
23703
+
23704
+ function matchesRange(range) {
23705
+ var specifiers = range.split(/ ?&& ?/);
23706
+
23707
+ if (specifiers.length === 0) {
23708
+ return false;
23709
+ }
23710
+
23711
+ for (var i = 0; i < specifiers.length; ++i) {
23712
+ if (!specifierIncluded(specifiers[i])) {
23713
+ return false;
23714
+ }
23715
+ }
23716
+
23717
+ return true;
23718
+ }
23719
+
23720
+ function versionIncluded(specifierValue) {
23721
+ if (typeof specifierValue === 'boolean') {
23722
+ return specifierValue;
23723
+ }
23724
+
23725
+ if (specifierValue && typeof specifierValue === 'object') {
23726
+ for (var i = 0; i < specifierValue.length; ++i) {
23727
+ if (matchesRange(specifierValue[i])) {
23728
+ return true;
23729
+ }
23730
+ }
23731
+
23732
+ return false;
23733
+ }
23734
+
23735
+ return matchesRange(specifierValue);
23736
+ }
23737
+
23738
+ var core$3 = {};
23739
+
23740
+ for (var mod in data) {
23741
+ // eslint-disable-line no-restricted-syntax
23742
+ if (Object.prototype.hasOwnProperty.call(data, mod)) {
23743
+ core$3[mod] = versionIncluded(data[mod]);
23744
+ }
23745
+ }
23746
+
23747
+ var core_1 = core$3;
23748
+
23749
+ var isCore = function isCore(x) {
23750
+ return Object.prototype.hasOwnProperty.call(core_1, x);
23751
+ };
23752
+
23753
+ var realpath = fs$3.realpath && typeof fs$3.realpath.native === 'function' ? fs$3.realpath.native : fs$3.realpath;
23754
+
23755
+ var defaultIsFile = function isFile(file, cb) {
23756
+ fs$3.stat(file, function (err, stat) {
23757
+ if (!err) {
23758
+ return cb(null, stat.isFile() || stat.isFIFO());
23759
+ }
23760
+
23761
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
23762
+ return cb(err);
23763
+ });
23764
+ };
23765
+
23766
+ var defaultIsDir = function isDirectory(dir, cb) {
23767
+ fs$3.stat(dir, function (err, stat) {
23768
+ if (!err) {
23769
+ return cb(null, stat.isDirectory());
23770
+ }
23771
+
23772
+ if (err.code === 'ENOENT' || err.code === 'ENOTDIR') return cb(null, false);
23773
+ return cb(err);
23774
+ });
23775
+ };
23776
+
23777
+ var maybeUnwrapSymlink = function maybeUnwrapSymlink(x, opts, cb) {
23778
+ if (opts && opts.preserveSymlinks === false) {
23779
+ realpath(x, function (realPathErr, realPath) {
23780
+ if (realPathErr && realPathErr.code !== 'ENOENT') cb(realPathErr);else cb(null, realPathErr ? x : realPath);
23781
+ });
23782
+ } else {
23783
+ cb(null, x);
23784
+ }
23785
+ };
23786
+
23787
+ var getPackageCandidates = function getPackageCandidates(x, start, opts) {
23788
+ var dirs = nodeModulesPaths(start, opts, x);
23789
+
23790
+ for (var i = 0; i < dirs.length; i++) {
23791
+ dirs[i] = path$2.join(dirs[i], x);
23792
+ }
23793
+
23794
+ return dirs;
23795
+ };
23796
+
23797
+ var async = function resolve(x, options, callback) {
23798
+ var cb = callback;
23799
+ var opts = options;
23800
+
23801
+ if (typeof options === 'function') {
23802
+ cb = opts;
23803
+ opts = {};
23804
+ }
23805
+
23806
+ if (typeof x !== 'string') {
23807
+ var err = new TypeError('Path must be a string.');
23808
+ return process.nextTick(function () {
23809
+ cb(err);
23810
+ });
23811
+ }
23812
+
23813
+ opts = normalizeOptions$2(x, opts);
23814
+ var isFile = opts.isFile || defaultIsFile;
23815
+ var isDirectory = opts.isDirectory || defaultIsDir;
23816
+ var readFile = opts.readFile || fs$3.readFile;
23817
+ var packageIterator = opts.packageIterator;
23818
+ var extensions = opts.extensions || ['.js'];
23819
+ var basedir = opts.basedir || path$2.dirname(caller());
23820
+ var parent = opts.filename || basedir;
23821
+ opts.paths = opts.paths || []; // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
23822
+
23823
+ var absoluteStart = path$2.resolve(basedir);
23824
+ maybeUnwrapSymlink(absoluteStart, opts, function (err, realStart) {
23825
+ if (err) cb(err);else init(realStart);
23826
+ });
23827
+ var res;
23828
+
23829
+ function init(basedir) {
23830
+ if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
23831
+ res = path$2.resolve(basedir, x);
23832
+ if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
23833
+
23834
+ if (/\/$/.test(x) && res === basedir) {
23835
+ loadAsDirectory(res, opts.package, onfile);
23836
+ } else loadAsFile(res, opts.package, onfile);
23837
+ } else if (isCore(x)) {
23838
+ return cb(null, x);
23839
+ } else loadNodeModules(x, basedir, function (err, n, pkg) {
23840
+ if (err) cb(err);else if (n) {
23841
+ return maybeUnwrapSymlink(n, opts, function (err, realN) {
23842
+ if (err) {
23843
+ cb(err);
23844
+ } else {
23845
+ cb(null, realN, pkg);
23846
+ }
23847
+ });
23848
+ } else {
23849
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
23850
+ moduleError.code = 'MODULE_NOT_FOUND';
23851
+ cb(moduleError);
23852
+ }
23853
+ });
23854
+ }
23855
+
23856
+ function onfile(err, m, pkg) {
23857
+ if (err) cb(err);else if (m) cb(null, m, pkg);else loadAsDirectory(res, function (err, d, pkg) {
23858
+ if (err) cb(err);else if (d) {
23859
+ maybeUnwrapSymlink(d, opts, function (err, realD) {
23860
+ if (err) {
23861
+ cb(err);
23862
+ } else {
23863
+ cb(null, realD, pkg);
23864
+ }
23865
+ });
23866
+ } else {
23867
+ var moduleError = new Error("Cannot find module '" + x + "' from '" + parent + "'");
23868
+ moduleError.code = 'MODULE_NOT_FOUND';
23869
+ cb(moduleError);
23870
+ }
23871
+ });
23872
+ }
23873
+
23874
+ function loadAsFile(x, thePackage, callback) {
23875
+ var loadAsFilePackage = thePackage;
23876
+ var cb = callback;
23877
+
23878
+ if (typeof loadAsFilePackage === 'function') {
23879
+ cb = loadAsFilePackage;
23880
+ loadAsFilePackage = undefined;
23881
+ }
23882
+
23883
+ var exts = [''].concat(extensions);
23884
+ load(exts, x, loadAsFilePackage);
23885
+
23886
+ function load(exts, x, loadPackage) {
23887
+ if (exts.length === 0) return cb(null, undefined, loadPackage);
23888
+ var file = x + exts[0];
23889
+ var pkg = loadPackage;
23890
+ if (pkg) onpkg(null, pkg);else loadpkg(path$2.dirname(file), onpkg);
23891
+
23892
+ function onpkg(err, pkg_, dir) {
23893
+ pkg = pkg_;
23894
+ if (err) return cb(err);
23895
+
23896
+ if (dir && pkg && opts.pathFilter) {
23897
+ var rfile = path$2.relative(dir, file);
23898
+ var rel = rfile.slice(0, rfile.length - exts[0].length);
23899
+ var r = opts.pathFilter(pkg, x, rel);
23900
+ if (r) return load([''].concat(extensions.slice()), path$2.resolve(dir, r), pkg);
23901
+ }
23902
+
23903
+ isFile(file, onex);
23904
+ }
23905
+
23906
+ function onex(err, ex) {
23907
+ if (err) return cb(err);
23908
+ if (ex) return cb(null, file, pkg);
23909
+ load(exts.slice(1), x, pkg);
23910
+ }
23911
+ }
23912
+ }
23913
+
23914
+ function loadpkg(dir, cb) {
23915
+ if (dir === '' || dir === '/') return cb(null);
23916
+
23917
+ if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
23918
+ return cb(null);
23919
+ }
23920
+
23921
+ if (/[/\\]node_modules[/\\]*$/.test(dir)) return cb(null);
23922
+ maybeUnwrapSymlink(dir, opts, function (unwrapErr, pkgdir) {
23923
+ if (unwrapErr) return loadpkg(path$2.dirname(dir), cb);
23924
+ var pkgfile = path$2.join(pkgdir, 'package.json');
23925
+ isFile(pkgfile, function (err, ex) {
23926
+ // on err, ex is false
23927
+ if (!ex) return loadpkg(path$2.dirname(dir), cb);
23928
+ readFile(pkgfile, function (err, body) {
23929
+ if (err) cb(err);
23930
+
23931
+ try {
23932
+ var pkg = JSON.parse(body);
23933
+ } catch (jsonErr) {}
23934
+
23935
+ if (pkg && opts.packageFilter) {
23936
+ pkg = opts.packageFilter(pkg, pkgfile);
23937
+ }
23938
+
23939
+ cb(null, pkg, dir);
23940
+ });
23941
+ });
23942
+ });
23943
+ }
23944
+
23945
+ function loadAsDirectory(x, loadAsDirectoryPackage, callback) {
23946
+ var cb = callback;
23947
+ var fpkg = loadAsDirectoryPackage;
23948
+
23949
+ if (typeof fpkg === 'function') {
23950
+ cb = fpkg;
23951
+ fpkg = opts.package;
23952
+ }
23953
+
23954
+ maybeUnwrapSymlink(x, opts, function (unwrapErr, pkgdir) {
23955
+ if (unwrapErr) return cb(unwrapErr);
23956
+ var pkgfile = path$2.join(pkgdir, 'package.json');
23957
+ isFile(pkgfile, function (err, ex) {
23958
+ if (err) return cb(err);
23959
+ if (!ex) return loadAsFile(path$2.join(x, 'index'), fpkg, cb);
23960
+ readFile(pkgfile, function (err, body) {
23961
+ if (err) return cb(err);
23962
+
23963
+ try {
23964
+ var pkg = JSON.parse(body);
23965
+ } catch (jsonErr) {}
23966
+
23967
+ if (pkg && opts.packageFilter) {
23968
+ pkg = opts.packageFilter(pkg, pkgfile);
23969
+ }
23970
+
23971
+ if (pkg && pkg.main) {
23972
+ if (typeof pkg.main !== 'string') {
23973
+ var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
23974
+ mainError.code = 'INVALID_PACKAGE_MAIN';
23975
+ return cb(mainError);
23976
+ }
23307
23977
 
23308
- const createRequire = Module.createRequire || Module.createRequireFromPath;
23309
- resolve = createRequire(__dirname).resolve;
23978
+ if (pkg.main === '.' || pkg.main === './') {
23979
+ pkg.main = 'index';
23980
+ }
23981
+
23982
+ loadAsFile(path$2.resolve(x, pkg.main), pkg, function (err, m, pkg) {
23983
+ if (err) return cb(err);
23984
+ if (m) return cb(null, m, pkg);
23985
+ if (!pkg) return loadAsFile(path$2.join(x, 'index'), pkg, cb);
23986
+ var dir = path$2.resolve(x, pkg.main);
23987
+ loadAsDirectory(dir, pkg, function (err, n, pkg) {
23988
+ if (err) return cb(err);
23989
+ if (n) return cb(null, n, pkg);
23990
+ loadAsFile(path$2.join(x, 'index'), pkg, cb);
23991
+ });
23992
+ });
23993
+ return;
23994
+ }
23995
+
23996
+ loadAsFile(path$2.join(x, '/index'), pkg, cb);
23997
+ });
23998
+ });
23999
+ });
24000
+ }
24001
+
24002
+ function processDirs(cb, dirs) {
24003
+ if (dirs.length === 0) return cb(null, undefined);
24004
+ var dir = dirs[0];
24005
+ isDirectory(path$2.dirname(dir), isdir);
24006
+
24007
+ function isdir(err, isdir) {
24008
+ if (err) return cb(err);
24009
+ if (!isdir) return processDirs(cb, dirs.slice(1));
24010
+ loadAsFile(dir, opts.package, onfile);
24011
+ }
24012
+
24013
+ function onfile(err, m, pkg) {
24014
+ if (err) return cb(err);
24015
+ if (m) return cb(null, m, pkg);
24016
+ loadAsDirectory(dir, opts.package, ondir);
24017
+ }
24018
+
24019
+ function ondir(err, n, pkg) {
24020
+ if (err) return cb(err);
24021
+ if (n) return cb(null, n, pkg);
24022
+ processDirs(cb, dirs.slice(1));
24023
+ }
24024
+ }
24025
+
24026
+ function loadNodeModules(x, start, cb) {
24027
+ var thunk = function () {
24028
+ return getPackageCandidates(x, start, opts);
24029
+ };
24030
+
24031
+ processDirs(cb, packageIterator ? packageIterator(x, start, thunk, opts) : thunk());
24032
+ }
24033
+ };
24034
+
24035
+ var realpath$1 = fs$3.realpathSync && typeof fs$3.realpathSync.native === 'function' ? fs$3.realpathSync.native : fs$3.realpathSync;
24036
+
24037
+ var defaultIsFile$1 = function isFile(file) {
24038
+ try {
24039
+ var stat = fs$3.statSync(file);
24040
+ } catch (e) {
24041
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
24042
+ throw e;
24043
+ }
24044
+
24045
+ return stat.isFile() || stat.isFIFO();
24046
+ };
24047
+
24048
+ var defaultIsDir$1 = function isDirectory(dir) {
24049
+ try {
24050
+ var stat = fs$3.statSync(dir);
24051
+ } catch (e) {
24052
+ if (e && (e.code === 'ENOENT' || e.code === 'ENOTDIR')) return false;
24053
+ throw e;
24054
+ }
24055
+
24056
+ return stat.isDirectory();
24057
+ };
24058
+
24059
+ var maybeUnwrapSymlink$1 = function maybeUnwrapSymlink(x, opts) {
24060
+ if (opts && opts.preserveSymlinks === false) {
24061
+ try {
24062
+ return realpath$1(x);
24063
+ } catch (realPathErr) {
24064
+ if (realPathErr.code !== 'ENOENT') {
24065
+ throw realPathErr;
24066
+ }
24067
+ }
24068
+ }
24069
+
24070
+ return x;
24071
+ };
24072
+
24073
+ var getPackageCandidates$1 = function getPackageCandidates(x, start, opts) {
24074
+ var dirs = nodeModulesPaths(start, opts, x);
24075
+
24076
+ for (var i = 0; i < dirs.length; i++) {
24077
+ dirs[i] = path$2.join(dirs[i], x);
24078
+ }
24079
+
24080
+ return dirs;
24081
+ };
24082
+
24083
+ var sync = function resolveSync(x, options) {
24084
+ if (typeof x !== 'string') {
24085
+ throw new TypeError('Path must be a string.');
24086
+ }
24087
+
24088
+ var opts = normalizeOptions$2(x, options);
24089
+ var isFile = opts.isFile || defaultIsFile$1;
24090
+ var readFileSync = opts.readFileSync || fs$3.readFileSync;
24091
+ var isDirectory = opts.isDirectory || defaultIsDir$1;
24092
+ var packageIterator = opts.packageIterator;
24093
+ var extensions = opts.extensions || ['.js'];
24094
+ var basedir = opts.basedir || path$2.dirname(caller());
24095
+ var parent = opts.filename || basedir;
24096
+ opts.paths = opts.paths || []; // ensure that `basedir` is an absolute path at this point, resolving against the process' current working directory
24097
+
24098
+ var absoluteStart = maybeUnwrapSymlink$1(path$2.resolve(basedir), opts);
24099
+
24100
+ if (/^(?:\.\.?(?:\/|$)|\/|([A-Za-z]:)?[/\\])/.test(x)) {
24101
+ var res = path$2.resolve(absoluteStart, x);
24102
+ if (x === '.' || x === '..' || x.slice(-1) === '/') res += '/';
24103
+ var m = loadAsFileSync(res) || loadAsDirectorySync(res);
24104
+ if (m) return maybeUnwrapSymlink$1(m, opts);
24105
+ } else if (isCore(x)) {
24106
+ return x;
24107
+ } else {
24108
+ var n = loadNodeModulesSync(x, absoluteStart);
24109
+ if (n) return maybeUnwrapSymlink$1(n, opts);
24110
+ }
24111
+
24112
+ var err = new Error("Cannot find module '" + x + "' from '" + parent + "'");
24113
+ err.code = 'MODULE_NOT_FOUND';
24114
+ throw err;
24115
+
24116
+ function loadAsFileSync(x) {
24117
+ var pkg = loadpkg(path$2.dirname(x));
24118
+
24119
+ if (pkg && pkg.dir && pkg.pkg && opts.pathFilter) {
24120
+ var rfile = path$2.relative(pkg.dir, x);
24121
+ var r = opts.pathFilter(pkg.pkg, x, rfile);
24122
+
24123
+ if (r) {
24124
+ x = path$2.resolve(pkg.dir, r); // eslint-disable-line no-param-reassign
24125
+ }
24126
+ }
24127
+
24128
+ if (isFile(x)) {
24129
+ return x;
24130
+ }
24131
+
24132
+ for (var i = 0; i < extensions.length; i++) {
24133
+ var file = x + extensions[i];
24134
+
24135
+ if (isFile(file)) {
24136
+ return file;
24137
+ }
24138
+ }
24139
+ }
24140
+
24141
+ function loadpkg(dir) {
24142
+ if (dir === '' || dir === '/') return;
24143
+
24144
+ if (process.platform === 'win32' && /^\w:[/\\]*$/.test(dir)) {
24145
+ return;
24146
+ }
24147
+
24148
+ if (/[/\\]node_modules[/\\]*$/.test(dir)) return;
24149
+ var pkgfile = path$2.join(maybeUnwrapSymlink$1(dir, opts), 'package.json');
24150
+
24151
+ if (!isFile(pkgfile)) {
24152
+ return loadpkg(path$2.dirname(dir));
24153
+ }
24154
+
24155
+ var body = readFileSync(pkgfile);
24156
+
24157
+ try {
24158
+ var pkg = JSON.parse(body);
24159
+ } catch (jsonErr) {}
24160
+
24161
+ if (pkg && opts.packageFilter) {
24162
+ // v2 will pass pkgfile
24163
+ pkg = opts.packageFilter(pkg,
24164
+ /*pkgfile,*/
24165
+ dir); // eslint-disable-line spaced-comment
24166
+ }
24167
+
24168
+ return {
24169
+ pkg: pkg,
24170
+ dir: dir
24171
+ };
24172
+ }
24173
+
24174
+ function loadAsDirectorySync(x) {
24175
+ var pkgfile = path$2.join(maybeUnwrapSymlink$1(x, opts), '/package.json');
24176
+
24177
+ if (isFile(pkgfile)) {
24178
+ try {
24179
+ var body = readFileSync(pkgfile, 'UTF8');
24180
+ var pkg = JSON.parse(body);
24181
+ } catch (e) {}
24182
+
24183
+ if (pkg && opts.packageFilter) {
24184
+ // v2 will pass pkgfile
24185
+ pkg = opts.packageFilter(pkg,
24186
+ /*pkgfile,*/
24187
+ x); // eslint-disable-line spaced-comment
24188
+ }
24189
+
24190
+ if (pkg && pkg.main) {
24191
+ if (typeof pkg.main !== 'string') {
24192
+ var mainError = new TypeError('package “' + pkg.name + '” `main` must be a string');
24193
+ mainError.code = 'INVALID_PACKAGE_MAIN';
24194
+ throw mainError;
24195
+ }
24196
+
24197
+ if (pkg.main === '.' || pkg.main === './') {
24198
+ pkg.main = 'index';
24199
+ }
24200
+
24201
+ try {
24202
+ var m = loadAsFileSync(path$2.resolve(x, pkg.main));
24203
+ if (m) return m;
24204
+ var n = loadAsDirectorySync(path$2.resolve(x, pkg.main));
24205
+ if (n) return n;
24206
+ } catch (e) {}
24207
+ }
24208
+ }
24209
+
24210
+ return loadAsFileSync(path$2.join(x, '/index'));
24211
+ }
24212
+
24213
+ function loadNodeModulesSync(x, start) {
24214
+ var thunk = function () {
24215
+ return getPackageCandidates$1(x, start, opts);
24216
+ };
24217
+
24218
+ var dirs = packageIterator ? packageIterator(x, start, thunk, opts) : thunk();
24219
+
24220
+ for (var i = 0; i < dirs.length; i++) {
24221
+ var dir = dirs[i];
24222
+
24223
+ if (isDirectory(path$2.dirname(dir))) {
24224
+ var m = loadAsFileSync(dir);
24225
+ if (m) return m;
24226
+ var n = loadAsDirectorySync(dir);
24227
+ if (n) return n;
24228
+ }
24229
+ }
24230
+ }
24231
+ };
24232
+
24233
+ async.core = core_1;
24234
+ async.isCore = isCore;
24235
+ async.sync = sync;
24236
+ var resolve = async;
24237
+
24238
+ // eslint-disable-next-line prefer-destructuring
24239
+
24240
+
24241
+ let resolve$1 = require.resolve; // In the VS Code and Atom extensions `require` is overridden and `require.resolve` doesn't support the 2nd argument.
24242
+
24243
+ if (resolve$1.length === 1 || process.env.PRETTIER_FALLBACK_RESOLVE) {
24244
+ resolve$1 = (id, options) => {
24245
+ let basedir;
24246
+
24247
+ if (options && options.paths && options.paths.length === 1) {
24248
+ basedir = options.paths[0];
24249
+ }
24250
+
24251
+ return resolve.sync(id, {
24252
+ basedir
24253
+ });
24254
+ };
23310
24255
  }
23311
24256
 
23312
- var resolve_1 = resolve;
24257
+ var resolve_1 = resolve$1;
23313
24258
 
23314
24259
  const getExplorerMemoized = mem_1(opts => {
23315
24260
  const cosmiconfig = thirdParty["cosmiconfig" + (opts.sync ? "Sync" : "")];
@@ -23318,7 +24263,7 @@ const getExplorerMemoized = mem_1(opts => {
23318
24263
  transform: result => {
23319
24264
  if (result && result.config) {
23320
24265
  if (typeof result.config === "string") {
23321
- const dir = path$1.dirname(result.filepath);
24266
+ const dir = path$2.dirname(result.filepath);
23322
24267
 
23323
24268
  try {
23324
24269
  const modulePath = resolve_1(result.config, {
@@ -23382,7 +24327,7 @@ function _resolveConfig(filePath, opts, sync) {
23382
24327
  ["plugins", "pluginSearchDirs"].forEach(optionName => {
23383
24328
  if (Array.isArray(merged[optionName])) {
23384
24329
  merged[optionName] = merged[optionName].map(value => typeof value === "string" && value.startsWith(".") // relative path
23385
- ? path$1.resolve(path$1.dirname(result.filepath), value) : value);
24330
+ ? path$2.resolve(path$2.dirname(result.filepath), value) : value);
23386
24331
  }
23387
24332
  });
23388
24333
 
@@ -23442,7 +24387,7 @@ function mergeOverrides(configResult, filePath) {
23442
24387
  options = _objectWithoutPropertiesLoose(_ref, ["overrides"]);
23443
24388
 
23444
24389
  if (filePath && overrides) {
23445
- const relativeFilePath = path$1.relative(path$1.dirname(configPath), filePath);
24390
+ const relativeFilePath = path$2.relative(path$2.dirname(configPath), filePath);
23446
24391
 
23447
24392
  for (const override of overrides) {
23448
24393
  if (pathMatchesGlobs(relativeFilePath, override.files, override.excludeFiles)) {
@@ -23557,7 +24502,7 @@ function _getFileInfo({
23557
24502
  }
23558
24503
 
23559
24504
  function normalizeFilePath(filePath, ignorePath) {
23560
- return ignorePath ? path$1.relative(path$1.dirname(ignorePath), filePath) : filePath;
24505
+ return ignorePath ? path$2.relative(path$2.dirname(ignorePath), filePath) : filePath;
23561
24506
  }
23562
24507
 
23563
24508
  var getFileInfo_1 = getFileInfo;
@@ -26975,7 +27920,7 @@ var arrayUnion = (...arguments_) => {
26975
27920
  */
26976
27921
 
26977
27922
 
26978
- const PassThrough = stream$5.PassThrough;
27923
+ const PassThrough = stream$6.PassThrough;
26979
27924
  const slice = Array.prototype.slice;
26980
27925
  var merge2_1 = merge2;
26981
27926
 
@@ -27124,7 +28069,7 @@ var errno = createCommonjsModule(function (module, exports) {
27124
28069
  unwrapExports(errno);
27125
28070
  var errno_1 = errno.isEnoentCodeError;
27126
28071
 
27127
- var fs = createCommonjsModule(function (module, exports) {
28072
+ var fs$1 = createCommonjsModule(function (module, exports) {
27128
28073
 
27129
28074
  Object.defineProperty(exports, "__esModule", {
27130
28075
  value: true
@@ -27150,8 +28095,8 @@ var fs = createCommonjsModule(function (module, exports) {
27150
28095
 
27151
28096
  exports.createDirentFromStats = createDirentFromStats;
27152
28097
  });
27153
- unwrapExports(fs);
27154
- var fs_1 = fs.createDirentFromStats;
28098
+ unwrapExports(fs$1);
28099
+ var fs_1 = fs$1.createDirentFromStats;
27155
28100
 
27156
28101
  var path_1 = createCommonjsModule(function (module, exports) {
27157
28102
 
@@ -27172,7 +28117,7 @@ var path_1 = createCommonjsModule(function (module, exports) {
27172
28117
  exports.unixify = unixify;
27173
28118
 
27174
28119
  function makeAbsolute(cwd, filepath) {
27175
- return path$1.resolve(cwd, filepath);
28120
+ return path$2.resolve(cwd, filepath);
27176
28121
  }
27177
28122
 
27178
28123
  exports.makeAbsolute = makeAbsolute;
@@ -27279,8 +28224,8 @@ var isGlob = function isGlob(str, options) {
27279
28224
  return false;
27280
28225
  };
27281
28226
 
27282
- var pathPosixDirname = path$1.posix.dirname;
27283
- var isWin32 = os.platform() === 'win32';
28227
+ var pathPosixDirname = path$2.posix.dirname;
28228
+ var isWin32 = os$1.platform() === 'win32';
27284
28229
  var slash = '/';
27285
28230
  var backslash = /\\/g;
27286
28231
  var enclosure = /[\{\[].*[\/]*.*[\}\]]$/;
@@ -27916,7 +28861,7 @@ const toRegex = (start, end, options) => {
27916
28861
  };
27917
28862
 
27918
28863
  const rangeError = (...args) => {
27919
- return new RangeError('Invalid range arguments: ' + util$3.inspect(...args));
28864
+ return new RangeError('Invalid range arguments: ' + util$4.inspect(...args));
27920
28865
  };
27921
28866
 
27922
28867
  const invalidRange = (start, end, options) => {
@@ -28227,7 +29172,7 @@ const expand$1 = (ast, options = {}) => {
28227
29172
 
28228
29173
  var expand_1 = expand$1;
28229
29174
 
28230
- var constants$1 = {
29175
+ var constants$2 = {
28231
29176
  MAX_LENGTH: 1024 * 64,
28232
29177
  // Digits
28233
29178
  CHAR_0: '0',
@@ -28411,12 +29356,12 @@ const {
28411
29356
  /* ' */
28412
29357
  CHAR_NO_BREAK_SPACE,
28413
29358
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
28414
- } = constants$1;
29359
+ } = constants$2;
28415
29360
  /**
28416
29361
  * parse
28417
29362
  */
28418
29363
 
28419
- const parse$2 = (input, options = {}) => {
29364
+ const parse$3 = (input, options = {}) => {
28420
29365
  if (typeof input !== 'string') {
28421
29366
  throw new TypeError('Expected a string');
28422
29367
  }
@@ -28766,7 +29711,7 @@ const parse$2 = (input, options = {}) => {
28766
29711
  return ast;
28767
29712
  };
28768
29713
 
28769
- var parse_1 = parse$2;
29714
+ var parse_1 = parse$3;
28770
29715
 
28771
29716
  /**
28772
29717
  * Expand the given pattern or create a regex-compatible string.
@@ -29009,7 +29954,7 @@ const POSIX_REGEX_SOURCE = {
29009
29954
  word: 'A-Za-z0-9_',
29010
29955
  xdigit: 'A-Fa-f0-9'
29011
29956
  };
29012
- var constants$2 = {
29957
+ var constants$3 = {
29013
29958
  MAX_LENGTH: 1024 * 64,
29014
29959
  POSIX_REGEX_SOURCE,
29015
29960
  // regular expressions
@@ -29157,7 +30102,7 @@ var constants$2 = {
29157
30102
  CHAR_ZERO_WIDTH_NOBREAK_SPACE: 65279,
29158
30103
 
29159
30104
  /* \uFEFF */
29160
- SEP: path$1.sep,
30105
+ SEP: path$2.sep,
29161
30106
 
29162
30107
  /**
29163
30108
  * Create EXTGLOB_CHARS
@@ -29209,7 +30154,7 @@ var utils$3 = createCommonjsModule(function (module, exports) {
29209
30154
  REGEX_REMOVE_BACKSLASH,
29210
30155
  REGEX_SPECIAL_CHARS,
29211
30156
  REGEX_SPECIAL_CHARS_GLOBAL
29212
- } = constants$2;
30157
+ } = constants$3;
29213
30158
 
29214
30159
  exports.isObject = val => val !== null && typeof val === 'object' && !Array.isArray(val);
29215
30160
 
@@ -29242,7 +30187,7 @@ var utils$3 = createCommonjsModule(function (module, exports) {
29242
30187
  return options.windows;
29243
30188
  }
29244
30189
 
29245
- return win32 === true || path$1.sep === '\\';
30190
+ return win32 === true || path$2.sep === '\\';
29246
30191
  };
29247
30192
 
29248
30193
  exports.escapeLast = (input, char, lastIdx) => {
@@ -29333,7 +30278,7 @@ const {
29333
30278
  CHAR_RIGHT_SQUARE_BRACKET: CHAR_RIGHT_SQUARE_BRACKET$1
29334
30279
  /* ] */
29335
30280
 
29336
- } = constants$2;
30281
+ } = constants$3;
29337
30282
 
29338
30283
  const isPathSeparator = code => {
29339
30284
  return code === CHAR_FORWARD_SLASH || code === CHAR_BACKWARD_SLASH;
@@ -29725,7 +30670,7 @@ const {
29725
30670
  REGEX_NON_SPECIAL_CHARS,
29726
30671
  REGEX_SPECIAL_CHARS_BACKREF,
29727
30672
  REPLACEMENTS
29728
- } = constants$2;
30673
+ } = constants$3;
29729
30674
  /**
29730
30675
  * Helpers
29731
30676
  */
@@ -29763,7 +30708,7 @@ const syntaxError = (type, char) => {
29763
30708
  */
29764
30709
 
29765
30710
 
29766
- const parse$3 = (input, options) => {
30711
+ const parse$4 = (input, options) => {
29767
30712
  if (typeof input !== 'string') {
29768
30713
  throw new TypeError('Expected a string');
29769
30714
  }
@@ -29786,8 +30731,8 @@ const parse$3 = (input, options) => {
29786
30731
  const capture = opts.capture ? '' : '?:';
29787
30732
  const win32 = utils$3.isWindows(options); // create constants based on platform, for windows or posix
29788
30733
 
29789
- const PLATFORM_CHARS = constants$2.globChars(win32);
29790
- const EXTGLOB_CHARS = constants$2.extglobChars(PLATFORM_CHARS);
30734
+ const PLATFORM_CHARS = constants$3.globChars(win32);
30735
+ const EXTGLOB_CHARS = constants$3.extglobChars(PLATFORM_CHARS);
29791
30736
  const {
29792
30737
  DOT_LITERAL,
29793
30738
  PLUS_LITERAL,
@@ -30843,7 +31788,7 @@ const parse$3 = (input, options) => {
30843
31788
  */
30844
31789
 
30845
31790
 
30846
- parse$3.fastpaths = (input, options) => {
31791
+ parse$4.fastpaths = (input, options) => {
30847
31792
  const opts = Object.assign({}, options);
30848
31793
  const max = typeof opts.maxLength === 'number' ? Math.min(MAX_LENGTH$3, opts.maxLength) : MAX_LENGTH$3;
30849
31794
  const len = input.length;
@@ -30865,7 +31810,7 @@ parse$3.fastpaths = (input, options) => {
30865
31810
  NO_DOTS_SLASH,
30866
31811
  STAR,
30867
31812
  START_ANCHOR
30868
- } = constants$2.globChars(win32);
31813
+ } = constants$3.globChars(win32);
30869
31814
  const nodot = opts.dot ? NO_DOTS : NO_DOT;
30870
31815
  const slashDot = opts.dot ? NO_DOTS_SLASH : NO_DOT;
30871
31816
  const capture = opts.capture ? '' : '?:';
@@ -30931,7 +31876,7 @@ parse$3.fastpaths = (input, options) => {
30931
31876
  return source;
30932
31877
  };
30933
31878
 
30934
- var parse_1$1 = parse$3;
31879
+ var parse_1$1 = parse$4;
30935
31880
 
30936
31881
  const isObject$2 = val => val && typeof val === 'object' && !Array.isArray(val);
30937
31882
  /**
@@ -31121,7 +32066,7 @@ picomatch.test = (input, regex, options, {
31121
32066
 
31122
32067
  picomatch.matchBase = (input, glob, options, posix = utils$3.isWindows(options)) => {
31123
32068
  const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
31124
- return regex.test(path$1.basename(input));
32069
+ return regex.test(path$2.basename(input));
31125
32070
  };
31126
32071
  /**
31127
32072
  * Returns true if **any** of the given glob `patterns` match the specified `string`.
@@ -31296,7 +32241,7 @@ picomatch.toRegex = (source, options) => {
31296
32241
  */
31297
32242
 
31298
32243
 
31299
- picomatch.constants = constants$2;
32244
+ picomatch.constants = constants$3;
31300
32245
  /**
31301
32246
  * Expose "picomatch"
31302
32247
  */
@@ -31490,7 +32435,7 @@ micromatch.not = (list, patterns, options = {}) => {
31490
32435
 
31491
32436
  micromatch.contains = (str, pattern, options) => {
31492
32437
  if (typeof str !== 'string') {
31493
- throw new TypeError(`Expected a string: "${util$3.inspect(str)}"`);
32438
+ throw new TypeError(`Expected a string: "${util$4.inspect(str)}"`);
31494
32439
  }
31495
32440
 
31496
32441
  if (Array.isArray(pattern)) {
@@ -31645,7 +32590,7 @@ micromatch.every = (list, patterns, options) => {
31645
32590
 
31646
32591
  micromatch.all = (str, patterns, options) => {
31647
32592
  if (typeof str !== 'string') {
31648
- throw new TypeError(`Expected a string: "${util$3.inspect(str)}"`);
32593
+ throw new TypeError(`Expected a string: "${util$4.inspect(str)}"`);
31649
32594
  }
31650
32595
 
31651
32596
  return [].concat(patterns).every(p => picomatch$1(p, options)(str));
@@ -31888,7 +32833,7 @@ var pattern = createCommonjsModule(function (module, exports) {
31888
32833
  exports.endsWithSlashGlobStar = endsWithSlashGlobStar;
31889
32834
 
31890
32835
  function isAffectDepthOfReadingPattern(pattern) {
31891
- const basename = path$1.basename(pattern);
32836
+ const basename = path$2.basename(pattern);
31892
32837
  return endsWithSlashGlobStar(pattern) || isStaticPattern(basename);
31893
32838
  }
31894
32839
 
@@ -31963,7 +32908,7 @@ var pattern_16 = pattern.makeRe;
31963
32908
  var pattern_17 = pattern.convertPatternsToRe;
31964
32909
  var pattern_18 = pattern.matchAny;
31965
32910
 
31966
- var stream = createCommonjsModule(function (module, exports) {
32911
+ var stream$1 = createCommonjsModule(function (module, exports) {
31967
32912
 
31968
32913
  Object.defineProperty(exports, "__esModule", {
31969
32914
  value: true
@@ -31985,8 +32930,8 @@ var stream = createCommonjsModule(function (module, exports) {
31985
32930
  streams.forEach(stream => stream.emit('close'));
31986
32931
  }
31987
32932
  });
31988
- unwrapExports(stream);
31989
- var stream_1 = stream.merge;
32933
+ unwrapExports(stream$1);
32934
+ var stream_1 = stream$1.merge;
31990
32935
 
31991
32936
  var string$1 = createCommonjsModule(function (module, exports) {
31992
32937
 
@@ -32017,10 +32962,10 @@ var utils$4 = createCommonjsModule(function (module, exports) {
32017
32962
  });
32018
32963
  exports.array = array$2;
32019
32964
  exports.errno = errno;
32020
- exports.fs = fs;
32965
+ exports.fs = fs$1;
32021
32966
  exports.path = path_1;
32022
32967
  exports.pattern = pattern;
32023
- exports.stream = stream;
32968
+ exports.stream = stream$1;
32024
32969
  exports.string = string$1;
32025
32970
  });
32026
32971
  unwrapExports(utils$4);
@@ -32128,7 +33073,7 @@ var tasks_5 = tasks.groupPatternsByBaseDirectory;
32128
33073
  var tasks_6 = tasks.convertPatternGroupsToTasks;
32129
33074
  var tasks_7 = tasks.convertPatternGroupToTask;
32130
33075
 
32131
- var async = createCommonjsModule(function (module, exports) {
33076
+ var async$1 = createCommonjsModule(function (module, exports) {
32132
33077
 
32133
33078
  Object.defineProperty(exports, "__esModule", {
32134
33079
  value: true
@@ -32172,10 +33117,10 @@ var async = createCommonjsModule(function (module, exports) {
32172
33117
  callback(null, result);
32173
33118
  }
32174
33119
  });
32175
- unwrapExports(async);
32176
- var async_1 = async.read;
33120
+ unwrapExports(async$1);
33121
+ var async_1 = async$1.read;
32177
33122
 
32178
- var sync = createCommonjsModule(function (module, exports) {
33123
+ var sync$1 = createCommonjsModule(function (module, exports) {
32179
33124
 
32180
33125
  Object.defineProperty(exports, "__esModule", {
32181
33126
  value: true
@@ -32207,8 +33152,8 @@ var sync = createCommonjsModule(function (module, exports) {
32207
33152
 
32208
33153
  exports.read = read;
32209
33154
  });
32210
- unwrapExports(sync);
32211
- var sync_1 = sync.read;
33155
+ unwrapExports(sync$1);
33156
+ var sync_1 = sync$1.read;
32212
33157
 
32213
33158
  var fs_1$1 = createCommonjsModule(function (module, exports) {
32214
33159
 
@@ -32216,10 +33161,10 @@ var fs_1$1 = createCommonjsModule(function (module, exports) {
32216
33161
  value: true
32217
33162
  });
32218
33163
  exports.FILE_SYSTEM_ADAPTER = {
32219
- lstat: fs$2.lstat,
32220
- stat: fs$2.stat,
32221
- lstatSync: fs$2.lstatSync,
32222
- statSync: fs$2.statSync
33164
+ lstat: fs$3.lstat,
33165
+ stat: fs$3.stat,
33166
+ lstatSync: fs$3.lstatSync,
33167
+ statSync: fs$3.statSync
32223
33168
  };
32224
33169
 
32225
33170
  function createFileSystemAdapter(fsMethods) {
@@ -32270,17 +33215,17 @@ var out = createCommonjsModule(function (module, exports) {
32270
33215
 
32271
33216
  function stat(path, optionsOrSettingsOrCallback, callback) {
32272
33217
  if (typeof optionsOrSettingsOrCallback === 'function') {
32273
- return async.read(path, getSettings(), optionsOrSettingsOrCallback);
33218
+ return async$1.read(path, getSettings(), optionsOrSettingsOrCallback);
32274
33219
  }
32275
33220
 
32276
- async.read(path, getSettings(optionsOrSettingsOrCallback), callback);
33221
+ async$1.read(path, getSettings(optionsOrSettingsOrCallback), callback);
32277
33222
  }
32278
33223
 
32279
33224
  exports.stat = stat;
32280
33225
 
32281
33226
  function statSync(path, optionsOrSettings) {
32282
33227
  const settings = getSettings(optionsOrSettings);
32283
- return sync.read(path, settings);
33228
+ return sync$1.read(path, settings);
32284
33229
  }
32285
33230
 
32286
33231
  exports.statSync = statSync;
@@ -32352,7 +33297,7 @@ function runParallel(tasks, cb) {
32352
33297
  isSync = false;
32353
33298
  }
32354
33299
 
32355
- var constants$3 = createCommonjsModule(function (module, exports) {
33300
+ var constants$4 = createCommonjsModule(function (module, exports) {
32356
33301
 
32357
33302
  Object.defineProperty(exports, "__esModule", {
32358
33303
  value: true
@@ -32370,10 +33315,10 @@ var constants$3 = createCommonjsModule(function (module, exports) {
32370
33315
 
32371
33316
  exports.IS_SUPPORT_READDIR_WITH_FILE_TYPES = IS_MATCHED_BY_MAJOR || IS_MATCHED_BY_MAJOR_AND_MINOR;
32372
33317
  });
32373
- unwrapExports(constants$3);
32374
- var constants_1 = constants$3.IS_SUPPORT_READDIR_WITH_FILE_TYPES;
33318
+ unwrapExports(constants$4);
33319
+ var constants_1 = constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES;
32375
33320
 
32376
- var fs$1 = createCommonjsModule(function (module, exports) {
33321
+ var fs$2 = createCommonjsModule(function (module, exports) {
32377
33322
 
32378
33323
  Object.defineProperty(exports, "__esModule", {
32379
33324
  value: true
@@ -32399,27 +33344,27 @@ var fs$1 = createCommonjsModule(function (module, exports) {
32399
33344
 
32400
33345
  exports.createDirentFromStats = createDirentFromStats;
32401
33346
  });
32402
- unwrapExports(fs$1);
32403
- var fs_1$2 = fs$1.createDirentFromStats;
33347
+ unwrapExports(fs$2);
33348
+ var fs_1$2 = fs$2.createDirentFromStats;
32404
33349
 
32405
33350
  var utils$5 = createCommonjsModule(function (module, exports) {
32406
33351
 
32407
33352
  Object.defineProperty(exports, "__esModule", {
32408
33353
  value: true
32409
33354
  });
32410
- exports.fs = fs$1;
33355
+ exports.fs = fs$2;
32411
33356
  });
32412
33357
  unwrapExports(utils$5);
32413
33358
  var utils_1$5 = utils$5.fs;
32414
33359
 
32415
- var async$1 = createCommonjsModule(function (module, exports) {
33360
+ var async$2 = createCommonjsModule(function (module, exports) {
32416
33361
 
32417
33362
  Object.defineProperty(exports, "__esModule", {
32418
33363
  value: true
32419
33364
  });
32420
33365
 
32421
33366
  function read(directory, settings, callback) {
32422
- if (!settings.stats && constants$3.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
33367
+ if (!settings.stats && constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
32423
33368
  return readdirWithFileTypes(directory, settings, callback);
32424
33369
  }
32425
33370
 
@@ -32525,19 +33470,19 @@ var async$1 = createCommonjsModule(function (module, exports) {
32525
33470
  callback(null, result);
32526
33471
  }
32527
33472
  });
32528
- unwrapExports(async$1);
32529
- var async_1$1 = async$1.read;
32530
- var async_2 = async$1.readdirWithFileTypes;
32531
- var async_3 = async$1.readdir;
33473
+ unwrapExports(async$2);
33474
+ var async_1$1 = async$2.read;
33475
+ var async_2 = async$2.readdirWithFileTypes;
33476
+ var async_3 = async$2.readdir;
32532
33477
 
32533
- var sync$1 = createCommonjsModule(function (module, exports) {
33478
+ var sync$2 = createCommonjsModule(function (module, exports) {
32534
33479
 
32535
33480
  Object.defineProperty(exports, "__esModule", {
32536
33481
  value: true
32537
33482
  });
32538
33483
 
32539
33484
  function read(directory, settings) {
32540
- if (!settings.stats && constants$3.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
33485
+ if (!settings.stats && constants$4.IS_SUPPORT_READDIR_WITH_FILE_TYPES) {
32541
33486
  return readdirWithFileTypes(directory, settings);
32542
33487
  }
32543
33488
 
@@ -32595,10 +33540,10 @@ var sync$1 = createCommonjsModule(function (module, exports) {
32595
33540
 
32596
33541
  exports.readdir = readdir;
32597
33542
  });
32598
- unwrapExports(sync$1);
32599
- var sync_1$1 = sync$1.read;
32600
- var sync_2 = sync$1.readdirWithFileTypes;
32601
- var sync_3 = sync$1.readdir;
33543
+ unwrapExports(sync$2);
33544
+ var sync_1$1 = sync$2.read;
33545
+ var sync_2 = sync$2.readdirWithFileTypes;
33546
+ var sync_3 = sync$2.readdir;
32602
33547
 
32603
33548
  var fs_1$3 = createCommonjsModule(function (module, exports) {
32604
33549
 
@@ -32606,12 +33551,12 @@ var fs_1$3 = createCommonjsModule(function (module, exports) {
32606
33551
  value: true
32607
33552
  });
32608
33553
  exports.FILE_SYSTEM_ADAPTER = {
32609
- lstat: fs$2.lstat,
32610
- stat: fs$2.stat,
32611
- lstatSync: fs$2.lstatSync,
32612
- statSync: fs$2.statSync,
32613
- readdir: fs$2.readdir,
32614
- readdirSync: fs$2.readdirSync
33554
+ lstat: fs$3.lstat,
33555
+ stat: fs$3.stat,
33556
+ lstatSync: fs$3.lstatSync,
33557
+ statSync: fs$3.statSync,
33558
+ readdir: fs$3.readdir,
33559
+ readdirSync: fs$3.readdirSync
32615
33560
  };
32616
33561
 
32617
33562
  function createFileSystemAdapter(fsMethods) {
@@ -32639,7 +33584,7 @@ var settings$1 = createCommonjsModule(function (module, exports) {
32639
33584
  this._options = _options;
32640
33585
  this.followSymbolicLinks = this._getValue(this._options.followSymbolicLinks, false);
32641
33586
  this.fs = fs_1$3.createFileSystemAdapter(this._options.fs);
32642
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$1.sep);
33587
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$2.sep);
32643
33588
  this.stats = this._getValue(this._options.stats, false);
32644
33589
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
32645
33590
  this.fsStatSettings = new out.Settings({
@@ -32668,17 +33613,17 @@ var out$1 = createCommonjsModule(function (module, exports) {
32668
33613
 
32669
33614
  function scandir(path, optionsOrSettingsOrCallback, callback) {
32670
33615
  if (typeof optionsOrSettingsOrCallback === 'function') {
32671
- return async$1.read(path, getSettings(), optionsOrSettingsOrCallback);
33616
+ return async$2.read(path, getSettings(), optionsOrSettingsOrCallback);
32672
33617
  }
32673
33618
 
32674
- async$1.read(path, getSettings(optionsOrSettingsOrCallback), callback);
33619
+ async$2.read(path, getSettings(optionsOrSettingsOrCallback), callback);
32675
33620
  }
32676
33621
 
32677
33622
  exports.scandir = scandir;
32678
33623
 
32679
33624
  function scandirSync(path, optionsOrSettings) {
32680
33625
  const settings = getSettings(optionsOrSettings);
32681
- return sync$1.read(path, settings);
33626
+ return sync$2.read(path, settings);
32682
33627
  }
32683
33628
 
32684
33629
  exports.scandirSync = scandirSync;
@@ -32960,7 +33905,7 @@ var reader = createCommonjsModule(function (module, exports) {
32960
33905
  });
32961
33906
  unwrapExports(reader);
32962
33907
 
32963
- var async$2 = createCommonjsModule(function (module, exports) {
33908
+ var async$3 = createCommonjsModule(function (module, exports) {
32964
33909
 
32965
33910
  Object.defineProperty(exports, "__esModule", {
32966
33911
  value: true
@@ -32971,7 +33916,7 @@ var async$2 = createCommonjsModule(function (module, exports) {
32971
33916
  super(_root, _settings);
32972
33917
  this._settings = _settings;
32973
33918
  this._scandir = out$1.scandir;
32974
- this._emitter = new events.EventEmitter();
33919
+ this._emitter = new events$1.EventEmitter();
32975
33920
  this._queue = queue(this._worker.bind(this), this._settings.concurrency);
32976
33921
  this._isFatalError = false;
32977
33922
  this._isDestroyed = false;
@@ -33080,9 +34025,9 @@ var async$2 = createCommonjsModule(function (module, exports) {
33080
34025
 
33081
34026
  exports.default = AsyncReader;
33082
34027
  });
33083
- unwrapExports(async$2);
34028
+ unwrapExports(async$3);
33084
34029
 
33085
- var async$3 = createCommonjsModule(function (module, exports) {
34030
+ var async$4 = createCommonjsModule(function (module, exports) {
33086
34031
 
33087
34032
  Object.defineProperty(exports, "__esModule", {
33088
34033
  value: true
@@ -33092,7 +34037,7 @@ var async$3 = createCommonjsModule(function (module, exports) {
33092
34037
  constructor(_root, _settings) {
33093
34038
  this._root = _root;
33094
34039
  this._settings = _settings;
33095
- this._reader = new async$2.default(this._root, this._settings);
34040
+ this._reader = new async$3.default(this._root, this._settings);
33096
34041
  this._storage = new Set();
33097
34042
  }
33098
34043
 
@@ -33124,9 +34069,9 @@ var async$3 = createCommonjsModule(function (module, exports) {
33124
34069
  callback(null, entries);
33125
34070
  }
33126
34071
  });
33127
- unwrapExports(async$3);
34072
+ unwrapExports(async$4);
33128
34073
 
33129
- var stream$1 = createCommonjsModule(function (module, exports) {
34074
+ var stream$2 = createCommonjsModule(function (module, exports) {
33130
34075
 
33131
34076
  Object.defineProperty(exports, "__esModule", {
33132
34077
  value: true
@@ -33136,8 +34081,8 @@ var stream$1 = createCommonjsModule(function (module, exports) {
33136
34081
  constructor(_root, _settings) {
33137
34082
  this._root = _root;
33138
34083
  this._settings = _settings;
33139
- this._reader = new async$2.default(this._root, this._settings);
33140
- this._stream = new stream$5.Readable({
34084
+ this._reader = new async$3.default(this._root, this._settings);
34085
+ this._stream = new stream$6.Readable({
33141
34086
  objectMode: true,
33142
34087
  read: () => {},
33143
34088
  destroy: this._reader.destroy.bind(this._reader)
@@ -33166,9 +34111,9 @@ var stream$1 = createCommonjsModule(function (module, exports) {
33166
34111
 
33167
34112
  exports.default = StreamProvider;
33168
34113
  });
33169
- unwrapExports(stream$1);
34114
+ unwrapExports(stream$2);
33170
34115
 
33171
- var sync$2 = createCommonjsModule(function (module, exports) {
34116
+ var sync$3 = createCommonjsModule(function (module, exports) {
33172
34117
 
33173
34118
  Object.defineProperty(exports, "__esModule", {
33174
34119
  value: true
@@ -33247,9 +34192,9 @@ var sync$2 = createCommonjsModule(function (module, exports) {
33247
34192
 
33248
34193
  exports.default = SyncReader;
33249
34194
  });
33250
- unwrapExports(sync$2);
34195
+ unwrapExports(sync$3);
33251
34196
 
33252
- var sync$3 = createCommonjsModule(function (module, exports) {
34197
+ var sync$4 = createCommonjsModule(function (module, exports) {
33253
34198
 
33254
34199
  Object.defineProperty(exports, "__esModule", {
33255
34200
  value: true
@@ -33259,7 +34204,7 @@ var sync$3 = createCommonjsModule(function (module, exports) {
33259
34204
  constructor(_root, _settings) {
33260
34205
  this._root = _root;
33261
34206
  this._settings = _settings;
33262
- this._reader = new sync$2.default(this._root, this._settings);
34207
+ this._reader = new sync$3.default(this._root, this._settings);
33263
34208
  }
33264
34209
 
33265
34210
  read() {
@@ -33270,7 +34215,7 @@ var sync$3 = createCommonjsModule(function (module, exports) {
33270
34215
 
33271
34216
  exports.default = SyncProvider;
33272
34217
  });
33273
- unwrapExports(sync$3);
34218
+ unwrapExports(sync$4);
33274
34219
 
33275
34220
  var settings$2 = createCommonjsModule(function (module, exports) {
33276
34221
 
@@ -33286,7 +34231,7 @@ var settings$2 = createCommonjsModule(function (module, exports) {
33286
34231
  this.deepFilter = this._getValue(this._options.deepFilter, null);
33287
34232
  this.entryFilter = this._getValue(this._options.entryFilter, null);
33288
34233
  this.errorFilter = this._getValue(this._options.errorFilter, null);
33289
- this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$1.sep);
34234
+ this.pathSegmentSeparator = this._getValue(this._options.pathSegmentSeparator, path$2.sep);
33290
34235
  this.fsScandirSettings = new out$1.Settings({
33291
34236
  followSymbolicLinks: this._options.followSymbolicLinks,
33292
34237
  fs: this._options.fs,
@@ -33315,17 +34260,17 @@ var out$2 = createCommonjsModule(function (module, exports) {
33315
34260
 
33316
34261
  function walk(directory, optionsOrSettingsOrCallback, callback) {
33317
34262
  if (typeof optionsOrSettingsOrCallback === 'function') {
33318
- return new async$3.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
34263
+ return new async$4.default(directory, getSettings()).read(optionsOrSettingsOrCallback);
33319
34264
  }
33320
34265
 
33321
- new async$3.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
34266
+ new async$4.default(directory, getSettings(optionsOrSettingsOrCallback)).read(callback);
33322
34267
  }
33323
34268
 
33324
34269
  exports.walk = walk;
33325
34270
 
33326
34271
  function walkSync(directory, optionsOrSettings) {
33327
34272
  const settings = getSettings(optionsOrSettings);
33328
- const provider = new sync$3.default(directory, settings);
34273
+ const provider = new sync$4.default(directory, settings);
33329
34274
  return provider.read();
33330
34275
  }
33331
34276
 
@@ -33333,7 +34278,7 @@ var out$2 = createCommonjsModule(function (module, exports) {
33333
34278
 
33334
34279
  function walkStream(directory, optionsOrSettings) {
33335
34280
  const settings = getSettings(optionsOrSettings);
33336
- const provider = new stream$1.default(directory, settings);
34281
+ const provider = new stream$2.default(directory, settings);
33337
34282
  return provider.read();
33338
34283
  }
33339
34284
 
@@ -33370,7 +34315,7 @@ var reader$1 = createCommonjsModule(function (module, exports) {
33370
34315
  }
33371
34316
 
33372
34317
  _getFullEntryPath(filepath) {
33373
- return path$1.resolve(this._settings.cwd, filepath);
34318
+ return path$2.resolve(this._settings.cwd, filepath);
33374
34319
  }
33375
34320
 
33376
34321
  _makeEntry(stats, pattern) {
@@ -33397,7 +34342,7 @@ var reader$1 = createCommonjsModule(function (module, exports) {
33397
34342
  });
33398
34343
  unwrapExports(reader$1);
33399
34344
 
33400
- var stream$2 = createCommonjsModule(function (module, exports) {
34345
+ var stream$3 = createCommonjsModule(function (module, exports) {
33401
34346
 
33402
34347
  Object.defineProperty(exports, "__esModule", {
33403
34348
  value: true
@@ -33416,7 +34361,7 @@ var stream$2 = createCommonjsModule(function (module, exports) {
33416
34361
 
33417
34362
  static(patterns, options) {
33418
34363
  const filepaths = patterns.map(this._getFullEntryPath, this);
33419
- const stream = new stream$5.PassThrough({
34364
+ const stream = new stream$6.PassThrough({
33420
34365
  objectMode: true
33421
34366
  });
33422
34367
 
@@ -33463,7 +34408,7 @@ var stream$2 = createCommonjsModule(function (module, exports) {
33463
34408
 
33464
34409
  exports.default = ReaderStream;
33465
34410
  });
33466
- unwrapExports(stream$2);
34411
+ unwrapExports(stream$3);
33467
34412
 
33468
34413
  var matcher = createCommonjsModule(function (module, exports) {
33469
34414
 
@@ -33823,7 +34768,7 @@ var provider = createCommonjsModule(function (module, exports) {
33823
34768
  }
33824
34769
 
33825
34770
  _getRootDirectory(task) {
33826
- return path$1.resolve(this._settings.cwd, task.base);
34771
+ return path$2.resolve(this._settings.cwd, task.base);
33827
34772
  }
33828
34773
 
33829
34774
  _getReaderOptions(task) {
@@ -33862,7 +34807,7 @@ var provider = createCommonjsModule(function (module, exports) {
33862
34807
  });
33863
34808
  unwrapExports(provider);
33864
34809
 
33865
- var async$4 = createCommonjsModule(function (module, exports) {
34810
+ var async$5 = createCommonjsModule(function (module, exports) {
33866
34811
 
33867
34812
  Object.defineProperty(exports, "__esModule", {
33868
34813
  value: true
@@ -33871,7 +34816,7 @@ var async$4 = createCommonjsModule(function (module, exports) {
33871
34816
  class ProviderAsync extends provider.default {
33872
34817
  constructor() {
33873
34818
  super(...arguments);
33874
- this._reader = new stream$2.default(this._settings);
34819
+ this._reader = new stream$3.default(this._settings);
33875
34820
  }
33876
34821
 
33877
34822
  read(task) {
@@ -33900,9 +34845,9 @@ var async$4 = createCommonjsModule(function (module, exports) {
33900
34845
 
33901
34846
  exports.default = ProviderAsync;
33902
34847
  });
33903
- unwrapExports(async$4);
34848
+ unwrapExports(async$5);
33904
34849
 
33905
- var stream$3 = createCommonjsModule(function (module, exports) {
34850
+ var stream$4 = createCommonjsModule(function (module, exports) {
33906
34851
 
33907
34852
  Object.defineProperty(exports, "__esModule", {
33908
34853
  value: true
@@ -33911,7 +34856,7 @@ var stream$3 = createCommonjsModule(function (module, exports) {
33911
34856
  class ProviderStream extends provider.default {
33912
34857
  constructor() {
33913
34858
  super(...arguments);
33914
- this._reader = new stream$2.default(this._settings);
34859
+ this._reader = new stream$3.default(this._settings);
33915
34860
  }
33916
34861
 
33917
34862
  read(task) {
@@ -33920,7 +34865,7 @@ var stream$3 = createCommonjsModule(function (module, exports) {
33920
34865
  const options = this._getReaderOptions(task);
33921
34866
 
33922
34867
  const source = this.api(root, task, options);
33923
- const destination = new stream$5.Readable({
34868
+ const destination = new stream$6.Readable({
33924
34869
  objectMode: true,
33925
34870
  read: () => {}
33926
34871
  });
@@ -33941,9 +34886,9 @@ var stream$3 = createCommonjsModule(function (module, exports) {
33941
34886
 
33942
34887
  exports.default = ProviderStream;
33943
34888
  });
33944
- unwrapExports(stream$3);
34889
+ unwrapExports(stream$4);
33945
34890
 
33946
- var sync$4 = createCommonjsModule(function (module, exports) {
34891
+ var sync$5 = createCommonjsModule(function (module, exports) {
33947
34892
 
33948
34893
  Object.defineProperty(exports, "__esModule", {
33949
34894
  value: true
@@ -34000,9 +34945,9 @@ var sync$4 = createCommonjsModule(function (module, exports) {
34000
34945
 
34001
34946
  exports.default = ReaderSync;
34002
34947
  });
34003
- unwrapExports(sync$4);
34948
+ unwrapExports(sync$5);
34004
34949
 
34005
- var sync$5 = createCommonjsModule(function (module, exports) {
34950
+ var sync$6 = createCommonjsModule(function (module, exports) {
34006
34951
 
34007
34952
  Object.defineProperty(exports, "__esModule", {
34008
34953
  value: true
@@ -34011,7 +34956,7 @@ var sync$5 = createCommonjsModule(function (module, exports) {
34011
34956
  class ProviderSync extends provider.default {
34012
34957
  constructor() {
34013
34958
  super(...arguments);
34014
- this._reader = new sync$4.default(this._settings);
34959
+ this._reader = new sync$5.default(this._settings);
34015
34960
  }
34016
34961
 
34017
34962
  read(task) {
@@ -34035,21 +34980,21 @@ var sync$5 = createCommonjsModule(function (module, exports) {
34035
34980
 
34036
34981
  exports.default = ProviderSync;
34037
34982
  });
34038
- unwrapExports(sync$5);
34983
+ unwrapExports(sync$6);
34039
34984
 
34040
34985
  var settings$3 = createCommonjsModule(function (module, exports) {
34041
34986
 
34042
34987
  Object.defineProperty(exports, "__esModule", {
34043
34988
  value: true
34044
34989
  });
34045
- const CPU_COUNT = os.cpus().length;
34990
+ const CPU_COUNT = os$1.cpus().length;
34046
34991
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = {
34047
- lstat: fs$2.lstat,
34048
- lstatSync: fs$2.lstatSync,
34049
- stat: fs$2.stat,
34050
- statSync: fs$2.statSync,
34051
- readdir: fs$2.readdir,
34052
- readdirSync: fs$2.readdirSync
34992
+ lstat: fs$3.lstat,
34993
+ lstatSync: fs$3.lstatSync,
34994
+ stat: fs$3.stat,
34995
+ statSync: fs$3.statSync,
34996
+ readdir: fs$3.readdir,
34997
+ readdirSync: fs$3.readdirSync
34053
34998
  };
34054
34999
 
34055
35000
  class Settings {
@@ -34103,7 +35048,7 @@ var settings_1 = settings$3.DEFAULT_FILE_SYSTEM_ADAPTER;
34103
35048
 
34104
35049
  async function FastGlob(source, options) {
34105
35050
  assertPatternsInput(source);
34106
- const works = getWorks(source, async$4.default, options);
35051
+ const works = getWorks(source, async$5.default, options);
34107
35052
  const result = await Promise.all(works);
34108
35053
  return utils$4.array.flatten(result);
34109
35054
  } // https://github.com/typescript-eslint/typescript-eslint/issues/60
@@ -34113,7 +35058,7 @@ async function FastGlob(source, options) {
34113
35058
  (function (FastGlob) {
34114
35059
  function sync(source, options) {
34115
35060
  assertPatternsInput(source);
34116
- const works = getWorks(source, sync$5.default, options);
35061
+ const works = getWorks(source, sync$6.default, options);
34117
35062
  return utils$4.array.flatten(works);
34118
35063
  }
34119
35064
 
@@ -34121,7 +35066,7 @@ async function FastGlob(source, options) {
34121
35066
 
34122
35067
  function stream(source, options) {
34123
35068
  assertPatternsInput(source);
34124
- const works = getWorks(source, stream$3.default, options);
35069
+ const works = getWorks(source, stream$4.default, options);
34125
35070
  /**
34126
35071
  * The stream returned by the provider cannot work with an asynchronous iterator.
34127
35072
  * To support asynchronous iterators, regardless of the number of tasks, we always multiplex streams.
@@ -34179,7 +35124,7 @@ var out$3 = FastGlob;
34179
35124
 
34180
35125
  const {
34181
35126
  promisify
34182
- } = util$3;
35127
+ } = util$4;
34183
35128
 
34184
35129
  async function isType(fsStatType, statsMethodName, filePath) {
34185
35130
  if (typeof filePath !== 'string') {
@@ -34187,7 +35132,7 @@ async function isType(fsStatType, statsMethodName, filePath) {
34187
35132
  }
34188
35133
 
34189
35134
  try {
34190
- const stats = await promisify(fs$2[fsStatType])(filePath);
35135
+ const stats = await promisify(fs$3[fsStatType])(filePath);
34191
35136
  return stats[statsMethodName]();
34192
35137
  } catch (error) {
34193
35138
  if (error.code === 'ENOENT') {
@@ -34204,7 +35149,7 @@ function isTypeSync(fsStatType, statsMethodName, filePath) {
34204
35149
  }
34205
35150
 
34206
35151
  try {
34207
- return fs$2[fsStatType](filePath)[statsMethodName]();
35152
+ return fs$3[fsStatType](filePath)[statsMethodName]();
34208
35153
  } catch (error) {
34209
35154
  if (error.code === 'ENOENT') {
34210
35155
  return false;
@@ -34233,11 +35178,11 @@ const getExtensions = extensions => extensions.length > 1 ? `{${extensions.join(
34233
35178
 
34234
35179
  const getPath = (filepath, cwd) => {
34235
35180
  const pth = filepath[0] === '!' ? filepath.slice(1) : filepath;
34236
- return path$1.isAbsolute(pth) ? pth : path$1.join(cwd, pth);
35181
+ return path$2.isAbsolute(pth) ? pth : path$2.join(cwd, pth);
34237
35182
  };
34238
35183
 
34239
35184
  const addExtensions = (file, extensions) => {
34240
- if (path$1.extname(file)) {
35185
+ if (path$2.extname(file)) {
34241
35186
  return `**/${file}`;
34242
35187
  }
34243
35188
 
@@ -34254,18 +35199,18 @@ const getGlob = (directory, options) => {
34254
35199
  }
34255
35200
 
34256
35201
  if (options.files && options.extensions) {
34257
- return options.files.map(x => path$1.posix.join(directory, addExtensions(x, options.extensions)));
35202
+ return options.files.map(x => path$2.posix.join(directory, addExtensions(x, options.extensions)));
34258
35203
  }
34259
35204
 
34260
35205
  if (options.files) {
34261
- return options.files.map(x => path$1.posix.join(directory, `**/${x}`));
35206
+ return options.files.map(x => path$2.posix.join(directory, `**/${x}`));
34262
35207
  }
34263
35208
 
34264
35209
  if (options.extensions) {
34265
- return [path$1.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];
35210
+ return [path$2.posix.join(directory, `**/*.${getExtensions(options.extensions)}`)];
34266
35211
  }
34267
35212
 
34268
- return [path$1.posix.join(directory, '**')];
35213
+ return [path$2.posix.join(directory, '**')];
34269
35214
  };
34270
35215
 
34271
35216
  var dirGlob = async (input, options) => {
@@ -34284,7 +35229,7 @@ var dirGlob = async (input, options) => {
34284
35229
  return [].concat.apply([], globs); // eslint-disable-line prefer-spread
34285
35230
  };
34286
35231
 
34287
- var sync$6 = (input, options) => {
35232
+ var sync$7 = (input, options) => {
34288
35233
  options = Object.assign({
34289
35234
  cwd: process.cwd()
34290
35235
  }, options);
@@ -34296,7 +35241,7 @@ var sync$6 = (input, options) => {
34296
35241
  const globs = [].concat(input).map(x => pathType.isDirectorySync(getPath(x, options.cwd)) ? getGlob(x, options) : x);
34297
35242
  return [].concat.apply([], globs); // eslint-disable-line prefer-spread
34298
35243
  };
34299
- dirGlob.sync = sync$6;
35244
+ dirGlob.sync = sync$7;
34300
35245
 
34301
35246
  // A simple implementation of make-array
34302
35247
  function makeArray(subject) {
@@ -34707,20 +35652,20 @@ var slash$1 = path => {
34707
35652
 
34708
35653
  const {
34709
35654
  promisify: promisify$1
34710
- } = util$3;
35655
+ } = util$4;
34711
35656
  const DEFAULT_IGNORE = ['**/node_modules/**', '**/flow-typed/**', '**/coverage/**', '**/.git'];
34712
- const readFileP = promisify$1(fs$2.readFile);
35657
+ const readFileP = promisify$1(fs$3.readFile);
34713
35658
 
34714
35659
  const mapGitIgnorePatternTo = base => ignore => {
34715
35660
  if (ignore.startsWith('!')) {
34716
- return '!' + path$1.posix.join(base, ignore.slice(1));
35661
+ return '!' + path$2.posix.join(base, ignore.slice(1));
34717
35662
  }
34718
35663
 
34719
- return path$1.posix.join(base, ignore);
35664
+ return path$2.posix.join(base, ignore);
34720
35665
  };
34721
35666
 
34722
35667
  const parseGitIgnore = (content, options) => {
34723
- const base = slash$1(path$1.relative(options.cwd, path$1.dirname(options.fileName)));
35668
+ const base = slash$1(path$2.relative(options.cwd, path$2.dirname(options.fileName)));
34724
35669
  return content.split(/\r?\n/).filter(Boolean).filter(line => !line.startsWith('#')).map(mapGitIgnorePatternTo(base));
34725
35670
  };
34726
35671
 
@@ -34735,7 +35680,7 @@ const reduceIgnore = files => {
34735
35680
  };
34736
35681
 
34737
35682
  const ensureAbsolutePathForCwd = (cwd, p) => {
34738
- if (path$1.isAbsolute(p)) {
35683
+ if (path$2.isAbsolute(p)) {
34739
35684
  if (p.startsWith(cwd)) {
34740
35685
  return p;
34741
35686
  }
@@ -34743,15 +35688,15 @@ const ensureAbsolutePathForCwd = (cwd, p) => {
34743
35688
  throw new Error(`Path ${p} is not in cwd ${cwd}`);
34744
35689
  }
34745
35690
 
34746
- return path$1.join(cwd, p);
35691
+ return path$2.join(cwd, p);
34747
35692
  };
34748
35693
 
34749
35694
  const getIsIgnoredPredecate = (ignores, cwd) => {
34750
- return p => ignores.ignores(slash$1(path$1.relative(cwd, ensureAbsolutePathForCwd(cwd, p))));
35695
+ return p => ignores.ignores(slash$1(path$2.relative(cwd, ensureAbsolutePathForCwd(cwd, p))));
34751
35696
  };
34752
35697
 
34753
35698
  const getFile = async (file, cwd) => {
34754
- const filePath = path$1.join(cwd, file);
35699
+ const filePath = path$2.join(cwd, file);
34755
35700
  const content = await readFileP(filePath, 'utf8');
34756
35701
  return {
34757
35702
  cwd,
@@ -34761,8 +35706,8 @@ const getFile = async (file, cwd) => {
34761
35706
  };
34762
35707
 
34763
35708
  const getFileSync = (file, cwd) => {
34764
- const filePath = path$1.join(cwd, file);
34765
- const content = fs$2.readFileSync(filePath, 'utf8');
35709
+ const filePath = path$2.join(cwd, file);
35710
+ const content = fs$3.readFileSync(filePath, 'utf8');
34766
35711
  return {
34767
35712
  cwd,
34768
35713
  filePath,
@@ -34770,7 +35715,7 @@ const getFileSync = (file, cwd) => {
34770
35715
  };
34771
35716
  };
34772
35717
 
34773
- const normalizeOptions$2 = ({
35718
+ const normalizeOptions$3 = ({
34774
35719
  ignore = [],
34775
35720
  cwd = slash$1(process.cwd())
34776
35721
  } = {}) => {
@@ -34781,7 +35726,7 @@ const normalizeOptions$2 = ({
34781
35726
  };
34782
35727
 
34783
35728
  var gitignore = async options => {
34784
- options = normalizeOptions$2(options);
35729
+ options = normalizeOptions$3(options);
34785
35730
  const paths = await out$3('**/.gitignore', {
34786
35731
  ignore: DEFAULT_IGNORE.concat(options.ignore),
34787
35732
  cwd: options.cwd
@@ -34791,8 +35736,8 @@ var gitignore = async options => {
34791
35736
  return getIsIgnoredPredecate(ignores, options.cwd);
34792
35737
  };
34793
35738
 
34794
- var sync$7 = options => {
34795
- options = normalizeOptions$2(options);
35739
+ var sync$8 = options => {
35740
+ options = normalizeOptions$3(options);
34796
35741
  const paths = out$3.sync('**/.gitignore', {
34797
35742
  ignore: DEFAULT_IGNORE.concat(options.ignore),
34798
35743
  cwd: options.cwd
@@ -34801,11 +35746,11 @@ var sync$7 = options => {
34801
35746
  const ignores = reduceIgnore(files);
34802
35747
  return getIsIgnoredPredecate(ignores, options.cwd);
34803
35748
  };
34804
- gitignore.sync = sync$7;
35749
+ gitignore.sync = sync$8;
34805
35750
 
34806
35751
  const {
34807
35752
  Transform
34808
- } = stream$5;
35753
+ } = stream$6;
34809
35754
 
34810
35755
  class ObjectTransform extends Transform {
34811
35756
  constructor() {
@@ -34878,7 +35823,7 @@ const checkCwdOption = (options = {}) => {
34878
35823
  let stat;
34879
35824
 
34880
35825
  try {
34881
- stat = fs$2.statSync(options.cwd);
35826
+ stat = fs$3.statSync(options.cwd);
34882
35827
  } catch (_) {
34883
35828
  return;
34884
35829
  }
@@ -34888,7 +35833,7 @@ const checkCwdOption = (options = {}) => {
34888
35833
  }
34889
35834
  };
34890
35835
 
34891
- const getPathString = p => p.stats instanceof fs$2.Stats ? p.path : p;
35836
+ const getPathString = p => p.stats instanceof fs$3.Stats ? p.path : p;
34892
35837
 
34893
35838
  const generateGlobTasks = (patterns, taskOptions) => {
34894
35839
  patterns = arrayUnion([].concat(patterns));
@@ -34983,7 +35928,7 @@ var globby$1 = async (patterns, options) => {
34983
35928
  return arrayUnion(...paths).filter(path_ => !filter(getPathString(path_)));
34984
35929
  };
34985
35930
 
34986
- var sync$8 = (patterns, options) => {
35931
+ var sync$9 = (patterns, options) => {
34987
35932
  const globTasks = generateGlobTasks(patterns, options);
34988
35933
  const tasks = globTasks.reduce((tasks, task) => {
34989
35934
  const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
@@ -34993,7 +35938,7 @@ var sync$8 = (patterns, options) => {
34993
35938
  return tasks.reduce((matches, task) => arrayUnion(matches, out$3.sync(task.pattern, task.options)), []).filter(path_ => !filter(path_));
34994
35939
  };
34995
35940
 
34996
- var stream$4 = (patterns, options) => {
35941
+ var stream$5 = (patterns, options) => {
34997
35942
  const globTasks = generateGlobTasks(patterns, options);
34998
35943
  const tasks = globTasks.reduce((tasks, task) => {
34999
35944
  const newTask = getPattern(task, dirGlob.sync).map(globToTask(task));
@@ -35010,8 +35955,8 @@ var generateGlobTasks_1 = generateGlobTasks;
35010
35955
  var hasMagic = (patterns, options) => [].concat(patterns).some(pattern => out$3.isDynamicPattern(pattern, options));
35011
35956
 
35012
35957
  var gitignore_1 = gitignore;
35013
- globby$1.sync = sync$8;
35014
- globby$1.stream = stream$4;
35958
+ globby$1.sync = sync$9;
35959
+ globby$1.stream = stream$5;
35015
35960
  globby$1.generateGlobTasks = generateGlobTasks_1;
35016
35961
  globby$1.hasMagic = hasMagic;
35017
35962
  globby$1.gitignore = gitignore_1;
@@ -36213,7 +37158,7 @@ var build = createCommonjsModule(function (module, exports) {
36213
37158
  exports.print = print;
36214
37159
 
36215
37160
  function _os() {
36216
- const data = os;
37161
+ const data = os$1;
36217
37162
 
36218
37163
  _os = function () {
36219
37164
  return data;
@@ -37472,7 +38417,7 @@ function needsParens(path, options) {
37472
38417
  }
37473
38418
 
37474
38419
  if (pp === np && name === "right") {
37475
- assert.strictEqual(parent.right, node);
38420
+ assert$1.strictEqual(parent.right, node);
37476
38421
  return true;
37477
38422
  }
37478
38423
 
@@ -39972,7 +40917,7 @@ function printPathNoParens(path, options, print, args) {
39972
40917
  return nodeStr(n, options);
39973
40918
 
39974
40919
  case "NumberLiteralTypeAnnotation":
39975
- assert.strictEqual(typeof n.value, "number");
40920
+ assert$1.strictEqual(typeof n.value, "number");
39976
40921
 
39977
40922
  if (n.extra != null) {
39978
40923
  return printNumber$1(n.extra.raw);
@@ -40589,7 +41534,7 @@ function printMethod(path, options, print) {
40589
41534
  parts.push("*");
40590
41535
  }
40591
41536
  } else {
40592
- assert.ok(kind === "get" || kind === "set");
41537
+ assert$1.ok(kind === "get" || kind === "set");
40593
41538
  parts.push(kind, " ");
40594
41539
  }
40595
41540
 
@@ -41072,7 +42017,7 @@ function printFlowDeclaration(path, parts) {
41072
42017
  const parentExportDecl = getParentExportDeclaration$1(path);
41073
42018
 
41074
42019
  if (parentExportDecl) {
41075
- assert.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
42020
+ assert$1.strictEqual(parentExportDecl.type, "DeclareExportDeclaration");
41076
42021
  } else {
41077
42022
  // If the parent node has type DeclareExportDeclaration, then it
41078
42023
  // will be responsible for printing the "declare" token. Otherwise
@@ -42907,7 +43852,7 @@ const DELIMITER_MAP = {
42907
43852
  "+++": "toml"
42908
43853
  };
42909
43854
 
42910
- function parse$4(text) {
43855
+ function parse$5(text) {
42911
43856
  const delimiterRegex = Object.keys(DELIMITER_MAP).map(escapeStringRegexp$2).join("|");
42912
43857
  const match = text.match( // trailing spaces after delimiters are allowed
42913
43858
  new RegExp(`^(${delimiterRegex})[^\\n\\S]*\\n(?:([\\s\\S]*?)\\n)?\\1[^\\n\\S]*(\\n|$)`));
@@ -42930,7 +43875,7 @@ function parse$4(text) {
42930
43875
  };
42931
43876
  }
42932
43877
 
42933
- var frontMatter = parse$4;
43878
+ var frontMatter = parse$5;
42934
43879
 
42935
43880
  function hasPragma$1(text) {
42936
43881
  return pragma.hasPragma(frontMatter(text).content);
@@ -47012,7 +47957,7 @@ var colgroup = [
47012
47957
  "valign",
47013
47958
  "width"
47014
47959
  ];
47015
- var data = [
47960
+ var data$1 = [
47016
47961
  "value"
47017
47962
  ];
47018
47963
  var del$1 = [
@@ -47505,7 +48450,7 @@ var index$1 = {
47505
48450
  caption: caption,
47506
48451
  col: col,
47507
48452
  colgroup: colgroup,
47508
- data: data,
48453
+ data: data$1,
47509
48454
  del: del$1,
47510
48455
  details: details,
47511
48456
  dfn: dfn,
@@ -47588,7 +48533,7 @@ var htmlElementAttributes = /*#__PURE__*/Object.freeze({
47588
48533
  caption: caption,
47589
48534
  col: col,
47590
48535
  colgroup: colgroup,
47591
- data: data,
48536
+ data: data$1,
47592
48537
  del: del$1,
47593
48538
  details: details,
47594
48539
  dfn: dfn,
@@ -48648,7 +49593,7 @@ function deepUnique(array) {
48648
49593
  });
48649
49594
  }
48650
49595
 
48651
- var parse$5 = string => {
49596
+ var parse$6 = string => {
48652
49597
  return deepUnique(string.split(',').map(part => {
48653
49598
  const result = {};
48654
49599
  part.trim().split(/\s+/).forEach((element, index) => {
@@ -48701,7 +49646,7 @@ var stringify$2 = array => {
48701
49646
  };
48702
49647
 
48703
49648
  var srcset = {
48704
- parse: parse$5,
49649
+ parse: parse$6,
48705
49650
  stringify: stringify$2
48706
49651
  };
48707
49652
 
@@ -49276,7 +50221,7 @@ function printOpeningTagStartMarker(node) {
49276
50221
  }
49277
50222
 
49278
50223
  function printOpeningTagEndMarker(node) {
49279
- assert(!node.isSelfClosing);
50224
+ assert$1(!node.isSelfClosing);
49280
50225
 
49281
50226
  switch (node.type) {
49282
50227
  case "ieConditionalComment":
@@ -49295,7 +50240,7 @@ function printOpeningTagEndMarker(node) {
49295
50240
  }
49296
50241
 
49297
50242
  function printClosingTagStartMarker(node, options) {
49298
- assert(!node.isSelfClosing);
50243
+ assert$1(!node.isSelfClosing);
49299
50244
 
49300
50245
  if (shouldNotPrintClosingTag$1(node, options)) {
49301
50246
  return "";
@@ -50643,7 +51588,7 @@ function load(plugins, pluginSearchDirs) {
50643
51588
 
50644
51589
  try {
50645
51590
  // try local files
50646
- requirePath = resolve_1(path$1.resolve(process.cwd(), pluginName));
51591
+ requirePath = resolve_1(path$2.resolve(process.cwd(), pluginName));
50647
51592
  } catch (_) {
50648
51593
  // try node modules
50649
51594
  requirePath = resolve_1(pluginName, {
@@ -50657,8 +51602,8 @@ function load(plugins, pluginSearchDirs) {
50657
51602
  };
50658
51603
  });
50659
51604
  const externalAutoLoadPluginInfos = pluginSearchDirs.map(pluginSearchDir => {
50660
- const resolvedPluginSearchDir = path$1.resolve(process.cwd(), pluginSearchDir);
50661
- const nodeModulesDir = path$1.resolve(resolvedPluginSearchDir, "node_modules"); // In some fringe cases (ex: files "mounted" as virtual directories), the
51605
+ const resolvedPluginSearchDir = path$2.resolve(process.cwd(), pluginSearchDir);
51606
+ const nodeModulesDir = path$2.resolve(resolvedPluginSearchDir, "node_modules"); // In some fringe cases (ex: files "mounted" as virtual directories), the
50662
51607
  // isDirectory(resolvedPluginSearchDir) check might be false even though
50663
51608
  // the node_modules actually exists.
50664
51609
 
@@ -50684,12 +51629,12 @@ function findPluginsInNodeModules(nodeModulesDir) {
50684
51629
  cwd: nodeModulesDir,
50685
51630
  expandDirectories: false
50686
51631
  });
50687
- return pluginPackageJsonPaths.map(path$1.dirname);
51632
+ return pluginPackageJsonPaths.map(path$2.dirname);
50688
51633
  }
50689
51634
 
50690
51635
  function isDirectory$1(dir) {
50691
51636
  try {
50692
- return fs$2.statSync(dir).isDirectory();
51637
+ return fs$3.statSync(dir).isDirectory();
50693
51638
  } catch (e) {
50694
51639
  return false;
50695
51640
  }
@@ -51027,7 +51972,7 @@ value = function () {
51027
51972
  // functions and variables.
51028
51973
 
51029
51974
 
51030
- var parse$6 = function (source, reviver) {
51975
+ var parse$7 = function (source, reviver) {
51031
51976
  var result;
51032
51977
  text = source;
51033
51978
  at = 0;
@@ -51221,10 +52166,10 @@ var stringify$3 = function (value, replacer, space) {
51221
52166
  });
51222
52167
  };
51223
52168
 
51224
- var parse$7 = parse$6;
52169
+ var parse$8 = parse$7;
51225
52170
  var stringify$4 = stringify$3;
51226
52171
  var jsonify = {
51227
- parse: parse$7,
52172
+ parse: parse$8,
51228
52173
  stringify: stringify$4
51229
52174
  };
51230
52175
 
@@ -52145,7 +53090,7 @@ function* expandPatterns(context) {
52145
53090
  continue;
52146
53091
  }
52147
53092
 
52148
- const relativePath = path$1.relative(cwd, pathOrError); // filter out duplicates
53093
+ const relativePath = path$2.relative(cwd, pathOrError); // filter out duplicates
52149
53094
 
52150
53095
  if (seen.has(relativePath)) {
52151
53096
  continue;
@@ -52186,7 +53131,7 @@ function* expandPatternsInternal(context) {
52186
53131
  const entries = [];
52187
53132
 
52188
53133
  for (const pattern of context.filePatterns) {
52189
- const absolutePath = path$1.resolve(cwd, pattern);
53134
+ const absolutePath = path$2.resolve(cwd, pattern);
52190
53135
 
52191
53136
  if (containsIgnoredPathSegment(absolutePath, cwd, silentlyIgnoredDirs)) {
52192
53137
  continue;
@@ -52277,7 +53222,7 @@ const errorMessages = {
52277
53222
  */
52278
53223
 
52279
53224
  function containsIgnoredPathSegment(absolutePath, cwd, ignoredDirectories) {
52280
- return path$1.relative(cwd, absolutePath).split(path$1.sep).some(dir => ignoredDirectories[dir]);
53225
+ return path$2.relative(cwd, absolutePath).split(path$2.sep).some(dir => ignoredDirectories[dir]);
52281
53226
  }
52282
53227
  /**
52283
53228
  * @param {string[]} paths
@@ -52296,7 +53241,7 @@ function sortPaths(paths) {
52296
53241
 
52297
53242
  function statSafeSync(filePath) {
52298
53243
  try {
52299
- return fs$2.statSync(filePath);
53244
+ return fs$3.statSync(filePath);
52300
53245
  } catch (error) {
52301
53246
  /* istanbul ignore next */
52302
53247
  if (error.code !== "ENOENT") {
@@ -52318,7 +53263,7 @@ function escapePathForGlob(path) {
52318
53263
  .replace(/\0/g, "@(\\\\)"); // Workaround for fast-glob#262 (part 2)
52319
53264
  }
52320
53265
 
52321
- const isWindows = path$1.sep === "\\";
53266
+ const isWindows = path$2.sep === "\\";
52322
53267
  /**
52323
53268
  * Using backslashes in globs is probably not okay, but not accepting
52324
53269
  * backslashes as path separators on Windows is even more not okay.
@@ -52573,8 +53518,8 @@ function diff(a, b) {
52573
53518
  function handleError(context, filename, error) {
52574
53519
  if (error instanceof errors.UndefinedParserError) {
52575
53520
  if (context.argv.write && isTty()) {
52576
- readline.clearLine(process.stdout, 0);
52577
- readline.cursorTo(process.stdout, 0, null);
53521
+ readline$1.clearLine(process.stdout, 0);
53522
+ readline$1.cursorTo(process.stdout, 0, null);
52578
53523
  }
52579
53524
 
52580
53525
  if (!context.argv.check && !context.argv["list-different"]) {
@@ -52617,7 +53562,7 @@ function logResolvedConfigPathOrDie(context) {
52617
53562
  const configFile = prettier.resolveConfigFile.sync(context.argv["find-config-path"]);
52618
53563
 
52619
53564
  if (configFile) {
52620
- context.logger.log(path$1.relative(process.cwd(), configFile));
53565
+ context.logger.log(path$2.relative(process.cwd(), configFile));
52621
53566
  } else {
52622
53567
  process.exit(1);
52623
53568
  }
@@ -52835,11 +53780,11 @@ function applyConfigPrecedence(context, options) {
52835
53780
  }
52836
53781
 
52837
53782
  function formatStdin(context) {
52838
- const filepath = context.argv["stdin-filepath"] ? path$1.resolve(process.cwd(), context.argv["stdin-filepath"]) : process.cwd();
53783
+ const filepath = context.argv["stdin-filepath"] ? path$2.resolve(process.cwd(), context.argv["stdin-filepath"]) : process.cwd();
52839
53784
  const ignorer = createIgnorerFromContextOrDie(context); // If there's an ignore-path set, the filename must be relative to the
52840
53785
  // ignore path, not the current working directory.
52841
53786
 
52842
- const relativeFilepath = context.argv["ignore-path"] ? path$1.relative(path$1.dirname(context.argv["ignore-path"]), filepath) : path$1.relative(process.cwd(), filepath);
53787
+ const relativeFilepath = context.argv["ignore-path"] ? path$2.relative(path$2.dirname(context.argv["ignore-path"]), filepath) : path$2.relative(process.cwd(), filepath);
52843
53788
  thirdParty.getStream(process.stdin).then(input => {
52844
53789
  if (relativeFilepath && ignorer.filter([relativeFilepath]).length === 0) {
52845
53790
  writeOutput(context, {
@@ -52890,7 +53835,7 @@ function formatFiles(context) {
52890
53835
  const filename = pathOrError; // If there's an ignore-path set, the filename must be relative to the
52891
53836
  // ignore path, not the current working directory.
52892
53837
 
52893
- const ignoreFilename = context.argv["ignore-path"] ? path$1.relative(path$1.dirname(context.argv["ignore-path"]), filename) : filename;
53838
+ const ignoreFilename = context.argv["ignore-path"] ? path$2.relative(path$2.dirname(context.argv["ignore-path"]), filename) : filename;
52894
53839
  const fileIgnored = ignorer.filter([ignoreFilename]).length === 0;
52895
53840
 
52896
53841
  if (fileIgnored && (context.argv["debug-check"] || context.argv.write || context.argv.check || context.argv["list-different"])) {
@@ -52910,7 +53855,7 @@ function formatFiles(context) {
52910
53855
  let input;
52911
53856
 
52912
53857
  try {
52913
- input = fs$2.readFileSync(filename, "utf8");
53858
+ input = fs$3.readFileSync(filename, "utf8");
52914
53859
  } catch (error) {
52915
53860
  // Add newline to split errors from filename line.
52916
53861
  context.logger.log("");
@@ -52943,8 +53888,8 @@ function formatFiles(context) {
52943
53888
 
52944
53889
  if (isTty()) {
52945
53890
  // Remove previously printed filename to log it with duration.
52946
- readline.clearLine(process.stdout, 0);
52947
- readline.cursorTo(process.stdout, 0, null);
53891
+ readline$1.clearLine(process.stdout, 0);
53892
+ readline$1.cursorTo(process.stdout, 0, null);
52948
53893
  }
52949
53894
 
52950
53895
  if (context.argv.write) {
@@ -52956,7 +53901,7 @@ function formatFiles(context) {
52956
53901
  }
52957
53902
 
52958
53903
  try {
52959
- fs$2.writeFileSync(filename, output, "utf8");
53904
+ fs$3.writeFileSync(filename, output, "utf8");
52960
53905
  } catch (error) {
52961
53906
  context.logger.error(`Unable to write file: ${filename}\n${error.message}`); // Don't exit the process if one file failed
52962
53907
 
@@ -53318,7 +54263,7 @@ function normalizeContextArgv(context, keys) {
53318
54263
  } //------------------------------context-util-end--------------------------------
53319
54264
 
53320
54265
 
53321
- var util$2 = {
54266
+ var util$3 = {
53322
54267
  createContext,
53323
54268
  createDetailedOptionMap,
53324
54269
  createDetailedUsage,
@@ -53335,10 +54280,10 @@ var util$2 = {
53335
54280
  pleaseUpgradeNode(require$$1);
53336
54281
 
53337
54282
  function run(args) {
53338
- const context = util$2.createContext(args);
54283
+ const context = util$3.createContext(args);
53339
54284
 
53340
54285
  try {
53341
- util$2.initContext(context);
54286
+ util$3.initContext(context);
53342
54287
  context.logger.debug(`normalized argv: ${JSON.stringify(context.argv)}`);
53343
54288
 
53344
54289
  if (context.argv.check && context.argv["list-different"]) {
@@ -53367,7 +54312,7 @@ function run(args) {
53367
54312
  }
53368
54313
 
53369
54314
  if (context.argv.help !== undefined) {
53370
- context.logger.log(typeof context.argv.help === "string" && context.argv.help !== "" ? util$2.createDetailedUsage(context, context.argv.help) : util$2.createUsage(context));
54315
+ context.logger.log(typeof context.argv.help === "string" && context.argv.help !== "" ? util$3.createDetailedUsage(context, context.argv.help) : util$3.createUsage(context));
53371
54316
  process.exit(0);
53372
54317
  }
53373
54318
 
@@ -53382,15 +54327,15 @@ function run(args) {
53382
54327
  const useStdin = !hasFilePatterns && (!process.stdin.isTTY || context.args["stdin-filepath"]);
53383
54328
 
53384
54329
  if (context.argv["find-config-path"]) {
53385
- util$2.logResolvedConfigPathOrDie(context);
54330
+ util$3.logResolvedConfigPathOrDie(context);
53386
54331
  } else if (context.argv["file-info"]) {
53387
- util$2.logFileInfoOrDie(context);
54332
+ util$3.logFileInfoOrDie(context);
53388
54333
  } else if (useStdin) {
53389
- util$2.formatStdin(context);
54334
+ util$3.formatStdin(context);
53390
54335
  } else if (hasFilePatterns) {
53391
- util$2.formatFiles(context);
54336
+ util$3.formatFiles(context);
53392
54337
  } else {
53393
- context.logger.log(util$2.createUsage(context));
54338
+ context.logger.log(util$3.createUsage(context));
53394
54339
  process.exit(1);
53395
54340
  }
53396
54341
  } catch (error) {