vitest 0.32.2 → 0.32.3

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.
Files changed (42) hide show
  1. package/LICENSE.md +33 -4
  2. package/dist/browser.d.ts +1 -1
  3. package/dist/browser.js +22 -5
  4. package/dist/child.js +3 -3
  5. package/dist/{chunk-api-setup.05e3917b.js → chunk-api-setup.8f785c4a.js} +18 -11
  6. package/dist/{chunk-install-pkg.62047ee6.js → chunk-install-pkg.0716919d.js} +69 -55
  7. package/dist/{chunk-integrations-globals.a56dee90.js → chunk-integrations-globals.0093e2ed.js} +5 -5
  8. package/dist/{chunk-node-git.4c43bd73.js → chunk-node-git.c410fed8.js} +3 -2
  9. package/dist/cli-wrapper.js +2 -2
  10. package/dist/cli.js +8 -8
  11. package/dist/config.d.ts +1 -1
  12. package/dist/coverage.d.ts +1 -1
  13. package/dist/entry.js +9 -9
  14. package/dist/environments.d.ts +1 -1
  15. package/dist/environments.js +1 -1
  16. package/dist/index.d.ts +60 -40
  17. package/dist/index.js +6 -6
  18. package/dist/loader.js +140 -4
  19. package/dist/node.d.ts +3 -3
  20. package/dist/node.js +9 -9
  21. package/dist/runners.d.ts +1 -1
  22. package/dist/runners.js +24 -19
  23. package/dist/suite.d.ts +1 -0
  24. package/dist/{types-2b1c412e.d.ts → types-198fd1d9.d.ts} +302 -77
  25. package/dist/vendor-_commonjsHelpers.7d1333e8.js +7 -0
  26. package/dist/{vendor-cli-api.f9adf98c.js → vendor-cli-api.ff679aa2.js} +281 -229
  27. package/dist/{vendor-coverage.de2180ed.js → vendor-coverage.2e41927a.js} +1 -1
  28. package/dist/{vendor-execute.001ae440.js → vendor-execute.3576af13.js} +14 -16
  29. package/dist/{vendor-index.c1e09929.js → vendor-index.1f85e5f1.js} +52 -39
  30. package/dist/{vendor-index.fad2598b.js → vendor-index.23ac4e13.js} +1 -1
  31. package/dist/{vendor-index.0f133dbe.js → vendor-index.2af39fbb.js} +5 -3
  32. package/dist/{vendor-index.fc98d30f.js → vendor-index.98139333.js} +4 -22
  33. package/dist/{vendor-index.87ab04c3.js → vendor-index.cc463d9e.js} +2 -1
  34. package/dist/{vendor-rpc.4d3d7a54.js → vendor-rpc.ad5b08c7.js} +10 -10
  35. package/dist/{vendor-run-once.69ce7172.js → vendor-run-once.1fa85ba7.js} +2 -2
  36. package/dist/vendor-vi.dd6706cb.js +3421 -0
  37. package/dist/worker.js +3 -3
  38. package/package.json +21 -22
  39. package/dist/vendor-_commonjsHelpers.76cdd49e.js +0 -3
  40. package/dist/vendor-setup.common.f1cf2231.js +0 -20
  41. package/dist/vendor-vi.74cf3ef7.js +0 -3354
  42. /package/dist/{vendor-index.75f2b63d.js → vendor-environments.75f2b63d.js} +0 -0
@@ -1,23 +1,23 @@
1
1
  import { resolve as resolve$2, relative, isAbsolute, dirname, basename, normalize, join, extname, toNamespacedPath } from 'pathe';
2
2
  import { E as EXIT_CODE_RESTART, c as configFiles, d as defaultPort, a as defaultBrowserPort, w as workspacesFiles, C as CONFIG_NAMES } from './vendor-constants.538d9b49.js';
3
- import { g as getCoverageProvider, C as CoverageProviderMap } from './vendor-coverage.de2180ed.js';
4
- import { g as getEnvPackageName } from './vendor-index.75f2b63d.js';
3
+ import { g as getCoverageProvider, C as CoverageProviderMap } from './vendor-coverage.2e41927a.js';
4
+ import { g as getEnvPackageName } from './vendor-environments.75f2b63d.js';
5
5
  import url, { fileURLToPath, pathToFileURL } from 'node:url';
6
6
  import c from 'picocolors';
7
7
  import { isPackageExists, resolveModule } from 'local-pkg';
8
- import { i as isNode, r as relativePath, a as removeUndefinedValues, b as isWindows } from './vendor-index.fad2598b.js';
8
+ import { a as isNode, b as relativePath, c as removeUndefinedValues, d as isWindows } from './vendor-index.23ac4e13.js';
9
9
  import { isCI } from 'std-env';
10
10
  import { loadConfigFromFile, createServer, version as version$2, mergeConfig } from 'vite';
11
11
  import path$a from 'node:path';
12
12
  import process$1 from 'node:process';
13
13
  import fs$8, { promises, existsSync, readFileSync } from 'node:fs';
14
- import p from 'path';
14
+ import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './vendor-_commonjsHelpers.7d1333e8.js';
15
+ import f$1 from 'path';
15
16
  import require$$0 from 'os';
16
- import require$$0$1 from 'util';
17
- import require$$0$2 from 'stream';
18
- import require$$2 from 'events';
19
- import require$$0$3 from 'fs';
20
- import { c as commonjsGlobal } from './vendor-_commonjsHelpers.76cdd49e.js';
17
+ import require$$2 from 'util';
18
+ import require$$0$1 from 'stream';
19
+ import require$$2$1 from 'events';
20
+ import $ from 'fs';
21
21
  import { slash as slash$2, normalizeRequestId, cleanUrl } from 'vite-node/utils';
22
22
  import { ViteNodeRunner } from 'vite-node/client';
23
23
  import { SnapshotManager } from '@vitest/snapshot/manager';
@@ -25,7 +25,7 @@ import { ViteNodeServer } from 'vite-node/server';
25
25
  import { d as distDir, r as rootDir } from './vendor-paths.84fc7a99.js';
26
26
  import v8 from 'node:v8';
27
27
  import { fork } from 'node:child_process';
28
- import { g as groupBy, a as getEnvironmentTransformMode, c as createBirpc, A as AggregateErrorPonyfill, s as slash$1, t as toArray, i as isPrimitive, d as deepMerge, n as noop$1, b as stdout } from './vendor-index.87ab04c3.js';
28
+ import { a as groupBy, b as getEnvironmentTransformMode, c as createBirpc, A as AggregateErrorPonyfill, s as slash$1, t as toArray, i as isPrimitive, d as deepMerge, n as noop$1, e as stdout } from './vendor-index.cc463d9e.js';
29
29
  import { MessageChannel } from 'node:worker_threads';
30
30
  import { cpus, hostname } from 'node:os';
31
31
  import Tinypool from 'tinypool';
@@ -35,15 +35,15 @@ import { g as getFullName, h as hasFailedSnapshot } from './vendor-tasks.f9d75ae
35
35
  import { getTests, hasFailed, getSuites, generateHash, calculateSuiteHash, someTasksAreOnly, interpretTaskModes, getTasks } from '@vitest/runner/utils';
36
36
  import { createRequire, builtinModules } from 'node:module';
37
37
  import { createHash } from 'node:crypto';
38
- import { s as signalExit, e as execa } from './vendor-index.c1e09929.js';
38
+ import { o as onExit, e as execa } from './vendor-index.1f85e5f1.js';
39
39
  import { writeFile, rm } from 'node:fs/promises';
40
- import cn from 'module';
40
+ import ue from 'module';
41
41
  import { parse as parse$4 } from 'acorn';
42
42
  import { ancestor, simple, findNodeAround } from 'acorn-walk';
43
43
  import MagicString from 'magic-string';
44
44
  import { stripLiteral } from 'strip-literal';
45
45
  import readline from 'node:readline';
46
- import require$$0$4 from 'readline';
46
+ import require$$0$2 from 'readline';
47
47
 
