vitest 4.0.13 → 4.0.14

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 (31) hide show
  1. package/dist/chunks/{base.Dqf2QAxh.js → base.BEv8sRbK.js} +1 -1
  2. package/dist/chunks/{browser.d.CDvMh6F9.d.ts → browser.d.F6jMf15V.d.ts} +1 -1
  3. package/dist/chunks/{cac.L-UbQ_Ix.js → cac.DnEx6DOX.js} +6 -6
  4. package/dist/chunks/{cli-api.CdZ6wo9-.js → cli-api.CbjxIXjQ.js} +23 -16
  5. package/dist/chunks/{index.CMvpbrsJ.js → index.B88tjlE5.js} +1 -1
  6. package/dist/chunks/{index.QWbK7rHY.js → index.BspFP3mn.js} +12 -7
  7. package/dist/chunks/{index.DWDW6mLz.js → index.D6PC4Dpu.js} +9 -4
  8. package/dist/chunks/{init-forks.CglOH45c.js → init-forks.DmvIFK4U.js} +1 -1
  9. package/dist/chunks/{init-threads.BuMdIy1r.js → init-threads.De6b3S3g.js} +1 -1
  10. package/dist/chunks/{init.MkYs5nmh.js → init.a5SCIJ0x.js} +3 -3
  11. package/dist/chunks/{plugin.d.B4l3vYM_.d.ts → plugin.d.B6hlg3fN.d.ts} +1 -1
  12. package/dist/chunks/{reporters.d.J2RlBlp9.d.ts → reporters.d.DeFcIuza.d.ts} +4 -4
  13. package/dist/chunks/{vm.Y19jrZy2.js → vm.BbVD4fJ5.js} +1 -1
  14. package/dist/chunks/{worker.d.DCy61tzi.d.ts → worker.d.DhEa3KzY.d.ts} +1 -1
  15. package/dist/cli.js +2 -2
  16. package/dist/config.d.ts +5 -5
  17. package/dist/coverage.d.ts +3 -3
  18. package/dist/environments.js +1 -1
  19. package/dist/index.d.ts +4 -4
  20. package/dist/module-evaluator.js +4 -1
  21. package/dist/node.d.ts +7 -7
  22. package/dist/node.js +6 -6
  23. package/dist/reporters.d.ts +3 -3
  24. package/dist/reporters.js +2 -2
  25. package/dist/worker.d.ts +1 -1
  26. package/dist/worker.js +3 -3
  27. package/dist/workers/forks.js +4 -4
  28. package/dist/workers/threads.js +4 -4
  29. package/dist/workers/vmForks.js +4 -4
  30. package/dist/workers/vmThreads.js +4 -4
  31. package/package.json +13 -18
@@ -1,7 +1,7 @@
1
1
  import { runInThisContext } from 'node:vm';
2
2
  import * as spyModule from '@vitest/spy';
3
3
  import { r as resolveTestRunner, a as resolveSnapshotEnvironment, s as setupChaiConfig } from './index.CQwQ_SLL.js';
4
- import { l as loadEnvironment } from './init.MkYs5nmh.js';
4
+ import { l as loadEnvironment } from './init.a5SCIJ0x.js';
5
5
  import { V as VitestEvaluatedModules } from './evaluatedModules.Dg1zASAC.js';
6
6
  import { s as startVitestModuleRunner, c as createNodeImportMeta } from './startModuleRunner.W28wBIgJ.js';
7
7
  import { performance as performance$1 } from 'node:perf_hooks';
@@ -1,5 +1,5 @@
1
1
  import { FileSpecification } from '@vitest/runner';
2
- import { T as TestExecutionMethod } from './worker.d.DCy61tzi.js';
2
+ import { T as TestExecutionMethod } from './worker.d.DhEa3KzY.js';
3
3
 
