vitest 3.0.0 → 3.0.2

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 (41) hide show
  1. package/dist/browser.js +1 -1
  2. package/dist/chunks/{base.CUDzyU2J.js → base.gZAre3Yy.js} +3 -3
  3. package/dist/chunks/{cac.DZC9WjGM.js → cac.CHB7MTUk.js} +22 -22
  4. package/dist/chunks/{cli-api.CmJw5Cd_.js → cli-api.B7hOUwun.js} +164 -131
  5. package/dist/chunks/{console.CN7AiMGV.js → console.BxE0RUCr.js} +3 -3
  6. package/dist/chunks/{creator.DztqrnyH.js → creator.B8v1wNyQ.js} +3 -3
  7. package/dist/chunks/{execute.BMOaRArH.js → execute.4vt3NSmG.js} +3 -4
  8. package/dist/chunks/{globals.C5RQxaV3.js → globals.BSNBk3vE.js} +2 -2
  9. package/dist/chunks/{index.BQbxGbG9.js → index.Bf4FgyZN.js} +1 -1
  10. package/dist/chunks/{index.BJDntFik.js → index.Bh7wTRhh.js} +8 -8
  11. package/dist/chunks/{index.CUcwvygK.js → index.C2XSkjNu.js} +2 -2
  12. package/dist/chunks/{index.D9C26wCk.js → index.DfqWks-F.js} +1 -1
  13. package/dist/chunks/{index.TKSL1HjN.js → index.DyQPL4DO.js} +15 -15
  14. package/dist/chunks/{index.68735LiX.js → index.TH3f4LSA.js} +2 -2
  15. package/dist/chunks/{index.K90BXFOx.js → index.cYxyd29h.js} +12 -12
  16. package/dist/chunks/{inspector.DKLceBVD.js → inspector.CU9GlB9I.js} +1 -1
  17. package/dist/chunks/{resolveConfig.CSLLD33d.js → resolveConfig.DATSOo7x.js} +14 -14
  18. package/dist/chunks/{rpc.TVf73xOu.js → rpc.Bf456uf4.js} +1 -1
  19. package/dist/chunks/{runBaseTests.C0T_TQwH.js → runBaseTests.Ba8jtu6O.js} +8 -8
  20. package/dist/chunks/{setup-common.D0zLenuv.js → setup-common.jLbIuaww.js} +1 -1
  21. package/dist/chunks/{typechecker.BJMkWMXo.js → typechecker.ChNaIV36.js} +9 -9
  22. package/dist/chunks/{vi.Da_PT3Vw.js → vi.CjhMlMwf.js} +6 -6
  23. package/dist/chunks/{vm.DrFVeTXo.js → vm.CUw7ChSp.js} +5 -5
  24. package/dist/cli.js +1 -1
  25. package/dist/config.cjs +1 -1
  26. package/dist/config.js +1 -1
  27. package/dist/coverage.js +9 -9
  28. package/dist/environments.js +1 -1
  29. package/dist/execute.js +1 -1
  30. package/dist/index.js +2 -2
  31. package/dist/node.js +9 -9
  32. package/dist/reporters.js +2 -2
  33. package/dist/runners.js +4 -4
  34. package/dist/worker.js +5 -5
  35. package/dist/workers/forks.js +2 -2
  36. package/dist/workers/runVmTests.js +7 -7
  37. package/dist/workers/threads.js +2 -2
  38. package/dist/workers/vmForks.js +3 -3
  39. package/dist/workers/vmThreads.js +3 -3
  40. package/dist/workers.js +8 -8
  41. package/package.json +15 -15
