vitest 4.0.3 → 4.0.4

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.
@@ -4,7 +4,7 @@ import { V as VitestEvaluatedModules } from './evaluatedModules.Dg1zASAC.js';
4
4
  import { s as startVitestModuleRunner, c as createNodeImportMeta } from './startModuleRunner.iF1E9Bt4.js';
5
5
  import { performance } from 'node:perf_hooks';
6
6
  import { startTests, collectTests } from '@vitest/runner';
7
- import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './resolveSnapshotEnvironment.yzXri_YN.js';
7
+ import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './resolveSnapshotEnvironment.BZzLjzkh.js';
8
8
  import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './setup-common.DR1sucx6.js';
9
9
  import { g as globalExpect, v as vi } from './vi.BZvkKVkM.js';
10
10
  import { c as closeInspector } from './inspector.DLZxSeU3.js';
@@ -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.3";
622
+ var version = "4.0.4";
623
623
 
624
624
  const apiConfig = (port) => ({
625
625
  port: {
@@ -1294,7 +1294,7 @@ function normalizeCliOptions(cliFilters, argv) {
1294
1294
  }
1295
1295
  async function start(mode, cliFilters, options) {
1296
1296
  try {
1297
- const { startVitest } = await import('./cli-api.D24RdiHp.js').then(function (n) { return n.p; }), ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
1297
+ const { startVitest } = await import('./cli-api.BxbUFDR6.js').then(function (n) { return n.p; }), ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
1298
1298
  if (!ctx.shouldKeepServer()) await ctx.exit();
1299
1299
  } catch (e) {
1300
1300
  const { errorBanner } = await import('./index.CcRZ6fUh.js').then(function (n) { return n.u; });
@@ -1309,7 +1309,7 @@ async function init(project) {
1309
1309
  }
1310
1310
  async function collect(mode, cliFilters, options) {
1311
1311
  try {
1312
- const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.D24RdiHp.js').then(function (n) { return n.p; }), ctx = await prepareVitest(mode, {
1312
+ const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.BxbUFDR6.js').then(function (n) { return n.p; }), ctx = await prepareVitest(mode, {
1313
1313
  ...normalizeCliOptions(cliFilters, options),
1314
1314
  watch: false,
1315
1315
  run: true
@@ -11,7 +11,7 @@ import * as nodeos from 'node:os';
11
11
  import nodeos__default, { tmpdir } from 'node:os';
12
12
  import { generateHash as generateHash$1, calculateSuiteHash, someTasksAreOnly, interpretTaskModes, hasFailed, generateFileHash, limitConcurrency, createFileTask as createFileTask$1, getTasks, isTestCase } from '@vitest/runner/utils';
13
13
  import { SnapshotManager } from '@vitest/snapshot/manager';
14
- import { v as version$1 } from './cac.D3tBgDur.js';
14
+ import { v as version$1 } from './cac.39_DDnyx.js';
15
15
  import { c as createBirpc } from './index.Bgo3tNWt.js';
16
16
  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.CcRZ6fUh.js';
17
17
  import require$$0$3 from 'events';
@@ -28,7 +28,7 @@ import { g as getDefaultExportFromCjs } from './_commonjsHelpers.BFTU3MAI.js';
28
28
  import crypto, { createHash } from 'node:crypto';
29
29
  import { rootDir, distDir } from '../path.js';
30
30
  import createDebug from 'debug';
31
- import { h as hash, R as RandomSequencer, i as isPackageExists, c as isBrowserEnabled, r as resolveConfig, g as getCoverageProvider, a as resolveApiServerConfig } from './coverage.BJHGXm3x.js';
31
+ import { h as hash, R as RandomSequencer, i as isPackageExists, c as isBrowserEnabled, r as resolveConfig, g as getCoverageProvider, a as resolveApiServerConfig } from './coverage.CSfvENE1.js';
32
32
  import { readFile, writeFile, rename, stat, unlink, rm, mkdir, copyFile } from 'node:fs/promises';
33
33
  import { builtinModules, createRequire, isBuiltin } from 'node:module';
34
34
  import { VitestModuleEvaluator } from '#module-evaluator';
@@ -5054,10 +5054,9 @@ function clearId(id) {
5054
5054
  function cloneByOwnProperties(value) {
5055
5055
  // Clones the value's properties into a new Object. The simpler approach of
5056
5056
  // Object.assign() won't work in the case that properties are not enumerable.
5057
- return Object.getOwnPropertyNames(value).reduce((clone, prop) => ({
5058
- ...clone,
5059
- [prop]: value[prop]
5060
- }), {});
5057
+ return Object.getOwnPropertyNames(value).reduce((clone, prop) => {
5058
+ return clone[prop] = value[prop], clone;
5059
+ }, {});
5061
5060
  }
5062
5061
  /**
5063
5062
  * Replacer function for serialization methods such as JS.stringify() or
@@ -6344,11 +6343,17 @@ function createMethodsRPC(project, options = {}) {
6344
6343
  const environment = project.vite.environments[environmentName];
6345
6344
  if (!environment) throw new Error(`The environment ${environmentName} was not defined in the Vite config.`);
6346
6345
  const resolved = await environment.pluginContainer.resolveId(id, importer);
6347
- return resolved ? {
6346
+ if (!resolved) return null;
6347
+ const file = cleanUrl(resolved.id);
6348
+ return resolved.external ? {
6349
+ file,
6350
+ url: !resolved.id.startsWith("node:") && isBuiltin(resolved.id) ? `node:${resolved.id}` : resolved.id,
6351
+ id: resolved.id
6352
+ } : {
6348
6353
  file: cleanUrl(resolved.id),
6349
6354
  url: normalizeResolvedIdToUrl(environment, resolved.id),
6350
6355
  id: resolved.id
6351
- } : null;
6356
+ };
6352
6357
  },
6353
6358
  snapshotSaved(snapshot) {
6354
6359
  vitest.snapshot.add(snapshot);
@@ -6538,9 +6543,11 @@ class ForksPoolWorker {
6538
6543
  execArgv;
6539
6544
  env;
6540
6545
  _fork;
6546
+ stdout;
6547
+ stderr;
6541
6548
  constructor(options) {
6542
6549
  /** Loads {@link file://./../../../runtime/workers/forks.ts} */
6543
- this.execArgv = options.execArgv, this.env = options.env, this.entrypoint = resolve$1(options.distPath, "workers/forks.js");
6550
+ this.execArgv = options.execArgv, this.env = options.env, this.stdout = options.project.vitest.logger.outputStream, this.stderr = options.project.vitest.logger.errorStream, this.entrypoint = resolve$1(options.distPath, "workers/forks.js");
6544
6551
  }
6545
6552
  on(event, callback) {
6546
6553
  this.fork.on(event, callback);
@@ -6559,17 +6566,21 @@ class ForksPoolWorker {
6559
6566
  this.fork.send(v8.serialize(message));
6560
6567
  }
6561
6568
  async start() {
6562
- this._fork ||= fork(this.entrypoint, [], {
6569
+ if (this._fork ||= fork(this.entrypoint, [], {
6563
6570
  env: this.env,
6564
- execArgv: this.execArgv
6565
- });
6571
+ execArgv: this.execArgv,
6572
+ stdio: "pipe"
6573
+ }), this._fork.stdout) this.stdout.setMaxListeners(1 + this.stdout.getMaxListeners()), this._fork.stdout.pipe(this.stdout);
6574
+ if (this._fork.stderr) this.stderr.setMaxListeners(1 + this.stderr.getMaxListeners()), this._fork.stderr.pipe(this.stderr);
6566
6575
  }
6567
6576
  async stop() {
6568
6577
  const fork = this.fork, waitForExit = new Promise((resolve) => {
6569
6578
  if (fork.exitCode != null) resolve();
6570
6579
  else fork.once("exit", resolve);
6571
6580
  }), sigkillTimeout = setTimeout(() => fork.kill("SIGKILL"), SIGKILL_TIMEOUT);
6572
- fork.kill(), await waitForExit, clearTimeout(sigkillTimeout), this._fork = void 0;
6581
+ if (fork.kill(), await waitForExit, clearTimeout(sigkillTimeout), fork.stdout) fork.stdout?.unpipe(this.stdout), this.stdout.setMaxListeners(this.stdout.getMaxListeners() - 1);
6582
+ if (fork.stderr) fork.stderr?.unpipe(this.stderr), this.stderr.setMaxListeners(this.stderr.getMaxListeners() - 1);
6583
+ this._fork = void 0;
6573
6584
  }
6574
6585
  deserialize(data) {
6575
6586
  try {
@@ -6614,9 +6625,11 @@ class ThreadsPoolWorker {
6614
6625
  execArgv;
6615
6626
  env;
6616
6627
  _thread;
6628
+ stdout;
6629
+ stderr;
6617
6630
  constructor(options) {
6618
6631
  /** Loads {@link file://./../../../runtime/workers/threads.ts} */
6619
- this.execArgv = options.execArgv, this.env = options.env, this.entrypoint = resolve$1(options.distPath, "workers/threads.js");
6632
+ this.execArgv = options.execArgv, this.env = options.env, this.stdout = options.project.vitest.logger.outputStream, this.stderr = options.project.vitest.logger.errorStream, this.entrypoint = resolve$1(options.distPath, "workers/threads.js");
6620
6633
  }
6621
6634
  on(event, callback) {
6622
6635
  this.thread.on(event, callback);
@@ -6628,16 +6641,15 @@ class ThreadsPoolWorker {
6628
6641
  this.thread.postMessage(message);
6629
6642
  }
6630
6643
  async start() {
6631
- // This can be called multiple times if the runtime is shared.
6632
6644
  this._thread ||= new Worker(this.entrypoint, {
6633
6645
  env: this.env,
6634
- execArgv: this.execArgv
6635
- });
6646
+ execArgv: this.execArgv,
6647
+ stdout: true,
6648
+ stderr: true
6649
+ }), this.stdout.setMaxListeners(1 + this.stdout.getMaxListeners()), this._thread.stdout.pipe(this.stdout), this.stderr.setMaxListeners(1 + this.stderr.getMaxListeners()), this._thread.stderr.pipe(this.stderr);
6636
6650
  }
6637
6651
  async stop() {
6638
- await this.thread.terminate().then(() => {
6639
- this._thread = void 0;
6640
- });
6652
+ await this.thread.terminate(), this._thread?.stdout?.unpipe(this.stdout), this.stdout.setMaxListeners(this.stdout.getMaxListeners() - 1), this._thread?.stderr?.unpipe(this.stderr), this.stderr.setMaxListeners(this.stderr.getMaxListeners() - 1), this._thread = void 0;
6641
6653
  }
6642
6654
  deserialize(data) {
6643
6655
  return data;
@@ -6838,9 +6850,7 @@ class Pool {
6838
6850
  method,
6839
6851
  cancelTask
6840
6852
  };
6841
- this.activeTasks.push(activeTask), runner.on("error", (error) => {
6842
- resolver.reject(new Error(`[vitest-pool]: Worker ${task.worker} emitted error.`, { cause: error }));
6843
- });
6853
+ this.activeTasks.push(activeTask);
6844
6854
  async function cancelTask() {
6845
6855
  await runner.stop(), resolver.reject(/* @__PURE__ */ new Error("Cancelled"));
6846
6856
  }
@@ -6852,6 +6862,9 @@ class Pool {
6852
6862
  }
6853
6863
  };
6854
6864
  if (runner.on("message", onFinished), !runner.isStarted) {
6865
+ runner.on("error", (error) => {
6866
+ resolver.reject(new Error(`[vitest-pool]: Worker ${task.worker} emitted error.`, { cause: error }));
6867
+ });
6855
6868
  const id = setTimeout(() => resolver.reject(/* @__PURE__ */ new Error(`[vitest-pool]: Timeout starting ${task.worker} runner.`)), WORKER_START_TIMEOUT);
6856
6869
  await runner.start().finally(() => clearTimeout(id));
6857
6870
  }
@@ -2447,7 +2447,7 @@ function resolveConfig$1(vitest, options, viteConfig) {
2447
2447
  mode
2448
2448
  };
2449
2449
  if (options.pool && typeof options.pool !== "string") resolved.pool = options.pool.name, resolved.poolRunner = options.pool;
2450
- if (resolved.pool ??= "forks", resolved.project = toArray(resolved.project), resolved.provide ??= {}, resolved.name = typeof options.name === "string" ? options.name : options.name?.label || "", resolved.color = typeof options.name !== "string" ? options.name?.color : void 0, resolved.environment === "browser") throw new Error(`Looks like you set "test.environment" to "browser". To enabled Browser Mode, use "test.browser.enabled" instead.`);
2450
+ if (resolved.pool ??= "forks", resolved.project = toArray(resolved.project), resolved.provide ??= {}, resolved.name = typeof options.name === "string" ? options.name : options.name?.label || "", resolved.color = typeof options.name !== "string" ? options.name?.color : void 0, resolved.environment === "browser") throw new Error(`Looks like you set "test.environment" to "browser". To enable Browser Mode, use "test.browser.enabled" instead.`);
2451
2451
  const inspector = resolved.inspect || resolved.inspectBrk;
2452
2452
  if (resolved.inspector = {
2453
2453
  ...resolved.inspector,
@@ -1,5 +1,5 @@
1
1
  import v8 from 'node:v8';
2
- import { i as init } from './init.DvvF4rpe.js';
2
+ import { i as init } from './init.CfeGZ8J3.js';
3
3
 
4
4
  if (!process.send) throw new Error("Expected worker to be run in node:child_process");
5
5
  // 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.DvvF4rpe.js';
2
+ import { i as init } from './init.CfeGZ8J3.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) {
@@ -9,7 +9,7 @@ import { b as VitestTransport } from './startModuleRunner.iF1E9Bt4.js';
9
9
  import { e as environments } from './index.DON9WL-E.js';
10
10
  import { s as setupInspect } from './inspector.DLZxSeU3.js';
11
11
  import { V as VitestEvaluatedModules } from './evaluatedModules.Dg1zASAC.js';
12
- import { c as createRuntimeRpc, a as rpcDone } from './rpc.cD77ENhU.js';
12
+ import { c as createRuntimeRpc, a as rpcDone } from './rpc.Dv1Jt3i2.js';
13
13
 
14
14
  function isBuiltinEnvironment(env) {
15
15
  return env in environments;
@@ -1,8 +1,8 @@
1
1
  import { chai } from '@vitest/expect';
2
2
  import { l as loadDiffConfig, b as loadSnapshotSerializers, t as takeCoverageInsideWorker } from './setup-common.DR1sucx6.js';
3
- import { r as rpc } from './rpc.cD77ENhU.js';
3
+ import { r as rpc } from './rpc.Dv1Jt3i2.js';
4
4
  import { g as getWorkerState } from './utils.CG9h5ccR.js';
5
- import { V as VitestTestRunner, N as NodeBenchmarkRunner } from './test.CR2PBYe2.js';
5
+ import { V as VitestTestRunner, N as NodeBenchmarkRunner } from './test.CnspO-X4.js';
6
6
 
7
7
  function setupChaiConfig(config) {
8
8
  Object.assign(chai.config, config);
@@ -22,21 +22,23 @@ async function rpcDone() {
22
22
  const awaitable = Array.from(promises);
23
23
  return Promise.all(awaitable);
24
24
  }
25
+ let previousRpc;
25
26
  function createRuntimeRpc(options) {
27
+ if (previousRpc) previousRpc.$close(), previousRpc = void 0;
26
28
  let setCancel = (_reason) => {};
27
29
  const onCancel = new Promise((resolve) => {
28
30
  setCancel = resolve;
29
- });
30
- return {
31
- rpc: createSafeRpc(createBirpc({ onCancel: setCancel }, {
32
- eventNames: [
33
- "onUserConsoleLog",
34
- "onCollected",
35
- "onCancel"
36
- ],
37
- timeout: -1,
38
- ...options
39
- })),
31
+ }), rpc = createSafeRpc(createBirpc({ onCancel: setCancel }, {
32
+ eventNames: [
33
+ "onUserConsoleLog",
34
+ "onCollected",
35
+ "onCancel"
36
+ ],
37
+ timeout: -1,
38
+ ...options
39
+ }));
40
+ return previousRpc = rpc, {
41
+ rpc,
40
42
  onCancel
41
43
  };
42
44
  }
@@ -8,7 +8,7 @@ import { getTests, getNames, getTestName } from '@vitest/runner/utils';
8
8
  import { processError } from '@vitest/utils/error';
9
9
  import { normalize } from 'pathe';
10
10
  import { a as getSnapshotClient, i as inject, c as createExpect, v as vi } from './vi.BZvkKVkM.js';
11
- import { r as rpc } from './rpc.cD77ENhU.js';
11
+ import { r as rpc } from './rpc.Dv1Jt3i2.js';
12
12
 
13
13
  function createBenchmarkResult(name) {
14
14
  return {
package/dist/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as createCLI } from './chunks/cac.D3tBgDur.js';
1
+ import { c as createCLI } from './chunks/cac.39_DDnyx.js';
2
2
  import '@vitest/utils/helpers';
3
3
  import 'events';
4
4
  import 'pathe';
package/dist/coverage.js CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BaseCoverageProvider } from './chunks/coverage.BJHGXm3x.js';
1
+ export { B as BaseCoverageProvider } from './chunks/coverage.CSfvENE1.js';
2
2
  import 'node:fs';
3
3
  import 'node:path';
4
4
  import '@vitest/utils/helpers';
package/dist/node.d.ts CHANGED
@@ -149,6 +149,8 @@ declare class ForksPoolWorker implements PoolWorker {
149
149
  protected execArgv: string[];
150
150
  protected env: Partial<NodeJS.ProcessEnv>;
151
151
  private _fork?;
152
+ private stdout;
153
+ private stderr;
152
154
  constructor(options: PoolOptions);
153
155
  on(event: string, callback: (arg: any) => void): void;
154
156
  off(event: string, callback: (arg: any) => void): void;
@@ -166,6 +168,8 @@ declare class ThreadsPoolWorker implements PoolWorker {
166
168
  protected execArgv: string[];
167
169
  protected env: Partial<NodeJS.ProcessEnv>;
168
170
  private _thread?;
171
+ private stdout;
172
+ private stderr;
169
173
  constructor(options: PoolOptions);
170
174
  on(event: string, callback: (arg: any) => void): void;
171
175
  off(event: string, callback: (arg: any) => void): void;
package/dist/node.js CHANGED
@@ -1,11 +1,11 @@
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.D24RdiHp.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.D24RdiHp.js';
6
- export { p as parseCLI } from './chunks/cac.D3tBgDur.js';
7
- import { r as resolveConfig$2 } from './chunks/coverage.BJHGXm3x.js';
8
- export { b as BaseSequencer, a as resolveApiServerConfig } from './chunks/coverage.BJHGXm3x.js';
4
+ import { V as Vitest, a as VitestPlugin } from './chunks/cli-api.BxbUFDR6.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.BxbUFDR6.js';
6
+ export { p as parseCLI } from './chunks/cac.39_DDnyx.js';
7
+ import { r as resolveConfig$2 } from './chunks/coverage.CSfvENE1.js';
8
+ export { b as BaseSequencer, a as resolveApiServerConfig } from './chunks/coverage.CSfvENE1.js';
9
9
  import { slash, deepClone } from '@vitest/utils/helpers';
10
10
  import { a as any } from './chunks/index.Dc3xnDvT.js';
11
11
  import { resolve } from 'pathe';
package/dist/runners.js CHANGED
@@ -1,4 +1,4 @@
1
- export { N as NodeBenchmarkRunner, V as VitestTestRunner } from './chunks/test.CR2PBYe2.js';
1
+ export { N as NodeBenchmarkRunner, V as VitestTestRunner } from './chunks/test.CnspO-X4.js';
2
2
  import '@vitest/runner';
3
3
  import '@vitest/utils/helpers';
4
4
  import '@vitest/utils/timers';
@@ -15,5 +15,5 @@ import '@vitest/utils/offset';
15
15
  import '@vitest/utils/source-map';
16
16
  import './chunks/_commonjsHelpers.BFTU3MAI.js';
17
17
  import './chunks/date.-jtEtIeV.js';
18
- import './chunks/rpc.cD77ENhU.js';
18
+ import './chunks/rpc.Dv1Jt3i2.js';
19
19
  import './chunks/index.Bgo3tNWt.js';
package/dist/worker.js CHANGED
@@ -1,5 +1,5 @@
1
- export { r as runBaseTests } from './chunks/base.CVAgx931.js';
2
- export { i as init } from './chunks/init.DvvF4rpe.js';
1
+ export { r as runBaseTests } from './chunks/base.B04-CjXH.js';
2
+ export { i as init } from './chunks/init.CfeGZ8J3.js';
3
3
  import 'node:vm';
4
4
  import '@vitest/spy';
5
5
  import './chunks/evaluatedModules.Dg1zASAC.js';
@@ -17,16 +17,16 @@ import './module-evaluator.js';
17
17
  import '@vitest/mocker';
18
18
  import 'node:perf_hooks';
19
19
  import '@vitest/runner';
20
- import './chunks/resolveSnapshotEnvironment.yzXri_YN.js';
20
+ import './chunks/resolveSnapshotEnvironment.BZzLjzkh.js';
21
21
  import '@vitest/expect';
22
22
  import './chunks/setup-common.DR1sucx6.js';
23
23
  import './chunks/coverage.D_JHT54q.js';
24
24
  import '@vitest/snapshot';
25
25
  import '@vitest/utils/timers';
26
26
  import './chunks/utils.CG9h5ccR.js';
27
- import './chunks/rpc.cD77ENhU.js';
27
+ import './chunks/rpc.Dv1Jt3i2.js';
28
28
  import './chunks/index.Bgo3tNWt.js';
29
- import './chunks/test.CR2PBYe2.js';
29
+ import './chunks/test.CnspO-X4.js';
30
30
  import './chunks/benchmark.DHKMYAts.js';
31
31
  import '@vitest/runner/utils';
32
32
  import '@vitest/utils/error';
@@ -1,5 +1,5 @@
1
- import { r as runBaseTests } from '../chunks/base.CVAgx931.js';
2
- import { w as workerInit } from '../chunks/init-forks.BtwT3q9G.js';
1
+ import { r as runBaseTests } from '../chunks/base.B04-CjXH.js';
2
+ import { w as workerInit } from '../chunks/init-forks.D3tMfiuX.js';
3
3
  import 'node:vm';
4
4
  import '@vitest/spy';
5
5
  import '../chunks/evaluatedModules.Dg1zASAC.js';
@@ -17,16 +17,16 @@ import '../module-evaluator.js';
17
17
  import '@vitest/mocker';
18
18
  import 'node:perf_hooks';
19
19
  import '@vitest/runner';
20
- import '../chunks/resolveSnapshotEnvironment.yzXri_YN.js';
20
+ import '../chunks/resolveSnapshotEnvironment.BZzLjzkh.js';
21
21
  import '@vitest/expect';
22
22
  import '../chunks/setup-common.DR1sucx6.js';
23
23
  import '../chunks/coverage.D_JHT54q.js';
24
24
  import '@vitest/snapshot';
25
25
  import '@vitest/utils/timers';
26
26
  import '../chunks/utils.CG9h5ccR.js';
27
- import '../chunks/rpc.cD77ENhU.js';
27
+ import '../chunks/rpc.Dv1Jt3i2.js';
28
28
  import '../chunks/index.Bgo3tNWt.js';
29
- import '../chunks/test.CR2PBYe2.js';
29
+ import '../chunks/test.CnspO-X4.js';
30
30
  import '../chunks/benchmark.DHKMYAts.js';
31
31
  import '@vitest/runner/utils';
32
32
  import '@vitest/utils/error';
@@ -43,7 +43,7 @@ import '@vitest/utils/constants';
43
43
  import '../chunks/index.RwjEGCQ0.js';
44
44
  import 'expect-type';
45
45
  import 'node:v8';
46
- import '../chunks/init.DvvF4rpe.js';
46
+ import '../chunks/init.CfeGZ8J3.js';
47
47
  import '../chunks/index.DON9WL-E.js';
48
48
  import 'node:console';
49
49
 
@@ -5,17 +5,17 @@ import timersPromises from 'node:timers/promises';
5
5
  import util from 'node:util';
6
6
  import { startTests, collectTests } from '@vitest/runner';
7
7
  import { KNOWN_ASSET_TYPES } from '@vitest/utils/constants';
8
- import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/resolveSnapshotEnvironment.yzXri_YN.js';
8
+ import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/resolveSnapshotEnvironment.BZzLjzkh.js';
9
9
  import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.DR1sucx6.js';
10
10
  import { i as index } from '../chunks/index.RwjEGCQ0.js';
11
11
  import { c as closeInspector } from '../chunks/inspector.DLZxSeU3.js';
12
12
  import { g as getWorkerState } from '../chunks/utils.CG9h5ccR.js';
13
13
  import { g as globalExpect } from '../chunks/vi.BZvkKVkM.js';
14
14
  import '@vitest/expect';
15
- import '../chunks/rpc.cD77ENhU.js';
15
+ import '../chunks/rpc.Dv1Jt3i2.js';
16
16
  import '@vitest/utils/timers';
17
17
  import '../chunks/index.Bgo3tNWt.js';
18
- import '../chunks/test.CR2PBYe2.js';
18
+ import '../chunks/test.CnspO-X4.js';
19
19
  import '@vitest/utils/helpers';
20
20
  import '../chunks/benchmark.DHKMYAts.js';
21
21
  import '@vitest/runner/utils';
@@ -1,5 +1,5 @@
1
- import { r as runBaseTests } from '../chunks/base.CVAgx931.js';
2
- import { w as workerInit } from '../chunks/init-threads.BEmFEaEY.js';
1
+ import { r as runBaseTests } from '../chunks/base.B04-CjXH.js';
2
+ import { w as workerInit } from '../chunks/init-threads.yLRZD8Id.js';
3
3
  import 'node:vm';
4
4
  import '@vitest/spy';
5
5
  import '../chunks/evaluatedModules.Dg1zASAC.js';
@@ -17,16 +17,16 @@ import '../module-evaluator.js';
17
17
  import '@vitest/mocker';
18
18
  import 'node:perf_hooks';
19
19
  import '@vitest/runner';
20
- import '../chunks/resolveSnapshotEnvironment.yzXri_YN.js';
20
+ import '../chunks/resolveSnapshotEnvironment.BZzLjzkh.js';
21
21
  import '@vitest/expect';
22
22
  import '../chunks/setup-common.DR1sucx6.js';
23
23
  import '../chunks/coverage.D_JHT54q.js';
24
24
  import '@vitest/snapshot';
25
25
  import '@vitest/utils/timers';
26
26
  import '../chunks/utils.CG9h5ccR.js';
27
- import '../chunks/rpc.cD77ENhU.js';
27
+ import '../chunks/rpc.Dv1Jt3i2.js';
28
28
  import '../chunks/index.Bgo3tNWt.js';
29
- import '../chunks/test.CR2PBYe2.js';
29
+ import '../chunks/test.CnspO-X4.js';
30
30
  import '../chunks/benchmark.DHKMYAts.js';
31
31
  import '@vitest/runner/utils';
32
32
  import '@vitest/utils/error';
@@ -43,7 +43,7 @@ import '@vitest/utils/constants';
43
43
  import '../chunks/index.RwjEGCQ0.js';
44
44
  import 'expect-type';
45
45
  import 'node:worker_threads';
46
- import '../chunks/init.DvvF4rpe.js';
46
+ import '../chunks/init.CfeGZ8J3.js';
47
47
  import '../chunks/index.DON9WL-E.js';
48
48
  import 'node:console';
49
49
 
@@ -1,7 +1,7 @@
1
- import { w as workerInit } from '../chunks/init-forks.BtwT3q9G.js';
1
+ import { w as workerInit } from '../chunks/init-forks.D3tMfiuX.js';
2
2
  import { r as runVmTests } from '../chunks/vm.CuMWYx_F.js';
3
3
  import 'node:v8';
4
- import '../chunks/init.DvvF4rpe.js';
4
+ import '../chunks/init.CfeGZ8J3.js';
5
5
  import '@vitest/utils/error';
6
6
  import '@vitest/utils/source-map';
7
7
  import 'node:fs';
@@ -21,7 +21,7 @@ import '../chunks/index.DON9WL-E.js';
21
21
  import 'node:console';
22
22
  import '../chunks/inspector.DLZxSeU3.js';
23
23
  import '../chunks/evaluatedModules.Dg1zASAC.js';
24
- import '../chunks/rpc.cD77ENhU.js';
24
+ import '../chunks/rpc.Dv1Jt3i2.js';
25
25
  import '@vitest/utils/timers';
26
26
  import '../chunks/index.Bgo3tNWt.js';
27
27
  import '../chunks/utils.CG9h5ccR.js';
@@ -1,7 +1,7 @@
1
- import { w as workerInit } from '../chunks/init-threads.BEmFEaEY.js';
1
+ import { w as workerInit } from '../chunks/init-threads.yLRZD8Id.js';
2
2
  import { r as runVmTests } from '../chunks/vm.CuMWYx_F.js';
3
3
  import 'node:worker_threads';
4
- import '../chunks/init.DvvF4rpe.js';
4
+ import '../chunks/init.CfeGZ8J3.js';
5
5
  import '@vitest/utils/error';
6
6
  import '@vitest/utils/source-map';
7
7
  import 'node:fs';
@@ -21,7 +21,7 @@ import '../chunks/index.DON9WL-E.js';
21
21
  import 'node:console';
22
22
  import '../chunks/inspector.DLZxSeU3.js';
23
23
  import '../chunks/evaluatedModules.Dg1zASAC.js';
24
- import '../chunks/rpc.cD77ENhU.js';
24
+ import '../chunks/rpc.Dv1Jt3i2.js';
25
25
  import '@vitest/utils/timers';
26
26
  import '../chunks/index.Bgo3tNWt.js';
27
27
  import '../chunks/utils.CG9h5ccR.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitest",
3
3
  "type": "module",
4
- "version": "4.0.3",
4
+ "version": "4.0.4",
5
5
  "description": "Next generation testing framework powered by Vite",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -134,10 +134,10 @@
134
134
  "@types/node": "^20.0.0 || ^22.0.0 || >=24.0.0",
135
135
  "happy-dom": "*",
136
136
  "jsdom": "*",
137
- "@vitest/browser-playwright": "4.0.3",
138
- "@vitest/browser-preview": "4.0.3",
139
- "@vitest/browser-webdriverio": "4.0.3",
140
- "@vitest/ui": "4.0.3"
137
+ "@vitest/browser-playwright": "4.0.4",
138
+ "@vitest/browser-webdriverio": "4.0.4",
139
+ "@vitest/ui": "4.0.4",
140
+ "@vitest/browser-preview": "4.0.4"
141
141
  },
142
142
  "peerDependenciesMeta": {
143
143
  "@edge-runtime/vm": {
@@ -182,13 +182,13 @@
182
182
  "tinyrainbow": "^3.0.3",
183
183
  "vite": "^6.0.0 || ^7.0.0",
184
184
  "why-is-node-running": "^2.3.0",
185
- "@vitest/expect": "4.0.3",
186
- "@vitest/mocker": "4.0.3",
187
- "@vitest/pretty-format": "4.0.3",
188
- "@vitest/runner": "4.0.3",
189
- "@vitest/spy": "4.0.3",
190
- "@vitest/utils": "4.0.3",
191
- "@vitest/snapshot": "4.0.3"
185
+ "@vitest/mocker": "4.0.4",
186
+ "@vitest/expect": "4.0.4",
187
+ "@vitest/runner": "4.0.4",
188
+ "@vitest/pretty-format": "4.0.4",
189
+ "@vitest/snapshot": "4.0.4",
190
+ "@vitest/spy": "4.0.4",
191
+ "@vitest/utils": "4.0.4"
192
192
  },
193
193
  "devDependencies": {
194
194
  "@antfu/install-pkg": "^1.1.0",