4
4
  type SerializedTestSpecification = [project: {
5
5
  name: string | undefined;
@@ -3,7 +3,7 @@ import { EventEmitter } from 'events';
3
3
  import { normalize } from 'pathe';
4
4
  import c from 'tinyrainbow';
5
5
  import { a as defaultPort, d as defaultBrowserPort } from './constants.D_Q9UYh-.js';
6
- import { R as ReportersMap } from './index.DWDW6mLz.js';
6
+ import { R as ReportersMap } from './index.D6PC4Dpu.js';
7
7
 
8
8
  function toArr(any) {
9
9
  return any == null ? [] : Array.isArray(any) ? any : [any];
@@ -619,7 +619,7 @@ class CAC extends EventEmitter {
619
619
 
620
620
  const cac = (name = "") => new CAC(name);
621
621
 
622
- var version = "4.0.13";
622
+ var version = "4.0.14";
623
623
 
624
624
  const apiConfig = (port) => ({
625
625
  port: {
@@ -1371,11 +1371,11 @@ function normalizeCliOptions(cliFilters, argv) {
1371
1371
  }
1372
1372
  async function start(mode, cliFilters, options) {
1373
1373
  try {
1374
- const { startVitest } = await import('./cli-api.CdZ6wo9-.js').then(function (n) { return n.p; });
1374
+ const { startVitest } = await import('./cli-api.CbjxIXjQ.js').then(function (n) { return n.p; });
1375
1375
  const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
1376
1376
  if (!ctx.shouldKeepServer()) await ctx.exit();
1377
1377
  } catch (e) {
1378
- const { errorBanner } = await import('./index.DWDW6mLz.js').then(function (n) { return n.u; });
1378
+ const { errorBanner } = await import('./index.D6PC4Dpu.js').then(function (n) { return n.u; });
1379
1379
  console.error(`\n${errorBanner("Startup Error")}`);
1380
1380
  console.error(e);
1381
1381
  console.error("\n\n");
@@ -1393,7 +1393,7 @@ async function init(project) {
1393
1393
  }
1394
1394
  async function collect(mode, cliFilters, options) {
1395
1395
  try {
1396
- const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.CdZ6wo9-.js').then(function (n) { return n.p; });
1396
+ const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.CbjxIXjQ.js').then(function (n) { return n.p; });
1397
1397
  const ctx = await prepareVitest(mode, {
1398
1398
  ...normalizeCliOptions(cliFilters, options),
1399
1399
  watch: false,
@@ -1412,7 +1412,7 @@ async function collect(mode, cliFilters, options) {
1412
1412
  } else outputFileList(await ctx.getRelevantTestSpecifications(cliFilters.map(normalize)), options);
1413
1413
  await ctx.close();
1414
1414
  } catch (e) {
1415
- const { errorBanner } = await import('./index.DWDW6mLz.js').then(function (n) { return n.u; });
1415
+ const { errorBanner } = await import('./index.D6PC4Dpu.js').then(function (n) { return n.u; });
1416
1416
  console.error(`\n${errorBanner("Collect Error")}`);
1417
1417
  console.error(e);
1418
1418
  console.error("\n\n");
@@ -10,12 +10,12 @@ import { parseAst, searchForWorkspaceRoot, fetchModule, version, mergeConfig, cr
10
10
  import { A as API_PATH, c as configFiles, d as defaultBrowserPort, a as defaultPort } from './constants.D_Q9UYh-.js';
11
11
  import * as nodeos from 'node:os';
12
12
  import nodeos__default, { tmpdir } from 'node:os';
13
- import { generateHash as generateHash$1, calculateSuiteHash, someTasksAreOnly, interpretTaskModes, hasFailed, generateFileHash, limitConcurrency, createFileTask as createFileTask$1, getTasks, isTestCase } from '@vitest/runner/utils';
13
+ import { generateHash as generateHash$1, createTaskName, calculateSuiteHash, someTasksAreOnly, interpretTaskModes, hasFailed, generateFileHash, limitConcurrency, createFileTask as createFileTask$1, getTasks, isTestCase } from '@vitest/runner/utils';
14
14
  import { SnapshotManager } from '@vitest/snapshot/manager';
15
- import { v as version$1 } from './cac.L-UbQ_Ix.js';
15
+ import { v as version$1 } from './cac.DnEx6DOX.js';
16
16
  import { performance as performance$1 } from 'node:perf_hooks';
17
17
  import { c as createBirpc } from './index.0kCJoeWi.js';
18
- import { p as parse, d as stringify, e as TraceMap, o as originalPositionFor, h as ancestor, i as printError, f as formatProjectName, w as withLabel, j as errorBanner, k as divider, l as Typechecker, m as generateCodeFrame, n as createDefinesScript, R as ReportersMap, B as BlobReporter, r as readBlobs, q as convertTasksToEvents, H as HangingProcessReporter } from './index.DWDW6mLz.js';
18
+ import { p as parse, d as stringify, e as TraceMap, o as originalPositionFor, h as ancestor, i as printError, f as formatProjectName, w as withLabel, j as errorBanner, k as divider, l as Typechecker, m as generateCodeFrame, n as createDefinesScript, R as ReportersMap, B as BlobReporter, r as readBlobs, q as convertTasksToEvents, H as HangingProcessReporter } from './index.D6PC4Dpu.js';
19
19
  import require$$0$3 from 'events';
20
20
  import require$$1$1 from 'https';
21
21
  import require$$2 from 'http';
@@ -30,7 +30,7 @@ import { g as getDefaultExportFromCjs } from './_commonjsHelpers.D26ty3Ew.js';
30
30
  import crypto, { createHash } from 'node:crypto';
31
31
  import { rootDir, distDir } from '../path.js';
32
32
  import { T as Traces } from './traces.U4xDYhzZ.js';
33
- import createDebug from 'debug';
33
+ import { createDebug } from 'obug';
34
34
  import { rm, readFile, writeFile, rename, stat, unlink, mkdir, copyFile } from 'node:fs/promises';
35
35
  import c from 'tinyrainbow';
36
36
  import { VitestModuleEvaluator } from '#module-evaluator';
@@ -52,7 +52,7 @@ import { c as configDefaults } from './defaults.BOqNVLsY.js';
52
52
  import { KNOWN_ASSET_RE } from '@vitest/utils/constants';
53
53
  import { findNearestPackageData } from '@vitest/utils/resolver';
54
54
  import * as esModuleLexer from 'es-module-lexer';
55
- import { a as BenchmarkReportsMap } from './index.CMvpbrsJ.js';
55
+ import { a as BenchmarkReportsMap } from './index.B88tjlE5.js';
56
56
  import assert$1 from 'node:assert';
57
57
  import { serializeValue } from '@vitest/utils/serialize';
58
58
  import { parseErrorStacktrace } from '@vitest/utils/source-map';
@@ -5401,6 +5401,7 @@ function createFailedFileTask(project, filepath, error) {
5401
5401
  type: "suite",
5402
5402
  id: /* @__PURE__ */ generateHash$1(`${testFilepath}${project.config.name || ""}`),
5403
5403
  name: testFilepath,
5404
+ fullName: testFilepath,
5404
5405
  mode: "run",
5405
5406
  tasks: [],
5406
5407
  start: 0,
@@ -5438,6 +5439,7 @@ function createFileTask(testFilepath, code, requestMap, options) {
5438
5439
  type: "suite",
5439
5440
  id: /* @__PURE__ */ generateHash$1(`${testFilepath}${options.name || ""}`),
5440
5441
  name: testFilepath,
5442
+ fullName: testFilepath,
5441
5443
  mode: "run",
5442
5444
  tasks: [],
5443
5445
  start: ast.start,
@@ -5482,6 +5484,8 @@ function createFileTask(testFilepath, code, requestMap, options) {
5482
5484
  tasks: [],
5483
5485
  mode,
5484
5486
  name: definition.name,
5487
+ fullName: createTaskName([latestSuite.fullName, definition.name]),
5488
+ fullTestName: createTaskName([latestSuite.fullTestName, definition.name]),
5485
5489
  end: definition.end,
5486
5490
  start: definition.start,
5487
5491
  location,
@@ -5501,6 +5505,8 @@ function createFileTask(testFilepath, code, requestMap, options) {
5501
5505
  mode,
5502
5506
  context: {},
5503
5507
  name: definition.name,
5508
+ fullName: createTaskName([latestSuite.fullName, definition.name]),
5509
+ fullTestName: createTaskName([latestSuite.fullTestName, definition.name]),
5504
5510
  end: definition.end,
5505
5511
  start: definition.start,
5506
5512
  location,
@@ -5760,7 +5766,7 @@ class FileSystemModuleCache {
5760
5766
  */
5761
5767
  rootCache;
5762
5768
  metadataFilePath;
5763
- version = "1.0.0-beta.1";
5769
+ version = "1.0.0-beta.2";
5764
5770
  fsCacheRoots = /* @__PURE__ */ new WeakMap();
5765
5771
  fsEnvironmentHashMap = /* @__PURE__ */ new WeakMap();
5766
5772
  fsCacheKeyGenerators = /* @__PURE__ */ new Set();
@@ -6108,6 +6114,11 @@ class ModuleFetcher {
6108
6114
  const cached = !!moduleGraphModule.transformResult;
6109
6115
  if (moduleGraphModule.file) trace.setAttribute("code.file.path", moduleGraphModule.file);
6110
6116
  if (options?.cached && cached) return { cache: true };
6117
+ const externalize = await this.resolver.shouldExternalize(moduleGraphModule.id);
6118
+ if (externalize) return {
6119
+ externalize,
6120
+ type: "module"
6121
+ };
6111
6122
  const cachePath = await this.getCachePath(environment, moduleGraphModule);
6112
6123
  // full fs caching is disabled, but we still want to keep tmp files if makeTmpCopies is enabled
6113
6124
  // this is primarily used by the forks pool to avoid using process.send(bigBuffer)
@@ -6224,11 +6235,6 @@ class ModuleFetcher {
6224
6235
  };
6225
6236
  }
6226
6237
  async fetchAndProcess(environment, url, importer, moduleGraphModule, options) {
6227
- const externalize = await this.resolver.shouldExternalize(moduleGraphModule.id);
6228
- if (externalize) return {
6229
- externalize,
6230
- type: "module"
6231
- };
6232
6238
  return processResultSource(environment, await fetchModule(environment, url, importer, {
6233
6239
  ...options,
6234
6240
  inlineSourceMap: false
@@ -7179,7 +7185,6 @@ class PoolRunner {
7179
7185
  __vitest_worker_request__: true,
7180
7186
  type: method,
7181
7187
  context,
7182
- poolId: this.poolId,
7183
7188
  otelCarrier: this.getOTELCarrier()
7184
7189
  });
7185
7190
  }
@@ -7187,7 +7192,7 @@ class PoolRunner {
7187
7192
  const activeContext = this._otel?.currentContext || this._otel?.workerContext;
7188
7193
  return activeContext ? this._traces.getContextCarrier(activeContext) : void 0;
7189
7194
  }
7190
- async start() {
7195
+ async start(options) {
7191
7196
  // Wait for any ongoing operation to complete
7192
7197
  if (this._operationLock) await this._operationLock;
7193
7198
  if (this._state === RunnerState.STARTED || this._state === RunnerState.STARTING) return;
@@ -7211,6 +7216,8 @@ class PoolRunner {
7211
7216
  const tracesSdk = projectConfig?.sdkPath ?? globalConfig?.sdkPath;
7212
7217
  this.postMessage({
7213
7218
  type: "start",
7219
+ poolId: this.poolId,
7220
+ workerId: options.workerId,
7214
7221
  __vitest_worker_request__: true,
7215
7222
  options: { reportMemory: this.worker.reportMemory ?? false },
7216
7223
  context: {
@@ -7716,6 +7723,8 @@ class Pool {
7716
7723
  try {
7717
7724
  let isMemoryLimitReached = false;
7718
7725
  const runner = this.getPoolRunner(task, method);
7726
+ const poolId = runner.poolId ?? this.getWorkerId();
7727
+ runner.poolId = poolId;
7719
7728
  const activeTask = {
7720
7729
  task,
7721
7730
  resolver,
@@ -7742,10 +7751,8 @@ class Pool {
7742
7751
  resolver.reject(new Error(`[vitest-pool]: Worker ${task.worker} emitted error.`, { cause: error }));
7743
7752
  });
7744
7753
  const id = setTimeout(() => resolver.reject(/* @__PURE__ */ new Error(`[vitest-pool]: Timeout starting ${task.worker} runner.`)), WORKER_START_TIMEOUT);
7745
- await runner.start().finally(() => clearTimeout(id));
7754
+ await runner.start({ workerId: task.context.workerId }).finally(() => clearTimeout(id));
7746
7755
  }
7747
- const poolId = runner.poolId ?? this.getWorkerId();
7748
- runner.poolId = poolId;
7749
7756
  const span = runner.startTracesSpan(`vitest.worker.${method}`);
7750
7757
  // Start running the test in the worker
7751
7758
  runner.request(method, task.context);
@@ -2,7 +2,7 @@ import fs from 'node:fs';
2
2
  import { getTasks, getFullName, getTests } from '@vitest/runner/utils';
3
3
  import * as pathe from 'pathe';
4
4
  import c from 'tinyrainbow';
5
- import { g as getStateSymbol, t as truncateString, F as F_RIGHT, D as DefaultReporter, f as formatProjectName, s as separator } from './index.DWDW6mLz.js';
5
+ import { g as getStateSymbol, t as truncateString, F as F_RIGHT, D as DefaultReporter, f as formatProjectName, s as separator } from './index.D6PC4Dpu.js';
6
6
  import { stripVTControlCharacters } from 'node:util';
7
7
  import { notNullish } from '@vitest/utils/helpers';
8
8
 
@@ -588,9 +588,20 @@ function createCompatUtils(window) {
588
588
  return utils;
589
589
  }
590
590
  function patchAddEventListener(window) {
591
+ const abortControllers = /* @__PURE__ */ new WeakMap();
591
592
  const JSDOMAbortSignal = window.AbortSignal;
592
593
  const JSDOMAbortController = window.AbortController;
593
594
  const originalAddEventListener = window.EventTarget.prototype.addEventListener;
595
+ function getJsdomAbortController(signal) {
596
+ if (!abortControllers.has(signal)) {
597
+ const jsdomAbortController = new JSDOMAbortController();
598
+ signal.addEventListener("abort", () => {
599
+ jsdomAbortController.abort(signal.reason);
600
+ });
601
+ abortControllers.set(signal, jsdomAbortController);
602
+ }
603
+ return abortControllers.get(signal);
604
+ }
594
605
  window.EventTarget.prototype.addEventListener = function addEventListener(type, callback, options) {
595
606
  if (typeof options === "object" && options.signal != null) {
596
607
  const { signal, ...otherOptions } = options;
@@ -601,13 +612,7 @@ function patchAddEventListener(window) {
601
612
  if (!(signal instanceof JSDOMAbortSignal)) {
602
613
  const jsdomCompatOptions = Object.create(null);
603
614
  Object.assign(jsdomCompatOptions, otherOptions);
604
- // use jsdom-native abort controller instead and forward the
605
- // previous one with `addEventListener`
606
- const jsdomAbortController = new JSDOMAbortController();
607
- signal.addEventListener("abort", () => {
608
- jsdomAbortController.abort(signal.reason);
609
- });
610
- jsdomCompatOptions.signal = jsdomAbortController.signal;
615
+ jsdomCompatOptions.signal = getJsdomAbortController(signal).signal;
611
616
  return originalAddEventListener.call(this, type, callback, jsdomCompatOptions);
612
617
  }
613
618
  }
@@ -2,7 +2,7 @@ import { existsSync, readFileSync, promises } from 'node:fs';
2
2
  import { mkdir, writeFile, readdir, stat, readFile } from 'node:fs/promises';
3
3
  import { resolve as resolve$1, dirname, isAbsolute, relative, basename, join, normalize } from 'pathe';
4
4
  import { performance as performance$1 } from 'node:perf_hooks';
5
- import { getTests, getTestName, hasFailed, getSuites, generateHash, calculateSuiteHash, someTasksAreOnly, interpretTaskModes, getTasks, getFullName } from '@vitest/runner/utils';
5
+ import { getTests, getTestName, hasFailed, getSuites, generateHash, createTaskName, calculateSuiteHash, someTasksAreOnly, interpretTaskModes, getTasks, getFullName } from '@vitest/runner/utils';
6
6
  import { slash, toArray, isPrimitive } from '@vitest/utils/helpers';
7
7
  import { parseStacktrace, defaultStackIgnorePatterns, parseErrorStacktrace } from '@vitest/utils/source-map';
8
8
  import c from 'tinyrainbow';
@@ -795,16 +795,14 @@ class BaseReporter {
795
795
  // Execution time is either sum of all runs of `--merge-reports` or the current run's time
796
796
  const executionTime = blobs?.executionTimes ? sum(blobs.executionTimes, (time) => time) : this.end - this.start;
797
797
  const environmentTime = sum(files, (file) => file.environmentLoad);
798
- const prepareTime = sum(files, (file) => file.prepareDuration);
799
798
  const transformTime = this.ctx.state.transformTime;
800
799
  const typecheck = sum(this.ctx.projects, (project) => project.typechecker?.getResult().time);
801
800
  const timers = [
802
801
  `transform ${formatTime(transformTime)}`,
803
802
  `setup ${formatTime(setupTime)}`,
804
- `collect ${formatTime(collectTime)}`,
803
+ `import ${formatTime(collectTime)}`,
805
804
  `tests ${formatTime(testsTime)}`,
806
805
  `environment ${formatTime(environmentTime)}`,
807
- `prepare ${formatTime(prepareTime)}`,
808
806
  typecheck && `typecheck ${formatTime(typecheck)}`
809
807
  ].filter(Boolean).join(", ");
810
808
  this.log(padSummaryTitle("Duration"), formatTime(executionTime) + c.dim(` (${timers})`));
@@ -2350,6 +2348,7 @@ async function collectTests(ctx, filepath) {
2350
2348
  type: "suite",
2351
2349
  id: generateHash(`${testFilepath}${projectName ? `${projectName}:__typecheck__` : "__typecheck__"}`),
2352
2350
  name: testFilepath,
2351
+ fullName: testFilepath,
2353
2352
  mode: "run",
2354
2353
  tasks: [],
2355
2354
  start: ast.start,
@@ -2442,6 +2441,8 @@ async function collectTests(ctx, filepath) {
2442
2441
  tasks: [],
2443
2442
  mode,
2444
2443
  name: definition.name,
2444
+ fullName: createTaskName([lastSuite.fullName, definition.name]),
2445
+ fullTestName: createTaskName([lastSuite.fullTestName, definition.name]),
2445
2446
  end: definition.end,
2446
2447
  start: definition.start,
2447
2448
  meta: { typecheck: true }
@@ -2460,6 +2461,8 @@ async function collectTests(ctx, filepath) {
2460
2461
  timeout: 0,
2461
2462
  context: {},
2462
2463
  name: definition.name,
2464
+ fullName: createTaskName([lastSuite.fullName, definition.name]),
2465
+ fullTestName: createTaskName([lastSuite.fullTestName, definition.name]),
2463
2466
  end: definition.end,
2464
2467
  start: definition.start,
2465
2468
  annotations: [],
@@ -3500,6 +3503,8 @@ class JUnitReporter {
3500
3503
  id: file.id,
3501
3504
  type: "test",
3502
3505
  name: file.name,
3506
+ fullName: file.name,
3507
+ fullTestName: file.name,
3503
3508
  mode: "run",
3504
3509
  result: file.result,
3505
3510
  meta: {},
@@ -1,4 +1,4 @@
1
- import { i as init } from './init.MkYs5nmh.js';
1
+ import { i as init } from './init.a5SCIJ0x.js';
2
2
 
3
3
  if (!process.send) throw new Error("Expected worker to be run in node:child_process");
4
4
  // Store globals in case tests overwrite them
@@ -1,5 +1,5 @@
1
1
  import { isMainThread, parentPort } from 'node:worker_threads';
2
- import { i as init } from './init.MkYs5nmh.js';
2
+ import { i as init } from './init.a5SCIJ0x.js';
3
3
 
4
4
  if (isMainThread || !parentPort) throw new Error("Expected worker to be run in node:worker_threads");
5
5
  function workerInit(options) {
@@ -4,7 +4,7 @@ import { pathToFileURL } from 'node:url';
4
4
  import { resolve } from 'pathe';
5
5
  import { ModuleRunner } from 'vite/module-runner';
6
6
  import { b as VitestTransport } from './startModuleRunner.W28wBIgJ.js';
7
- import { e as environments } from './index.QWbK7rHY.js';
7
+ import { e as environments } from './index.BspFP3mn.js';
8
8
  import { serializeError } from '@vitest/utils/error';
9
9
  import { T as Traces } from './traces.U4xDYhzZ.js';
10
10
  import { o as onCancel, a as rpcDone, c as createRuntimeRpc } from './rpc.BytlcPfC.js';
@@ -158,6 +158,8 @@ function init(worker) {
158
158
  if (message?.__vitest_worker_request__ !== true) return;
159
159
  switch (message.type) {
160
160
  case "start": {
161
+ process.env.VITEST_POOL_ID = String(message.poolId);
162
+ process.env.VITEST_WORKER_ID = String(message.workerId);
161
163
  reportMemory = message.options.reportMemory;
162
164
  const tracesStart = performance.now();
163
165
  traces ??= await new Traces({
@@ -203,7 +205,6 @@ function init(worker) {
203
205
  return;
204
206
  }
205
207
  try {
206
- process.env.VITEST_POOL_ID = String(message.poolId);
207
208
  process.env.VITEST_WORKER_ID = String(message.context.workerId);
208
209
  } catch (error) {
209
210
  return send({
@@ -248,7 +249,6 @@ function init(worker) {
248
249
  return;
249
250
  }
250
251
  try {
251
- process.env.VITEST_POOL_ID = String(message.poolId);
252
252
  process.env.VITEST_WORKER_ID = String(message.context.workerId);
253
253
  } catch (error) {
254
254
  return send({
@@ -1,5 +1,5 @@
1
1
  import { DevEnvironment } from 'vite';
2
- import { V as Vitest, T as TestProject, b as TestProjectConfiguration } from './reporters.d.J2RlBlp9.js';
2
+ import { V as Vitest, T as TestProject, b as TestProjectConfiguration } from './reporters.d.DeFcIuza.js';
3
3
 
4
4
  /**
5
5
  * Generate a unique cache identifier.
@@ -7,13 +7,13 @@ import { MockedModule } from '@vitest/mocker';
7
7
  import { StackTraceParserOptions } from '@vitest/utils/source-map';
8
8
  import { BrowserCommands } from 'vitest/browser';
9
9
  import { B as BrowserTraceViewMode, S as SerializedConfig, F as FakeTimerInstallOpts } from './config.d.g6OOauRt.js';
10
- import { S as SerializedTestSpecification, B as BrowserTesterOptions } from './browser.d.CDvMh6F9.js';
10
+ import { S as SerializedTestSpecification, B as BrowserTesterOptions } from './browser.d.F6jMf15V.js';
11
11
  import { PrettyFormatOptions } from '@vitest/pretty-format';
12
12
  import { SnapshotSummary, SnapshotStateOptions } from '@vitest/snapshot';
13
13
  import { SerializedDiffOptions } from '@vitest/utils/diff';
14
14
  import { chai } from '@vitest/expect';
15
15
  import { happyDomTypes, jsdomTypes } from 'vitest/optional-types.js';
16
- import { c as ContextTestEnvironment, d as WorkerTestEnvironment, e as WorkerExecuteContext } from './worker.d.DCy61tzi.js';
16
+ import { c as ContextTestEnvironment, d as WorkerExecuteContext, e as WorkerTestEnvironment } from './worker.d.DhEa3KzY.js';
17
17
  import { O as OTELCarrier } from './traces.d.402V_yFI.js';
18
18
  import { B as BenchmarkResult } from './benchmark.d.DAaHLpsq.js';
19
19
  import { a as RuntimeCoverageProviderModule } from './coverage.d.BZtK59WP.js';
@@ -1937,6 +1937,8 @@ type WorkerRequest = {
1937
1937
  __vitest_worker_request__: true;
1938
1938
  } & ({
1939
1939
  type: "start";
1940
+ poolId: number;
1941
+ workerId: WorkerExecuteContext["workerId"];
1940
1942
  options: {
1941
1943
  reportMemory: boolean;
1942
1944
  };
@@ -1956,12 +1958,10 @@ type WorkerRequest = {
1956
1958
  } | {
1957
1959
  type: "run";
1958
1960
  context: WorkerExecuteContext;
1959
- poolId: number;
1960
1961
  otelCarrier?: OTELCarrier;
1961
1962
  } | {
1962
1963
  type: "collect";
1963
1964
  context: WorkerExecuteContext;
1964
- poolId: number;
1965
1965
  otelCarrier?: OTELCarrier;
1966
1966
  } | {
1967
1967
  type: "cancel";
@@ -1,7 +1,7 @@
1
1
  import { fileURLToPath, pathToFileURL } from 'node:url';
2
2
  import vm, { isContext, runInContext } from 'node:vm';
3
3
  import { dirname, basename, extname, normalize, resolve } from 'pathe';
4
- import { l as loadEnvironment } from './init.MkYs5nmh.js';
4
+ import { l as loadEnvironment } from './init.a5SCIJ0x.js';
5
5
  import { distDir } from '../path.js';
6
6
  import { createCustomConsole } from './console.Cf-YriPC.js';
7
7
  import fs from 'node:fs';
@@ -235,4 +235,4 @@ interface WorkerGlobalState {
235
235
  onFilterStackTrace?: (trace: string) => string;
236
236
  }
237
237
 
238
- export type { BirpcOptions as B, ContextRPC as C, TestExecutionMethod as T, WorkerGlobalState as W, WorkerSetupContext as a, BirpcReturn as b, ContextTestEnvironment as c, WorkerTestEnvironment as d, WorkerExecuteContext as e };
238
+ export type { BirpcOptions as B, ContextRPC as C, TestExecutionMethod as T, WorkerGlobalState as W, WorkerSetupContext as a, BirpcReturn as b, ContextTestEnvironment as c, WorkerExecuteContext as d, WorkerTestEnvironment as e };
package/dist/cli.js CHANGED
@@ -1,10 +1,10 @@
1
- import { c as createCLI } from './chunks/cac.L-UbQ_Ix.js';
1
+ import { c as createCLI } from './chunks/cac.DnEx6DOX.js';
2
2
  import '@vitest/utils/helpers';
3
3
  import 'events';
4
4
  import 'pathe';
5
5
  import 'tinyrainbow';
6
6
  import './chunks/constants.D_Q9UYh-.js';
7
- import './chunks/index.DWDW6mLz.js';
7
+ import './chunks/index.D6PC4Dpu.js';
8
8
  import 'node:fs';
9
9
  import 'node:fs/promises';
10
10
  import 'node:perf_hooks';
package/dist/config.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import { HookHandler, ConfigEnv, UserConfig } from 'vite';
2
2
  export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
3
- import { I as InlineConfig, c as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport } from './chunks/reporters.d.J2RlBlp9.js';
4
- export { b as TestProjectConfiguration, g as TestProjectInlineConfiguration, f as TestUserConfig, W as WatcherTriggerPattern } from './chunks/reporters.d.J2RlBlp9.js';
5
- import { V as VitestPluginContext } from './chunks/plugin.d.B4l3vYM_.js';
3
+ import { I as InlineConfig, c as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport } from './chunks/reporters.d.DeFcIuza.js';
4
+ export { b as TestProjectConfiguration, g as TestProjectInlineConfiguration, f as TestUserConfig, W as WatcherTriggerPattern } from './chunks/reporters.d.DeFcIuza.js';
5
+ import { V as VitestPluginContext } from './chunks/plugin.d.B6hlg3fN.js';
6
6
  import { F as FakeTimerInstallOpts } from './chunks/config.d.g6OOauRt.js';
7
7
  import '@vitest/runner';
8
8
  import '@vitest/utils';
@@ -14,8 +14,8 @@ import 'node:stream';
14
14
  import '@vitest/mocker';
15
15
  import '@vitest/utils/source-map';
16
16
  import 'vitest/browser';
17
- import './chunks/browser.d.CDvMh6F9.js';
18
- import './chunks/worker.d.DCy61tzi.js';
17
+ import './chunks/browser.d.F6jMf15V.js';
18
+ import './chunks/worker.d.DhEa3KzY.js';
19
19
  import './chunks/environment.d.CrsxCzP1.js';
20
20
  import '@vitest/pretty-format';
21
21
  import '@vitest/utils/diff';
@@ -1,4 +1,4 @@
1
- import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.J2RlBlp9.js';
1
+ import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.DeFcIuza.js';
2
2
  import { TransformResult } from 'vite';
3
3
  import { A as AfterSuiteRunMeta } from './chunks/rpc.d.RH3apGEf.js';
4
4
  import '@vitest/runner';
@@ -11,8 +11,8 @@ import './chunks/config.d.g6OOauRt.js';
11
11
  import '@vitest/pretty-format';
12
12
  import '@vitest/snapshot';
13
13
  import '@vitest/utils/diff';
14
- import './chunks/browser.d.CDvMh6F9.js';
15
- import './chunks/worker.d.DCy61tzi.js';
14
+ import './chunks/browser.d.F6jMf15V.js';
15
+ import './chunks/worker.d.DhEa3KzY.js';
16
16
  import 'vite/module-runner';
17
17
  import './chunks/environment.d.CrsxCzP1.js';
18
18
  import '@vitest/expect';
@@ -1,3 +1,3 @@
1
- export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.QWbK7rHY.js';
1
+ export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.BspFP3mn.js';
2
2
  import 'node:url';
3
3
  import 'node:console';
package/dist/index.d.ts CHANGED
@@ -1,12 +1,12 @@
1
- import { S as SerializedTestSpecification } from './chunks/browser.d.CDvMh6F9.js';
2
- export { B as BrowserTesterOptions } from './chunks/browser.d.CDvMh6F9.js';
1
+ import { S as SerializedTestSpecification } from './chunks/browser.d.F6jMf15V.js';
2
+ export { B as BrowserTesterOptions } from './chunks/browser.d.F6jMf15V.js';
3
3
  import './chunks/global.d.B15mdLcR.js';
4
4
  import { File, TestAnnotation, TestArtifact, TaskResultPack, TaskEventPack, Test, TaskPopulated } from '@vitest/runner';
5
5
  export { CancelReason, ImportDuration, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskEventPack as RunnerTaskEventPack, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestAnnotation, TestAnnotationArtifact, TestArtifact, TestArtifactBase, TestArtifactLocation, TestArtifactRegistry, TestAttachment, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, recordArtifact, suite, test } from '@vitest/runner';
6
6
  import { Awaitable } from '@vitest/utils';
7
7
  export { ParsedStack, SerializedError, TestError } from '@vitest/utils';
8
- import { b as BirpcReturn } from './chunks/worker.d.DCy61tzi.js';
9
- export { C as ContextRPC, c as ContextTestEnvironment, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.DCy61tzi.js';
8
+ import { b as BirpcReturn } from './chunks/worker.d.DhEa3KzY.js';
9
+ export { C as ContextRPC, c as ContextTestEnvironment, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.DhEa3KzY.js';
10
10
  import { S as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.g6OOauRt.js';
11
11
  export { b as RuntimeConfig, a as SerializedCoverageConfig } from './chunks/config.d.g6OOauRt.js';
12
12
  import { U as UserConsoleLog, L as LabelColor, M as ModuleGraphData, P as ProvidedContext } from './chunks/rpc.d.RH3apGEf.js';
@@ -67,7 +67,10 @@ class VitestModuleEvaluator {
67
67
  async runExternalModule(id) {
68
68
  if (id in this.stubs) return this.stubs[id];
69
69
  const file = this.convertIdToImportUrl(id);
70
- const namespace = await this._otel.$("vitest.module.external", { attributes: { "code.file.path": file } }, () => this.vm ? this.vm.externalModulesExecutor.import(file) : import(file));
70
+ const finishModuleExecutionInfo = this.debug.startCalculateModuleExecutionInfo(file, 0);
71
+ const namespace = await this._otel.$("vitest.module.external", { attributes: { "code.file.path": file } }, () => this.vm ? this.vm.externalModulesExecutor.import(file) : import(file)).finally(() => {
72
+ finishModuleExecutionInfo();
73
+ });
71
74
  if (!this.shouldInterop(file, namespace)) return namespace;
72
75
  const { mod, defaultExport } = interopModule(namespace);
73
76
  const { Proxy, Reflect } = this.primitives;
package/dist/node.d.ts CHANGED
@@ -3,16 +3,16 @@ import { InlineConfig, UserConfig as UserConfig$1, Plugin, ResolvedConfig as Res
3
3
  export { vite as Vite };
4
4
  export { esbuildVersion, isCSSRequest, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
5
5
  import { IncomingMessage } from 'node:http';
6
- import { h as ResolvedConfig, f as UserConfig, i as VitestRunMode, j as VitestOptions, V as Vitest, A as ApiConfig, k as TestSpecification, T as TestProject, P as PoolWorker, l as PoolOptions, m as WorkerRequest, n as TestSequencer, L as Logger } from './chunks/reporters.d.J2RlBlp9.js';
7
- export { at as BaseCoverageOptions, Y as BenchmarkUserOptions, Z as BrowserBuiltinProvider, $ as BrowserCommand, a0 as BrowserCommandContext, a1 as BrowserConfigOptions, a2 as BrowserInstanceOption, a3 as BrowserModuleMocker, a4 as BrowserOrchestrator, a5 as BrowserProvider, a6 as BrowserProviderOption, a7 as BrowserScript, a8 as BrowserServerFactory, a9 as BrowserServerOptions, aa as BrowserServerState, ab as BrowserServerStateSession, ai as BuiltinEnvironment, ac as CDPSession, aj as CSSModuleScopeStrategy, au as CoverageIstanbulOptions, av as CoverageOptions, aw as CoverageProvider, ax as CoverageProviderModule, ay as CoverageReporter, c as CoverageV8Options, az as CustomProviderOptions, ak as DepsOptimizationOptions, al as EnvironmentOptions, H as HTMLOptions, I as InlineConfig, t as JUnitOptions, J as JsonOptions, M as ModuleDiagnostic, O as OnServerRestartHandler, o as OnTestsRerunHandler, ad as ParentProjectBrowser, am as Pool, q as PoolRunnerInitializer, r as PoolTask, ae as ProjectBrowser, an as ProjectConfig, a as ReportContext, aB as ReportedHookContext, aC as Reporter, ap as ResolveSnapshotPathHandler, aq as ResolveSnapshotPathHandlerContext, af as ResolvedBrowserOptions, R as ResolvedCoverageOptions, ao as ResolvedProjectConfig, S as SerializedTestProject, u as TaskOptions, v as TestCase, w as TestCollection, x as TestDiagnostic, y as TestModule, z as TestModuleState, B as TestResult, D as TestResultFailed, E as TestResultPassed, F as TestResultSkipped, aD as TestRunEndReason, aA as TestRunResult, X as TestSequencerConstructor, G as TestState, K as TestSuite, N as TestSuiteState, ag as ToMatchScreenshotComparators, ah as ToMatchScreenshotOptions, ar as TypecheckConfig, U as UserWorkspaceConfig, as as VitestEnvironment, p as VitestPackageInstaller, W as WatcherTriggerPattern, s as WorkerResponse, _ as _BrowserNames, Q as experimental_getRunnerTask } from './chunks/reporters.d.J2RlBlp9.js';
8
- export { C as CacheKeyIdGenerator, a as CacheKeyIdGeneratorContext, V as VitestPluginContext } from './chunks/plugin.d.B4l3vYM_.js';
6
+ import { h as ResolvedConfig, f as UserConfig, i as VitestRunMode, j as VitestOptions, V as Vitest, A as ApiConfig, k as TestSpecification, T as TestProject, P as PoolWorker, l as PoolOptions, m as WorkerRequest, n as TestSequencer, L as Logger } from './chunks/reporters.d.DeFcIuza.js';
7
+ export { at as BaseCoverageOptions, Y as BenchmarkUserOptions, Z as BrowserBuiltinProvider, $ as BrowserCommand, a0 as BrowserCommandContext, a1 as BrowserConfigOptions, a2 as BrowserInstanceOption, a3 as BrowserModuleMocker, a4 as BrowserOrchestrator, a5 as BrowserProvider, a6 as BrowserProviderOption, a7 as BrowserScript, a8 as BrowserServerFactory, a9 as BrowserServerOptions, aa as BrowserServerState, ab as BrowserServerStateSession, ai as BuiltinEnvironment, ac as CDPSession, aj as CSSModuleScopeStrategy, au as CoverageIstanbulOptions, av as CoverageOptions, aw as CoverageProvider, ax as CoverageProviderModule, ay as CoverageReporter, c as CoverageV8Options, az as CustomProviderOptions, ak as DepsOptimizationOptions, al as EnvironmentOptions, H as HTMLOptions, I as InlineConfig, t as JUnitOptions, J as JsonOptions, M as ModuleDiagnostic, O as OnServerRestartHandler, o as OnTestsRerunHandler, ad as ParentProjectBrowser, am as Pool, q as PoolRunnerInitializer, r as PoolTask, ae as ProjectBrowser, an as ProjectConfig, a as ReportContext, aB as ReportedHookContext, aC as Reporter, ap as ResolveSnapshotPathHandler, aq as ResolveSnapshotPathHandlerContext, af as ResolvedBrowserOptions, R as ResolvedCoverageOptions, ao as ResolvedProjectConfig, S as SerializedTestProject, u as TaskOptions, v as TestCase, w as TestCollection, x as TestDiagnostic, y as TestModule, z as TestModuleState, B as TestResult, D as TestResultFailed, E as TestResultPassed, F as TestResultSkipped, aD as TestRunEndReason, aA as TestRunResult, X as TestSequencerConstructor, G as TestState, K as TestSuite, N as TestSuiteState, ag as ToMatchScreenshotComparators, ah as ToMatchScreenshotOptions, ar as TypecheckConfig, U as UserWorkspaceConfig, as as VitestEnvironment, p as VitestPackageInstaller, W as WatcherTriggerPattern, s as WorkerResponse, _ as _BrowserNames, Q as experimental_getRunnerTask } from './chunks/reporters.d.DeFcIuza.js';
8
+ export { C as CacheKeyIdGenerator, a as CacheKeyIdGeneratorContext, V as VitestPluginContext } from './chunks/plugin.d.B6hlg3fN.js';
9
9
  import { Awaitable } from '@vitest/utils';
10
10
  export { SerializedError } from '@vitest/utils';
11
11
  import { R as RuntimeRPC } from './chunks/rpc.d.RH3apGEf.js';
12
12
  import { Writable } from 'node:stream';
13
- import { C as ContextRPC } from './chunks/worker.d.DCy61tzi.js';
14
- export { T as TestExecutionType } from './chunks/worker.d.DCy61tzi.js';
15
- import { Debugger } from 'debug';
13
+ import { C as ContextRPC } from './chunks/worker.d.DhEa3KzY.js';
14
+ export { T as TestExecutionType } from './chunks/worker.d.DhEa3KzY.js';
15
+ import { Debugger } from 'obug';
16
16
  import './chunks/global.d.B15mdLcR.js';
17
17
  export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
18
18
  export { b as RuntimeConfig } from './chunks/config.d.g6OOauRt.js';
@@ -20,7 +20,7 @@ export { generateFileHash } from '@vitest/runner/utils';
20
20
  import '@vitest/mocker';
21
21
  import '@vitest/utils/source-map';
22
22
  import 'vitest/browser';
23
- import './chunks/browser.d.CDvMh6F9.js';
23
+ import './chunks/browser.d.F6jMf15V.js';
24
24
  import '@vitest/pretty-format';
25
25
  import '@vitest/snapshot';
26
26
  import '@vitest/utils/diff';
package/dist/node.js CHANGED
@@ -1,9 +1,9 @@
1
1
  import * as vite from 'vite';
2
2
  import { resolveConfig as resolveConfig$1, mergeConfig } from 'vite';
3
3
  export { esbuildVersion, isCSSRequest, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
4
- import { V as Vitest, a as VitestPlugin } from './chunks/cli-api.CdZ6wo9-.js';
5
- export { f as ForksPoolWorker, G as GitNotFoundError, F as TestsNotFoundError, T as ThreadsPoolWorker, h as TypecheckPoolWorker, b as VitestPackageInstaller, j as VmForksPoolWorker, k as VmThreadsPoolWorker, o as createDebugger, d as createMethodsRPC, n as createViteLogger, c as createVitest, e as escapeTestName, l as experimental_getRunnerTask, g as getFilePoolName, i as isValidApiRequest, m as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.CdZ6wo9-.js';
6
- export { p as parseCLI } from './chunks/cac.L-UbQ_Ix.js';
4
+ import { V as Vitest, a as VitestPlugin } from './chunks/cli-api.CbjxIXjQ.js';
5
+ export { f as ForksPoolWorker, G as GitNotFoundError, F as TestsNotFoundError, T as ThreadsPoolWorker, h as TypecheckPoolWorker, b as VitestPackageInstaller, j as VmForksPoolWorker, k as VmThreadsPoolWorker, o as createDebugger, d as createMethodsRPC, n as createViteLogger, c as createVitest, e as escapeTestName, l as experimental_getRunnerTask, g as getFilePoolName, i as isValidApiRequest, m as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.CbjxIXjQ.js';
6
+ export { p as parseCLI } from './chunks/cac.DnEx6DOX.js';
7
7
  import { r as resolveConfig$2 } from './chunks/coverage.CtyeYmKM.js';
8
8
  export { b as BaseSequencer, a as resolveApiServerConfig } from './chunks/coverage.CtyeYmKM.js';
9
9
  import { slash, deepClone } from '@vitest/utils/helpers';
@@ -19,7 +19,7 @@ import 'node:os';
19
19
  import '@vitest/snapshot/manager';
20
20
  import 'node:perf_hooks';
21
21
  import './chunks/index.0kCJoeWi.js';
22
- import './chunks/index.DWDW6mLz.js';
22
+ import './chunks/index.D6PC4Dpu.js';
23
23
  import 'node:fs/promises';
24
24
  import '@vitest/utils/source-map';
25
25
  import 'tinyrainbow';
@@ -45,7 +45,7 @@ import 'buffer';
45
45
  import './chunks/_commonjsHelpers.D26ty3Ew.js';
46
46
  import 'node:crypto';
47
47
  import './chunks/traces.U4xDYhzZ.js';
48
- import 'debug';
48
+ import 'obug';
49
49
  import '#module-evaluator';
50
50
  import 'vite/module-runner';
51
51
  import '@vitest/utils/highlight';
@@ -62,7 +62,7 @@ import './chunks/defaults.BOqNVLsY.js';
62
62
  import '@vitest/utils/constants';
63
63
  import '@vitest/utils/resolver';
64
64
  import 'es-module-lexer';
65
- import './chunks/index.CMvpbrsJ.js';
65
+ import './chunks/index.B88tjlE5.js';
66
66
  import 'node:assert';
67
67
  import '@vitest/utils/serialize';
68
68
  import 'node:readline';
@@ -1,4 +1,4 @@
1
- export { aR as BaseReporter, aS as BenchmarkBuiltinReporters, aE as BenchmarkReporter, aF as BenchmarkReportsMap, aT as BuiltinReporterOptions, aU as BuiltinReporters, aG as DefaultReporter, aH as DotReporter, aI as GithubActionsReporter, aJ as HangingProcessReporter, aL as JUnitReporter, aV as JsonAssertionResult, aK as JsonReporter, aW as JsonTestResult, aX as JsonTestResults, aB as ReportedHookContext, aC as Reporter, aM as ReportersMap, aN as TapFlatReporter, aO as TapReporter, aD as TestRunEndReason, aP as VerboseBenchmarkReporter, aQ as VerboseReporter } from './chunks/reporters.d.J2RlBlp9.js';
1
+ export { aR as BaseReporter, aS as BenchmarkBuiltinReporters, aE as BenchmarkReporter, aF as BenchmarkReportsMap, aT as BuiltinReporterOptions, aU as BuiltinReporters, aG as DefaultReporter, aH as DotReporter, aI as GithubActionsReporter, aJ as HangingProcessReporter, aL as JUnitReporter, aV as JsonAssertionResult, aK as JsonReporter, aW as JsonTestResult, aX as JsonTestResults, aB as ReportedHookContext, aC as Reporter, aM as ReportersMap, aN as TapFlatReporter, aO as TapReporter, aD as TestRunEndReason, aP as VerboseBenchmarkReporter, aQ as VerboseReporter } from './chunks/reporters.d.DeFcIuza.js';
2
2
  import '@vitest/runner';
3
3
  import '@vitest/utils';
4
4
  import './chunks/rpc.d.RH3apGEf.js';
@@ -13,8 +13,8 @@ import 'vitest/browser';
13
13
  import './chunks/config.d.g6OOauRt.js';
14
14
  import '@vitest/pretty-format';
15
15
  import '@vitest/utils/diff';
16
- import './chunks/browser.d.CDvMh6F9.js';
17
- import './chunks/worker.d.DCy61tzi.js';
16
+ import './chunks/browser.d.F6jMf15V.js';
17
+ import './chunks/worker.d.DhEa3KzY.js';
18
18
  import './chunks/environment.d.CrsxCzP1.js';
19
19
  import '@vitest/expect';
20
20
  import 'vitest/optional-types.js';
package/dist/reporters.js CHANGED
@@ -1,5 +1,5 @@
1
- export { D as DefaultReporter, a as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, b as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, c as TapReporter, V as VerboseReporter } from './chunks/index.DWDW6mLz.js';
2
- export { B as BenchmarkReporter, a as BenchmarkReportsMap, V as VerboseBenchmarkReporter } from './chunks/index.CMvpbrsJ.js';
1
+ export { D as DefaultReporter, a as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, b as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, c as TapReporter, V as VerboseReporter } from './chunks/index.D6PC4Dpu.js';
2
+ export { B as BenchmarkReporter, a as BenchmarkReportsMap, V as VerboseBenchmarkReporter } from './chunks/index.B88tjlE5.js';
3
3
  import 'node:fs';
4
4
  import 'node:fs/promises';
5
5
  import 'pathe';
package/dist/worker.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { W as WorkerGlobalState, B as BirpcOptions, a as WorkerSetupContext } from './chunks/worker.d.DCy61tzi.js';
1
+ import { W as WorkerGlobalState, B as BirpcOptions, a as WorkerSetupContext } from './chunks/worker.d.DhEa3KzY.js';
2
2
  import { T as Traces } from './chunks/traces.d.402V_yFI.js';
3
3
  import { Awaitable } from '@vitest/utils';
4
4
  import { R as RuntimeRPC } from './chunks/rpc.d.RH3apGEf.js';
package/dist/worker.js CHANGED
@@ -1,5 +1,5 @@
1
- export { r as runBaseTests } from './chunks/base.Dqf2QAxh.js';
2
- export { i as init } from './chunks/init.MkYs5nmh.js';
1
+ export { r as runBaseTests } from './chunks/base.BEv8sRbK.js';
2
+ export { i as init } from './chunks/init.a5SCIJ0x.js';
3
3
  import 'node:vm';
4
4
  import '@vitest/spy';
5
5
  import './chunks/index.CQwQ_SLL.js';
@@ -43,5 +43,5 @@ import 'node:util';
43
43
  import '@vitest/utils/constants';
44
44
  import './chunks/index.DBx1AtPJ.js';
45
45
  import 'expect-type';
46
- import './chunks/index.QWbK7rHY.js';
46
+ import './chunks/index.BspFP3mn.js';
47
47
  import 'node:console';
@@ -1,5 +1,5 @@
1
- import { r as runBaseTests, s as setupEnvironment } from '../chunks/base.Dqf2QAxh.js';
2
- import { w as workerInit } from '../chunks/init-forks.CglOH45c.js';
1
+ import { r as runBaseTests, s as setupEnvironment } from '../chunks/base.BEv8sRbK.js';
2
+ import { w as workerInit } from '../chunks/init-forks.DmvIFK4U.js';
3
3
  import 'node:vm';
4
4
  import '@vitest/spy';
5
5
  import '../chunks/index.CQwQ_SLL.js';
@@ -23,7 +23,7 @@ import '@vitest/utils/offset';
23
23
  import '@vitest/utils/source-map';
24
24
  import '../chunks/_commonjsHelpers.D26ty3Ew.js';
25
25
  import '../chunks/date.Bq6ZW5rf.js';
26
- import '../chunks/init.MkYs5nmh.js';
26
+ import '../chunks/init.a5SCIJ0x.js';
27
27
  import 'node:fs';
28
28
  import 'node:module';
29
29
  import 'node:url';
@@ -35,7 +35,7 @@ import '@vitest/utils/serialize';
35
35
  import '../module-evaluator.js';
36
36
  import '../chunks/traces.U4xDYhzZ.js';
37
37
  import '@vitest/mocker';
38
- import '../chunks/index.QWbK7rHY.js';
38
+ import '../chunks/index.BspFP3mn.js';
39
39
  import 'node:console';
40
40
  import '../chunks/inspector.CvyFGlXm.js';
41
41
  import '../chunks/evaluatedModules.Dg1zASAC.js';
@@ -1,5 +1,5 @@
1
- import { s as setupEnvironment, r as runBaseTests } from '../chunks/base.Dqf2QAxh.js';
2
- import { w as workerInit } from '../chunks/init-threads.BuMdIy1r.js';
1
+ import { s as setupEnvironment, r as runBaseTests } from '../chunks/base.BEv8sRbK.js';
2
+ import { w as workerInit } from '../chunks/init-threads.De6b3S3g.js';
3
3
  import 'node:vm';
4
4
  import '@vitest/spy';
5
5
  import '../chunks/index.CQwQ_SLL.js';
@@ -23,7 +23,7 @@ import '@vitest/utils/offset';
23
23
  import '@vitest/utils/source-map';
24
24
  import '../chunks/_commonjsHelpers.D26ty3Ew.js';
25
25
  import '../chunks/date.Bq6ZW5rf.js';
26
- import '../chunks/init.MkYs5nmh.js';
26
+ import '../chunks/init.a5SCIJ0x.js';
27
27
  import 'node:fs';
28
28
  import 'node:module';
29
29
  import 'node:url';
@@ -35,7 +35,7 @@ import '@vitest/utils/serialize';
35
35
  import '../module-evaluator.js';
36
36
  import '../chunks/traces.U4xDYhzZ.js';
37
37
  import '@vitest/mocker';
38
- import '../chunks/index.QWbK7rHY.js';
38
+ import '../chunks/index.BspFP3mn.js';
39
39
  import 'node:console';
40
40
  import '../chunks/inspector.CvyFGlXm.js';
41
41
  import '../chunks/evaluatedModules.Dg1zASAC.js';
@@ -1,6 +1,6 @@
1
- import { w as workerInit } from '../chunks/init-forks.CglOH45c.js';
2
- import { r as runVmTests } from '../chunks/vm.Y19jrZy2.js';
3
- import '../chunks/init.MkYs5nmh.js';
1
+ import { w as workerInit } from '../chunks/init-forks.DmvIFK4U.js';
2
+ import { r as runVmTests } from '../chunks/vm.BbVD4fJ5.js';
3
+ import '../chunks/init.a5SCIJ0x.js';
4
4
  import 'node:fs';
5
5
  import 'node:module';
6
6
  import 'node:url';
@@ -15,7 +15,7 @@ import '../module-evaluator.js';
15
15
  import 'node:vm';
16
16
  import '../chunks/traces.U4xDYhzZ.js';
17
17
  import '@vitest/mocker';
18
- import '../chunks/index.QWbK7rHY.js';
18
+ import '../chunks/index.BspFP3mn.js';
19
19
  import 'node:console';
20
20
  import '@vitest/utils/error';
21
21
  import '../chunks/rpc.BytlcPfC.js';
@@ -1,7 +1,7 @@
1
- import { w as workerInit } from '../chunks/init-threads.BuMdIy1r.js';
2
- import { r as runVmTests } from '../chunks/vm.Y19jrZy2.js';
1
+ import { w as workerInit } from '../chunks/init-threads.De6b3S3g.js';
2
+ import { r as runVmTests } from '../chunks/vm.BbVD4fJ5.js';
3
3
  import 'node:worker_threads';
4
- import '../chunks/init.MkYs5nmh.js';
4
+ import '../chunks/init.a5SCIJ0x.js';
5
5
  import 'node:fs';
6
6
  import 'node:module';
7
7
  import 'node:url';
@@ -16,7 +16,7 @@ import '../module-evaluator.js';
16
16
  import 'node:vm';
17
17
  import '../chunks/traces.U4xDYhzZ.js';
18
18
  import '@vitest/mocker';
19
- import '../chunks/index.QWbK7rHY.js';
19
+ import '../chunks/index.BspFP3mn.js';
20
20
  import 'node:console';
21
21
  import '@vitest/utils/error';
22
22
  import '../chunks/rpc.BytlcPfC.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitest",
3
3
  "type": "module",
4
- "version": "4.0.13",
4
+ "version": "4.0.14",
5
5
  "description": "Next generation testing framework powered by Vite",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -131,14 +131,13 @@
131
131
  "peerDependencies": {
132
132
  "@edge-runtime/vm": "*",
133
133
  "@opentelemetry/api": "^1.9.0",
134
- "@types/debug": "^4.1.12",
135
134
  "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",
136
135
  "happy-dom": "*",
137
136
  "jsdom": "*",
138
- "@vitest/browser-playwright": "4.0.13",
139
- "@vitest/browser-preview": "4.0.13",
140
- "@vitest/browser-webdriverio": "4.0.13",
141
- "@vitest/ui": "4.0.13"
137
+ "@vitest/browser-playwright": "4.0.14",
138
+ "@vitest/browser-preview": "4.0.14",
139
+ "@vitest/browser-webdriverio": "4.0.14",
140
+ "@vitest/ui": "4.0.14"
142
141
  },
143
142
  "peerDependenciesMeta": {
144
143
  "@edge-runtime/vm": {
@@ -147,9 +146,6 @@
147
146
  "@opentelemetry/api": {
148
147
  "optional": true
149
148
  },
150
- "@types/debug": {
151
- "optional": true
152
- },
153
149
  "@types/node": {
154
150
  "optional": true
155
151
  },
@@ -173,10 +169,10 @@
173
169
  }
174
170
  },
175
171
  "dependencies": {
176
- "debug": "^4.4.3",
177
172
  "es-module-lexer": "^1.7.0",
178
173
  "expect-type": "^1.2.2",
179
174
  "magic-string": "^0.30.21",
175
+ "obug": "^2.1.1",
180
176
  "pathe": "^2.0.3",
181
177
  "picomatch": "^4.0.3",
182
178
  "std-env": "^3.10.0",
@@ -186,13 +182,13 @@
186
182
  "tinyrainbow": "^3.0.3",
187
183
  "vite": "^6.0.0 || ^7.0.0",
188
184
  "why-is-node-running": "^2.3.0",
189
- "@vitest/mocker": "4.0.13",
190
- "@vitest/pretty-format": "4.0.13",
191
- "@vitest/runner": "4.0.13",
192
- "@vitest/spy": "4.0.13",
193
- "@vitest/utils": "4.0.13",
194
- "@vitest/snapshot": "4.0.13",
195
- "@vitest/expect": "4.0.13"
185
+ "@vitest/expect": "4.0.14",
186
+ "@vitest/pretty-format": "4.0.14",
187
+ "@vitest/snapshot": "4.0.14",
188
+ "@vitest/runner": "4.0.14",
189
+ "@vitest/spy": "4.0.14",
190
+ "@vitest/mocker": "4.0.14",
191
+ "@vitest/utils": "4.0.14"
196
192
  },
197
193
  "devDependencies": {
198
194
  "@antfu/install-pkg": "^1.1.0",
@@ -200,7 +196,6 @@
200
196
  "@jridgewell/trace-mapping": "0.3.31",
201
197
  "@opentelemetry/api": "^1.9.0",
202
198
  "@sinonjs/fake-timers": "14.0.0",
203
- "@types/debug": "^4.1.12",
204
199
  "@types/estree": "^1.0.8",
205
200
  "@types/istanbul-lib-coverage": "^2.0.6",
206
201
  "@types/istanbul-reports": "^3.0.4",