@@ -3,17 +3,16 @@ import { extname, normalize, relative, dirname, resolve, join, basename, isAbsol
3
3
  import { g as getCoverageProvider, C as CoverageProviderMap } from './coverage.BWeNbfBa.js';
4
4
  import a, { resolve as resolve$1 } from 'node:path';
5
5
  import { noop, isPrimitive, createDefer, highlight, toArray, deepMerge, nanoid, slash, deepClone, notNullish } from '@vitest/utils';
6
- import { f as findUp, p as prompt } from './index.BJDntFik.js';
7
- import * as vite from 'vite';
6
+ import { f as findUp, p as prompt } from './index.Bh7wTRhh.js';
8
7
  import { searchForWorkspaceRoot, version, createServer, mergeConfig } from 'vite';
9
8
  import { A as API_PATH, c as configFiles, a as defaultBrowserPort, w as workspacesFiles, d as defaultPort } from './constants.fzPh7AOq.js';
10
9
  import { generateFileHash, createFileTask, limitConcurrency, hasFailed, getTasks, getTests } from '@vitest/runner/utils';
11
10
  import { SnapshotManager } from '@vitest/snapshot/manager';
12
11
  import { ViteNodeRunner } from 'vite-node/client';
13
12
  import { ViteNodeServer } from 'vite-node/server';
14
- import { v as version$1 } from './cac.DZC9WjGM.js';
15
- import { c as createBirpc } from './index.68735LiX.js';
16
- import { s as stringify, p as parse, g as printError, h as generateCodeFrame, R as ReportersMap, b as BenchmarkReportsMap, i as BlobReporter, r as readBlobs, H as HangingProcessReporter } from './index.TKSL1HjN.js';
13
+ import { v as version$1 } from './cac.CHB7MTUk.js';
14
+ import { c as createBirpc } from './index.TH3f4LSA.js';
15
+ import { s as stringify, p as parse, g as printError, h as generateCodeFrame, R as ReportersMap, b as BenchmarkReportsMap, i as BlobReporter, r as readBlobs, H as HangingProcessReporter } from './index.DyQPL4DO.js';
17
16
  import require$$0$2 from 'stream';
18
17
  import require$$0 from 'zlib';
19
18
  import require$$0$1 from 'buffer';
@@ -27,8 +26,8 @@ import require$$7 from 'url';
27
26
  import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './_commonjsHelpers.BFTU3MAI.js';
28
27
  import { parseErrorStacktrace } from '@vitest/utils/source-map';
29
28
  import { distDir, rootDir } from '../path.js';
30
- import { R as RandomSequencer, i as isPackageExists, e as requireMicromatch, h as hash, V as VitestCache, f as configDefaults, g as getFilePoolName, j as isBrowserEnabled, m as mm, a as resolveConfig, k as groupBy, w as wildcardPatternToRegExp, l as createPool, b as resolveApiServerConfig, s as stdout } from './resolveConfig.CSLLD33d.js';
31
- import { i as isTTY, b as isWindows, c as convertTasksToEvents } from './typechecker.BJMkWMXo.js';
29
+ import { R as RandomSequencer, i as isPackageExists, e as requireMicromatch, h as hash, V as VitestCache, f as configDefaults, g as getFilePoolName, j as isBrowserEnabled, m as mm, a as resolveConfig, k as groupBy, w as wildcardPatternToRegExp, l as createPool, b as resolveApiServerConfig, s as stdout } from './resolveConfig.DATSOo7x.js';
30
+ import { i as isTTY, b as isWindows, c as convertTasksToEvents } from './typechecker.ChNaIV36.js';
32
31
  import { Console } from 'node:console';
33
32
  import c from 'tinyrainbow';
34
33
  import { a as formatProjectName, w as withLabel, d as divider } from './utils.DJWL04yX.js';
@@ -4928,7 +4927,7 @@ function setup(ctx, _server) {
4928
4927
  return promises.writeFile(id, content, "utf-8");
4929
4928
  },
4930
4929
  async rerun(files, resetTestNamePattern) {
4931
- await ctx.rerunFiles(files, void 0, true, resetTestNamePattern);
4930
+ await ctx.rerunFiles(files, undefined, true, resetTestNamePattern);
4932
4931
  },
4933
4932
  async rerunTask(id) {
4934
4933
  await ctx.rerunTask(id);
@@ -5205,7 +5204,7 @@ class Logger {
5205
5204
  return;
5206
5205
  }
5207
5206
  const log = this._clearScreenPending;
5208
- this._clearScreenPending = void 0;
5207
+ this._clearScreenPending = undefined;
5209
5208
  this.console.log(`${CURSOR_TO_START}${ERASE_DOWN}${log}`);
5210
5209
  }
5211
5210
  printError(err, options = {}) {
@@ -5379,8 +5378,8 @@ Vitest found ${errors.length} error${errors.length > 1 ? "s" : ""} not related t
5379
5378
  };
5380
5379
  const onExit = (signal, exitCode) => {
5381
5380
  cleanup();
5382
- if (process.exitCode === void 0) {
5383
- process.exitCode = exitCode !== void 0 ? 128 + exitCode : Number(signal);
5381
+ if (process.exitCode === undefined) {
5382
+ process.exitCode = exitCode !== undefined ? 128 + exitCode : Number(signal);
5384
5383
  }
5385
5384
  process.exit();
5386
5385
  };
@@ -5443,7 +5442,7 @@ class VitestPackageInstaller {
5443
5442
  if (!isTTY) {
5444
5443
  return false;
5445
5444
  }
5446
- const prompts = await import('./index.BJDntFik.js').then(function (n) { return n.i; });
5445
+ const prompts = await import('./index.Bh7wTRhh.js').then(function (n) { return n.i; });
5447
5446
  const { install } = await prompts.default({
5448
5447
  type: "confirm",
5449
5448
  name: "install",
@@ -5451,7 +5450,7 @@ class VitestPackageInstaller {
5451
5450
  });
5452
5451
  if (install) {
5453
5452
  const packageName = version ? `${dependency}@${version}` : dependency;
5454
- await (await import('./index.D9C26wCk.js')).installPackage(packageName, { dev: true });
5453
+ await (await import('./index.DfqWks-F.js')).installPackage(packageName, { dev: true });
5455
5454
  process.stderr.write(
5456
5455
  c.yellow(
5457
5456
  `
@@ -5478,7 +5477,7 @@ function requireArray () {
5478
5477
  if (hasRequiredArray) return array;
5479
5478
  hasRequiredArray = 1;
5480
5479
  Object.defineProperty(array, "__esModule", { value: true });
5481
- array.splitWhen = array.flatten = void 0;
5480
+ array.splitWhen = array.flatten = undefined;
5482
5481
  function flatten(items) {
5483
5482
  return items.reduce((collection, item) => [].concat(collection, item), []);
5484
5483
  }
@@ -5509,7 +5508,7 @@ function requireErrno () {
5509
5508
  if (hasRequiredErrno) return errno;
5510
5509
  hasRequiredErrno = 1;
5511
5510
  Object.defineProperty(errno, "__esModule", { value: true });
5512
- errno.isEnoentCodeError = void 0;
5511
+ errno.isEnoentCodeError = undefined;
5513
5512
  function isEnoentCodeError(error) {
5514
5513
  return error.code === 'ENOENT';
5515
5514
  }
@@ -5525,7 +5524,7 @@ function requireFs$3 () {
5525
5524
  if (hasRequiredFs$3) return fs$3;
5526
5525
  hasRequiredFs$3 = 1;
5527
5526
  Object.defineProperty(fs$3, "__esModule", { value: true });
5528
- fs$3.createDirentFromStats = void 0;
5527
+ fs$3.createDirentFromStats = undefined;
5529
5528
  class DirentFromStats {
5530
5529
  constructor(name, stats) {
5531
5530
  this.name = name;
@@ -5553,7 +5552,7 @@ function requirePath () {
5553
5552
  if (hasRequiredPath) return path;
5554
5553
  hasRequiredPath = 1;
5555
5554
  Object.defineProperty(path, "__esModule", { value: true });
5556
- path.convertPosixPathToPattern = path.convertWindowsPathToPattern = path.convertPathToPattern = path.escapePosixPath = path.escapeWindowsPath = path.escape = path.removeLeadingDotSegment = path.makeAbsolute = path.unixify = void 0;
5555
+ path.convertPosixPathToPattern = path.convertWindowsPathToPattern = path.convertPathToPattern = path.escapePosixPath = path.escapeWindowsPath = path.escape = path.removeLeadingDotSegment = path.makeAbsolute = path.unixify = undefined;
5557
5556
  const os = require$$0$4;
5558
5557
  const path$1 = require$$0$5;
5559
5558
  const IS_WINDOWS_PLATFORM = os.platform() === 'win32';
@@ -5868,7 +5867,7 @@ function requirePattern () {
5868
5867
  if (hasRequiredPattern) return pattern;
5869
5868
  hasRequiredPattern = 1;
5870
5869
  Object.defineProperty(pattern, "__esModule", { value: true });
5871
- pattern.removeDuplicateSlashes = pattern.matchAny = pattern.convertPatternsToRe = pattern.makeRe = pattern.getPatternParts = pattern.expandBraceExpansion = pattern.expandPatternsWithBraceExpansion = pattern.isAffectDepthOfReadingPattern = pattern.endsWithSlashGlobStar = pattern.hasGlobStar = pattern.getBaseDirectory = pattern.isPatternRelatedToParentDirectory = pattern.getPatternsOutsideCurrentDirectory = pattern.getPatternsInsideCurrentDirectory = pattern.getPositivePatterns = pattern.getNegativePatterns = pattern.isPositivePattern = pattern.isNegativePattern = pattern.convertToNegativePattern = pattern.convertToPositivePattern = pattern.isDynamicPattern = pattern.isStaticPattern = void 0;
5870
+ pattern.isAbsolute = pattern.partitionAbsoluteAndRelative = pattern.removeDuplicateSlashes = pattern.matchAny = pattern.convertPatternsToRe = pattern.makeRe = pattern.getPatternParts = pattern.expandBraceExpansion = pattern.expandPatternsWithBraceExpansion = pattern.isAffectDepthOfReadingPattern = pattern.endsWithSlashGlobStar = pattern.hasGlobStar = pattern.getBaseDirectory = pattern.isPatternRelatedToParentDirectory = pattern.getPatternsOutsideCurrentDirectory = pattern.getPatternsInsideCurrentDirectory = pattern.getPositivePatterns = pattern.getNegativePatterns = pattern.isPositivePattern = pattern.isNegativePattern = pattern.convertToNegativePattern = pattern.convertToPositivePattern = pattern.isDynamicPattern = pattern.isStaticPattern = undefined;
5872
5871
  const path = require$$0$5;
5873
5872
  const globParent = requireGlobParent();
5874
5873
  const micromatch = requireMicromatch();
@@ -6054,6 +6053,24 @@ function requirePattern () {
6054
6053
  return pattern.replace(DOUBLE_SLASH_RE, '/');
6055
6054
  }
6056
6055
  pattern.removeDuplicateSlashes = removeDuplicateSlashes;
6056
+ function partitionAbsoluteAndRelative(patterns) {
6057
+ const absolute = [];
6058
+ const relative = [];
6059
+ for (const pattern of patterns) {
6060
+ if (isAbsolute(pattern)) {
6061
+ absolute.push(pattern);
6062
+ }
6063
+ else {
6064
+ relative.push(pattern);
6065
+ }
6066
+ }
6067
+ return [absolute, relative];
6068
+ }
6069
+ pattern.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
6070
+ function isAbsolute(pattern) {
6071
+ return path.isAbsolute(pattern);
6072
+ }
6073
+ pattern.isAbsolute = isAbsolute;
6057
6074
  return pattern;
6058
6075
  }
6059
6076
 
@@ -6217,7 +6234,7 @@ function requireStream$3 () {
6217
6234
  if (hasRequiredStream$3) return stream$3;
6218
6235
  hasRequiredStream$3 = 1;
6219
6236
  Object.defineProperty(stream$3, "__esModule", { value: true });
6220
- stream$3.merge = void 0;
6237
+ stream$3.merge = undefined;
6221
6238
  const merge2 = requireMerge2();
6222
6239
  function merge(streams) {
6223
6240
  const mergedStream = merge2(streams);
@@ -6243,7 +6260,7 @@ function requireString () {
6243
6260
  if (hasRequiredString) return string;
6244
6261
  hasRequiredString = 1;
6245
6262
  Object.defineProperty(string, "__esModule", { value: true });
6246
- string.isEmpty = string.isString = void 0;
6263
+ string.isEmpty = string.isString = undefined;
6247
6264
  function isString(input) {
6248
6265
  return typeof input === 'string';
6249
6266
  }
@@ -6261,7 +6278,7 @@ function requireUtils$1 () {
6261
6278
  if (hasRequiredUtils$1) return utils$1;
6262
6279
  hasRequiredUtils$1 = 1;
6263
6280
  Object.defineProperty(utils$1, "__esModule", { value: true });
6264
- utils$1.string = utils$1.stream = utils$1.pattern = utils$1.path = utils$1.fs = utils$1.errno = utils$1.array = void 0;
6281
+ utils$1.string = utils$1.stream = utils$1.pattern = utils$1.path = utils$1.fs = utils$1.errno = utils$1.array = undefined;
6265
6282
  const array = requireArray();
6266
6283
  utils$1.array = array;
6267
6284
  const errno = requireErrno();
@@ -6285,7 +6302,7 @@ function requireTasks () {
6285
6302
  if (hasRequiredTasks) return tasks;
6286
6303
  hasRequiredTasks = 1;
6287
6304
  Object.defineProperty(tasks, "__esModule", { value: true });
6288
- tasks.convertPatternGroupToTask = tasks.convertPatternGroupsToTasks = tasks.groupPatternsByBaseDirectory = tasks.getNegativePatternsAsPositive = tasks.getPositivePatterns = tasks.convertPatternsToTasks = tasks.generate = void 0;
6305
+ tasks.convertPatternGroupToTask = tasks.convertPatternGroupsToTasks = tasks.groupPatternsByBaseDirectory = tasks.getNegativePatternsAsPositive = tasks.getPositivePatterns = tasks.convertPatternsToTasks = tasks.generate = undefined;
6289
6306
  const utils = requireUtils$1();
6290
6307
  function generate(input, settings) {
6291
6308
  const patterns = processPatterns(input, settings);
@@ -6420,7 +6437,7 @@ function requireAsync$5 () {
6420
6437
  if (hasRequiredAsync$5) return async;
6421
6438
  hasRequiredAsync$5 = 1;
6422
6439
  Object.defineProperty(async, "__esModule", { value: true });
6423
- async.read = void 0;
6440
+ async.read = undefined;
6424
6441
  function read(path, settings, callback) {
6425
6442
  settings.fs.lstat(path, (lstatError, lstat) => {
6426
6443
  if (lstatError !== null) {
@@ -6465,7 +6482,7 @@ function requireSync$5 () {
6465
6482
  if (hasRequiredSync$5) return sync$5;
6466
6483
  hasRequiredSync$5 = 1;
6467
6484
  Object.defineProperty(sync$5, "__esModule", { value: true });
6468
- sync$5.read = void 0;
6485
+ sync$5.read = undefined;
6469
6486
  function read(path, settings) {
6470
6487
  const lstat = settings.fs.lstatSync(path);
6471
6488
  if (!lstat.isSymbolicLink() || !settings.followSymbolicLink) {
@@ -6500,7 +6517,7 @@ function requireFs$2 () {
6500
6517
  hasRequiredFs$2 = 1;
6501
6518
  (function (exports) {
6502
6519
  Object.defineProperty(exports, "__esModule", { value: true });
6503
- exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
6520
+ exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = undefined;
6504
6521
  const fs = require$$0$6;
6505
6522
  exports.FILE_SYSTEM_ADAPTER = {
6506
6523
  lstat: fs.lstat,
@@ -6535,7 +6552,7 @@ function requireSettings$3 () {
6535
6552
  this.throwErrorOnBrokenSymbolicLink = this._getValue(this._options.throwErrorOnBrokenSymbolicLink, true);
6536
6553
  }
6537
6554
  _getValue(option, value) {
6538
- return option !== null && option !== void 0 ? option : value;
6555
+ return option !== null && option !== undefined ? option : value;
6539
6556
  }
6540
6557
  }
6541
6558
  settings$3.default = Settings;
@@ -6548,7 +6565,7 @@ function requireOut$3 () {
6548
6565
  if (hasRequiredOut$3) return out$1;
6549
6566
  hasRequiredOut$3 = 1;
6550
6567
  Object.defineProperty(out$1, "__esModule", { value: true });
6551
- out$1.statSync = out$1.stat = out$1.Settings = void 0;
6568
+ out$1.statSync = out$1.stat = out$1.Settings = undefined;
6552
6569
  const async = requireAsync$5();
6553
6570
  const sync = requireSync$5();
6554
6571
  const settings_1 = requireSettings$3();
@@ -6663,7 +6680,7 @@ function requireConstants () {
6663
6680
  if (hasRequiredConstants) return constants;
6664
6681
  hasRequiredConstants = 1;
6665
6682
  Object.defineProperty(constants, "__esModule", { value: true });
6666
- constants.IS_SUPPORT_READDIR_WITH_FILE_TYPES = void 0;
6683
+ constants.IS_SUPPORT_READDIR_WITH_FILE_TYPES = undefined;
6667
6684
  const NODE_PROCESS_VERSION_PARTS = process.versions.node.split('.');
6668
6685
  if (NODE_PROCESS_VERSION_PARTS[0] === undefined || NODE_PROCESS_VERSION_PARTS[1] === undefined) {
6669
6686
  throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`);
@@ -6691,7 +6708,7 @@ function requireFs$1 () {
6691
6708
  if (hasRequiredFs$1) return fs$1;
6692
6709
  hasRequiredFs$1 = 1;
6693
6710
  Object.defineProperty(fs$1, "__esModule", { value: true });
6694
- fs$1.createDirentFromStats = void 0;
6711
+ fs$1.createDirentFromStats = undefined;
6695
6712
  class DirentFromStats {
6696
6713
  constructor(name, stats) {
6697
6714
  this.name = name;
@@ -6717,7 +6734,7 @@ function requireUtils () {
6717
6734
  if (hasRequiredUtils) return utils;
6718
6735
  hasRequiredUtils = 1;
6719
6736
  Object.defineProperty(utils, "__esModule", { value: true });
6720
- utils.fs = void 0;
6737
+ utils.fs = undefined;
6721
6738
  const fs = requireFs$1();
6722
6739
  utils.fs = fs;
6723
6740
  return utils;
@@ -6731,7 +6748,7 @@ function requireCommon$1 () {
6731
6748
  if (hasRequiredCommon$1) return common$1;
6732
6749
  hasRequiredCommon$1 = 1;
6733
6750
  Object.defineProperty(common$1, "__esModule", { value: true });
6734
- common$1.joinPathSegments = void 0;
6751
+ common$1.joinPathSegments = undefined;
6735
6752
  function joinPathSegments(a, b, separator) {
6736
6753
  /**
6737
6754
  * The correct handling of cases when the first segment is a root (`/`, `C:/`) or UNC path (`//?/C:/`).
@@ -6751,7 +6768,7 @@ function requireAsync$4 () {
6751
6768
  if (hasRequiredAsync$4) return async$1;
6752
6769
  hasRequiredAsync$4 = 1;
6753
6770
  Object.defineProperty(async$1, "__esModule", { value: true });
6754
- async$1.readdir = async$1.readdirWithFileTypes = async$1.read = void 0;
6771
+ async$1.readdir = async$1.readdirWithFileTypes = async$1.read = undefined;
6755
6772
  const fsStat = requireOut$3();
6756
6773
  const rpl = requireRunParallel();
6757
6774
  const constants_1 = requireConstants();
@@ -6864,7 +6881,7 @@ function requireSync$4 () {
6864
6881
  if (hasRequiredSync$4) return sync$4;
6865
6882
  hasRequiredSync$4 = 1;
6866
6883
  Object.defineProperty(sync$4, "__esModule", { value: true });
6867
- sync$4.readdir = sync$4.readdirWithFileTypes = sync$4.read = void 0;
6884
+ sync$4.readdir = sync$4.readdirWithFileTypes = sync$4.read = undefined;
6868
6885
  const fsStat = requireOut$3();
6869
6886
  const constants_1 = requireConstants();
6870
6887
  const utils = requireUtils();
@@ -6930,7 +6947,7 @@ function requireFs () {
6930
6947
  hasRequiredFs = 1;
6931
6948
  (function (exports) {
6932
6949
  Object.defineProperty(exports, "__esModule", { value: true });
6933
- exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
6950
+ exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = undefined;
6934
6951
  const fs = require$$0$6;
6935
6952
  exports.FILE_SYSTEM_ADAPTER = {
6936
6953
  lstat: fs.lstat,
@@ -6975,7 +6992,7 @@ function requireSettings$2 () {
6975
6992
  });
6976
6993
  }
6977
6994
  _getValue(option, value) {
6978
- return option !== null && option !== void 0 ? option : value;
6995
+ return option !== null && option !== undefined ? option : value;
6979
6996
  }
6980
6997
  }
6981
6998
  settings$2.default = Settings;
@@ -6988,7 +7005,7 @@ function requireOut$2 () {
6988
7005
  if (hasRequiredOut$2) return out$2;
6989
7006
  hasRequiredOut$2 = 1;
6990
7007
  Object.defineProperty(out$2, "__esModule", { value: true });
6991
- out$2.Settings = out$2.scandirSync = out$2.scandir = void 0;
7008
+ out$2.Settings = out$2.scandirSync = out$2.scandir = undefined;
6992
7009
  const async = requireAsync$4();
6993
7010
  const sync = requireSync$4();
6994
7011
  const settings_1 = requireSettings$2();
@@ -7384,7 +7401,7 @@ function requireCommon () {
7384
7401
  if (hasRequiredCommon) return common;
7385
7402
  hasRequiredCommon = 1;
7386
7403
  Object.defineProperty(common, "__esModule", { value: true });
7387
- common.joinPathSegments = common.replacePathSegmentSeparator = common.isAppliedFilter = common.isFatalError = void 0;
7404
+ common.joinPathSegments = common.replacePathSegmentSeparator = common.isAppliedFilter = common.isFatalError = undefined;
7388
7405
  function isFatalError(settings, error) {
7389
7406
  if (settings.errorFilter === null) {
7390
7407
  return true;
@@ -7739,7 +7756,7 @@ function requireSettings$1 () {
7739
7756
  });
7740
7757
  }
7741
7758
  _getValue(option, value) {
7742
- return option !== null && option !== void 0 ? option : value;
7759
+ return option !== null && option !== undefined ? option : value;
7743
7760
  }
7744
7761
  }
7745
7762
  settings$1.default = Settings;
@@ -7752,7 +7769,7 @@ function requireOut$1 () {
7752
7769
  if (hasRequiredOut$1) return out$3;
7753
7770
  hasRequiredOut$1 = 1;
7754
7771
  Object.defineProperty(out$3, "__esModule", { value: true });
7755
- out$3.Settings = out$3.walkStream = out$3.walkSync = out$3.walk = void 0;
7772
+ out$3.Settings = out$3.walkStream = out$3.walkSync = out$3.walk = undefined;
7756
7773
  const async_1 = requireAsync$2();
7757
7774
  const stream_1 = requireStream$2();
7758
7775
  const sync_1 = requireSync$2();
@@ -8125,11 +8142,19 @@ function requireEntry$1 () {
8125
8142
  this.index = new Map();
8126
8143
  }
8127
8144
  getFilter(positive, negative) {
8128
- const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
8129
- const negativeRe = utils.pattern.convertPatternsToRe(negative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }));
8130
- return (entry) => this._filter(entry, positiveRe, negativeRe);
8145
+ const [absoluteNegative, relativeNegative] = utils.pattern.partitionAbsoluteAndRelative(negative);
8146
+ const patterns = {
8147
+ positive: {
8148
+ all: utils.pattern.convertPatternsToRe(positive, this._micromatchOptions)
8149
+ },
8150
+ negative: {
8151
+ absolute: utils.pattern.convertPatternsToRe(absoluteNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true })),
8152
+ relative: utils.pattern.convertPatternsToRe(relativeNegative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }))
8153
+ }
8154
+ };
8155
+ return (entry) => this._filter(entry, patterns);
8131
8156
  }
8132
- _filter(entry, positiveRe, negativeRe) {
8157
+ _filter(entry, patterns) {
8133
8158
  const filepath = utils.path.removeLeadingDotSegment(entry.path);
8134
8159
  if (this._settings.unique && this._isDuplicateEntry(filepath)) {
8135
8160
  return false;
@@ -8137,11 +8162,7 @@ function requireEntry$1 () {
8137
8162
  if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
8138
8163
  return false;
8139
8164
  }
8140
- if (this._isSkippedByAbsoluteNegativePatterns(filepath, negativeRe)) {
8141
- return false;
8142
- }
8143
- const isDirectory = entry.dirent.isDirectory();
8144
- const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory);
8165
+ const isMatched = this._isMatchToPatternsSet(filepath, patterns, entry.dirent.isDirectory());
8145
8166
  if (this._settings.unique && isMatched) {
8146
8167
  this._createIndexRecord(filepath);
8147
8168
  }
@@ -8159,14 +8180,32 @@ function requireEntry$1 () {
8159
8180
  _onlyDirectoryFilter(entry) {
8160
8181
  return this._settings.onlyDirectories && !entry.dirent.isDirectory();
8161
8182
  }
8162
- _isSkippedByAbsoluteNegativePatterns(entryPath, patternsRe) {
8163
- if (!this._settings.absolute) {
8183
+ _isMatchToPatternsSet(filepath, patterns, isDirectory) {
8184
+ const isMatched = this._isMatchToPatterns(filepath, patterns.positive.all, isDirectory);
8185
+ if (!isMatched) {
8186
+ return false;
8187
+ }
8188
+ const isMatchedByRelativeNegative = this._isMatchToPatterns(filepath, patterns.negative.relative, isDirectory);
8189
+ if (isMatchedByRelativeNegative) {
8190
+ return false;
8191
+ }
8192
+ const isMatchedByAbsoluteNegative = this._isMatchToAbsoluteNegative(filepath, patterns.negative.absolute, isDirectory);
8193
+ if (isMatchedByAbsoluteNegative) {
8194
+ return false;
8195
+ }
8196
+ return true;
8197
+ }
8198
+ _isMatchToAbsoluteNegative(filepath, patternsRe, isDirectory) {
8199
+ if (patternsRe.length === 0) {
8164
8200
  return false;
8165
8201
  }
8166
- const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
8167
- return utils.pattern.matchAny(fullpath, patternsRe);
8202
+ const fullpath = utils.path.makeAbsolute(this._settings.cwd, filepath);
8203
+ return this._isMatchToPatterns(fullpath, patternsRe, isDirectory);
8168
8204
  }
8169
8205
  _isMatchToPatterns(filepath, patternsRe, isDirectory) {
8206
+ if (patternsRe.length === 0) {
8207
+ return false;
8208
+ }
8170
8209
  // Trying to match files and directories by patterns.
8171
8210
  const isMatched = utils.pattern.matchAny(filepath, patternsRe);
8172
8211
  // A pattern with a trailling slash can be used for directory matching.
@@ -8458,7 +8497,7 @@ function requireSettings () {
8458
8497
  hasRequiredSettings = 1;
8459
8498
  (function (exports) {
8460
8499
  Object.defineProperty(exports, "__esModule", { value: true });
8461
- exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
8500
+ exports.DEFAULT_FILE_SYSTEM_ADAPTER = undefined;
8462
8501
  const fs = require$$0$6;
8463
8502
  const os = require$$0$4;
8464
8503
  /**
@@ -8675,8 +8714,8 @@ function serializeConfig(config, coreConfig, viteConfig) {
8675
8714
  reportsDirectory: coverage.reportsDirectory,
8676
8715
  provider: coverage.provider,
8677
8716
  enabled: coverage.enabled,
8678
- htmlReporter: htmlReporter ? { subdir } : void 0,
8679
- customProviderModule: "customProviderModule" in coverage ? coverage.customProviderModule : void 0
8717
+ htmlReporter: htmlReporter ? { subdir } : undefined,
8718
+ customProviderModule: "customProviderModule" in coverage ? coverage.customProviderModule : undefined
8680
8719
  };
8681
8720
  })(config.coverage),
8682
8721
  fakeTimers: config.fakeTimers,
@@ -8711,11 +8750,11 @@ function serializeConfig(config, coreConfig, viteConfig) {
8711
8750
  },
8712
8751
  snapshotOptions: {
8713
8752
  // TODO: store it differently, not on the config
8714
- snapshotEnvironment: void 0,
8753
+ snapshotEnvironment: undefined,
8715
8754
  updateSnapshot: coreConfig.snapshotOptions.updateSnapshot,
8716
8755
  snapshotFormat: {
8717
8756
  ...coreConfig.snapshotOptions.snapshotFormat,
8718
- compareKeys: void 0
8757
+ compareKeys: undefined
8719
8758
  },
8720
8759
  expand: config.snapshotOptions.expand ?? coreConfig.snapshotOptions.expand
8721
8760
  },
@@ -8858,7 +8897,7 @@ let lastMsg;
8858
8897
  let sameCount = 0;
8859
8898
  let timeFormatter;
8860
8899
  function getTimeFormatter() {
8861
- timeFormatter ??= new Intl.DateTimeFormat(void 0, {
8900
+ timeFormatter ??= new Intl.DateTimeFormat(undefined, {
8862
8901
  hour: "numeric",
8863
8902
  minute: "numeric",
8864
8903
  second: "numeric"
@@ -8961,10 +9000,6 @@ function silenceImportViteIgnoreWarning(logger) {
8961
9000
  };
8962
9001
  }
8963
9002
 
8964
- function getDefaultServerConditions() {
8965
- return vite.defaultServerConditions ?? ["node"];
8966
- }
8967
-
8968
9003
  const cssLangs = "\\.(?:css|less|sass|scss|styl|stylus|pcss|postcss)(?:$|\\?)";
8969
9004
  const cssLangRE = new RegExp(cssLangs);
8970
9005
  const cssModuleRE = new RegExp(`\\.module${cssLangs}`);
@@ -9101,7 +9136,7 @@ function requireJsTokens () {
9101
9136
  yield ({
9102
9137
  type: "RegularExpressionLiteral",
9103
9138
  value: match[0],
9104
- closed: match[1] !== void 0 && match[1] !== "\\"
9139
+ closed: match[1] !== undefined && match[1] !== "\\"
9105
9140
  });
9106
9141
  continue;
9107
9142
  }
@@ -9239,7 +9274,7 @@ function requireJsTokens () {
9239
9274
  yield ({
9240
9275
  type: "StringLiteral",
9241
9276
  value: match[0],
9242
- closed: match[2] !== void 0
9277
+ closed: match[2] !== undefined
9243
9278
  });
9244
9279
  continue;
9245
9280
  }
@@ -9340,7 +9375,7 @@ function requireJsTokens () {
9340
9375
  yield ({
9341
9376
  type: "JSXString",
9342
9377
  value: match[0],
9343
- closed: match[2] !== void 0
9378
+ closed: match[2] !== undefined
9344
9379
  });
9345
9380
  continue;
9346
9381
  }
@@ -9415,7 +9450,7 @@ function requireJsTokens () {
9415
9450
  yield ({
9416
9451
  type: "MultiLineComment",
9417
9452
  value: match[0],
9418
- closed: match[1] !== void 0
9453
+ closed: match[1] !== undefined
9419
9454
  });
9420
9455
  continue;
9421
9456
  }
@@ -9438,7 +9473,7 @@ function requireJsTokens () {
9438
9473
  value: firstCodePoint
9439
9474
  });
9440
9475
  }
9441
- return void 0;
9476
+ return undefined;
9442
9477
  };
9443
9478
  return jsTokens_1;
9444
9479
  }
@@ -9563,7 +9598,7 @@ function resolveOptimizerConfig(_testOptions, viteOptions, testConfig, viteCache
9563
9598
  testOptions.enabled ??= false;
9564
9599
  }
9565
9600
  if (!allowed || testOptions?.enabled !== true) {
9566
- newConfig.cacheDir = void 0;
9601
+ newConfig.cacheDir = undefined;
9567
9602
  newConfig.optimizeDeps = {
9568
9603
  // experimental in Vite >2.9.2, entries remains to help with older versions
9569
9604
  disabled: true,
@@ -9724,7 +9759,7 @@ function VitestProjectResolver(ctx) {
9724
9759
  enforce: "pre",
9725
9760
  async resolveId(id, _, { ssr }) {
9726
9761
  if (id === "vitest" || id.startsWith("@vitest/") || id.startsWith("vitest/")) {
9727
- const resolved = await ctx.server.pluginContainer.resolveId(id, void 0, {
9762
+ const resolved = await ctx.server.pluginContainer.resolveId(id, undefined, {
9728
9763
  skip: /* @__PURE__ */ new Set([plugin]),
9729
9764
  ssr
9730
9765
  });
@@ -9778,7 +9813,6 @@ function WorkspaceVitestPlugin(project, options) {
9778
9813
  name = options.workspacePath.toString();
9779
9814
  }
9780
9815
  }
9781
- const conditions = getDefaultServerConditions();
9782
9816
  const config = {
9783
9817
  root,
9784
9818
  resolve: {
@@ -9786,7 +9820,7 @@ function WorkspaceVitestPlugin(project, options) {
9786
9820
  // setting this option can bypass that and fallback to cjs version
9787
9821
  mainFields: [],
9788
9822
  alias: testConfig.alias,
9789
- conditions
9823
+ conditions: ["node"]
9790
9824
  },
9791
9825
  esbuild: viteConfig.esbuild === false ? false : {
9792
9826
  // Lowest target Vitest supports is Node18
@@ -9819,7 +9853,7 @@ function WorkspaceVitestPlugin(project, options) {
9819
9853
  // by default Vite resolves `module` field, which not always a native ESM module
9820
9854
  // setting this option can bypass that and fallback to cjs version
9821
9855
  mainFields: [],
9822
- conditions
9856
+ conditions: ["node"]
9823
9857
  }
9824
9858
  }
9825
9859
  },
@@ -9927,7 +9961,7 @@ class TestSpecification {
9927
9961
  get testModule() {
9928
9962
  const task = this.project.vitest.state.idMap.get(this.taskId);
9929
9963
  if (!task) {
9930
- return void 0;
9964
+ return undefined;
9931
9965
  }
9932
9966
  return this.project.vitest.state.getReportedEntity(task);
9933
9967
  }
@@ -10282,7 +10316,7 @@ class TestProject {
10282
10316
  }
10283
10317
  /** @deprecated use `matchesTestGlob` instead */
10284
10318
  async isTargetFile(id, source) {
10285
- return this.matchesTestGlob(id, source ? () => source : void 0);
10319
+ return this.matchesTestGlob(id, source ? () => source : undefined);
10286
10320
  }
10287
10321
  isInSourceTestCode(code) {
10288
10322
  return code.includes("import.meta.vitest");
@@ -10361,7 +10395,7 @@ class TestProject {
10361
10395
  ].filter(Boolean)
10362
10396
  ).then(() => {
10363
10397
  this._provided = {};
10364
- this._vite = void 0;
10398
+ this._vite = undefined;
10365
10399
  });
10366
10400
  }
10367
10401
  return this.closingPromise;
@@ -10399,7 +10433,7 @@ class TestProject {
10399
10433
  this.config.provide[providedKey]
10400
10434
  );
10401
10435
  }
10402
- this.closingPromise = void 0;
10436
+ this.closingPromise = undefined;
10403
10437
  this._vite = server;
10404
10438
  this.vitenode = new ViteNodeServer(server, this.config.server);
10405
10439
  const node = this.vitenode;
@@ -10491,7 +10525,7 @@ function deduped(cb) {
10491
10525
  return (...args) => {
10492
10526
  if (!_promise) {
10493
10527
  _promise = cb(...args).finally(() => {
10494
- _promise = void 0;
10528
+ _promise = undefined;
10495
10529
  });
10496
10530
  }
10497
10531
  return _promise;
@@ -10523,7 +10557,7 @@ async function loadCustomReporterModule(path, runner) {
10523
10557
  cause: customReporterModuleError
10524
10558
  });
10525
10559
  }
10526
- if (customReporterModule.default === null || customReporterModule.default === void 0) {
10560
+ if (customReporterModule.default === null || customReporterModule.default === undefined) {
10527
10561
  throw new Error(
10528
10562
  `Custom reporter loaded from ${path} was not the default export`
10529
10563
  );
@@ -10608,7 +10642,7 @@ function groupFilters(filters) {
10608
10642
  const testLocations = filters2.map((f) => f.lineNumber);
10609
10643
  return [
10610
10644
  filename,
10611
- testLocations.filter((l) => l !== void 0)
10645
+ testLocations.filter((l) => l !== undefined)
10612
10646
  ];
10613
10647
  })
10614
10648
  );
@@ -10646,7 +10680,7 @@ class VitestSpecifications {
10646
10680
  const files = [];
10647
10681
  const dir = process.cwd();
10648
10682
  const parsedFilters = filters.map((f) => parseFilter(f));
10649
- if (!this.vitest.config.includeTaskLocation && parsedFilters.some((f) => f.lineNumber !== void 0)) {
10683
+ if (!this.vitest.config.includeTaskLocation && parsedFilters.some((f) => f.lineNumber !== undefined)) {
10650
10684
  throw new IncludeTaskLocationDisabledError();
10651
10685
  }
10652
10686
  const testLines = groupFilters(parsedFilters.map(
@@ -10847,7 +10881,7 @@ class TestCase extends ReportedTaskImplementation {
10847
10881
  * Full name of the test including all parent suites separated with `>`.
10848
10882
  */
10849
10883
  get fullName() {
10850
- if (this.#fullName === void 0) {
10884
+ if (this.#fullName === undefined) {
10851
10885
  if (this.parent.type !== "module") {
10852
10886
  this.#fullName = `${this.parent.fullName} > ${this.name}`;
10853
10887
  } else {
@@ -10869,14 +10903,14 @@ class TestCase extends ReportedTaskImplementation {
10869
10903
  if (!result && (mode === "skip" || mode === "todo")) {
10870
10904
  return {
10871
10905
  state: "skipped",
10872
- note: void 0,
10873
- errors: void 0
10906
+ note: undefined,
10907
+ errors: undefined
10874
10908
  };
10875
10909
  }
10876
10910
  if (!result || result.state === "run" || result.state === "queued") {
10877
10911
  return {
10878
10912
  state: "pending",
10879
- errors: void 0
10913
+ errors: undefined
10880
10914
  };
10881
10915
  }
10882
10916
  const state = result.state === "fail" ? "failed" : result.state === "pass" ? "passed" : "skipped";
@@ -10884,7 +10918,7 @@ class TestCase extends ReportedTaskImplementation {
10884
10918
  return {
10885
10919
  state,
10886
10920
  note: result.note,
10887
- errors: void 0
10921
+ errors: undefined
10888
10922
  };
10889
10923
  }
10890
10924
  if (state === "passed") {
@@ -10911,7 +10945,7 @@ class TestCase extends ReportedTaskImplementation {
10911
10945
  diagnostic() {
10912
10946
  const result = this.task.result;
10913
10947
  if (!result || !result.startTime) {
10914
- return void 0;
10948
+ return undefined;
10915
10949
  }
10916
10950
  const duration = result.duration || 0;
10917
10951
  const slow = duration > this.project.globalConfig.slowTestThreshold;
@@ -11075,7 +11109,7 @@ class TestSuite extends SuiteImplementation {
11075
11109
  * Full name of the suite including all parent suites separated with `>`.
11076
11110
  */
11077
11111
  get fullName() {
11078
- if (this.#fullName === void 0) {
11112
+ if (this.#fullName === undefined) {
11079
11113
  if (this.parent.type !== "module") {
11080
11114
  this.#fullName = `${this.parent.fullName} > ${this.name}`;
11081
11115
  } else {
@@ -11808,7 +11842,7 @@ async function resolveBrowserWorkspace(vitest, names, resolvedProjects) {
11808
11842
  if (!isTTY) {
11809
11843
  throw new Error(`${message} Please, filter projects with --browser=name or --project=name flag or run tests with "headless: true" option.`);
11810
11844
  }
11811
- const prompts = await import('./index.BJDntFik.js').then(function (n) { return n.i; });
11845
+ const prompts = await import('./index.Bh7wTRhh.js').then(function (n) { return n.i; });
11812
11846
  const { projectName } = await prompts.default({
11813
11847
  type: "select",
11814
11848
  name: "projectName",
@@ -11854,7 +11888,7 @@ function cloneConfig(project, { browser, ...config }) {
11854
11888
  headless: project.vitest._options?.browser?.headless ?? headless ?? currentConfig.headless,
11855
11889
  name: browser,
11856
11890
  providerOptions: config,
11857
- instances: void 0
11891
+ instances: undefined
11858
11892
  // projects cannot spawn more configs
11859
11893
  }
11860
11894
  // TODO: should resolve, not merge/override
@@ -11871,7 +11905,7 @@ async function resolveTestProjectConfigs(vitest, workspaceConfigPath, workspaceD
11871
11905
  if (!isDynamicPattern(stringOption)) {
11872
11906
  const file = resolve(vitest.config.root, stringOption);
11873
11907
  if (!existsSync(file)) {
11874
- const relativeWorkSpaceConfigPath = workspaceConfigPath ? relative(vitest.config.root, workspaceConfigPath) : void 0;
11908
+ const relativeWorkSpaceConfigPath = workspaceConfigPath ? relative(vitest.config.root, workspaceConfigPath) : undefined;
11875
11909
  const note = workspaceConfigPath ? `Workspace config file "${relativeWorkSpaceConfigPath}"` : "Inline workspace";
11876
11910
  throw new Error(`${note} references a non-existing file or a directory: ${file}`);
11877
11911
  }
@@ -12015,13 +12049,13 @@ class Vitest {
12015
12049
  /** @internal */
12016
12050
  _options = {};
12017
12051
  /** @internal */
12018
- reporters = void 0;
12052
+ reporters = undefined;
12019
12053
  /** @internal */
12020
- vitenode = void 0;
12054
+ vitenode = undefined;
12021
12055
  /** @internal */
12022
- runner = void 0;
12056
+ runner = undefined;
12023
12057
  /** @internal */
12024
- _testRun = void 0;
12058
+ _testRun = undefined;
12025
12059
  isFirstRun = true;
12026
12060
  restartsCount = 0;
12027
12061
  specifications;
@@ -12099,14 +12133,14 @@ class Vitest {
12099
12133
  this.restartsCount += 1;
12100
12134
  this._browserLastPort = defaultBrowserPort;
12101
12135
  this.pool?.close?.();
12102
- this.pool = void 0;
12103
- this.closingPromise = void 0;
12136
+ this.pool = undefined;
12137
+ this.closingPromise = undefined;
12104
12138
  this.projects = [];
12105
12139
  this.resolvedProjects = [];
12106
- this._workspaceConfigPath = void 0;
12107
- this.coverageProvider = void 0;
12108
- this.runningPromise = void 0;
12109
- this.coreWorkspaceProject = void 0;
12140
+ this._workspaceConfigPath = undefined;
12141
+ this.coverageProvider = undefined;
12142
+ this.runningPromise = undefined;
12143
+ this.coreWorkspaceProject = undefined;
12110
12144
  this.specifications.clearCache();
12111
12145
  this._onUserTestsRerun = [];
12112
12146
  const resolved = resolveConfig(this.mode, options, server.config, this.logger);
@@ -12241,7 +12275,7 @@ class Vitest {
12241
12275
  return rootFiles.includes(configFile);
12242
12276
  });
12243
12277
  if (!workspaceConfigName) {
12244
- return void 0;
12278
+ return undefined;
12245
12279
  }
12246
12280
  return join(configDir, workspaceConfigName);
12247
12281
  }
@@ -12250,7 +12284,7 @@ class Vitest {
12250
12284
  return resolveWorkspace(
12251
12285
  this,
12252
12286
  cliOptions,
12253
- void 0,
12287
+ undefined,
12254
12288
  this.config.workspace
12255
12289
  );
12256
12290
  }
@@ -12278,7 +12312,7 @@ class Vitest {
12278
12312
  return this.specifications.globTestSpecifications(filters);
12279
12313
  }
12280
12314
  async initCoverageProvider() {
12281
- if (this.coverageProvider !== void 0) {
12315
+ if (this.coverageProvider !== undefined) {
12282
12316
  return;
12283
12317
  }
12284
12318
  this.coverageProvider = await getCoverageProvider(
@@ -12304,7 +12338,7 @@ class Vitest {
12304
12338
  const specifications = [];
12305
12339
  for (const file of files) {
12306
12340
  const project = this.getProjectByName(file.projectName || "");
12307
- const specification = project.createSpecification(file.filepath, void 0, file.pool);
12341
+ const specification = project.createSpecification(file.filepath, undefined, file.pool);
12308
12342
  specifications.push(specification);
12309
12343
  }
12310
12344
  await this.report("onSpecsCollected", specifications.map((spec) => spec.toJSON()));
@@ -12372,7 +12406,7 @@ class Vitest {
12372
12406
  } finally {
12373
12407
  await this.report("onInit", this);
12374
12408
  }
12375
- this.filenamePattern = filters && filters?.length > 0 ? filters : void 0;
12409
+ this.filenamePattern = filters && filters?.length > 0 ? filters : undefined;
12376
12410
  const files = await this.specifications.getRelevantTestSpecifications(filters);
12377
12411
  if (!files.length) {
12378
12412
  const throwAnError = !this.config.watch || !(this.config.changed || this.config.related?.length);
@@ -12458,7 +12492,7 @@ class Vitest {
12458
12492
  * @param allTestsRun Indicates whether all tests were run. This only matters for coverage.
12459
12493
  */
12460
12494
  async rerunTestSpecifications(specifications, allTestsRun = false) {
12461
- this.configOverride.testNamePattern = void 0;
12495
+ this.configOverride.testNamePattern = undefined;
12462
12496
  const files = specifications.map((spec) => spec.moduleId);
12463
12497
  await Promise.all([
12464
12498
  this.report("onWatcherRerun", files, "rerun test"),
@@ -12509,10 +12543,10 @@ class Vitest {
12509
12543
  await this.reportCoverage(coverage, allTestsRun);
12510
12544
  }
12511
12545
  })().finally(() => {
12512
- this.runningPromise = void 0;
12546
+ this.runningPromise = undefined;
12513
12547
  this.isFirstRun = false;
12514
12548
  this.config.changed = false;
12515
- this.config.related = void 0;
12549
+ this.config.related = undefined;
12516
12550
  });
12517
12551
  return await this.runningPromise;
12518
12552
  }
@@ -12549,9 +12583,9 @@ class Vitest {
12549
12583
  unhandledErrors: this.state.getUnhandledErrors()
12550
12584
  };
12551
12585
  })().finally(() => {
12552
- this.runningPromise = void 0;
12586
+ this.runningPromise = undefined;
12553
12587
  this.config.changed = false;
12554
- this.config.related = void 0;
12588
+ this.config.related = undefined;
12555
12589
  });
12556
12590
  return await this.runningPromise;
12557
12591
  }
@@ -12580,7 +12614,7 @@ class Vitest {
12580
12614
  /** @internal */
12581
12615
  async rerunFiles(files = this.state.getFilepaths(), trigger, allTestsRun = true, resetTestNamePattern = false) {
12582
12616
  if (resetTestNamePattern) {
12583
- this.configOverride.testNamePattern = void 0;
12617
+ this.configOverride.testNamePattern = undefined;
12584
12618
  }
12585
12619
  if (this.filenamePattern) {
12586
12620
  const filteredFiles = await this.globTestSpecifications(this.filenamePattern);
@@ -12621,9 +12655,9 @@ class Vitest {
12621
12655
  /** @internal */
12622
12656
  async changeNamePattern(pattern, files = this.state.getFilepaths(), trigger) {
12623
12657
  if (pattern === "") {
12624
- this.filenamePattern = void 0;
12658
+ this.filenamePattern = undefined;
12625
12659
  }
12626
- const testNamePattern = pattern ? new RegExp(pattern) : void 0;
12660
+ const testNamePattern = pattern ? new RegExp(pattern) : undefined;
12627
12661
  this.configOverride.testNamePattern = testNamePattern;
12628
12662
  if (testNamePattern) {
12629
12663
  files = files.filter((filepath) => {
@@ -12692,14 +12726,14 @@ class Vitest {
12692
12726
  if (pattern instanceof RegExp) {
12693
12727
  this.configOverride.testNamePattern = pattern;
12694
12728
  } else {
12695
- this.configOverride.testNamePattern = pattern ? new RegExp(pattern) : void 0;
12729
+ this.configOverride.testNamePattern = pattern ? new RegExp(pattern) : undefined;
12696
12730
  }
12697
12731
  }
12698
12732
  /**
12699
12733
  * Resets the global test name pattern. This method doesn't run any tests.
12700
12734
  */
12701
12735
  resetGlobalTestNamePattern() {
12702
- this.configOverride.testNamePattern = void 0;
12736
+ this.configOverride.testNamePattern = undefined;
12703
12737
  }
12704
12738
  _rerunTimer;
12705
12739
  // we can't use a single `triggerId` yet because vscode extension relies on this
@@ -12801,12 +12835,12 @@ class Vitest {
12801
12835
  }
12802
12836
  const closePromises = this.resolvedProjects.map((w) => w.close());
12803
12837
  if (this.coreWorkspaceProject && !this.resolvedProjects.includes(this.coreWorkspaceProject)) {
12804
- closePromises.push(this.coreWorkspaceProject.close().then(() => this._vite = void 0));
12838
+ closePromises.push(this.coreWorkspaceProject.close().then(() => this._vite = undefined));
12805
12839
  }
12806
12840
  if (this.pool) {
12807
12841
  closePromises.push((async () => {
12808
12842
  await this.pool?.close?.();
12809
- this.pool = void 0;
12843
+ this.pool = undefined;
12810
12844
  })());
12811
12845
  }
12812
12846
  closePromises.push(...this._onClose.map((fn) => fn()));
@@ -12961,7 +12995,6 @@ async function VitestPlugin(options = {}, ctx = new Vitest("test")) {
12961
12995
  if (testConfig.ui && testConfig.open) {
12962
12996
  open = testConfig.uiBase ?? "/__vitest__/";
12963
12997
  }
12964
- const conditions = getDefaultServerConditions();
12965
12998
  const config = {
12966
12999
  root: viteConfig.test?.root || options.root,
12967
13000
  esbuild: viteConfig.esbuild === false ? false : {
@@ -12976,13 +13009,13 @@ async function VitestPlugin(options = {}, ctx = new Vitest("test")) {
12976
13009
  // setting this option can bypass that and fallback to cjs version
12977
13010
  mainFields: [],
12978
13011
  alias: testConfig.alias,
12979
- conditions
13012
+ conditions: ["node"]
12980
13013
  },
12981
13014
  server: {
12982
13015
  ...testConfig.api,
12983
13016
  open,
12984
13017
  hmr: false,
12985
- ws: testConfig.api?.middlewareMode ? false : void 0,
13018
+ ws: testConfig.api?.middlewareMode ? false : undefined,
12986
13019
  preTransformRequests: false,
12987
13020
  fs: {
12988
13021
  allow: resolveFsAllow(options.root || process.cwd(), testConfig.config)
@@ -13005,7 +13038,7 @@ async function VitestPlugin(options = {}, ctx = new Vitest("test")) {
13005
13038
  // by default Vite resolves `module` field, which not always a native ESM module
13006
13039
  // setting this option can bypass that and fallback to cjs version
13007
13040
  mainFields: [],
13008
- conditions
13041
+ conditions: ["node"]
13009
13042
  }
13010
13043
  }
13011
13044
  },
@@ -13036,7 +13069,7 @@ async function VitestPlugin(options = {}, ctx = new Vitest("test")) {
13036
13069
  config.ssr = { noExternal: true };
13037
13070
  } else {
13038
13071
  const noExternal = viteConfig.ssr?.noExternal;
13039
- const noExternalArray = typeof noExternal !== "undefined" ? toArray(noExternal) : void 0;
13072
+ const noExternalArray = typeof noExternal !== "undefined" ? toArray(noExternal) : undefined;
13040
13073
  const uniqueInline = inline && noExternalArray ? inline.filter((dep) => !noExternalArray.includes(dep)) : inline;
13041
13074
  config.ssr = {
13042
13075
  noExternal: uniqueInline
@@ -13124,7 +13157,7 @@ async function VitestPlugin(options = {}, ctx = new Vitest("test")) {
13124
13157
  }
13125
13158
  function removeUndefinedValues(obj) {
13126
13159
  for (const key in Object.keys(obj)) {
13127
- if (obj[key] === void 0) {
13160
+ if (obj[key] === undefined) {
13128
13161
  delete obj[key];
13129
13162
  }
13130
13163
  }
@@ -13156,7 +13189,7 @@ const SELECTION_MAX_INDEX = 7;
13156
13189
  const ESC = "\x1B[";
13157
13190
  class WatchFilter {
13158
13191
  filterRL;
13159
- currentKeyword = void 0;
13192
+ currentKeyword = undefined;
13160
13193
  message;
13161
13194
  results = [];
13162
13195
  selectionIndex = -1;
@@ -13196,20 +13229,20 @@ class WatchFilter {
13196
13229
  if (this.currentKeyword && this.currentKeyword?.length > 1) {
13197
13230
  this.currentKeyword = this.currentKeyword?.slice(0, -1);
13198
13231
  } else {
13199
- this.currentKeyword = void 0;
13232
+ this.currentKeyword = undefined;
13200
13233
  }
13201
13234
  break;
13202
13235
  case (key?.ctrl && key?.name === "c"):
13203
13236
  case key?.name === "escape":
13204
13237
  this.write(`${ESC}1G${ESC}0J`);
13205
- onSubmit(void 0);
13238
+ onSubmit(undefined);
13206
13239
  return;
13207
13240
  case key?.name === "enter":
13208
13241
  case key?.name === "return":
13209
13242
  onSubmit(
13210
13243
  this.results[this.selectionIndex] || this.currentKeyword || ""
13211
13244
  );
13212
- this.currentKeyword = void 0;
13245
+ this.currentKeyword = undefined;
13213
13246
  break;
13214
13247
  case key?.name === "up":
13215
13248
  if (this.selectionIndex && this.selectionIndex > 0) {
@@ -13226,7 +13259,7 @@ class WatchFilter {
13226
13259
  }
13227
13260
  break;
13228
13261
  case (!key?.ctrl && !key?.meta):
13229
- if (this.currentKeyword === void 0) {
13262
+ if (this.currentKeyword === undefined) {
13230
13263
  this.currentKeyword = str;
13231
13264
  } else {
13232
13265
  this.currentKeyword += str || "";
@@ -13424,7 +13457,7 @@ function registerConsoleShortcuts(ctx, stdin = process.stdin, stdout2) {
13424
13457
  return;
13425
13458
  }
13426
13459
  const files = ctx.state.getFilepaths();
13427
- const cliFiles = ctx.config.standalone && !files.length ? await ctx._globTestFilepaths() : void 0;
13460
+ const cliFiles = ctx.config.standalone && !files.length ? await ctx._globTestFilepaths() : undefined;
13428
13461
  await ctx.changeNamePattern(
13429
13462
  filter?.trim() || "",
13430
13463
  cliFiles,
@@ -13463,7 +13496,7 @@ function registerConsoleShortcuts(ctx, stdin = process.stdin, stdout2) {
13463
13496
  const lastResults = watchFilter.getLastResults();
13464
13497
  await ctx.changeFilenamePattern(
13465
13498
  latestFilename,
13466
- filter && lastResults.length ? lastResults.map((i) => resolve(ctx.config.root, i)) : void 0
13499
+ filter && lastResults.length ? lastResults.map((i) => resolve(ctx.config.root, i)) : undefined
13467
13500
  );
13468
13501
  }
13469
13502
  let rl;
@@ -13478,7 +13511,7 @@ function registerConsoleShortcuts(ctx, stdin = process.stdin, stdout2) {
13478
13511
  }
13479
13512
  function off() {
13480
13513
  rl?.close();
13481
- rl = void 0;
13514
+ rl = undefined;
13482
13515
  stdin.removeListener("keypress", keypressHandler);
13483
13516
  if (stdin.isTTY) {
13484
13517
  stdin.setRawMode(false);