48
48
  function _mergeNamespaces(n, m) {
49
49
  m.forEach(function (e) {
@@ -60,7 +60,7 @@ function _mergeNamespaces(n, m) {
60
60
  return Object.freeze(n);
61
61
  }
62
62
 
63
- var version$1 = "0.32.2";
63
+ var version$1 = "0.32.3";
64
64
 
65
65
  const __dirname$1 = url.fileURLToPath(new URL(".", import.meta.url));
66
66
  async function ensurePackageInstalled(dependency, root, errorMessage) {
@@ -81,7 +81,7 @@ async function ensurePackageInstalled(dependency, root, errorMessage) {
81
81
  message: c.reset(`Do you want to install ${c.green(dependency)}?`)
82
82
  });
83
83
  if (install) {
84
- await (await import('./chunk-install-pkg.62047ee6.js')).installPackage(dependency, { dev: true });
84
+ await (await import('./chunk-install-pkg.0716919d.js')).installPackage(dependency, { dev: true });
85
85
  process.stderr.write(c.yellow(`
86
86
  Package ${dependency} installed, re-run the command to start.
87
87
  `));
@@ -430,7 +430,7 @@ var path$9 = {};
430
430
 
431
431
  Object.defineProperty(path$9, "__esModule", { value: true });
432
432
  path$9.removeLeadingDotSegment = path$9.escape = path$9.makeAbsolute = path$9.unixify = void 0;
433
- const path$8 = p;
433
+ const path$8 = f$1;
434
434
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
435
435
  const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
436
436
  /**
@@ -636,7 +636,7 @@ var isGlob$1 = function isGlob(str, options) {
636
636
  };
637
637
 
638
638
  var isGlob = isGlob$1;
639
- var pathPosixDirname = p.posix.dirname;
639
+ var pathPosixDirname = f$1.posix.dirname;
640
640
  var isWin32 = require$$0.platform() === 'win32';
641
641
 
642
642
  var slash = '/';
@@ -789,7 +789,7 @@ var utils$j = {};
789
789
  };
790
790
  flat(args);
791
791
  return result;
792
- };
792
+ };
793
793
  } (utils$j));
794
794
 
795
795
  const utils$i = utils$j;
@@ -1133,7 +1133,7 @@ var toRegexRange_1 = toRegexRange$1;
1133
1133
  * Licensed under the MIT License.
1134
1134
  */
1135
1135
 
1136
- const util$3 = require$$0$1;
1136
+ const util$3 = require$$2;
1137
1137
  const toRegexRange = toRegexRange_1;
1138
1138
 
1139
1139
  const isObject$1 = val => val !== null && typeof val === 'object' && !Array.isArray(val);
@@ -2096,11 +2096,9 @@ braces$1.create = (input, options = {}) => {
2096
2096
 
2097
2097
  var braces_1 = braces$1;
2098
2098
 
2099
- var picomatch$2 = {exports: {}};
2100
-
2101
2099
  var utils$f = {};
2102
2100
 
2103
- const path$7 = p;
2101
+ const path$7 = f$1;
2104
2102
  const WIN_SLASH = '\\\\/';
2105
2103
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
2106
2104
 
@@ -2280,7 +2278,7 @@ var constants$3 = {
2280
2278
 
2281
2279
  (function (exports) {
2282
2280
 
2283
- const path = p;
2281
+ const path = f$1;
2284
2282
  const win32 = process.platform === 'win32';
2285
2283
  const {
2286
2284
  REGEX_BACKSLASH,
@@ -2341,7 +2339,7 @@ var constants$3 = {
2341
2339
  output = `(?:^(?!${output}).*$)`;
2342
2340
  }
2343
2341
  return output;
2344
- };
2342
+ };
2345
2343
  } (utils$f));
2346
2344
 
2347
2345
  const utils$e = utils$f;
@@ -3824,7 +3822,7 @@ parse$1.fastpaths = (input, options) => {
3824
3822
 
3825
3823
  var parse_1 = parse$1;
3826
3824
 
3827
- const path$6 = p;
3825
+ const path$6 = f$1;
3828
3826
  const scan = scan_1;
3829
3827
  const parse = parse_1;
3830
3828
  const utils$c = utils$f;
@@ -3853,9 +3851,9 @@ const isObject = val => val && typeof val === 'object' && !Array.isArray(val);
3853
3851
  * @api public
3854
3852
  */
3855
3853
 
3856
- const picomatch$1 = (glob, options, returnState = false) => {
3854
+ const picomatch$2 = (glob, options, returnState = false) => {
3857
3855
  if (Array.isArray(glob)) {
3858
- const fns = glob.map(input => picomatch$1(input, options, returnState));
3856
+ const fns = glob.map(input => picomatch$2(input, options, returnState));
3859
3857
  const arrayMatcher = str => {
3860
3858
  for (const isMatch of fns) {
3861
3859
  const state = isMatch(str);
@@ -3875,8 +3873,8 @@ const picomatch$1 = (glob, options, returnState = false) => {
3875
3873
  const opts = options || {};
3876
3874
  const posix = utils$c.isWindows(options);
3877
3875
  const regex = isState
3878
- ? picomatch$1.compileRe(glob, options)
3879
- : picomatch$1.makeRe(glob, options, false, true);
3876
+ ? picomatch$2.compileRe(glob, options)
3877
+ : picomatch$2.makeRe(glob, options, false, true);
3880
3878
 
3881
3879
  const state = regex.state;
3882
3880
  delete regex.state;
@@ -3884,11 +3882,11 @@ const picomatch$1 = (glob, options, returnState = false) => {
3884
3882
  let isIgnored = () => false;
3885
3883
  if (opts.ignore) {
3886
3884
  const ignoreOpts = { ...options, ignore: null, onMatch: null, onResult: null };
3887
- isIgnored = picomatch$1(opts.ignore, ignoreOpts, returnState);
3885
+ isIgnored = picomatch$2(opts.ignore, ignoreOpts, returnState);
3888
3886
  }
3889
3887
 
3890
3888
  const matcher = (input, returnObject = false) => {
3891
- const { isMatch, match, output } = picomatch$1.test(input, regex, options, { glob, posix });
3889
+ const { isMatch, match, output } = picomatch$2.test(input, regex, options, { glob, posix });
3892
3890
  const result = { glob, state, regex, posix, input, output, match, isMatch };
3893
3891
 
3894
3892
  if (typeof opts.onResult === 'function') {
@@ -3938,7 +3936,7 @@ const picomatch$1 = (glob, options, returnState = false) => {
3938
3936
  * @api public
3939
3937
  */
3940
3938
 
3941
- picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
3939
+ picomatch$2.test = (input, regex, options, { glob, posix } = {}) => {
3942
3940
  if (typeof input !== 'string') {
3943
3941
  throw new TypeError('Expected input to be a string');
3944
3942
  }
@@ -3959,7 +3957,7 @@ picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
3959
3957
 
3960
3958
  if (match === false || opts.capture === true) {
3961
3959
  if (opts.matchBase === true || opts.basename === true) {
3962
- match = picomatch$1.matchBase(input, regex, options, posix);
3960
+ match = picomatch$2.matchBase(input, regex, options, posix);
3963
3961
  } else {
3964
3962
  match = regex.exec(output);
3965
3963
  }
@@ -3982,8 +3980,8 @@ picomatch$1.test = (input, regex, options, { glob, posix } = {}) => {
3982
3980
  * @api public
3983
3981
  */
3984
3982
 
3985
- picomatch$1.matchBase = (input, glob, options, posix = utils$c.isWindows(options)) => {
3986
- const regex = glob instanceof RegExp ? glob : picomatch$1.makeRe(glob, options);
3983
+ picomatch$2.matchBase = (input, glob, options, posix = utils$c.isWindows(options)) => {
3984
+ const regex = glob instanceof RegExp ? glob : picomatch$2.makeRe(glob, options);
3987
3985
  return regex.test(path$6.basename(input));
3988
3986
  };
3989
3987
 
@@ -4004,7 +4002,7 @@ picomatch$1.matchBase = (input, glob, options, posix = utils$c.isWindows(options
4004
4002
  * @api public
4005
4003
  */
4006
4004
 
4007
- picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)(str);
4005
+ picomatch$2.isMatch = (str, patterns, options) => picomatch$2(patterns, options)(str);
4008
4006
 
4009
4007
  /**
4010
4008
  * Parse a glob pattern to create the source string for a regular
@@ -4020,8 +4018,8 @@ picomatch$1.isMatch = (str, patterns, options) => picomatch$1(patterns, options)
4020
4018
  * @api public
4021
4019
  */
4022
4020
 
4023
- picomatch$1.parse = (pattern, options) => {
4024
- if (Array.isArray(pattern)) return pattern.map(p => picomatch$1.parse(p, options));
4021
+ picomatch$2.parse = (pattern, options) => {
4022
+ if (Array.isArray(pattern)) return pattern.map(p => picomatch$2.parse(p, options));
4025
4023
  return parse(pattern, { ...options, fastpaths: false });
4026
4024
  };
4027
4025
 
@@ -4052,7 +4050,7 @@ picomatch$1.parse = (pattern, options) => {
4052
4050
  * @api public
4053
4051
  */
4054
4052
 
4055
- picomatch$1.scan = (input, options) => scan(input, options);
4053
+ picomatch$2.scan = (input, options) => scan(input, options);
4056
4054
 
4057
4055
  /**
4058
4056
  * Compile a regular expression from the `state` object returned by the
@@ -4066,7 +4064,7 @@ picomatch$1.scan = (input, options) => scan(input, options);
4066
4064
  * @api public
4067
4065
  */
4068
4066
 
4069
- picomatch$1.compileRe = (state, options, returnOutput = false, returnState = false) => {
4067
+ picomatch$2.compileRe = (state, options, returnOutput = false, returnState = false) => {
4070
4068
  if (returnOutput === true) {
4071
4069
  return state.output;
4072
4070
  }
@@ -4080,7 +4078,7 @@ picomatch$1.compileRe = (state, options, returnOutput = false, returnState = fal
4080
4078
  source = `^(?!${source}).*$`;
4081
4079
  }
4082
4080
 
4083
- const regex = picomatch$1.toRegex(source, options);
4081
+ const regex = picomatch$2.toRegex(source, options);
4084
4082
  if (returnState === true) {
4085
4083
  regex.state = state;
4086
4084
  }
@@ -4107,7 +4105,7 @@ picomatch$1.compileRe = (state, options, returnOutput = false, returnState = fal
4107
4105
  * @api public
4108
4106
  */
4109
4107
 
4110
- picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
4108
+ picomatch$2.makeRe = (input, options = {}, returnOutput = false, returnState = false) => {
4111
4109
  if (!input || typeof input !== 'string') {
4112
4110
  throw new TypeError('Expected a non-empty string');
4113
4111
  }
@@ -4122,7 +4120,7 @@ picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = f
4122
4120
  parsed = parse(input, options);
4123
4121
  }
4124
4122
 
4125
- return picomatch$1.compileRe(parsed, options, returnOutput, returnState);
4123
+ return picomatch$2.compileRe(parsed, options, returnOutput, returnState);
4126
4124
  };
4127
4125
 
4128
4126
  /**
@@ -4142,7 +4140,7 @@ picomatch$1.makeRe = (input, options = {}, returnOutput = false, returnState = f
4142
4140
  * @api public
4143
4141
  */
4144
4142
 
4145
- picomatch$1.toRegex = (source, options) => {
4143
+ picomatch$2.toRegex = (source, options) => {
4146
4144
  try {
4147
4145
  const opts = options || {};
4148
4146
  return new RegExp(source, opts.flags || (opts.nocase ? 'i' : ''));
@@ -4157,22 +4155,19 @@ picomatch$1.toRegex = (source, options) => {
4157
4155
  * @return {Object}
4158
4156
  */
4159
4157
 
4160
- picomatch$1.constants = constants$1;
4158
+ picomatch$2.constants = constants$1;
4161
4159
 
4162
4160
  /**
4163
4161
  * Expose "picomatch"
4164
4162
  */
4165
4163
 
4166
- var picomatch_1 = picomatch$1;
4167
-
4168
- (function (module) {
4164
+ var picomatch_1 = picomatch$2;
4169
4165
 
4170
- module.exports = picomatch_1;
4171
- } (picomatch$2));
4166
+ var picomatch$1 = picomatch_1;
4172
4167
 
4173
- const util$2 = require$$0$1;
4168
+ const util$2 = require$$2;
4174
4169
  const braces = braces_1;
4175
- const picomatch = picomatch$2.exports;
4170
+ const picomatch = picomatch$1;
4176
4171
  const utils$b = utils$f;
4177
4172
  const isEmptyString = val => val === '' || val === './';
4178
4173
 
@@ -4636,9 +4631,11 @@ micromatch$1.braceExpand = (pattern, options) => {
4636
4631
 
4637
4632
  var micromatch_1 = micromatch$1;
4638
4633
 
4634
+ var mm = /*@__PURE__*/getDefaultExportFromCjs(micromatch_1);
4635
+
4639
4636
  Object.defineProperty(pattern$1, "__esModule", { value: true });
4640
4637
  pattern$1.matchAny = pattern$1.convertPatternsToRe = pattern$1.makeRe = pattern$1.getPatternParts = pattern$1.expandBraceExpansion = pattern$1.expandPatternsWithBraceExpansion = pattern$1.isAffectDepthOfReadingPattern = pattern$1.endsWithSlashGlobStar = pattern$1.hasGlobStar = pattern$1.getBaseDirectory = pattern$1.isPatternRelatedToParentDirectory = pattern$1.getPatternsOutsideCurrentDirectory = pattern$1.getPatternsInsideCurrentDirectory = pattern$1.getPositivePatterns = pattern$1.getNegativePatterns = pattern$1.isPositivePattern = pattern$1.isNegativePattern = pattern$1.convertToNegativePattern = pattern$1.convertToPositivePattern = pattern$1.isDynamicPattern = pattern$1.isStaticPattern = void 0;
4641
- const path$5 = p;
4638
+ const path$5 = f$1;
4642
4639
  const globParent = globParent$1;
4643
4640
  const micromatch = micromatch_1;
4644
4641
  const GLOBSTAR = '**';
@@ -4814,7 +4811,7 @@ var stream$4 = {};
4814
4811
  * Copyright (c) 2014-2020 Teambition
4815
4812
  * Licensed under the MIT license.
4816
4813
  */
4817
- const Stream = require$$0$2;
4814
+ const Stream = require$$0$1;
4818
4815
  const PassThrough = Stream.PassThrough;
4819
4816
  const slice = Array.prototype.slice;
4820
4817
 
@@ -5187,7 +5184,7 @@ var fs$5 = {};
5187
5184
  (function (exports) {
5188
5185
  Object.defineProperty(exports, "__esModule", { value: true });
5189
5186
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
5190
- const fs = require$$0$3;
5187
+ const fs = $;
5191
5188
  exports.FILE_SYSTEM_ADAPTER = {
5192
5189
  lstat: fs.lstat,
5193
5190
  stat: fs.stat,
@@ -5200,7 +5197,7 @@ var fs$5 = {};
5200
5197
  }
5201
5198
  return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
5202
5199
  }
5203
- exports.createFileSystemAdapter = createFileSystemAdapter;
5200
+ exports.createFileSystemAdapter = createFileSystemAdapter;
5204
5201
  } (fs$5));
5205
5202
 
5206
5203
  Object.defineProperty(settings$3, "__esModule", { value: true });
@@ -5538,7 +5535,7 @@ var fs$1 = {};
5538
5535
  (function (exports) {
5539
5536
  Object.defineProperty(exports, "__esModule", { value: true });
5540
5537
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
5541
- const fs = require$$0$3;
5538
+ const fs = $;
5542
5539
  exports.FILE_SYSTEM_ADAPTER = {
5543
5540
  lstat: fs.lstat,
5544
5541
  stat: fs.stat,
@@ -5553,11 +5550,11 @@ var fs$1 = {};
5553
5550
  }
5554
5551
  return Object.assign(Object.assign({}, exports.FILE_SYSTEM_ADAPTER), fsMethods);
5555
5552
  }
5556
- exports.createFileSystemAdapter = createFileSystemAdapter;
5553
+ exports.createFileSystemAdapter = createFileSystemAdapter;
5557
5554
  } (fs$1));
5558
5555
 
5559
5556
  Object.defineProperty(settings$2, "__esModule", { value: true });
5560
- const path$3 = p;
5557
+ const path$3 = f$1;
5561
5558
  const fsStat$3 = out$1;
5562
5559
  const fs = fs$1;
5563
5560
  let Settings$1 = class Settings {
@@ -5922,6 +5919,8 @@ function queueAsPromised (context, worker, concurrency) {
5922
5919
  queue.exports = fastqueue;
5923
5920
  queue.exports.promise = queueAsPromised;
5924
5921
 
5922
+ var queueExports = queue.exports;
5923
+
5925
5924
  var common$3 = {};
5926
5925
 
5927
5926
  Object.defineProperty(common$3, "__esModule", { value: true });
@@ -5969,9 +5968,9 @@ let Reader$1 = class Reader {
5969
5968
  reader$1.default = Reader$1;
5970
5969
 
5971
5970
  Object.defineProperty(async$4, "__esModule", { value: true });
5972
- const events_1 = require$$2;
5971
+ const events_1 = require$$2$1;
5973
5972
  const fsScandir$2 = out$2;
5974
- const fastq = queue.exports;
5973
+ const fastq = queueExports;
5975
5974
  const common$1 = common$3;
5976
5975
  const reader_1$4 = reader$1;
5977
5976
  class AsyncReader extends reader_1$4.default {
@@ -6098,7 +6097,7 @@ function callSuccessCallback(callback, entries) {
6098
6097
  var stream$2 = {};
6099
6098
 
6100
6099
  Object.defineProperty(stream$2, "__esModule", { value: true });
6101
- const stream_1$5 = require$$0$2;
6100
+ const stream_1$5 = require$$0$1;
6102
6101
  const async_1$3 = async$4;
6103
6102
  class StreamProvider {
6104
6103
  constructor(_root, _settings) {
@@ -6211,7 +6210,7 @@ sync$3.default = SyncProvider;
6211
6210
  var settings$1 = {};
6212
6211
 
6213
6212
  Object.defineProperty(settings$1, "__esModule", { value: true });
6214
- const path$2 = p;
6213
+ const path$2 = f$1;
6215
6214
  const fsScandir = out$2;
6216
6215
  class Settings {
6217
6216
  constructor(_options = {}) {
@@ -6273,7 +6272,7 @@ function getSettings(settingsOrOptions = {}) {
6273
6272
  var reader = {};
6274
6273
 
6275
6274
  Object.defineProperty(reader, "__esModule", { value: true });
6276
- const path$1 = p;
6275
+ const path$1 = f$1;
6277
6276
  const fsStat$2 = out$1;
6278
6277
  const utils$6 = utils$k;
6279
6278
  class Reader {
@@ -6308,7 +6307,7 @@ reader.default = Reader;
6308
6307
  var stream$1 = {};
6309
6308
 
6310
6309
  Object.defineProperty(stream$1, "__esModule", { value: true });
6311
- const stream_1$3 = require$$0$2;
6310
+ const stream_1$3 = require$$0$1;
6312
6311
  const fsStat$1 = out$1;
6313
6312
  const fsWalk$2 = out$3;
6314
6313
  const reader_1$2 = reader;
@@ -6667,7 +6666,7 @@ class EntryTransformer {
6667
6666
  entry.default = EntryTransformer;
6668
6667
 
6669
6668
  Object.defineProperty(provider, "__esModule", { value: true });
6670
- const path = p;
6669
+ const path = f$1;
6671
6670
  const deep_1 = deep;
6672
6671
  const entry_1 = entry$1;
6673
6672
  const error_1 = error;
@@ -6740,7 +6739,7 @@ async$7.default = ProviderAsync;
6740
6739
  var stream = {};
6741
6740
 
6742
6741
  Object.defineProperty(stream, "__esModule", { value: true });
6743
- const stream_1$1 = require$$0$2;
6742
+ const stream_1$1 = require$$0$1;
6744
6743
  const stream_2 = stream$1;
6745
6744
  const provider_1$1 = provider;
6746
6745
  class ProviderStream extends provider_1$1.default {
@@ -6845,7 +6844,7 @@ var settings = {};
6845
6844
  (function (exports) {
6846
6845
  Object.defineProperty(exports, "__esModule", { value: true });
6847
6846
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
6848
- const fs = require$$0$3;
6847
+ const fs = $;
6849
6848
  const os = require$$0;
6850
6849
  /**
6851
6850
  * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
@@ -6898,7 +6897,7 @@ var settings = {};
6898
6897
  return Object.assign(Object.assign({}, exports.DEFAULT_FILE_SYSTEM_ADAPTER), methods);
6899
6898
  }
6900
6899
  }
6901
- exports.default = Settings;
6900
+ exports.default = Settings;
6902
6901
  } (settings));
6903
6902
 
6904
6903
  const taskManager = tasks;
@@ -6969,6 +6968,8 @@ function assertPatternsInput(input) {
6969
6968
  }
6970
6969
  var out = FastGlob;
6971
6970
 
6971
+ var fg = /*@__PURE__*/getDefaultExportFromCjs(out);
6972
+
6972
6973
  const envsOrder = [
6973
6974
  "node",
6974
6975
  "jsdom",
@@ -6982,7 +6983,7 @@ async function groupFilesByEnv(files) {
6982
6983
  let env = (_a = code.match(/@(?:vitest|jest)-environment\s+?([\w-]+)\b/)) == null ? void 0 : _a[1];
6983
6984
  if (!env) {
6984
6985
  for (const [glob, target] of project.config.environmentMatchGlobs || []) {
6985
- if (micromatch_1.isMatch(file, glob, { cwd: project.config.root })) {
6986
+ if (mm.isMatch(file, glob, { cwd: project.config.root })) {
6986
6987
  env = target;
6987
6988
  break;
6988
6989
  }
@@ -7391,7 +7392,7 @@ function createPool(ctx) {
7391
7392
  for (const [glob, pool] of project.config.poolMatchGlobs || []) {
7392
7393
  if (pool === "browser")
7393
7394
  throw new Error('Since Vitest 0.31.0 "browser" pool is not supported in "poolMatchGlobs". You can create a workspace to run some of your tests in browser in parallel. Read more: https://vitest.dev/guide/workspace');
7394
- if (micromatch_1.isMatch(file, glob, { cwd: project.config.root }))
7395
+ if (mm.isMatch(file, glob, { cwd: project.config.root }))
7395
7396
  return pool;
7396
7397
  }
7397
7398
  return getDefaultPoolName(project);
@@ -7472,12 +7473,17 @@ function ansiRegex({onlyFirst = false} = {}) {
7472
7473
  return new RegExp(pattern, onlyFirst ? undefined : 'g');
7473
7474
  }
7474
7475
 
7476
+ const regex = ansiRegex();
7477
+
7475
7478
  function stripAnsi(string) {
7476
7479
  if (typeof string !== 'string') {
7477
7480
  throw new TypeError(`Expected a \`string\`, got \`${typeof string}\``);
7478
7481
  }
7479
7482
 
7480
- return string.replace(ansiRegex(), '');
7483
+ // Even though the regex is global, we don't need to reset the `.lastIndex`
7484
+ // because unlike `.exec()` and `.test()`, `.replace()` does it automatically
7485
+ // and doing it manually has a performance penalty.
7486
+ return string.replace(regex, '');
7481
7487
  }
7482
7488
 
7483
7489
  const spinnerMap = /* @__PURE__ */ new WeakMap();
@@ -7487,7 +7493,7 @@ const skipped = c.dim(c.gray(F_DOWN));
7487
7493
  function getCols(delta = 0) {
7488
7494
  var _a;
7489
7495
  let length = (_a = process.stdout) == null ? void 0 : _a.columns;
7490
- if (!length || isNaN(length))
7496
+ if (!length || Number.isNaN(length))
7491
7497
  length = 30;
7492
7498
  return Math.max(length + delta, 0);
7493
7499
  }
@@ -7654,15 +7660,17 @@ const WAIT_FOR_CHANGE_CANCELLED = `
7654
7660
  ${c.bold(c.inverse(c.red(" CANCELLED ")))}${c.red(" Test run cancelled. Watching for file changes...")}`;
7655
7661
  const LAST_RUN_LOG_TIMEOUT = 1500;
7656
7662
  class BaseReporter {
7663
+ start = 0;
7664
+ end = 0;
7665
+ watchFilters;
7666
+ isTTY = isNode && ((_a = process.stdout) == null ? void 0 : _a.isTTY) && !isCI;
7667
+ ctx = void 0;
7668
+ _filesInWatchMode = /* @__PURE__ */ new Map();
7669
+ _lastRunTimeout = 0;
7670
+ _lastRunTimer;
7671
+ _lastRunCount = 0;
7672
+ _timeStart = /* @__PURE__ */ new Date();
7657
7673
  constructor() {
7658
- this.start = 0;
7659
- this.end = 0;
7660
- this.isTTY = isNode && ((_a = process.stdout) == null ? void 0 : _a.isTTY) && !isCI;
7661
- this.ctx = void 0;
7662
- this._filesInWatchMode = /* @__PURE__ */ new Map();
7663
- this._lastRunTimeout = 0;
7664
- this._lastRunCount = 0;
7665
- this._timeStart = /* @__PURE__ */ new Date();
7666
7674
  this.registerUnhandledRejection();
7667
7675
  }
7668
7676
  get mode() {
@@ -7976,10 +7984,7 @@ ${c.cyan(c.inverse(c.bold(" BENCH ")))} ${c.cyan("Summary")}
7976
7984
  }
7977
7985
 
7978
7986
  class BasicReporter extends BaseReporter {
7979
- constructor() {
7980
- super(...arguments);
7981
- this.isTTY = false;
7982
- }
7987
+ isTTY = false;
7983
7988
  reportSummary(files, errors) {
7984
7989
  this.ctx.logger.log();
7985
7990
  return super.reportSummary(files, errors);
@@ -8663,16 +8668,19 @@ var eastasianwidth = {exports: {}};
8663
8668
  eawLen += charLen;
8664
8669
  }
8665
8670
  return result;
8666
- };
8671
+ };
8667
8672
  } (eastasianwidth));
8668
8673
 
8669
- var eastAsianWidth = eastasianwidth.exports;
8674
+ var eastasianwidthExports = eastasianwidth.exports;
8675
+ var eastAsianWidth = /*@__PURE__*/getDefaultExportFromCjs(eastasianwidthExports);
8670
8676
 
8671
8677
  var emojiRegex = function () {
8672
8678
  // https://mths.be/emoji
8673
8679
  return /\uD83C\uDFF4\uDB40\uDC67\uDB40\uDC62(?:\uDB40\uDC77\uDB40\uDC6C\uDB40\uDC73|\uDB40\uDC73\uDB40\uDC63\uDB40\uDC74|\uDB40\uDC65\uDB40\uDC6E\uDB40\uDC67)\uDB40\uDC7F|(?:\uD83E\uDDD1\uD83C\uDFFF\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFF\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFE])|(?:\uD83E\uDDD1\uD83C\uDFFE\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFE\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFD\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFD\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFC\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFC\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|(?:\uD83E\uDDD1\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1|\uD83D\uDC69\uD83C\uDFFB\u200D\uD83E\uDD1D\u200D(?:\uD83D[\uDC68\uDC69]))(?:\uD83C[\uDFFC-\uDFFF])|\uD83D\uDC68(?:\uD83C\uDFFB(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFC-\uDFFF])|[\u2695\u2696\u2708]\uFE0F|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))?|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFF]))|\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D)?\uD83D\uDC68|(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFE])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB-\uDFFD\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83E\uDD1D\u200D\uD83D\uDC68(?:\uD83C[\uDFFB\uDFFD-\uDFFF])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])\uFE0F|\u200D(?:(?:\uD83D[\uDC68\uDC69])\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D[\uDC66\uDC67])|\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC)?|(?:\uD83D\uDC69(?:\uD83C\uDFFB\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|(?:\uD83C[\uDFFC-\uDFFF])\u200D\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69]))|\uD83E\uDDD1(?:\uD83C[\uDFFB-\uDFFF])\u200D\uD83E\uDD1D\u200D\uD83E\uDDD1)(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67]))|\uD83D\uDC69(?:\u200D(?:\u2764\uFE0F\u200D(?:\uD83D\uDC8B\u200D(?:\uD83D[\uDC68\uDC69])|\uD83D[\uDC68\uDC69])|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83E\uDDD1(?:\u200D(?:\uD83E\uDD1D\u200D\uD83E\uDDD1|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFF\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFE\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFD\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFC\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C\uDFFB\u200D(?:\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD]))|\uD83D\uDC69\u200D\uD83D\uDC66\u200D\uD83D\uDC66|\uD83D\uDC69\u200D\uD83D\uDC69\u200D(?:\uD83D[\uDC66\uDC67])|\uD83D\uDC69\u200D\uD83D\uDC67\u200D(?:\uD83D[\uDC66\uDC67])|(?:\uD83D\uDC41\uFE0F\u200D\uD83D\uDDE8|\uD83E\uDDD1(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDC69(?:\uD83C\uDFFF\u200D[\u2695\u2696\u2708]|\uD83C\uDFFE\u200D[\u2695\u2696\u2708]|\uD83C\uDFFD\u200D[\u2695\u2696\u2708]|\uD83C\uDFFC\u200D[\u2695\u2696\u2708]|\uD83C\uDFFB\u200D[\u2695\u2696\u2708]|\u200D[\u2695\u2696\u2708])|\uD83D\uDE36\u200D\uD83C\uDF2B|\uD83C\uDFF3\uFE0F\u200D\u26A7|\uD83D\uDC3B\u200D\u2744|(?:(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF])\u200D[\u2640\u2642]|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])\u200D[\u2640\u2642]|\uD83C\uDFF4\u200D\u2620|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])\u200D[\u2640\u2642]|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u2600-\u2604\u260E\u2611\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26B0\u26B1\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0\u26F1\u26F4\u26F7\u26F8\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u3030\u303D\u3297\u3299]|\uD83C[\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]|\uD83D[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3])\uFE0F|\uD83C\uDFF3\uFE0F\u200D\uD83C\uDF08|\uD83D\uDC69\u200D\uD83D\uDC67|\uD83D\uDC69\u200D\uD83D\uDC66|\uD83D\uDE35\u200D\uD83D\uDCAB|\uD83D\uDE2E\u200D\uD83D\uDCA8|\uD83D\uDC15\u200D\uD83E\uDDBA|\uD83E\uDDD1(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83D\uDC69(?:\uD83C\uDFFF|\uD83C\uDFFE|\uD83C\uDFFD|\uD83C\uDFFC|\uD83C\uDFFB)?|\uD83C\uDDFD\uD83C\uDDF0|\uD83C\uDDF6\uD83C\uDDE6|\uD83C\uDDF4\uD83C\uDDF2|\uD83D\uDC08\u200D\u2B1B|\u2764\uFE0F\u200D(?:\uD83D\uDD25|\uD83E\uDE79)|\uD83D\uDC41\uFE0F|\uD83C\uDFF3\uFE0F|\uD83C\uDDFF(?:\uD83C[\uDDE6\uDDF2\uDDFC])|\uD83C\uDDFE(?:\uD83C[\uDDEA\uDDF9])|\uD83C\uDDFC(?:\uD83C[\uDDEB\uDDF8])|\uD83C\uDDFB(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA])|\uD83C\uDDFA(?:\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF])|\uD83C\uDDF9(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF])|\uD83C\uDDF8(?:\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF])|\uD83C\uDDF7(?:\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC])|\uD83C\uDDF5(?:\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE])|\uD83C\uDDF3(?:\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF])|\uD83C\uDDF2(?:\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF])|\uD83C\uDDF1(?:\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE])|\uD83C\uDDF0(?:\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF])|\uD83C\uDDEF(?:\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5])|\uD83C\uDDEE(?:\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9])|\uD83C\uDDED(?:\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA])|\uD83C\uDDEC(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE])|\uD83C\uDDEB(?:\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7])|\uD83C\uDDEA(?:\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA])|\uD83C\uDDE9(?:\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF])|\uD83C\uDDE8(?:\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF])|\uD83C\uDDE7(?:\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF])|\uD83C\uDDE6(?:\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF])|[#\*0-9]\uFE0F\u20E3|\u2764\uFE0F|(?:\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD])(?:\uD83C[\uDFFB-\uDFFF])|(?:\u26F9|\uD83C[\uDFCB\uDFCC]|\uD83D\uDD75)(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|\uD83C\uDFF4|(?:[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5])(?:\uD83C[\uDFFB-\uDFFF])|(?:[\u261D\u270C\u270D]|\uD83D[\uDD74\uDD90])(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])|[\u270A\u270B]|\uD83C[\uDF85\uDFC2\uDFC7]|\uD83D[\uDC08\uDC15\uDC3B\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE2E\uDE35\uDE36\uDE4C\uDE4F\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1C\uDD1E\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5]|\uD83C[\uDFC3\uDFC4\uDFCA]|\uD83D[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6]|\uD83E[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD]|\uD83D\uDC6F|\uD83E[\uDD3C\uDDDE\uDDDF]|[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0D\uDD0E\uDD10-\uDD17\uDD1D\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78\uDD7A-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCB\uDDD0\uDDE0-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6]|(?:[\u231A\u231B\u23E9-\u23EC\u23F0\u23F3\u25FD\u25FE\u2614\u2615\u2648-\u2653\u267F\u2693\u26A1\u26AA\u26AB\u26BD\u26BE\u26C4\u26C5\u26CE\u26D4\u26EA\u26F2\u26F3\u26F5\u26FA\u26FD\u2705\u270A\u270B\u2728\u274C\u274E\u2753-\u2755\u2757\u2795-\u2797\u27B0\u27BF\u2B1B\u2B1C\u2B50\u2B55]|\uD83C[\uDC04\uDCCF\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF93\uDFA0-\uDFCA\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF4\uDFF8-\uDFFF]|\uD83D[\uDC00-\uDC3E\uDC40\uDC42-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDD7A\uDD95\uDD96\uDDA4\uDDFB-\uDE4F\uDE80-\uDEC5\uDECC\uDED0-\uDED2\uDED5-\uDED7\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])|(?:[#\*0-9\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23E9-\u23F3\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB-\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u261D\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692-\u2697\u2699\u269B\u269C\u26A0\u26A1\u26A7\u26AA\u26AB\u26B0\u26B1\u26BD\u26BE\u26C4\u26C5\u26C8\u26CE\u26CF\u26D1\u26D3\u26D4\u26E9\u26EA\u26F0-\u26F5\u26F7-\u26FA\u26FD\u2702\u2705\u2708-\u270D\u270F\u2712\u2714\u2716\u271D\u2721\u2728\u2733\u2734\u2744\u2747\u274C\u274E\u2753-\u2755\u2757\u2763\u2764\u2795-\u2797\u27A1\u27B0\u27BF\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B50\u2B55\u3030\u303D\u3297\u3299]|\uD83C[\uDC04\uDCCF\uDD70\uDD71\uDD7E\uDD7F\uDD8E\uDD91-\uDD9A\uDDE6-\uDDFF\uDE01\uDE02\uDE1A\uDE2F\uDE32-\uDE3A\uDE50\uDE51\uDF00-\uDF21\uDF24-\uDF93\uDF96\uDF97\uDF99-\uDF9B\uDF9E-\uDFF0\uDFF3-\uDFF5\uDFF7-\uDFFF]|\uD83D[\uDC00-\uDCFD\uDCFF-\uDD3D\uDD49-\uDD4E\uDD50-\uDD67\uDD6F\uDD70\uDD73-\uDD7A\uDD87\uDD8A-\uDD8D\uDD90\uDD95\uDD96\uDDA4\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA-\uDE4F\uDE80-\uDEC5\uDECB-\uDED2\uDED5-\uDED7\uDEE0-\uDEE5\uDEE9\uDEEB\uDEEC\uDEF0\uDEF3-\uDEFC\uDFE0-\uDFEB]|\uD83E[\uDD0C-\uDD3A\uDD3C-\uDD45\uDD47-\uDD78\uDD7A-\uDDCB\uDDCD-\uDDFF\uDE70-\uDE74\uDE78-\uDE7A\uDE80-\uDE86\uDE90-\uDEA8\uDEB0-\uDEB6\uDEC0-\uDEC2\uDED0-\uDED6])\uFE0F|(?:[\u261D\u26F9\u270A-\u270D]|\uD83C[\uDF85\uDFC2-\uDFC4\uDFC7\uDFCA-\uDFCC]|\uD83D[\uDC42\uDC43\uDC46-\uDC50\uDC66-\uDC78\uDC7C\uDC81-\uDC83\uDC85-\uDC87\uDC8F\uDC91\uDCAA\uDD74\uDD75\uDD7A\uDD90\uDD95\uDD96\uDE45-\uDE47\uDE4B-\uDE4F\uDEA3\uDEB4-\uDEB6\uDEC0\uDECC]|\uD83E[\uDD0C\uDD0F\uDD18-\uDD1F\uDD26\uDD30-\uDD39\uDD3C-\uDD3E\uDD77\uDDB5\uDDB6\uDDB8\uDDB9\uDDBB\uDDCD-\uDDCF\uDDD1-\uDDDD])/g;
8674
8680
  };
8675
8681
 
8682
+ var emojiRegex$1 = /*@__PURE__*/getDefaultExportFromCjs(emojiRegex);
8683
+
8676
8684
  function stringWidth(string, options = {}) {
8677
8685
  if (typeof string !== 'string' || string.length === 0) {
8678
8686
  return 0;
@@ -8689,7 +8697,7 @@ function stringWidth(string, options = {}) {
8689
8697
  return 0;
8690
8698
  }
8691
8699
 
8692
- string = string.replace(emojiRegex(), ' ');
8700
+ string = string.replace(emojiRegex$1(), ' ');
8693
8701
 
8694
8702
  const ambiguousCharacterWidth = options.ambiguousIsNarrow ? 1 : 2;
8695
8703
  let width = 0;
@@ -8891,7 +8899,7 @@ function renderTree$1(tasks, options, level = 0, maxRows) {
8891
8899
  let prefix = ` ${getStateSymbol(task)} `;
8892
8900
  if (level === 0 && task.type === "suite" && task.projectName)
8893
8901
  prefix += formatProjectName(task.projectName);
8894
- if (task.type === "test" && ((_a = task.result) == null ? void 0 : _a.retryCount) && task.result.retryCount > 1)
8902
+ if (task.type === "test" && ((_a = task.result) == null ? void 0 : _a.retryCount) && task.result.retryCount > 0)
8895
8903
  suffix += c.yellow(` (retry x${task.result.retryCount})`);
8896
8904
  if (task.type === "suite" && !((_b = task.meta) == null ? void 0 : _b.typecheck)) {
8897
8905
  const tests = getTests(task);
@@ -8899,7 +8907,7 @@ function renderTree$1(tasks, options, level = 0, maxRows) {
8899
8907
  }
8900
8908
  if (task.mode === "skip" || task.mode === "todo")
8901
8909
  suffix += ` ${c.dim(c.gray("[skipped]"))}`;
8902
- if (task.type === "test" && ((_c = task.result) == null ? void 0 : _c.repeatCount) && task.result.repeatCount > 1)
8910
+ if (task.type === "test" && ((_c = task.result) == null ? void 0 : _c.repeatCount) && task.result.repeatCount > 0)
8903
8911
  suffix += c.yellow(` (repeat x${task.result.repeatCount})`);
8904
8912
  if (((_d = task.result) == null ? void 0 : _d.duration) != null) {
8905
8913
  if (task.result.duration > DURATION_LONG$1)
@@ -9005,9 +9013,16 @@ function createListRenderer(_tasks, options) {
9005
9013
  }
9006
9014
 
9007
9015
  class DefaultReporter extends BaseReporter {
9008
- constructor() {
9009
- super(...arguments);
9010
- this.rendererOptions = {};
9016
+ renderer;
9017
+ rendererOptions = {};
9018
+ renderSucceedDefault;
9019
+ onPathsCollected(paths = []) {
9020
+ if (this.isTTY) {
9021
+ if (this.renderSucceedDefault === void 0)
9022
+ this.renderSucceedDefault = !!this.rendererOptions.renderSucceed;
9023
+ if (this.renderSucceedDefault !== true)
9024
+ this.rendererOptions.renderSucceed = paths.length <= 1;
9025
+ }
9011
9026
  }
9012
9027
  async onTestRemoved(trigger) {
9013
9028
  await this.stopListRender();
@@ -9151,6 +9166,7 @@ function createDotRenderer(_tasks, options) {
9151
9166
  }
9152
9167
 
9153
9168
  class DotReporter extends BaseReporter {
9169
+ renderer;
9154
9170
  onCollected() {
9155
9171
  if (this.isTTY) {
9156
9172
  const files = this.ctx.state.getFiles(this.watchFilters);
@@ -9203,9 +9219,8 @@ const StatusMap = {
9203
9219
  todo: "todo"
9204
9220
  };
9205
9221
  let JsonReporter$1 = class JsonReporter {
9206
- constructor() {
9207
- this.start = 0;
9208
- }
9222
+ start = 0;
9223
+ ctx;
9209
9224
  onInit(ctx) {
9210
9225
  this.ctx = ctx;
9211
9226
  this.start = Date.now();
@@ -9241,9 +9256,9 @@ let JsonReporter$1 = class JsonReporter {
9241
9256
  const tests2 = getTests([file]);
9242
9257
  let startTime = tests2.reduce((prev, next) => {
9243
9258
  var _a2;
9244
- return Math.min(prev, ((_a2 = next.result) == null ? void 0 : _a2.startTime) ?? Infinity);
9245
- }, Infinity);
9246
- if (startTime === Infinity)
9259
+ return Math.min(prev, ((_a2 = next.result) == null ? void 0 : _a2.startTime) ?? Number.POSITIVE_INFINITY);
9260
+ }, Number.POSITIVE_INFINITY);
9261
+ if (startTime === Number.POSITIVE_INFINITY)
9247
9262
  startTime = this.start;
9248
9263
  const endTime = tests2.reduce((prev, next) => {
9249
9264
  var _a2, _b2;
@@ -9329,7 +9344,7 @@ let JsonReporter$1 = class JsonReporter {
9329
9344
  if (!error)
9330
9345
  return;
9331
9346
  const stack = parseErrorStacktrace(error);
9332
- const frame = stack[stack.length - 1];
9347
+ const frame = stack[0];
9333
9348
  if (!frame)
9334
9349
  return;
9335
9350
  return { line: frame.line, column: frame.column };
@@ -9368,8 +9383,8 @@ class VerboseReporter extends DefaultReporter {
9368
9383
  class IndentedLogger {
9369
9384
  constructor(baseLog) {
9370
9385
  this.baseLog = baseLog;
9371
- this.currentIndent = "";
9372
9386
  }
9387
+ currentIndent = "";
9373
9388
  indent() {
9374
9389
  this.currentIndent += " ";
9375
9390
  }
@@ -9388,6 +9403,8 @@ function tapString(str) {
9388
9403
  return str.replace(/\\/g, "\\\\").replace(/#/g, "\\#").replace(/\n/g, " ");
9389
9404
  }
9390
9405
  class TapReporter {
9406
+ ctx;
9407
+ logger;
9391
9408
  onInit(ctx) {
9392
9409
  this.ctx = ctx;
9393
9410
  this.logger = new IndentedLogger(ctx.logger.log.bind(ctx.logger));
@@ -9492,9 +9509,12 @@ function getDuration(task) {
9492
9509
  return executionTime(duration);
9493
9510
  }
9494
9511
  class JUnitReporter {
9495
- constructor() {
9496
- this._timeStart = /* @__PURE__ */ new Date();
9497
- }
9512
+ ctx;
9513
+ reportFile;
9514
+ baseLog;
9515
+ logger;
9516
+ _timeStart = /* @__PURE__ */ new Date();
9517
+ fileFd;
9498
9518
  async onInit(ctx) {
9499
9519
  this.ctx = ctx;
9500
9520
  const outputFile = getOutputFile(this.ctx.config, "junit");
@@ -9668,6 +9688,7 @@ class TapFlatReporter extends TapReporter {
9668
9688
  }
9669
9689
 
9670
9690
  class HangingProcessReporter {
9691
+ whyRunning;
9671
9692
  onInit() {
9672
9693
  const _require = createRequire(import.meta.url);
9673
9694
  this.whyRunning = _require("why-is-node-running");
@@ -9679,9 +9700,8 @@ class HangingProcessReporter {
9679
9700
  }
9680
9701
 
9681
9702
  class JsonReporter {
9682
- constructor() {
9683
- this.start = 0;
9684
- }
9703
+ start = 0;
9704
+ ctx;
9685
9705
  onInit(ctx) {
9686
9706
  this.ctx = ctx;
9687
9707
  }
@@ -9905,10 +9925,8 @@ function createTableRenderer(_tasks, options) {
9905
9925
  }
9906
9926
 
9907
9927
  class TableReporter extends BaseReporter {
9908
- constructor() {
9909
- super(...arguments);
9910
- this.rendererOptions = {};
9911
- }
9928
+ renderer;
9929
+ rendererOptions = {};
9912
9930
  async onTestRemoved(trigger) {
9913
9931
  await this.stopListRender();
9914
9932
  this.ctx.logger.clearScreen(c.yellow("Test removed...") + (trigger ? c.dim(` [ ${this.relative(trigger)} ]
@@ -10027,16 +10045,14 @@ function isAggregateError(err) {
10027
10045
  return err instanceof Error && "errors" in err;
10028
10046
  }
10029
10047
  class StateManager {
10030
- constructor() {
10031
- this.filesMap = /* @__PURE__ */ new Map();
10032
- this.pathsSet = /* @__PURE__ */ new Set();
10033
- this.collectingPromise = void 0;
10034
- this.browserTestPromises = /* @__PURE__ */ new Map();
10035
- this.idMap = /* @__PURE__ */ new Map();
10036
- this.taskFileMap = /* @__PURE__ */ new WeakMap();
10037
- this.errorsSet = /* @__PURE__ */ new Set();
10038
- this.processTimeoutCauses = /* @__PURE__ */ new Set();
10039
- }
10048
+ filesMap = /* @__PURE__ */ new Map();
10049
+ pathsSet = /* @__PURE__ */ new Set();
10050
+ collectingPromise = void 0;
10051
+ browserTestPromises = /* @__PURE__ */ new Map();
10052
+ idMap = /* @__PURE__ */ new Map();
10053
+ taskFileMap = /* @__PURE__ */ new WeakMap();
10054
+ errorsSet = /* @__PURE__ */ new Set();
10055
+ processTimeoutCauses = /* @__PURE__ */ new Set();
10040
10056
  catchError(err, type) {
10041
10057
  if (isAggregateError(err))
10042
10058
  return err.errors.forEach((error) => this.catchError(error, type));
@@ -10243,9 +10259,7 @@ const config = {
10243
10259
  const configDefaults = Object.freeze(config);
10244
10260
 
10245
10261
  class FilesStatsCache {
10246
- constructor() {
10247
- this.cache = /* @__PURE__ */ new Map();
10248
- }
10262
+ cache = /* @__PURE__ */ new Map();
10249
10263
  getStats(key) {
10250
10264
  return this.cache.get(key);
10251
10265
  }
@@ -10271,13 +10285,11 @@ class FilesStatsCache {
10271
10285
  }
10272
10286
 
10273
10287
  class ResultsCache {
10274
- constructor() {
10275
- this.cache = /* @__PURE__ */ new Map();
10276
- this.workspacesKeyMap = /* @__PURE__ */ new Map();
10277
- this.cachePath = null;
10278
- this.version = version$1;
10279
- this.root = "/";
10280
- }
10288
+ cache = /* @__PURE__ */ new Map();
10289
+ workspacesKeyMap = /* @__PURE__ */ new Map();
10290
+ cachePath = null;
10291
+ version = version$1;
10292
+ root = "/";
10281
10293
  getCachePath() {
10282
10294
  return this.cachePath;
10283
10295
  }
@@ -10342,10 +10354,8 @@ class ResultsCache {
10342
10354
  }
10343
10355
 
10344
10356
  class VitestCache {
10345
- constructor() {
10346
- this.results = new ResultsCache();
10347
- this.stats = new FilesStatsCache();
10348
- }
10357
+ results = new ResultsCache();
10358
+ stats = new FilesStatsCache();
10349
10359
  getFileTestResults(key) {
10350
10360
  return this.results.getResults(key);
10351
10361
  }
@@ -10374,6 +10384,7 @@ class VitestCache {
10374
10384
  }
10375
10385
 
10376
10386
  class BaseSequencer {
10387
+ ctx;
10377
10388
  constructor(ctx) {
10378
10389
  this.ctx = ctx;
10379
10390
  }
@@ -10485,11 +10496,11 @@ function resolveConfig(mode, options, viteConfig) {
10485
10496
  if (resolved.watch)
10486
10497
  throw new Error("You cannot use --shard option with enabled watch");
10487
10498
  const [indexString, countString] = options.shard.split("/");
10488
- const index = Math.abs(parseInt(indexString, 10));
10489
- const count = Math.abs(parseInt(countString, 10));
10490
- if (isNaN(count) || count <= 0)
10499
+ const index = Math.abs(Number.parseInt(indexString, 10));
10500
+ const count = Math.abs(Number.parseInt(countString, 10));
10501
+ if (Number.isNaN(count) || count <= 0)
10491
10502
  throw new Error("--shard <count> must be a positive number");
10492
- if (isNaN(index) || index <= 0 || index > count)
10503
+ if (Number.isNaN(index) || index <= 0 || index > count)
10493
10504
  throw new Error("--shard <index> must be a positive number less then <count>");
10494
10505
  resolved.shard = { index, count };
10495
10506
  }
@@ -10537,9 +10548,9 @@ function resolveConfig(mode, options, viteConfig) {
10537
10548
  if (options.resolveSnapshotPath)
10538
10549
  delete resolved.resolveSnapshotPath;
10539
10550
  if (process.env.VITEST_MAX_THREADS)
10540
- resolved.maxThreads = parseInt(process.env.VITEST_MAX_THREADS);
10551
+ resolved.maxThreads = Number.parseInt(process.env.VITEST_MAX_THREADS);
10541
10552
  if (process.env.VITEST_MIN_THREADS)
10542
- resolved.minThreads = parseInt(process.env.VITEST_MIN_THREADS);
10553
+ resolved.minThreads = Number.parseInt(process.env.VITEST_MIN_THREADS);
10543
10554
  if (mode === "benchmark") {
10544
10555
  resolved.benchmark = {
10545
10556
  ...benchmarkConfigDefaults,
@@ -10782,7 +10793,7 @@ ansiEscapes.iTerm = {
10782
10793
  }
10783
10794
  };
10784
10795
 
10785
- var onetime$1 = {exports: {}};
10796
+ var onetime$2 = {exports: {}};
10786
10797
 
10787
10798
  var mimicFn$2 = {exports: {}};
10788
10799
 
@@ -10798,7 +10809,9 @@ mimicFn$2.exports = mimicFn$1;
10798
10809
  // TODO: Remove this for the next major release
10799
10810
  mimicFn$2.exports.default = mimicFn$1;
10800
10811
 
10801
- const mimicFn = mimicFn$2.exports;
10812
+ var mimicFnExports = mimicFn$2.exports;
10813
+
10814
+ const mimicFn = mimicFnExports;
10802
10815
 
10803
10816
  const calledFunctions = new WeakMap();
10804
10817
 
@@ -10830,11 +10843,11 @@ const onetime = (function_, options = {}) => {
10830
10843
  return onetime;
10831
10844
  };
10832
10845
 
10833
- onetime$1.exports = onetime;
10846
+ onetime$2.exports = onetime;
10834
10847
  // TODO: Remove this for the next major release
10835
- onetime$1.exports.default = onetime;
10848
+ onetime$2.exports.default = onetime;
10836
10849
 
10837
- onetime$1.exports.callCount = function_ => {
10850
+ onetime$2.exports.callCount = function_ => {
10838
10851
  if (!calledFunctions.has(function_)) {
10839
10852
  throw new Error(`The given function \`${function_.name}\` is not wrapped by the \`onetime\` package`);
10840
10853
  }
@@ -10842,8 +10855,11 @@ onetime$1.exports.callCount = function_ => {
10842
10855
  return calledFunctions.get(function_);
10843
10856
  };
10844
10857
 
10845
- const restoreCursor = onetime$1.exports(() => {
10846
- signalExit.exports(() => {
10858
+ var onetimeExports = onetime$2.exports;
10859
+ var onetime$1 = /*@__PURE__*/getDefaultExportFromCjs(onetimeExports);
10860
+
10861
+ const restoreCursor = onetime$1(() => {
10862
+ onExit(() => {
10847
10863
  process$1.stderr.write('\u001B[?25h');
10848
10864
  }, {alwaysLast: true});
10849
10865
  });
@@ -11173,7 +11189,7 @@ createLogUpdate(process$1.stdout);
11173
11189
 
11174
11190
  createLogUpdate(process$1.stderr);
11175
11191
 
11176
- var version = "0.32.2";
11192
+ var version = "0.32.3";
11177
11193
 
11178
11194
  const comma = ','.charCodeAt(0);
11179
11195
  const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
@@ -11801,9 +11817,11 @@ function sliceGeneratedPositions(segments, memo, line, column, bias) {
11801
11817
  return result;
11802
11818
  }
11803
11819
 
11804
- function L(n){return /^\\\\\?\\/.test(n)?n:n.replace(/\\/g,"/")}function S(n,s){for(;;){const t=p.posix.join(n,s);if(require$$0$3.existsSync(t))return t;const e=p.dirname(n);if(e===n)return;n=e;}}const W=/^\.{1,2}(\/.*)?$/,M=n=>L(W.test(n)?n:`./${n}`);function un(n,s=!1){const t=n.length;let e=0,i="",l=0,c=16,a=0,g=0,v=0,k=0,r=0;function F(o,f){let u=0,j=0;for(;u<o||!f;){let T=n.charCodeAt(e);if(T>=48&&T<=57)j=j*16+T-48;else if(T>=65&&T<=70)j=j*16+T-65+10;else if(T>=97&&T<=102)j=j*16+T-97+10;else break;e++,u++;}return u<o&&(j=-1),j}function U(o){e=o,i="",l=0,c=16,r=0;}function A(){let o=e;if(n.charCodeAt(e)===48)e++;else for(e++;e<n.length&&_(n.charCodeAt(e));)e++;if(e<n.length&&n.charCodeAt(e)===46)if(e++,e<n.length&&_(n.charCodeAt(e)))for(e++;e<n.length&&_(n.charCodeAt(e));)e++;else return r=3,n.substring(o,e);let f=e;if(e<n.length&&(n.charCodeAt(e)===69||n.charCodeAt(e)===101))if(e++,(e<n.length&&n.charCodeAt(e)===43||n.charCodeAt(e)===45)&&e++,e<n.length&&_(n.charCodeAt(e))){for(e++;e<n.length&&_(n.charCodeAt(e));)e++;f=e;}else r=3;return n.substring(o,f)}function b(){let o="",f=e;for(;;){if(e>=t){o+=n.substring(f,e),r=2;break}const u=n.charCodeAt(e);if(u===34){o+=n.substring(f,e),e++;break}if(u===92){if(o+=n.substring(f,e),e++,e>=t){r=2;break}switch(n.charCodeAt(e++)){case 34:o+='"';break;case 92:o+="\\";break;case 47:o+="/";break;case 98:o+="\b";break;case 102:o+="\f";break;case 110:o+=`
11805
- `;break;case 114:o+="\r";break;case 116:o+=" ";break;case 117:const T=F(4,!0);T>=0?o+=String.fromCharCode(T):r=4;break;default:r=5;}f=e;continue}if(u>=0&&u<=31)if(N(u)){o+=n.substring(f,e),r=2;break}else r=6;e++;}return o}function O(){if(i="",r=0,l=e,g=a,k=v,e>=t)return l=t,c=17;let o=n.charCodeAt(e);if(R(o)){do e++,i+=String.fromCharCode(o),o=n.charCodeAt(e);while(R(o));return c=15}if(N(o))return e++,i+=String.fromCharCode(o),o===13&&n.charCodeAt(e)===10&&(e++,i+=`
11806
- `),a++,v=e,c=14;switch(o){case 123:return e++,c=1;case 125:return e++,c=2;case 91:return e++,c=3;case 93:return e++,c=4;case 58:return e++,c=6;case 44:return e++,c=5;case 34:return e++,i=b(),c=10;case 47:const f=e-1;if(n.charCodeAt(e+1)===47){for(e+=2;e<t&&!N(n.charCodeAt(e));)e++;return i=n.substring(f,e),c=12}if(n.charCodeAt(e+1)===42){e+=2;const u=t-1;let j=!1;for(;e<u;){const T=n.charCodeAt(e);if(T===42&&n.charCodeAt(e+1)===47){e+=2,j=!0;break}e++,N(T)&&(T===13&&n.charCodeAt(e)===10&&e++,a++,v=e);}return j||(e++,r=1),i=n.substring(f,e),c=13}return i+=String.fromCharCode(o),e++,c=16;case 45:if(i+=String.fromCharCode(o),e++,e===t||!_(n.charCodeAt(e)))return c=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=A(),c=11;default:for(;e<t&&E(o);)e++,o=n.charCodeAt(e);if(l!==e){switch(i=n.substring(l,e),i){case"true":return c=8;case"false":return c=9;case"null":return c=7}return c=16}return i+=String.fromCharCode(o),e++,c=16}}function E(o){if(R(o)||N(o))return !1;switch(o){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return !1}return !0}function $(){let o;do o=O();while(o>=12&&o<=15);return o}return {setPosition:U,getPosition:()=>e,scan:s?$:O,getToken:()=>c,getTokenValue:()=>i,getTokenOffset:()=>l,getTokenLength:()=>e-l,getTokenStartLine:()=>g,getTokenStartCharacter:()=>l-k,getTokenError:()=>r}}function R(n){return n===32||n===9}function N(n){return n===10||n===13}function _(n){return n>=48&&n<=57}var P;(function(n){n[n.lineFeed=10]="lineFeed",n[n.carriageReturn=13]="carriageReturn",n[n.space=32]="space",n[n._0=48]="_0",n[n._1=49]="_1",n[n._2=50]="_2",n[n._3=51]="_3",n[n._4=52]="_4",n[n._5=53]="_5",n[n._6=54]="_6",n[n._7=55]="_7",n[n._8=56]="_8",n[n._9=57]="_9",n[n.a=97]="a",n[n.b=98]="b",n[n.c=99]="c",n[n.d=100]="d",n[n.e=101]="e",n[n.f=102]="f",n[n.g=103]="g",n[n.h=104]="h",n[n.i=105]="i",n[n.j=106]="j",n[n.k=107]="k",n[n.l=108]="l",n[n.m=109]="m",n[n.n=110]="n",n[n.o=111]="o",n[n.p=112]="p",n[n.q=113]="q",n[n.r=114]="r",n[n.s=115]="s",n[n.t=116]="t",n[n.u=117]="u",n[n.v=118]="v",n[n.w=119]="w",n[n.x=120]="x",n[n.y=121]="y",n[n.z=122]="z",n[n.A=65]="A",n[n.B=66]="B",n[n.C=67]="C",n[n.D=68]="D",n[n.E=69]="E",n[n.F=70]="F",n[n.G=71]="G",n[n.H=72]="H",n[n.I=73]="I",n[n.J=74]="J",n[n.K=75]="K",n[n.L=76]="L",n[n.M=77]="M",n[n.N=78]="N",n[n.O=79]="O",n[n.P=80]="P",n[n.Q=81]="Q",n[n.R=82]="R",n[n.S=83]="S",n[n.T=84]="T",n[n.U=85]="U",n[n.V=86]="V",n[n.W=87]="W",n[n.X=88]="X",n[n.Y=89]="Y",n[n.Z=90]="Z",n[n.asterisk=42]="asterisk",n[n.backslash=92]="backslash",n[n.closeBrace=125]="closeBrace",n[n.closeBracket=93]="closeBracket",n[n.colon=58]="colon",n[n.comma=44]="comma",n[n.dot=46]="dot",n[n.doubleQuote=34]="doubleQuote",n[n.minus=45]="minus",n[n.openBrace=123]="openBrace",n[n.openBracket=91]="openBracket",n[n.plus=43]="plus",n[n.slash=47]="slash",n[n.formFeed=12]="formFeed",n[n.tab=9]="tab";})(P||(P={}));var h;(function(n){n.DEFAULT={allowTrailingComma:!1};})(h||(h={}));function fn(n,s=[],t=h.DEFAULT){let e=null,i=[];const l=[];function c(g){Array.isArray(i)?i.push(g):e!==null&&(i[e]=g);}return rn(n,{onObjectBegin:()=>{const g={};c(g),l.push(i),i=g,e=null;},onObjectProperty:g=>{e=g;},onObjectEnd:()=>{i=l.pop();},onArrayBegin:()=>{const g=[];c(g),l.push(i),i=g,e=null;},onArrayEnd:()=>{i=l.pop();},onLiteralValue:c,onError:(g,v,k)=>{s.push({error:g,offset:v,length:k});}},t),i[0]}function rn(n,s,t=h.DEFAULT){const e=un(n,!1),i=[];function l(m){return m?()=>m(e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter()):()=>!0}function c(m){return m?()=>m(e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter(),()=>i.slice()):()=>!0}function a(m){return m?w=>m(w,e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter()):()=>!0}function g(m){return m?w=>m(w,e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter(),()=>i.slice()):()=>!0}const v=c(s.onObjectBegin),k=g(s.onObjectProperty),r=l(s.onObjectEnd),F=c(s.onArrayBegin),U=l(s.onArrayEnd),A=g(s.onLiteralValue),b=a(s.onSeparator),O=l(s.onComment),E=a(s.onError),$=t&&t.disallowComments,o=t&&t.allowTrailingComma;function f(){for(;;){const m=e.scan();switch(e.getTokenError()){case 4:u(14);break;case 5:u(15);break;case 3:u(13);break;case 1:$||u(11);break;case 2:u(12);break;case 6:u(16);break}switch(m){case 12:case 13:$?u(10):O();break;case 16:u(1);break;case 15:case 14:break;default:return m}}}function u(m,w=[],H=[]){if(E(m),w.length+H.length>0){let I=e.getToken();for(;I!==17;){if(w.indexOf(I)!==-1){f();break}else if(H.indexOf(I)!==-1)break;I=f();}}}function j(m){const w=e.getTokenValue();return m?A(w):(k(w),i.push(w)),f(),!0}function T(){switch(e.getToken()){case 11:const m=e.getTokenValue();let w=Number(m);isNaN(w)&&(u(2),w=0),A(w);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return !1}return f(),!0}function sn(){return e.getToken()!==10?(u(3,[],[2,5]),!1):(j(!1),e.getToken()===6?(b(":"),f(),V()||u(4,[],[2,5])):u(5,[],[2,5]),i.pop(),!0)}function on(){v(),f();let m=!1;for(;e.getToken()!==2&&e.getToken()!==17;){if(e.getToken()===5){if(m||u(4,[],[]),b(","),f(),e.getToken()===2&&o)break}else m&&u(6,[],[]);sn()||u(4,[],[2,5]),m=!0;}return r(),e.getToken()!==2?u(7,[2],[]):f(),!0}function ln(){F(),f();let m=!0,w=!1;for(;e.getToken()!==4&&e.getToken()!==17;){if(e.getToken()===5){if(w||u(4,[],[]),b(","),f(),e.getToken()===4&&o)break}else w&&u(6,[],[]);m?(i.push(0),m=!1):i[i.length-1]++,V()||u(4,[],[4,5]),w=!0;}return U(),m||i.pop(),e.getToken()!==4?u(8,[4],[]):f(),!0}function V(){switch(e.getToken()){case 3:return ln();case 1:return on();case 10:return j(!0);default:return T()}}return f(),e.getToken()===17?t.allowEmptyContent?!0:(u(4,[],[]),!1):V()?(e.getToken()!==17&&u(9,[],[]),!0):(u(4,[],[]),!1)}var X;(function(n){n[n.None=0]="None",n[n.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",n[n.UnexpectedEndOfString=2]="UnexpectedEndOfString",n[n.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",n[n.InvalidUnicode=4]="InvalidUnicode",n[n.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",n[n.InvalidCharacter=6]="InvalidCharacter";})(X||(X={}));var Y;(function(n){n[n.OpenBraceToken=1]="OpenBraceToken",n[n.CloseBraceToken=2]="CloseBraceToken",n[n.OpenBracketToken=3]="OpenBracketToken",n[n.CloseBracketToken=4]="CloseBracketToken",n[n.CommaToken=5]="CommaToken",n[n.ColonToken=6]="ColonToken",n[n.NullKeyword=7]="NullKeyword",n[n.TrueKeyword=8]="TrueKeyword",n[n.FalseKeyword=9]="FalseKeyword",n[n.StringLiteral=10]="StringLiteral",n[n.NumericLiteral=11]="NumericLiteral",n[n.LineCommentTrivia=12]="LineCommentTrivia",n[n.BlockCommentTrivia=13]="BlockCommentTrivia",n[n.LineBreakTrivia=14]="LineBreakTrivia",n[n.Trivia=15]="Trivia",n[n.Unknown=16]="Unknown",n[n.EOF=17]="EOF";})(Y||(Y={}));const pn=fn;var Z;(function(n){n[n.InvalidSymbol=1]="InvalidSymbol",n[n.InvalidNumberFormat=2]="InvalidNumberFormat",n[n.PropertyNameExpected=3]="PropertyNameExpected",n[n.ValueExpected=4]="ValueExpected",n[n.ColonExpected=5]="ColonExpected",n[n.CommaExpected=6]="CommaExpected",n[n.CloseBraceExpected=7]="CloseBraceExpected",n[n.CloseBracketExpected=8]="CloseBracketExpected",n[n.EndOfFileExpected=9]="EndOfFileExpected",n[n.InvalidCommentToken=10]="InvalidCommentToken",n[n.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",n[n.UnexpectedEndOfString=12]="UnexpectedEndOfString",n[n.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",n[n.InvalidUnicode=14]="InvalidUnicode",n[n.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",n[n.InvalidCharacter=16]="InvalidCharacter";})(Z||(Z={}));const q=n=>pn(require$$0$3.readFileSync(n,"utf8")),{existsSync:D}=require$$0$3,gn=()=>{const{findPnpApi:n}=cn;return n&&n(process.cwd())};function d(n){const s=q(n);return p.join(n,"..",s&&"tsconfig"in s?s.tsconfig:"tsconfig.json")}function mn(n,s){let t=n;const e=n[0]===".";if(e||p.isAbsolute(n)){if(e&&(t===".."&&(t+="/tsconfig.json"),t=p.resolve(s,t)),D(t)&&require$$0$3.statSync(t).isFile()||!t.endsWith(".json")&&(t+=".json",D(t)))return t;throw new Error(`File '${n}' not found.`)}const i=gn();if(i){const{resolveRequest:c}=i,[a,g]=n.split("/"),v=a.startsWith("@")?`${a}/${g}`:a;try{if(v===n){const k=c(p.join(v,"package.json"),s);if(k){const r=d(k);if(D(r))return r}}else {let k;try{k=c(n,s,{extensions:[".json"]});}catch{k=c(p.join(n,"tsconfig.json"),s);}if(k)return k}}catch{}}let l=S(s,p.join("node_modules",t));if(l){if(require$$0$3.statSync(l).isDirectory()){const c=p.join(l,"package.json");if(D(c)?l=d(c):l=p.join(l,"tsconfig.json"),D(l))return l}else if(l.endsWith(".json"))return l}if(!t.endsWith(".json")&&(t+=".json",l=S(s,p.join("node_modules",t)),l))return l;throw new Error(`File '${n}' not found.`)}const an=(n,s)=>{var t;const e=mn(n,s),i=J(e);if(delete i.references,(t=i.compilerOptions)!=null&&t.baseUrl){const{compilerOptions:l}=i;l.baseUrl=p.relative(s,p.join(p.dirname(e),l.baseUrl))||"./";}return i.files&&(i.files=i.files.map(l=>p.relative(s,p.join(p.dirname(e),l)))),i.include&&(i.include=i.include.map(l=>p.relative(s,p.join(p.dirname(e),l)))),i},J=n=>{let s;try{s=require$$0$3.realpathSync(n);}catch{throw new Error(`Cannot resolve tsconfig at path: ${n}`)}const t=p.dirname(s);let e=q(s)||{};if(typeof e!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${n}`);if(e.extends){const i=Array.isArray(e.extends)?e.extends:[e.extends];delete e.extends;for(const l of i.reverse()){const c=an(l,t),a={...c,...e,compilerOptions:{...c.compilerOptions,...e.compilerOptions}};c.watchOptions&&(a.watchOptions={...c.watchOptions,...e.watchOptions}),e=a;}}if(e.compilerOptions){const{compilerOptions:i}=e;i.baseUrl&&(i.baseUrl=M(i.baseUrl)),i.outDir&&(Array.isArray(e.exclude)||(e.exclude=[]),e.exclude.push(i.outDir),i.outDir=M(i.outDir));}else e.compilerOptions={};if(e.files&&(e.files=e.files.map(M)),e.include&&(e.include=e.include.map(L)),e.watchOptions){const{watchOptions:i}=e;i.excludeDirectories&&(i.excludeDirectories=i.excludeDirectories.map(l=>L(p.resolve(t,l))));}return e};function kn(n=process.cwd(),s="tsconfig.json"){const t=S(L(n),s);if(!t)return null;const e=J(t);return {path:t,config:e}}p.posix;process.platform==="win32";
11820
+ const A=r=>r!==null&&typeof r=="object",a=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),_$1="ERR_INVALID_PACKAGE_CONFIG",E="ERR_INVALID_PACKAGE_TARGET",I="ERR_PACKAGE_PATH_NOT_EXPORTED",R$1=/^\d+$/,O=/^(\.{1,2}|node_modules)$/i,w=/\/|\\/;var h=(r=>(r.Export="exports",r.Import="imports",r))(h||{});const f=(r,t,e,o,c)=>{if(t==null)return [];if(typeof t=="string"){const[n,...i]=t.split(w);if(n===".."||i.some(l=>O.test(l)))throw a(E,`Invalid "${r}" target "${t}" defined in the package config`);return [c?t.replace(/\*/g,c):t]}if(Array.isArray(t))return t.flatMap(n=>f(r,n,e,o,c));if(A(t)){for(const n of Object.keys(t)){if(R$1.test(n))throw a(_$1,"Cannot contain numeric property keys");if(n==="default"||o.includes(n))return f(r,t[n],e,o,c)}return []}throw a(E,`Invalid "${r}" target "${t}"`)},s="*",m=(r,t)=>{const e=r.indexOf(s),o=t.indexOf(s);return e===o?t.length>r.length:o>e};function d$1(r,t){if(!t.includes(s)&&r.hasOwnProperty(t))return [t];let e,o;for(const c of Object.keys(r))if(c.includes(s)){const[n,i,l]=c.split(s);if(l===void 0&&t.startsWith(n)&&t.endsWith(i)){const g=t.slice(n.length,-i.length||void 0);g&&(!e||m(e,c))&&(e=c,o=g);}}return [e,o]}const p=r=>Object.keys(r).reduce((t,e)=>{const o=e===""||e[0]!==".";if(t===void 0||t===o)return o;throw a(_$1,'"exports" cannot contain some keys starting with "." and some not')},void 0),u=/^\w+:/,v=(r,t,e)=>{if(!r)throw new Error('"exports" is required');t=t===""?".":`./${t}`,(typeof r=="string"||Array.isArray(r)||A(r)&&p(r))&&(r={".":r});const[o,c]=d$1(r,t),n=f(h.Export,r[o],t,e,c);if(n.length===0)throw a(I,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const i of n)if(!i.startsWith("./")&&!u.test(i))throw a(E,`Invalid "exports" target "${i}" defined in the package config`);return n};
11821
+
11822
+ function U(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}const Y=(e,s)=>{for(;;){const i=f$1.posix.join(e,s);if($.existsSync(i))return i;const n=f$1.dirname(e);if(n===e)return;e=n;}},S=/^\.{1,2}(\/.*)?$/,V=e=>{const s=U(e);return S.test(s)?s:`./${s}`};function re(e,s=!1){const i=e.length;let n=0,t="",l=0,c=16,m=0,p=0,L=0,g=0,T=0;function k(o,r){let u=0,E=0;for(;u<o||!r;){let v=e.charCodeAt(n);if(v>=48&&v<=57)E=E*16+v-48;else if(v>=65&&v<=70)E=E*16+v-65+10;else if(v>=97&&v<=102)E=E*16+v-97+10;else break;n++,u++;}return u<o&&(E=-1),E}function j(o){n=o,t="",l=0,c=16,T=0;}function w(){let o=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&_(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&_(e.charCodeAt(n)))for(n++;n<e.length&&_(e.charCodeAt(n));)n++;else return T=3,e.substring(o,n);let r=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&_(e.charCodeAt(n))){for(n++;n<e.length&&_(e.charCodeAt(n));)n++;r=n;}else T=3;return e.substring(o,r)}function b(){let o="",r=n;for(;;){if(n>=i){o+=e.substring(r,n),T=2;break}const u=e.charCodeAt(n);if(u===34){o+=e.substring(r,n),n++;break}if(u===92){if(o+=e.substring(r,n),n++,n>=i){T=2;break}switch(e.charCodeAt(n++)){case 34:o+='"';break;case 92:o+="\\";break;case 47:o+="/";break;case 98:o+="\b";break;case 102:o+="\f";break;case 110:o+=`
11823
+ `;break;case 114:o+="\r";break;case 116:o+=" ";break;case 117:const v=k(4,!0);v>=0?o+=String.fromCharCode(v):T=4;break;default:T=5;}r=n;continue}if(u>=0&&u<=31)if(F(u)){o+=e.substring(r,n),T=2;break}else T=6;n++;}return o}function A(){if(t="",T=0,l=n,p=m,g=L,n>=i)return l=i,c=17;let o=e.charCodeAt(n);if(W(o)){do n++,t+=String.fromCharCode(o),o=e.charCodeAt(n);while(W(o));return c=15}if(F(o))return n++,t+=String.fromCharCode(o),o===13&&e.charCodeAt(n)===10&&(n++,t+=`
11824
+ `),m++,L=n,c=14;switch(o){case 123:return n++,c=1;case 125:return n++,c=2;case 91:return n++,c=3;case 93:return n++,c=4;case 58:return n++,c=6;case 44:return n++,c=5;case 34:return n++,t=b(),c=10;case 47:const r=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<i&&!F(e.charCodeAt(n));)n++;return t=e.substring(r,n),c=12}if(e.charCodeAt(n+1)===42){n+=2;const u=i-1;let E=!1;for(;n<u;){const v=e.charCodeAt(n);if(v===42&&e.charCodeAt(n+1)===47){n+=2,E=!0;break}n++,F(v)&&(v===13&&e.charCodeAt(n)===10&&n++,m++,L=n);}return E||(n++,T=1),t=e.substring(r,n),c=13}return t+=String.fromCharCode(o),n++,c=16;case 45:if(t+=String.fromCharCode(o),n++,n===i||!_(e.charCodeAt(n)))return c=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return t+=w(),c=11;default:for(;n<i&&N(o);)n++,o=e.charCodeAt(n);if(l!==n){switch(t=e.substring(l,n),t){case"true":return c=8;case"false":return c=9;case"null":return c=7}return c=16}return t+=String.fromCharCode(o),n++,c=16}}function N(o){if(W(o)||F(o))return !1;switch(o){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return !1}return !0}function h(){let o;do o=A();while(o>=12&&o<=15);return o}return {setPosition:j,getPosition:()=>n,scan:s?h:A,getToken:()=>c,getTokenValue:()=>t,getTokenOffset:()=>l,getTokenLength:()=>n-l,getTokenStartLine:()=>p,getTokenStartCharacter:()=>l-g,getTokenError:()=>T}}function W(e){return e===32||e===9}function F(e){return e===10||e===13}function _(e){return e>=48&&e<=57}var Z;(function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab";})(Z||(Z={}));var x;(function(e){e.DEFAULT={allowTrailingComma:!1};})(x||(x={}));function pe(e,s=[],i=x.DEFAULT){let n=null,t=[];const l=[];function c(p){Array.isArray(t)?t.push(p):n!==null&&(t[n]=p);}return ge(e,{onObjectBegin:()=>{const p={};c(p),l.push(t),t=p,n=null;},onObjectProperty:p=>{n=p;},onObjectEnd:()=>{t=l.pop();},onArrayBegin:()=>{const p=[];c(p),l.push(t),t=p,n=null;},onArrayEnd:()=>{t=l.pop();},onLiteralValue:c,onError:(p,L,g)=>{s.push({error:p,offset:L,length:g});}},i),t[0]}function ge(e,s,i=x.DEFAULT){const n=re(e,!1),t=[];function l(a){return a?()=>a(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function c(a){return a?()=>a(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>t.slice()):()=>!0}function m(a){return a?O=>a(O,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function p(a){return a?O=>a(O,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>t.slice()):()=>!0}const L=c(s.onObjectBegin),g=p(s.onObjectProperty),T=l(s.onObjectEnd),k=c(s.onArrayBegin),j=l(s.onArrayEnd),w=p(s.onLiteralValue),b=m(s.onSeparator),A=l(s.onComment),N=m(s.onError),h=i&&i.disallowComments,o=i&&i.allowTrailingComma;function r(){for(;;){const a=n.scan();switch(n.getTokenError()){case 4:u(14);break;case 5:u(15);break;case 3:u(13);break;case 1:h||u(11);break;case 2:u(12);break;case 6:u(16);break}switch(a){case 12:case 13:h?u(10):A();break;case 16:u(1);break;case 15:case 14:break;default:return a}}}function u(a,O=[],X=[]){if(N(a),O.length+X.length>0){let y=n.getToken();for(;y!==17;){if(O.indexOf(y)!==-1){r();break}else if(X.indexOf(y)!==-1)break;y=r();}}}function E(a){const O=n.getTokenValue();return a?w(O):(g(O),t.push(O)),r(),!0}function v(){switch(n.getToken()){case 11:const a=n.getTokenValue();let O=Number(a);isNaN(O)&&(u(2),O=0),w(O);break;case 7:w(null);break;case 8:w(!0);break;case 9:w(!1);break;default:return !1}return r(),!0}function oe(){return n.getToken()!==10?(u(3,[],[2,5]),!1):(E(!1),n.getToken()===6?(b(":"),r(),P()||u(4,[],[2,5])):u(5,[],[2,5]),t.pop(),!0)}function le(){L(),r();let a=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(a||u(4,[],[]),b(","),r(),n.getToken()===2&&o)break}else a&&u(6,[],[]);oe()||u(4,[],[2,5]),a=!0;}return T(),n.getToken()!==2?u(7,[2],[]):r(),!0}function ce(){k(),r();let a=!0,O=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(O||u(4,[],[]),b(","),r(),n.getToken()===4&&o)break}else O&&u(6,[],[]);a?(t.push(0),a=!1):t[t.length-1]++,P()||u(4,[],[4,5]),O=!0;}return j(),a||t.pop(),n.getToken()!==4?u(8,[4],[]):r(),!0}function P(){switch(n.getToken()){case 3:return ce();case 1:return le();case 10:return E(!0);default:return v()}}return r(),n.getToken()===17?i.allowEmptyContent?!0:(u(4,[],[]),!1):P()?(n.getToken()!==17&&u(9,[],[]),!0):(u(4,[],[]),!1)}var d;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter";})(d||(d={}));var q;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF";})(q||(q={}));const ae=pe;var K;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter";})(K||(K={}));const C=e=>ae($.readFileSync(e,"utf8")),{existsSync:B}=$,me=()=>{const{findPnpApi:e}=ue;return e&&e(process.cwd())},J=(e,s,i)=>{let n="tsconfig.json";const t=C(e);if(t)if(!i&&t.exports)try{const[l]=v(t.exports,s,["require","types"]);n=l;}catch{return}else !s&&t.tsconfig&&(n=t.tsconfig);return f$1.join(e,"..",n)},M="package.json",R="tsconfig.json",ke=(e,s)=>{let i=e;if(e===".."&&(i=f$1.join(i,R)),e[0]==="."&&(i=f$1.resolve(s,i)),f$1.isAbsolute(i)){if(B(i)){if($.statSync(i).isFile())return i}else if(!i.endsWith(".json")){const k=`${i}.json`;if(B(k))return k}return}const[n,...t]=e.split("/"),l=n[0]==="@"?`${n}/${t.shift()}`:n,c=t.join("/"),m=me();if(m){const{resolveRequest:k}=m;try{if(l===e){const j=k(f$1.join(l,M),s);if(j){const w=J(j,c);if(w&&B(w))return w}}else {let j;try{j=k(e,s,{extensions:[".json"]});}catch{j=k(f$1.join(e,R),s);}if(j)return j}}catch{}}const p=Y(s,f$1.join("node_modules",l));if(!p||!$.statSync(p).isDirectory())return;const L=f$1.join(p,M);if(B(L)){const k=J(L,c);if(!k)return;if(B(k))return k}const g=f$1.join(p,c),T=g.endsWith(".json");if(!T){const k=`${g}.json`;if(B(k))return k}if(B(g)){if($.statSync(g).isDirectory()){const k=f$1.join(g,M);if(B(k)){const w=J(k,"",!0);if(w&&B(w))return w}const j=f$1.join(g,R);if(B(j))return j}else if(T)return g}},be=(e,s)=>{var i;const n=ke(e,s);if(!n)throw new Error(`File '${e}' not found.`);const t=G(n);if(delete t.references,(i=t.compilerOptions)!=null&&i.baseUrl){const{compilerOptions:l}=t;l.baseUrl=f$1.relative(s,f$1.join(f$1.dirname(n),l.baseUrl))||"./";}return t.files&&(t.files=t.files.map(l=>f$1.relative(s,f$1.join(f$1.dirname(n),l)))),t.include&&(t.include=t.include.map(l=>f$1.relative(s,f$1.join(f$1.dirname(n),l)))),t},G=e=>{let s;try{s=$.realpathSync(e);}catch{throw new Error(`Cannot resolve tsconfig at path: ${e}`)}const i=f$1.dirname(s);let n=C(s)||{};if(typeof n!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);if(n.extends){const t=Array.isArray(n.extends)?n.extends:[n.extends];delete n.extends;for(const l of t.reverse()){const c=be(l,i),m={...c,...n,compilerOptions:{...c.compilerOptions,...n.compilerOptions}};c.watchOptions&&(m.watchOptions={...c.watchOptions,...n.watchOptions}),n=m;}}if(n.compilerOptions){const{compilerOptions:t}=n;if(t.baseUrl){const l=f$1.resolve(i,t.baseUrl),c=V(f$1.relative(i,l));t.baseUrl=c;}t.outDir&&(Array.isArray(n.exclude)||(n.exclude=[]),n.exclude.push(t.outDir),t.outDir=V(t.outDir));}else n.compilerOptions={};if(n.files&&(n.files=n.files.map(V)),n.include&&(n.include=n.include.map(U)),n.watchOptions){const{watchOptions:t}=n;t.excludeDirectories&&(t.excludeDirectories=t.excludeDirectories.map(l=>U(f$1.resolve(i,l))));}return n},Te=(e=process.cwd(),s="tsconfig.json")=>{const i=Y(U(e),s);if(!i)return null;const n=G(i);return {path:i,config:n}};f$1.posix;process.platform==="win32";
11807
11825
 
11808
11826
  const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
11809
11827
  const newLineRegExp = /\r?\n/;
@@ -11843,7 +11861,7 @@ async function makeTscErrorInfo(errInfo) {
11843
11861
  async function getTsconfig(root, config) {
11844
11862
  const configName = config.tsconfig ? basename(config.tsconfig) : void 0;
11845
11863
  const configSearchPath = config.tsconfig ? dirname(resolve$2(root, config.tsconfig)) : root;
11846
- const tsconfig = kn(configSearchPath, configName);
11864
+ const tsconfig = Te(configSearchPath, configName);
11847
11865
  if (!tsconfig)
11848
11866
  throw new Error("no tsconfig.json found");
11849
11867
  const tempConfigPath = join(dirname(tsconfig.path), "tsconfig.vitest-temp.json");
@@ -12032,20 +12050,26 @@ class TypeCheckError extends Error {
12032
12050
  super(message);
12033
12051
  this.message = message;
12034
12052
  this.stacks = stacks;
12035
- this.name = "TypeCheckError";
12036
12053
  }
12054
+ name = "TypeCheckError";
12037
12055
  }
12038
12056
  class Typechecker {
12039
12057
  constructor(ctx, files) {
12040
12058
  this.ctx = ctx;
12041
12059
  this.files = files;
12042
- this._result = {
12043
- files: [],
12044
- sourceErrors: []
12045
- };
12046
- this._output = "";
12047
- this._tests = {};
12048
12060
  }
12061
+ _onParseStart;
12062
+ _onParseEnd;
12063
+ _onWatcherRerun;
12064
+ _result = {
12065
+ files: [],
12066
+ sourceErrors: []
12067
+ };
12068
+ _output = "";
12069
+ _tests = {};
12070
+ tempConfigPath;
12071
+ allowJs;
12072
+ process;
12049
12073
  onParseStart(fn) {
12050
12074
  this._onParseStart = fn;
12051
12075
  }
@@ -12473,10 +12497,11 @@ class Logger {
12473
12497
  constructor(ctx, console = globalThis.console) {
12474
12498
  this.ctx = ctx;
12475
12499
  this.console = console;
12476
- this.outputStream = process.stdout;
12477
- this.errorStream = process.stderr;
12478
- this.logUpdate = createLogUpdate(process.stdout);
12479
12500
  }
12501
+ outputStream = process.stdout;
12502
+ errorStream = process.stderr;
12503
+ logUpdate = createLogUpdate(process.stdout);
12504
+ _clearScreenPending;
12480
12505
  log(...args) {
12481
12506
  this._clearScreen();
12482
12507
  this.console.log(...args);
@@ -12779,16 +12804,16 @@ async function createBrowserServer(project, options) {
12779
12804
  });
12780
12805
  await server.listen();
12781
12806
  await server.watcher.close();
12782
- (await import('./chunk-api-setup.05e3917b.js')).setup(project, server);
12807
+ (await import('./chunk-api-setup.8f785c4a.js')).setup(project, server);
12783
12808
  return server;
12784
12809
  }
12785
12810
 
12786
12811
  const playwrightBrowsers = ["firefox", "webkit", "chromium"];
12787
12812
  class PlaywrightBrowserProvider {
12788
- constructor() {
12789
- this.name = "playwright";
12790
- this.cachedBrowser = null;
12791
- }
12813
+ name = "playwright";
12814
+ cachedBrowser = null;
12815
+ browser;
12816
+ ctx;
12792
12817
  getSupportedBrowsers() {
12793
12818
  return playwrightBrowsers;
12794
12819
  }
@@ -12832,12 +12857,12 @@ class PlaywrightBrowserProvider {
12832
12857
 
12833
12858
  const webdriverBrowsers = ["firefox", "chrome", "edge", "safari"];
12834
12859
  class WebdriverBrowserProvider {
12835
- constructor() {
12836
- this.name = "webdriverio";
12837
- this.cachedBrowser = null;
12838
- this.stopSafari = () => {
12839
- };
12840
- }
12860
+ name = "webdriverio";
12861
+ cachedBrowser = null;
12862
+ stopSafari = () => {
12863
+ };
12864
+ browser;
12865
+ ctx;
12841
12866
  getSupportedBrowsers() {
12842
12867
  return webdriverBrowsers;
12843
12868
  }
@@ -13283,8 +13308,16 @@ class WorkspaceProject {
13283
13308
  constructor(path, ctx) {
13284
13309
  this.path = path;
13285
13310
  this.ctx = ctx;
13286
- this.browser = void 0;
13287
13311
  }
13312
+ configOverride;
13313
+ config;
13314
+ server;
13315
+ vitenode;
13316
+ runner;
13317
+ browser = void 0;
13318
+ typechecker;
13319
+ closingPromise;
13320
+ browserProvider;
13288
13321
  getName() {
13289
13322
  return this.config.name || "";
13290
13323
  }
@@ -13323,16 +13356,16 @@ class WorkspaceProject {
13323
13356
  cwd,
13324
13357
  ignore: exclude
13325
13358
  };
13326
- return out(include, globOptions);
13359
+ return fg(include, globOptions);
13327
13360
  }
13328
13361
  async isTargetFile(id, source) {
13329
13362
  var _a;
13330
13363
  const relativeId = relative(this.config.dir || this.config.root, id);
13331
- if (micromatch_1.isMatch(relativeId, this.config.exclude))
13364
+ if (mm.isMatch(relativeId, this.config.exclude))
13332
13365
  return false;
13333
- if (micromatch_1.isMatch(relativeId, this.config.include))
13366
+ if (mm.isMatch(relativeId, this.config.include))
13334
13367
  return true;
13335
- if (((_a = this.config.includeSource) == null ? void 0 : _a.length) && micromatch_1.isMatch(relativeId, this.config.includeSource)) {
13368
+ if (((_a = this.config.includeSource) == null ? void 0 : _a.length) && mm.isMatch(relativeId, this.config.includeSource)) {
13336
13369
  source = source || await promises.readFile(id, "utf-8");
13337
13370
  return this.isInSourceTestFile(source);
13338
13371
  }
@@ -13510,28 +13543,35 @@ const WATCHER_DEBOUNCE = 100;
13510
13543
  class Vitest {
13511
13544
  constructor(mode) {
13512
13545
  this.mode = mode;
13513
- this.config = void 0;
13514
- this.configOverride = {};
13515
- this.server = void 0;
13516
- this.state = void 0;
13517
- this.snapshot = void 0;
13518
- this.cache = void 0;
13519
- this.reporters = void 0;
13520
- this.vitenode = void 0;
13521
- this.invalidates = /* @__PURE__ */ new Set();
13522
- this.changedTests = /* @__PURE__ */ new Set();
13523
- this.isCancelling = false;
13524
- this.isFirstRun = true;
13525
- this.restartsCount = 0;
13526
- this.runner = void 0;
13527
- this.projects = [];
13528
- this.projectsTestFiles = /* @__PURE__ */ new Map();
13529
- this._onRestartListeners = [];
13530
- this._onSetServer = [];
13531
- this._onCancelListeners = [];
13532
- this.unregisterWatcher = noop$1;
13533
13546
  this.logger = new Logger(this);
13534
13547
  }
13548
+ config = void 0;
13549
+ configOverride = {};
13550
+ server = void 0;
13551
+ state = void 0;
13552
+ snapshot = void 0;
13553
+ cache = void 0;
13554
+ reporters = void 0;
13555
+ coverageProvider;
13556
+ browserProvider;
13557
+ logger;
13558
+ pool;
13559
+ vitenode = void 0;
13560
+ invalidates = /* @__PURE__ */ new Set();
13561
+ changedTests = /* @__PURE__ */ new Set();
13562
+ filenamePattern;
13563
+ runningPromise;
13564
+ closingPromise;
13565
+ isCancelling = false;
13566
+ isFirstRun = true;
13567
+ restartsCount = 0;
13568
+ runner = void 0;
13569
+ coreWorkspace;
13570
+ projects = [];
13571
+ projectsTestFiles = /* @__PURE__ */ new Map();
13572
+ _onRestartListeners = [];
13573
+ _onSetServer = [];
13574
+ _onCancelListeners = [];
13535
13575
  async setServer(options, server, cliOptions) {
13536
13576
  var _a, _b, _c;
13537
13577
  (_a = this.unregisterWatcher) == null ? void 0 : _a.call(this);
@@ -13628,7 +13668,7 @@ class Vitest {
13628
13668
  cwd: this.config.root,
13629
13669
  ignore: ["**/node_modules/**"]
13630
13670
  };
13631
- const workspacesFs = await out(workspaceGlobMatches, globOptions);
13671
+ const workspacesFs = await fg(workspaceGlobMatches, globOptions);
13632
13672
  const resolvedWorkspacesPaths = await Promise.all(workspacesFs.filter((file) => {
13633
13673
  if (file.endsWith("/")) {
13634
13674
  const hasWorkspaceWithConfig = workspacesFs.some((file2) => {
@@ -13747,7 +13787,7 @@ class Vitest {
13747
13787
  }
13748
13788
  async filterTestsBySource(specs) {
13749
13789
  if (this.config.changed && !this.config.related) {
13750
- const { VitestGit } = await import('./chunk-node-git.4c43bd73.js');
13790
+ const { VitestGit } = await import('./chunk-node-git.c410fed8.js');
13751
13791
  const vitestGit = new VitestGit(this.config.root);
13752
13792
  const related2 = await vitestGit.findChangedFiles({
13753
13793
  changedSince: this.config.changed
@@ -13762,7 +13802,7 @@ class Vitest {
13762
13802
  if (!related)
13763
13803
  return specs;
13764
13804
  const forceRerunTriggers = this.config.forceRerunTriggers;
13765
- if (forceRerunTriggers.length && micromatch_1(related, forceRerunTriggers).length)
13805
+ if (forceRerunTriggers.length && mm(related, forceRerunTriggers).length)
13766
13806
  return specs;
13767
13807
  if (!related.length)
13768
13808
  return [];
@@ -13863,6 +13903,7 @@ class Vitest {
13863
13903
  delete this.configOverride.snapshotOptions;
13864
13904
  }
13865
13905
  }
13906
+ _rerunTimer;
13866
13907
  async scheduleRerun(triggerId) {
13867
13908
  const currentCount = this.restartsCount;
13868
13909
  clearTimeout(this._rerunTimer);
@@ -13903,6 +13944,7 @@ class Vitest {
13903
13944
  return project.server.moduleGraph.getModuleById(id) || ((_a = project.browser) == null ? void 0 : _a.moduleGraph.getModuleById(id)) || ((_c = (_b = project.browser) == null ? void 0 : _b.moduleGraph.getModulesByFile(id)) == null ? void 0 : _c.size);
13904
13945
  });
13905
13946
  }
13947
+ unregisterWatcher = noop$1;
13906
13948
  registerWatcher() {
13907
13949
  const updateLastChanged = (id) => {
13908
13950
  const projects = this.getModuleProjects(id);
@@ -13964,7 +14006,7 @@ class Vitest {
13964
14006
  handleFileChanged(id) {
13965
14007
  if (this.changedTests.has(id) || this.invalidates.has(id))
13966
14008
  return [];
13967
- if (micromatch_1.isMatch(id, this.config.forceRerunTriggers)) {
14009
+ if (mm.isMatch(id, this.config.forceRerunTriggers)) {
13968
14010
  this.state.getFilepaths().forEach((file) => this.changedTests.add(file));
13969
14011
  return [];
13970
14012
  }
@@ -14206,7 +14248,7 @@ async function VitestPlugin(options = {}, ctx = new Vitest("test")) {
14206
14248
  try {
14207
14249
  await ctx.setServer(options, server, userConfig);
14208
14250
  if (options.api && options.watch)
14209
- (await import('./chunk-api-setup.05e3917b.js')).setup(ctx);
14251
+ (await import('./chunk-api-setup.8f785c4a.js')).setup(ctx);
14210
14252
  } catch (err) {
14211
14253
  await ctx.logger.printError(err, true);
14212
14254
  process.exit(1);
@@ -14730,19 +14772,19 @@ function requireUtil$1 () {
14730
14772
  return util$1;
14731
14773
  }
14732
14774
 
14733
- var prompt$1;
14775
+ var prompt$2;
14734
14776
  var hasRequiredPrompt$1;
14735
14777
 
14736
14778
  function requirePrompt$1 () {
14737
- if (hasRequiredPrompt$1) return prompt$1;
14779
+ if (hasRequiredPrompt$1) return prompt$2;
14738
14780
  hasRequiredPrompt$1 = 1;
14739
14781
 
14740
- const readline = require$$0$4;
14782
+ const readline = require$$0$2;
14741
14783
 
14742
14784
  const _require = requireUtil$1(),
14743
14785
  action = _require.action;
14744
14786
 
14745
- const EventEmitter = require$$2;
14787
+ const EventEmitter = require$$2$1;
14746
14788
 
14747
14789
  const _require2 = requireSrc(),
14748
14790
  beep = _require2.beep,
@@ -14816,8 +14858,8 @@ function requirePrompt$1 () {
14816
14858
 
14817
14859
  }
14818
14860
 
14819
- prompt$1 = Prompt;
14820
- return prompt$1;
14861
+ prompt$2 = Prompt;
14862
+ return prompt$2;
14821
14863
  }
14822
14864
 
14823
14865
  var text$1;
@@ -17434,8 +17476,8 @@ function requirePrompts$1 () {
17434
17476
  args.suggest = args.suggest || byTitle;
17435
17477
  args.choices = [].concat(args.choices || []);
17436
17478
  return toPrompt('AutocompletePrompt', args);
17437
- };
17438
- } (prompts$2));
17479
+ };
17480
+ } (prompts$2));
17439
17481
  return prompts$2;
17440
17482
  }
17441
17483
 
@@ -17895,16 +17937,16 @@ function requireUtil () {
17895
17937
  return util;
17896
17938
  }
17897
17939
 
17898
- var prompt;
17940
+ var prompt$1;
17899
17941
  var hasRequiredPrompt;
17900
17942
 
17901
17943
  function requirePrompt () {
17902
- if (hasRequiredPrompt) return prompt;
17944
+ if (hasRequiredPrompt) return prompt$1;
17903
17945
  hasRequiredPrompt = 1;
17904
17946
 
17905
- const readline = require$$0$4;
17947
+ const readline = require$$0$2;
17906
17948
  const { action } = requireUtil();
17907
- const EventEmitter = require$$2;
17949
+ const EventEmitter = require$$2$1;
17908
17950
  const { beep, cursor } = requireSrc();
17909
17951
  const color = requireKleur();
17910
17952
 
@@ -17967,8 +18009,8 @@ function requirePrompt () {
17967
18009
  }
17968
18010
  }
17969
18011
 
17970
- prompt = Prompt;
17971
- return prompt;
18012
+ prompt$1 = Prompt;
18013
+ return prompt$1;
17972
18014
  }
17973
18015
 
17974
18016
  var text;
@@ -20386,8 +20428,8 @@ function requirePrompts () {
20386
20428
  args.suggest = args.suggest || byTitle;
20387
20429
  args.choices = [].concat(args.choices || []);
20388
20430
  return toPrompt('AutocompletePrompt', args);
20389
- };
20390
- } (prompts$1));
20431
+ };
20432
+ } (prompts$1));
20391
20433
  return prompts$1;
20392
20434
  }
20393
20435
 
@@ -20512,9 +20554,11 @@ var prompts =
20512
20554
  ? requireDist()
20513
20555
  : requireLib();
20514
20556
 
20557
+ var prompt = /*@__PURE__*/getDefaultExportFromCjs(prompts);
20558
+
20515
20559
  var index = /*#__PURE__*/_mergeNamespaces({
20516
20560
  __proto__: null,
20517
- default: prompts
20561
+ default: prompt
20518
20562
  }, [prompts]);
20519
20563
 
20520
20564
  const keys = [
@@ -20526,7 +20570,7 @@ const keys = [
20526
20570
  ["t", "filter by a test name regex pattern"],
20527
20571
  ["q", "quit"]
20528
20572
  ];
20529
- const cancelKeys = ["space", "c", ...keys.map((key) => key[0]).flat()];
20573
+ const cancelKeys = ["space", "c", "h", ...keys.map((key) => key[0]).flat()];
20530
20574
  function printShortcutsHelp() {
20531
20575
  stdout().write(
20532
20576
  `
@@ -20540,6 +20584,9 @@ function registerConsoleShortcuts(ctx) {
20540
20584
  async function _keypressHandler(str, key) {
20541
20585
  if (str === "" || str === "\x1B" || key && key.ctrl && key.name === "c") {
20542
20586
  if (!ctx.isCancelling) {
20587
+ ctx.logger.logUpdate.clear();
20588
+ ctx.logger.log(c.red("Cancelling test run. Press CTRL+c again to exit forcefully.\n"));
20589
+ process.exitCode = 130;
20543
20590
  await ctx.cancelCurrentRun("keyboard-input");
20544
20591
  await ctx.runningPromise;
20545
20592
  }
@@ -20550,6 +20597,8 @@ function registerConsoleShortcuts(ctx) {
20550
20597
  process.kill(process.pid, "SIGTSTP");
20551
20598
  return;
20552
20599
  }
20600
+ if (!ctx.config.watch)
20601
+ return;
20553
20602
  const name = key == null ? void 0 : key.name;
20554
20603
  if (ctx.runningPromise) {
20555
20604
  if (cancelKeys.includes(name))
@@ -20581,7 +20630,7 @@ function registerConsoleShortcuts(ctx) {
20581
20630
  async function inputNamePattern() {
20582
20631
  var _a;
20583
20632
  off();
20584
- const { filter = "" } = await prompts([{
20633
+ const { filter = "" } = await prompt([{
20585
20634
  name: "filter",
20586
20635
  type: "text",
20587
20636
  message: "Input test name pattern (RegExp)",
@@ -20592,7 +20641,7 @@ function registerConsoleShortcuts(ctx) {
20592
20641
  }
20593
20642
  async function inputFilePattern() {
20594
20643
  off();
20595
- const { filter = "" } = await prompts([{
20644
+ const { filter = "" } = await prompt([{
20596
20645
  name: "filter",
20597
20646
  type: "text",
20598
20647
  message: "Input filename pattern",
@@ -20619,6 +20668,9 @@ function registerConsoleShortcuts(ctx) {
20619
20668
  process.stdin.setRawMode(false);
20620
20669
  }
20621
20670
  on();
20671
+ return function cleanup() {
20672
+ off();
20673
+ };
20622
20674
  }
20623
20675
 
20624
20676
  async function startVitest(mode, cliFilters = [], options = {}, viteOverrides) {
@@ -20659,10 +20711,9 @@ async function startVitest(mode, cliFilters = [], options = {}, viteOverrides) {
20659
20711
  process.exitCode = 1;
20660
20712
  return ctx;
20661
20713
  }
20662
- if (process.stdin.isTTY && ctx.config.watch)
20663
- registerConsoleShortcuts(ctx);
20664
- else
20665
- process.on("SIGINT", () => ctx.cancelCurrentRun("keyboard-input"));
20714
+ let stdinCleanup;
20715
+ if (process.stdin.isTTY)
20716
+ stdinCleanup = registerConsoleShortcuts(ctx);
20666
20717
  ctx.onServerRestart((reason) => {
20667
20718
  ctx.report("onServerRestart", reason);
20668
20719
  if (process.env.VITEST_CLI_WRAPPER)
@@ -20681,8 +20732,9 @@ async function startVitest(mode, cliFilters = [], options = {}, viteOverrides) {
20681
20732
  }
20682
20733
  if (ctx.shouldKeepServer())
20683
20734
  return ctx;
20735
+ stdinCleanup == null ? void 0 : stdinCleanup();
20684
20736
  await ctx.close();
20685
20737
  return ctx;
20686
20738
  }
20687
20739
 
20688
- export { BaseSequencer as B, VitestPlugin as V, createVitest as c, divider as d, onetime$1 as o, registerConsoleShortcuts as r, startVitest as s, version$1 as v };
20740
+ export { BaseSequencer as B, VitestPlugin as V, createVitest as c, divider as d, onetimeExports as o, registerConsoleShortcuts as r, startVitest as s, version$1 as v };