vitest 3.2.3 → 3.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/dist/browser.d.ts +2 -2
  2. package/dist/chunks/{base.Cg0miDlQ.js → base.DfmxU-tU.js} +1 -1
  3. package/dist/chunks/{cac.Cs_fZ7zn.js → cac.SLIZ-C4n.js} +11 -8
  4. package/dist/chunks/{cli-api.C37Ou0i1.js → cli-api.OeDE3qqq.js} +22 -10
  5. package/dist/chunks/{config.d.D2ROskhv.d.ts → config.d.BKdhh7Zx.d.ts} +4 -0
  6. package/dist/chunks/{coverage.D1a3dTnj.js → coverage.DfSpMS-b.js} +22 -11
  7. package/dist/chunks/{index.CJ0plNrh.js → index.B521nVV-.js} +4 -2
  8. package/dist/chunks/{index.CSxmp_dI.js → index.BCWujgDG.js} +1 -1
  9. package/dist/chunks/{index.BbB8_kAK.js → index.CwejwG0H.js} +1 -1
  10. package/dist/chunks/{index.CX5aIIXH.js → index.VByaPkjc.js} +8 -5
  11. package/dist/chunks/{reporters.d.DL9pg5DB.d.ts → reporters.d.BuRON0I0.d.ts} +25 -11
  12. package/dist/chunks/{rpc.Iovn4oWe.js → rpc.-pEldfrD.js} +1 -1
  13. package/dist/chunks/{runBaseTests.Dd85QTll.js → runBaseTests.9Ij9_de-.js} +3 -3
  14. package/dist/chunks/{vite.d.CtvOcEqC.d.ts → vite.d.BnOPPc46.d.ts} +1 -1
  15. package/dist/chunks/{worker.d.tQu2eJQy.d.ts → worker.d.CUgIPz9V.d.ts} +2 -1
  16. package/dist/chunks/{worker.d.DvqK5Vmu.d.ts → worker.d.uzWsCv9X.d.ts} +1 -1
  17. package/dist/cli.js +2 -2
  18. package/dist/config.d.ts +5 -5
  19. package/dist/coverage.d.ts +3 -3
  20. package/dist/coverage.js +2 -2
  21. package/dist/execute.d.ts +2 -2
  22. package/dist/index.d.ts +8 -8
  23. package/dist/node.d.ts +9 -9
  24. package/dist/node.js +9 -9
  25. package/dist/reporters.d.ts +3 -3
  26. package/dist/reporters.js +2 -2
  27. package/dist/runners.d.ts +1 -1
  28. package/dist/runners.js +2 -2
  29. package/dist/worker.js +2 -2
  30. package/dist/workers/forks.js +1 -1
  31. package/dist/workers/runVmTests.js +3 -3
  32. package/dist/workers/threads.js +1 -1
  33. package/dist/workers.d.ts +3 -3
  34. package/dist/workers.js +3 -3
  35. package/package.json +16 -16
package/dist/browser.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { S as SerializedCoverageConfig, a as SerializedConfig } from './chunks/config.d.D2ROskhv.js';
1
+ import { S as SerializedCoverageConfig, a as SerializedConfig } from './chunks/config.d.BKdhh7Zx.js';
2
2
  import { R as RuntimeCoverageModuleLoader } from './chunks/coverage.d.S9RMNXIe.js';
3
3
  import { SerializedDiffOptions } from '@vitest/utils/diff';
4
4
  import { VitestExecutor } from './execute.js';
@@ -12,7 +12,7 @@ import '@vitest/snapshot';
12
12
  import '@vitest/snapshot/environment';
13
13
  import 'vite-node/client';
14
14
  import 'vite-node';
15
- import './chunks/worker.d.tQu2eJQy.js';
15
+ import './chunks/worker.d.CUgIPz9V.js';
16
16
  import './chunks/environment.d.cL3nLXbE.js';
17
17
  import 'vitest/optional-types.js';
18
18
  import 'node:vm';
@@ -24,7 +24,7 @@ async function runBaseTests(method, state) {
24
24
  const [executor, { run }] = await Promise.all([startViteNode({
25
25
  state,
26
26
  requestStubs: getDefaultRequestStubs()
27
- }), import('./runBaseTests.Dd85QTll.js')]);
27
+ }), import('./runBaseTests.9Ij9_de-.js')]);
28
28
  const fileSpecs = ctx.files.map((f) => typeof f === "string" ? {
29
29
  filepath: f,
30
30
  testLocations: void 0
@@ -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.DnKduX2e.js';
6
- import { R as ReportersMap } from './index.CX5aIIXH.js';
6
+ import { R as ReportersMap } from './index.VByaPkjc.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 = "3.2.3";
622
+ var version = "3.2.5";
623
623
 
624
624
  const apiConfig = (port) => ({
625
625
  port: {
@@ -631,6 +631,8 @@ const apiConfig = (port) => ({
631
631
  argument: "[host]"
632
632
  },
633
633
  strictPort: { description: "Set to true to exit if port is already in use, instead of automatically trying the next available port" },
634
+ allowExec: { description: "Allow API to execute code. (Be careful when enabling this option in untrusted environments)" },
635
+ allowWrite: { description: "Allow API to edit files. (Be careful when enabling this option in untrusted environments)" },
634
636
  middlewareMode: null
635
637
  });
636
638
  const poolThreadsCommands = {
@@ -1365,7 +1367,7 @@ function parseCLI(argv, config = {}) {
1365
1367
  arrayArgs.unshift("node");
1366
1368
  let { args, options } = createCLI(config).parse(arrayArgs, { run: false });
1367
1369
  if (arrayArgs[2] === "watch" || arrayArgs[2] === "dev") options.watch = true;
1368
- if (arrayArgs[2] === "run") options.run = true;
1370
+ if (arrayArgs[2] === "run" && !options.watch) options.run = true;
1369
1371
  if (arrayArgs[2] === "related") {
1370
1372
  options.related = args;
1371
1373
  options.passWithNoTests ??= true;
@@ -1386,7 +1388,8 @@ async function watch(cliFilters, options) {
1386
1388
  await start("test", cliFilters, options);
1387
1389
  }
1388
1390
  async function run(cliFilters, options) {
1389
- options.run = true;
1391
+ // "vitest run --watch" should still be watch mode
1392
+ options.run = !options.watch;
1390
1393
  await start("test", cliFilters, options);
1391
1394
  }
1392
1395
  async function benchmark(cliFilters, options) {
@@ -1407,11 +1410,11 @@ async function start(mode, cliFilters, options) {
1407
1410
  process.title = "node (vitest)";
1408
1411
  } catch {}
1409
1412
  try {
1410
- const { startVitest } = await import('./cli-api.C37Ou0i1.js').then(function (n) { return n.f; });
1413
+ const { startVitest } = await import('./cli-api.OeDE3qqq.js').then(function (n) { return n.f; });
1411
1414
  const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
1412
1415
  if (!ctx.shouldKeepServer()) await ctx.exit();
1413
1416
  } catch (e) {
1414
- const { errorBanner } = await import('./index.CX5aIIXH.js').then(function (n) { return n.u; });
1417
+ const { errorBanner } = await import('./index.VByaPkjc.js').then(function (n) { return n.u; });
1415
1418
  console.error(`\n${errorBanner("Startup Error")}`);
1416
1419
  console.error(e);
1417
1420
  console.error("\n\n");
@@ -1432,7 +1435,7 @@ async function collect(mode, cliFilters, options) {
1432
1435
  process.title = "node (vitest)";
1433
1436
  } catch {}
1434
1437
  try {
1435
- const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.C37Ou0i1.js').then(function (n) { return n.f; });
1438
+ const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.OeDE3qqq.js').then(function (n) { return n.f; });
1436
1439
  const ctx = await prepareVitest(mode, {
1437
1440
  ...normalizeCliOptions(cliFilters, options),
1438
1441
  watch: false,
@@ -1454,7 +1457,7 @@ async function collect(mode, cliFilters, options) {
1454
1457
  }
1455
1458
  await ctx.close();
1456
1459
  } catch (e) {
1457
- const { errorBanner } = await import('./index.CX5aIIXH.js').then(function (n) { return n.u; });
1460
+ const { errorBanner } = await import('./index.VByaPkjc.js').then(function (n) { return n.u; });
1458
1461
  console.error(`\n${errorBanner("Collect Error")}`);
1459
1462
  console.error(e);
1460
1463
  console.error("\n\n");
@@ -11,9 +11,9 @@ import { generateFileHash, limitConcurrency, createFileTask, hasFailed, getTasks
11
11
  import { SnapshotManager } from '@vitest/snapshot/manager';
12
12
  import { ViteNodeRunner } from 'vite-node/client';
13
13
  import { ViteNodeServer } from 'vite-node/server';
14
- import { v as version$1 } from './cac.Cs_fZ7zn.js';
15
- import { c as createBirpc } from './index.CJ0plNrh.js';
16
- import { p as parse, s as stringify, d as printError, f as formatProjectName, w as withLabel, e as errorBanner, h as divider, i as generateCodeFrame, R as ReportersMap, j as BlobReporter, r as readBlobs, H as HangingProcessReporter } from './index.CX5aIIXH.js';
14
+ import { v as version$1 } from './cac.SLIZ-C4n.js';
15
+ import { c as createBirpc } from './index.B521nVV-.js';
16
+ import { p as parse, s as stringify, d as printError, f as formatProjectName, w as withLabel, e as errorBanner, h as divider, i as generateCodeFrame, R as ReportersMap, j as BlobReporter, r as readBlobs, H as HangingProcessReporter } from './index.VByaPkjc.js';
17
17
  import require$$0$3 from 'events';
18
18
  import require$$1$1 from 'https';
19
19
  import require$$2 from 'http';
@@ -28,7 +28,7 @@ import { g as getDefaultExportFromCjs } from './_commonjsHelpers.BFTU3MAI.js';
28
28
  import { parseErrorStacktrace } from '@vitest/utils/source-map';
29
29
  import crypto, { createHash } from 'node:crypto';
30
30
  import { distDir, rootDir } from '../path.js';
31
- import { h as hash, R as RandomSequencer, i as isPackageExists, g as getFilePoolName, d as isBrowserEnabled, r as resolveConfig, e as groupBy, f as getCoverageProvider, j as createPool, w as wildcardPatternToRegExp, a as resolveApiServerConfig, s as stdout } from './coverage.D1a3dTnj.js';
31
+ import { h as hash, R as RandomSequencer, i as isPackageExists, g as getFilePoolName, d as isBrowserEnabled, r as resolveConfig, e as groupBy, f as getCoverageProvider, j as createPool, w as wildcardPatternToRegExp, a as resolveApiServerConfig, s as stdout } from './coverage.DfSpMS-b.js';
32
32
  import { c as convertTasksToEvents } from './typechecker.DRKU1-1g.js';
33
33
  import { Console } from 'node:console';
34
34
  import c from 'tinyrainbow';
@@ -43,7 +43,7 @@ import { normalizeRequestId, cleanUrl } from 'vite-node/utils';
43
43
  import { hoistMocksPlugin, automockPlugin } from '@vitest/mocker/node';
44
44
  import { c as configDefaults } from './defaults.B7q_naMc.js';
45
45
  import MagicString from 'magic-string';
46
- import { a as BenchmarkReportsMap } from './index.CSxmp_dI.js';
46
+ import { a as BenchmarkReportsMap } from './index.BCWujgDG.js';
47
47
  import assert$1 from 'node:assert';
48
48
  import { serializeError } from '@vitest/utils/error';
49
49
  import readline from 'node:readline';
@@ -5109,12 +5109,15 @@ function setup(ctx, _server) {
5109
5109
  },
5110
5110
  async saveTestFile(id, content) {
5111
5111
  if (!ctx.state.filesMap.has(id) || !existsSync(id)) throw new Error(`Test file "${id}" was not registered, so it cannot be updated using the API.`);
5112
+ if (!ctx.config.api.allowWrite) return;
5112
5113
  return promises.writeFile(id, content, "utf-8");
5113
5114
  },
5114
5115
  async rerun(files, resetTestNamePattern) {
5116
+ if (!ctx.config.api.allowExec) return;
5115
5117
  await ctx.rerunFiles(files, void 0, true, resetTestNamePattern);
5116
5118
  },
5117
5119
  async rerunTask(id) {
5120
+ if (!ctx.config.api.allowExec) return;
5118
5121
  await ctx.rerunTask(id);
5119
5122
  },
5120
5123
  getConfig() {
@@ -5143,6 +5146,7 @@ function setup(ctx, _server) {
5143
5146
  return getModuleGraph(ctx, project, id, browser);
5144
5147
  },
5145
5148
  async updateSnapshot(file) {
5149
+ if (!ctx.config.api.allowExec || !ctx.config.api.allowWrite) return;
5146
5150
  if (!file) await ctx.updateSnapshot();
5147
5151
  else await ctx.updateSnapshot([file.filepath]);
5148
5152
  },
@@ -5705,6 +5709,12 @@ function serializeConfig(config, coreConfig, viteConfig) {
5705
5709
  pool: config.pool,
5706
5710
  expect: config.expect,
5707
5711
  snapshotSerializers: config.snapshotSerializers,
5712
+ api: ((api) => {
5713
+ return {
5714
+ allowExec: api?.allowExec,
5715
+ allowWrite: api?.allowWrite
5716
+ };
5717
+ })(config.browser.enabled ? config.browser.api : config.api),
5708
5718
  diff: config.diff,
5709
5719
  retry: config.retry,
5710
5720
  disableConsoleIntercept: config.disableConsoleIntercept,
@@ -9414,11 +9424,11 @@ class Vitest {
9414
9424
  async resolveProjects(cliOptions) {
9415
9425
  const names = /* @__PURE__ */ new Set();
9416
9426
  if (this.config.projects) {
9417
- if (typeof this.config.workspace !== "undefined") this.logger.warn("Both `config.projects` and `config.workspace` are defined. Ignoring the `workspace` option.");
9427
+ if (typeof this.config.workspace !== "undefined") this.logger.warn("Both `test.projects` and `test.workspace` are defined. Ignoring the `test.workspace` option.");
9418
9428
  return resolveProjects(this, cliOptions, void 0, this.config.projects, names);
9419
9429
  }
9420
9430
  if (Array.isArray(this.config.workspace)) {
9421
- this.logger.deprecate("The `workspace` option is deprecated and will be removed in the next major. To hide this warning, rename `workspace` option to `projects`.");
9431
+ this.logger.deprecate("The `test.workspace` option is deprecated and will be removed in the next major. To hide this warning, rename `test.workspace` option to `test.projects`.");
9422
9432
  return resolveProjects(this, cliOptions, void 0, this.config.workspace, names);
9423
9433
  }
9424
9434
  const workspaceConfigPath = await this.resolveWorkspaceConfigPath();
@@ -9432,7 +9442,7 @@ class Vitest {
9432
9442
  return resolveBrowserProjects(this, new Set([project.name]), [project]);
9433
9443
  }
9434
9444
  const configFile = this.vite.config.configFile ? resolve(this.vite.config.root, this.vite.config.configFile) : "the root config file";
9435
- this.logger.deprecate(`The workspace file is deprecated and will be removed in the next major. Please, use the \`projects\` field in ${configFile} instead.`);
9445
+ this.logger.deprecate(`The workspace file is deprecated and will be removed in the next major. Please, use the \`test.projects\` field in ${configFile} instead.`);
9436
9446
  const workspaceModule = await this.import(workspaceConfigPath);
9437
9447
  if (!workspaceModule.default || !Array.isArray(workspaceModule.default)) throw new TypeError(`Workspace config file "${workspaceConfigPath}" must export a default array of project paths.`);
9438
9448
  return resolveProjects(this, cliOptions, workspaceConfigPath, workspaceModule.default, names);
@@ -10149,6 +10159,9 @@ async function VitestPlugin(options = {}, vitest = new Vitest("test", deepClone(
10149
10159
  for (const name in envs) process.env[name] ??= envs[name];
10150
10160
  // don't watch files in run mode
10151
10161
  if (!options.watch) viteConfig.server.watch = null;
10162
+ if (options.ui)
10163
+ // @ts-expect-error mutate readonly
10164
+ viteConfig.plugins.push(await UIPlugin());
10152
10165
  Object.defineProperty(viteConfig, "_vitest", {
10153
10166
  value: options,
10154
10167
  enumerable: false,
@@ -10174,7 +10187,6 @@ async function VitestPlugin(options = {}, vitest = new Vitest("test", deepClone(
10174
10187
  ...CSSEnablerPlugin(vitest),
10175
10188
  CoverageTransform(vitest),
10176
10189
  VitestCoreResolver(vitest),
10177
- options.ui ? await UIPlugin() : null,
10178
10190
  ...MocksPlugins(),
10179
10191
  VitestOptimizer(),
10180
10192
  NormalizeURLPlugin()
@@ -10631,7 +10643,7 @@ const envPackageNames = {
10631
10643
  function getEnvPackageName(env) {
10632
10644
  if (env === "node") return null;
10633
10645
  if (env in envPackageNames) return envPackageNames[env];
10634
- if (env[0] === "." || env[0] === "/") return null;
10646
+ if (env[0] === "." || isAbsolute(env)) return null;
10635
10647
  return `vitest-environment-${env}`;
10636
10648
  }
10637
10649
 
@@ -162,6 +162,10 @@ interface SerializedConfig {
162
162
  showDiff?: boolean
163
163
  truncateThreshold?: number
164
164
  } | undefined;
165
+ api: {
166
+ allowExec: boolean | undefined
167
+ allowWrite: boolean | undefined
168
+ };
165
169
  diff: string | SerializedDiffOptions | undefined;
166
170
  retry: number;
167
171
  includeTaskLocation: boolean | undefined;
@@ -20,7 +20,7 @@ import * as nodeos from 'node:os';
20
20
  import nodeos__default from 'node:os';
21
21
  import { isatty } from 'node:tty';
22
22
  import EventEmitter from 'node:events';
23
- import { c as createBirpc } from './index.CJ0plNrh.js';
23
+ import { c as createBirpc } from './index.B521nVV-.js';
24
24
  import Tinypool$1, { Tinypool } from 'tinypool';
25
25
  import { w as wrapSerializableConfig, a as Typechecker } from './typechecker.DRKU1-1g.js';
26
26
  import { MessageChannel } from 'node:worker_threads';
@@ -2610,7 +2610,7 @@ function createForksPool(vitest, { execArgv, env }) {
2610
2610
  const threadsCount = vitest.config.watch ? Math.max(Math.floor(numCpus / 2), 1) : Math.max(numCpus - 1, 1);
2611
2611
  const poolOptions = vitest.config.poolOptions?.forks ?? {};
2612
2612
  const maxThreads = poolOptions.maxForks ?? vitest.config.maxWorkers ?? threadsCount;
2613
- const minThreads = poolOptions.minForks ?? vitest.config.minWorkers ?? threadsCount;
2613
+ const minThreads = poolOptions.minForks ?? vitest.config.minWorkers ?? Math.min(threadsCount, maxThreads);
2614
2614
  const worker = resolve(vitest.distPath, "workers/forks.js");
2615
2615
  const options = {
2616
2616
  runtime: "child_process",
@@ -2746,7 +2746,7 @@ function createThreadsPool(vitest, { execArgv, env }) {
2746
2746
  const threadsCount = vitest.config.watch ? Math.max(Math.floor(numCpus / 2), 1) : Math.max(numCpus - 1, 1);
2747
2747
  const poolOptions = vitest.config.poolOptions?.threads ?? {};
2748
2748
  const maxThreads = poolOptions.maxThreads ?? vitest.config.maxWorkers ?? threadsCount;
2749
- const minThreads = poolOptions.minThreads ?? vitest.config.minWorkers ?? threadsCount;
2749
+ const minThreads = poolOptions.minThreads ?? vitest.config.minWorkers ?? Math.min(threadsCount, maxThreads);
2750
2750
  const worker = resolve(vitest.distPath, "workers/threads.js");
2751
2751
  const options = {
2752
2752
  filename: resolve(vitest.distPath, "worker.js"),
@@ -3074,7 +3074,7 @@ function createVmForksPool(vitest, { execArgv, env }) {
3074
3074
  const threadsCount = vitest.config.watch ? Math.max(Math.floor(numCpus / 2), 1) : Math.max(numCpus - 1, 1);
3075
3075
  const poolOptions = vitest.config.poolOptions?.vmForks ?? {};
3076
3076
  const maxThreads = poolOptions.maxForks ?? vitest.config.maxWorkers ?? threadsCount;
3077
- const minThreads = poolOptions.maxForks ?? vitest.config.minWorkers ?? threadsCount;
3077
+ const minThreads = poolOptions.maxForks ?? vitest.config.minWorkers ?? Math.min(threadsCount, maxThreads);
3078
3078
  const worker = resolve(vitest.distPath, "workers/vmForks.js");
3079
3079
  const options = {
3080
3080
  runtime: "child_process",
@@ -3194,7 +3194,7 @@ function createVmThreadsPool(vitest, { execArgv, env }) {
3194
3194
  const threadsCount = vitest.config.watch ? Math.max(Math.floor(numCpus / 2), 1) : Math.max(numCpus - 1, 1);
3195
3195
  const poolOptions = vitest.config.poolOptions?.vmThreads ?? {};
3196
3196
  const maxThreads = poolOptions.maxThreads ?? vitest.config.maxWorkers ?? threadsCount;
3197
- const minThreads = poolOptions.minThreads ?? vitest.config.minWorkers ?? threadsCount;
3197
+ const minThreads = poolOptions.minThreads ?? vitest.config.minWorkers ?? Math.min(threadsCount, maxThreads);
3198
3198
  const worker = resolve(vitest.distPath, "workers/vmThreads.js");
3199
3199
  const options = {
3200
3200
  filename: resolve(vitest.distPath, "worker.js"),
@@ -3301,7 +3301,7 @@ function getDefaultPoolName(project) {
3301
3301
  }
3302
3302
  function getFilePoolName(project, file) {
3303
3303
  for (const [glob, pool] of project.config.poolMatchGlobs) {
3304
- if (pool === "browser") throw new Error("Since Vitest 0.31.0 \"browser\" pool is not supported in \"poolMatchGlobs\". You can create a project to run some of your tests in browser in parallel. Read more: https://vitest.dev/guide/projects");
3304
+ if (pool === "browser") throw new Error("Since Vitest 0.31.0 \"browser\" pool is not supported in `poolMatchGlobs`. You can create a project to run some of your tests in browser in parallel. Read more: https://vitest.dev/guide/projects");
3305
3305
  if (pm.isMatch(file, glob, { cwd: project.config.root })) return pool;
3306
3306
  }
3307
3307
  return getDefaultPoolName(project);
@@ -3396,7 +3396,10 @@ function createPool(ctx) {
3396
3396
  const Sequencer = ctx.config.sequence.sequencer;
3397
3397
  const sequencer = new Sequencer(ctx);
3398
3398
  async function sortSpecs(specs) {
3399
- if (ctx.config.shard) specs = await sequencer.shard(specs);
3399
+ if (ctx.config.shard) {
3400
+ if (!ctx.config.passWithNoTests && ctx.config.shard.count > specs.length) throw new Error(`--shard <count> must be a smaller than count of test files. Resolved ${specs.length} test files for --shard=${ctx.config.shard.index}/${ctx.config.shard.count}.`);
3401
+ specs = await sequencer.shard(specs);
3402
+ }
3400
3403
  return sequencer.sort(specs);
3401
3404
  }
3402
3405
  const sortedGroups = Array.from(groups).sort();
@@ -3511,7 +3514,7 @@ function parseInspector(inspect) {
3511
3514
  port: Number(port) || defaultInspectPort
3512
3515
  };
3513
3516
  }
3514
- function resolveApiServerConfig(options, defaultPort) {
3517
+ function resolveApiServerConfig(options, defaultPort, parentApi, logger) {
3515
3518
  let api;
3516
3519
  if (options.ui && !options.api) api = { port: defaultPort };
3517
3520
  else if (options.api === true) api = { port: defaultPort };
@@ -3524,6 +3527,14 @@ function resolveApiServerConfig(options, defaultPort) {
3524
3527
  if (api) {
3525
3528
  if (!api.port && !api.middlewareMode) api.port = defaultPort;
3526
3529
  } else api = { middlewareMode: true };
3530
+ if (!api.middlewareMode && api.host && api.host !== "localhost" && api.host !== "127.0.0.1") {
3531
+ if (parentApi && api.allowWrite == null && api.allowExec == null) logger?.error(c.yellow(`${c.yellowBright(" WARNING ")} API server is exposed to network, disabling write and exec operations by default for security reasons. This can cause some APIs to not work as expected. Set \`browser.api.allowExec\` manually to hide this warning. See https://vitest.dev/config/browser/api for more details.`));
3532
+ api.allowWrite ??= parentApi?.allowWrite ?? false;
3533
+ api.allowExec ??= parentApi?.allowExec ?? false;
3534
+ } else {
3535
+ api.allowWrite ??= parentApi?.allowWrite ?? true;
3536
+ api.allowExec ??= parentApi?.allowExec ?? true;
3537
+ }
3527
3538
  return api;
3528
3539
  }
3529
3540
  function resolveInlineWorkerOption(value) {
@@ -3767,7 +3778,7 @@ function resolveConfig$1(vitest, options, viteConfig) {
3767
3778
  // if passed down from the CLI and it's relative, resolve relative to CWD
3768
3779
  resolved.workspace = typeof options.workspace === "string" && options.workspace[0] === "." ? resolve$1(process.cwd(), options.workspace) : resolvePath(resolved.workspace, resolved.root);
3769
3780
  if (!builtinPools.includes(resolved.pool)) resolved.pool = resolvePath(resolved.pool, resolved.root);
3770
- if (resolved.poolMatchGlobs) logger.warn(c.yellow(`${c.inverse(c.yellow(" Vitest "))} "poolMatchGlobs" is deprecated. Use "workspace" to define different configurations instead.`));
3781
+ if (resolved.poolMatchGlobs) logger.deprecate("`poolMatchGlobs` is deprecated. Use `test.projects` to define different configurations instead.");
3771
3782
  resolved.poolMatchGlobs = (resolved.poolMatchGlobs || []).map(([glob, pool]) => {
3772
3783
  if (!builtinPools.includes(pool)) pool = resolvePath(pool, resolved.root);
3773
3784
  return [glob, pool];
@@ -3869,7 +3880,7 @@ function resolveConfig$1(vitest, options, viteConfig) {
3869
3880
  ...configDefaults.typecheck,
3870
3881
  ...resolved.typecheck
3871
3882
  };
3872
- if (resolved.environmentMatchGlobs) logger.warn(c.yellow(`${c.inverse(c.yellow(" Vitest "))} "environmentMatchGlobs" is deprecated. Use "workspace" to define different configurations instead.`));
3883
+ if (resolved.environmentMatchGlobs) logger.deprecate("\"environmentMatchGlobs\" is deprecated. Use `test.projects` to define different configurations instead.");
3873
3884
  resolved.environmentMatchGlobs = (resolved.environmentMatchGlobs || []).map((i) => [resolve$1(resolved.root, i[0]), i[1]]);
3874
3885
  resolved.typecheck ??= {};
3875
3886
  resolved.typecheck.enabled ??= false;
@@ -3896,7 +3907,7 @@ function resolveConfig$1(vitest, options, viteConfig) {
3896
3907
  resolved.browser.locators ??= {};
3897
3908
  resolved.browser.locators.testIdAttribute ??= "data-testid";
3898
3909
  if (resolved.browser.enabled && provider === "stackblitz") resolved.browser.provider = "preview";
3899
- resolved.browser.api = resolveApiServerConfig(resolved.browser, defaultBrowserPort) || { port: defaultBrowserPort };
3910
+ resolved.browser.api = resolveApiServerConfig(resolved.browser, defaultBrowserPort, resolved.api, logger) || { port: defaultBrowserPort };
3900
3911
  // enable includeTaskLocation by default in UI mode
3901
3912
  if (resolved.browser.enabled) {
3902
3913
  if (resolved.browser.ui) resolved.includeTaskLocation ??= true;
@@ -29,8 +29,10 @@ function createBirpc(functions, options) {
29
29
  return functions;
30
30
  if (method === "$close")
31
31
  return close;
32
+ if (method === "$closed")
33
+ return closed;
32
34
  if (method === "then" && !eventNames.includes("then") && !("then" in functions))
33
- return void 0;
35
+ return undefined;
34
36
  const sendEvent = (...args) => {
35
37
  post(serialize({ m: method, a: args, t: TYPE_REQUEST }));
36
38
  };
@@ -45,7 +47,7 @@ function createBirpc(functions, options) {
45
47
  try {
46
48
  await _promise;
47
49
  } finally {
48
- _promise = void 0;
50
+ _promise = undefined;
49
51
  }
50
52
  }
51
53
  return new Promise((resolve, reject) => {
@@ -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 } from './index.CX5aIIXH.js';
5
+ import { g as getStateSymbol, t as truncateString, F as F_RIGHT, D as DefaultReporter, f as formatProjectName } from './index.VByaPkjc.js';
6
6
  import { stripVTControlCharacters } from 'node:util';
7
7
  import { notNullish } from '@vitest/utils';
8
8
 
@@ -2,7 +2,7 @@ import * as chai from 'chai';
2
2
  import { resolve } from 'node:path';
3
3
  import { l as loadDiffConfig, b as loadSnapshotSerializers, t as takeCoverageInsideWorker } from './setup-common.Dd054P77.js';
4
4
  import { distDir } from '../path.js';
5
- import { r as rpc } from './rpc.Iovn4oWe.js';
5
+ import { r as rpc } from './rpc.-pEldfrD.js';
6
6
  import { g as getWorkerState } from './utils.XdZDrNZV.js';
7
7
 
8
8
  function setupChaiConfig(config) {
@@ -1,5 +1,5 @@
1
1
  import { performance as performance$1 } from 'node:perf_hooks';
2
- import { getTestName, hasFailed, getFullName, getTests, getSuites, getTasks } from '@vitest/runner/utils';
2
+ import { getTestName, getFullName, hasFailed, getTests, getSuites, getTasks } from '@vitest/runner/utils';
3
3
  import { slash, toArray, isPrimitive, inspect, positionToOffset, lineSplitRE } from '@vitest/utils';
4
4
  import { parseStacktrace, parseErrorStacktrace } from '@vitest/utils/source-map';
5
5
  import { isAbsolute, relative, dirname, basename, resolve, normalize } from 'pathe';
@@ -299,6 +299,9 @@ class BaseReporter {
299
299
  getTestName(test, separator) {
300
300
  return getTestName(test, separator);
301
301
  }
302
+ getFullName(test, separator) {
303
+ return getFullName(test, separator);
304
+ }
302
305
  formatShortError(error) {
303
306
  return `${F_RIGHT} ${error.message}`;
304
307
  }
@@ -361,7 +364,7 @@ class BaseReporter {
361
364
  const write = (msg) => output.write(msg);
362
365
  let headerText = "unknown test";
363
366
  const task = log.taskId ? this.ctx.state.idMap.get(log.taskId) : void 0;
364
- if (task) headerText = getFullName(task, c.dim(" > "));
367
+ if (task) headerText = this.getFullName(task, c.dim(" > "));
365
368
  else if (log.taskId && log.taskId !== "__vitest__unknown_test__") headerText = log.taskId;
366
369
  write(c.gray(log.type + c.dim(` | ${headerText}\n`)) + log.content);
367
370
  if (log.origin) {
@@ -469,7 +472,7 @@ class BaseReporter {
469
472
  for (const bench of topBenches) {
470
473
  const group = bench.suite || bench.file;
471
474
  if (!group) continue;
472
- const groupName = getFullName(group, c.dim(" > "));
475
+ const groupName = this.getFullName(group, c.dim(" > "));
473
476
  const project = this.ctx.projects.find((p) => p.name === bench.file.projectName);
474
477
  this.log(` ${formatProjectName(project)}${bench.name}${c.dim(` - ${groupName}`)}`);
475
478
  const siblings = group.tasks.filter((i) => i.meta.benchmark && i.result?.benchmark && i !== bench).sort((a, b) => a.result.benchmark.rank - b.result.benchmark.rank);
@@ -502,7 +505,7 @@ class BaseReporter {
502
505
  const filepath = task?.filepath || "";
503
506
  const projectName = task?.projectName || task.file?.projectName || "";
504
507
  const project = this.ctx.projects.find((p) => p.name === projectName);
505
- let name = getFullName(task, c.dim(" > "));
508
+ let name = this.getFullName(task, c.dim(" > "));
506
509
  if (filepath) name += c.dim(` [ ${this.relative(filepath)} ]`);
507
510
  this.ctx.logger.error(`${c.bgRed(c.bold(" FAIL "))} ${formatProjectName(project)}${name}`);
508
511
  }
@@ -1364,7 +1367,7 @@ function printErrorInner(error, project, options) {
1364
1367
  const stacks = options.parseErrorStacktrace(e);
1365
1368
  const nearest = error instanceof TypeCheckError ? error.stacks[0] : stacks.find((stack) => {
1366
1369
  try {
1367
- return project.server && project.getModuleById(stack.file) && existsSync(stack.file);
1370
+ return project._vite && project.getModuleById(stack.file) && existsSync(stack.file);
1368
1371
  } catch {
1369
1372
  return false;
1370
1373
  }
@@ -6,8 +6,8 @@ import { TransformResult as TransformResult$1, UserConfig as UserConfig$1, DepOp
6
6
  import { Console } from 'node:console';
7
7
  import { MockedModule } from '@vitest/mocker';
8
8
  import { StackTraceParserOptions } from '@vitest/utils/source-map';
9
- import { T as TestExecutionMethod } from './worker.d.tQu2eJQy.js';
10
- import { a as SerializedConfig, F as FakeTimerInstallOpts } from './config.d.D2ROskhv.js';
9
+ import { T as TestExecutionMethod } from './worker.d.CUgIPz9V.js';
10
+ import { a as SerializedConfig, F as FakeTimerInstallOpts } from './config.d.BKdhh7Zx.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';
@@ -676,6 +676,7 @@ declare abstract class BaseReporter implements Reporter {
676
676
  private getModuleLog;
677
677
  protected printTestSuite(_suite: TestSuite): void;
678
678
  protected getTestName(test: Task, separator?: string): string;
679
+ protected getFullName(test: Task, separator?: string): string;
679
680
  protected formatShortError(error: ErrorWithDiff): string;
680
681
  protected getTestIndentation(_test: Task): string;
681
682
  protected printAnnotations(test: TestCase, console: "log" | "error", padding?: number): void;
@@ -1041,15 +1042,15 @@ declare const BenchmarkReportsMap: {
1041
1042
  type BenchmarkBuiltinReporters = keyof typeof BenchmarkReportsMap;
1042
1043
 
1043
1044
  declare const ReportersMap: {
1044
- "default": typeof DefaultReporter
1045
- "basic": typeof BasicReporter
1046
- "blob": typeof BlobReporter
1047
- "verbose": typeof VerboseReporter
1048
- "dot": typeof DotReporter
1049
- "json": typeof JsonReporter
1050
- "tap": typeof TapReporter
1045
+ default: typeof DefaultReporter
1046
+ basic: typeof BasicReporter
1047
+ blob: typeof BlobReporter
1048
+ verbose: typeof VerboseReporter
1049
+ dot: typeof DotReporter
1050
+ json: typeof JsonReporter
1051
+ tap: typeof TapReporter
1051
1052
  "tap-flat": typeof TapFlatReporter
1052
- "junit": typeof JUnitReporter
1053
+ junit: typeof JUnitReporter
1053
1054
  "hanging-process": typeof HangingProcessReporter
1054
1055
  "github-actions": typeof GithubActionsReporter
1055
1056
  };
@@ -1452,7 +1453,20 @@ type BuiltinEnvironment = "node" | "jsdom" | "happy-dom" | "edge-runtime";
1452
1453
  type VitestEnvironment = BuiltinEnvironment | (string & Record<never, never>);
1453
1454
 
1454
1455
  type CSSModuleScopeStrategy = "stable" | "scoped" | "non-scoped";
1455
- type ApiConfig = Pick<ServerOptions, "port" | "strictPort" | "host" | "middlewareMode">;
1456
+ type ApiConfig = Pick<ServerOptions, "port" | "strictPort" | "host" | "middlewareMode"> & {
1457
+ /**
1458
+ * Allow any write operations from the API server.
1459
+ *
1460
+ * @default true if API is not exposed to the network, false otherwise
1461
+ */
1462
+ allowWrite?: boolean
1463
+ /**
1464
+ * Allow running test files via the API.
1465
+ *
1466
+ * @default true if API is not exposed to the network, false otherwise
1467
+ */
1468
+ allowExec?: boolean
1469
+ };
1456
1470
 
1457
1471
  type VitestRunMode = "test" | "benchmark";
1458
1472
  interface ProjectName {
@@ -1,5 +1,5 @@
1
1
  import { getSafeTimers } from '@vitest/utils';
2
- import { c as createBirpc } from './index.CJ0plNrh.js';
2
+ import { c as createBirpc } from './index.B521nVV-.js';
3
3
  import { g as getWorkerState } from './utils.XdZDrNZV.js';
4
4
 
5
5
  const { get } = Reflect;
@@ -1,6 +1,6 @@
1
1
  import { performance } from 'node:perf_hooks';
2
2
  import { startTests, collectTests } from '@vitest/runner';
3
- import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './index.BbB8_kAK.js';
3
+ import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './index.CwejwG0H.js';
4
4
  import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './setup-common.Dd054P77.js';
5
5
  import { a as globalExpect, v as vi } from './vi.bdSIJ99Y.js';
6
6
  import { c as closeInspector } from './inspector.C914Efll.js';
@@ -17,8 +17,8 @@ import 'chai';
17
17
  import 'node:path';
18
18
  import '../path.js';
19
19
  import 'node:url';
20
- import './rpc.Iovn4oWe.js';
21
- import './index.CJ0plNrh.js';
20
+ import './rpc.-pEldfrD.js';
21
+ import './index.B521nVV-.js';
22
22
  import './coverage.DVF1vEu8.js';
23
23
  import '@vitest/snapshot';
24
24
  import '@vitest/expect';
@@ -1,5 +1,5 @@
1
1
  import { HookHandler } from 'vite';
2
- import { V as Vitest, T as TestProject, b as TestProjectConfiguration, I as InlineConfig } from './reporters.d.DL9pg5DB.js';
2
+ import { V as Vitest, T as TestProject, b as TestProjectConfiguration, I as InlineConfig } from './reporters.d.BuRON0I0.js';
3
3
 
4
4
  interface VitestPluginContext {
5
5
  vitest: Vitest;
@@ -1,6 +1,6 @@
1
1
  import { File, TestAnnotation, TaskResultPack, TaskEventPack, CancelReason, FileSpecification, Task } from '@vitest/runner';
2
2
  import { ViteNodeResolveId, ModuleCacheMap, ModuleExecutionInfo } from 'vite-node';
3
- import { a as SerializedConfig } from './config.d.D2ROskhv.js';
3
+ import { a as SerializedConfig } from './config.d.BKdhh7Zx.js';
4
4
  import { T as TransformMode, U as UserConsoleLog, A as AfterSuiteRunMeta, E as Environment } from './environment.d.cL3nLXbE.js';
5
5
  import { SnapshotResult } from '@vitest/snapshot';
6
6
 
@@ -92,6 +92,7 @@ type BirpcReturn<RemoteFunctions, LocalFunctions = Record<string, never>> = {
92
92
  } & {
93
93
  $functions: LocalFunctions;
94
94
  $close: (error?: Error) => void;
95
+ $closed: boolean;
95
96
  };
96
97
 
97
98
  interface RuntimeRPC {
@@ -1,5 +1,5 @@
1
1
  import { MessagePort } from 'node:worker_threads';
2
- import { C as ContextRPC } from './worker.d.tQu2eJQy.js';
2
+ import { C as ContextRPC } from './worker.d.CUgIPz9V.js';
3
3
 
4
4
  interface WorkerContext extends ContextRPC {
5
5
  port: MessagePort;
package/dist/cli.js CHANGED
@@ -1,10 +1,10 @@
1
- import { c as createCLI } from './chunks/cac.Cs_fZ7zn.js';
1
+ import { c as createCLI } from './chunks/cac.SLIZ-C4n.js';
2
2
  import '@vitest/utils';
3
3
  import 'events';
4
4
  import 'pathe';
5
5
  import 'tinyrainbow';
6
6
  import './chunks/constants.DnKduX2e.js';
7
- import './chunks/index.CX5aIIXH.js';
7
+ import './chunks/index.VByaPkjc.js';
8
8
  import 'node:perf_hooks';
9
9
  import '@vitest/runner/utils';
10
10
  import '@vitest/utils/source-map';
package/dist/config.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import { UserConfig as UserConfig$1, ConfigEnv } from 'vite';
2
2
  export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
3
- import { c as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport, b as TestProjectConfiguration } from './chunks/reporters.d.DL9pg5DB.js';
4
- export { f as TestProjectInlineConfiguration, g as WatcherTriggerPattern, W as WorkspaceProjectConfiguration } from './chunks/reporters.d.DL9pg5DB.js';
5
- import './chunks/vite.d.CtvOcEqC.js';
6
- import { F as FakeTimerInstallOpts } from './chunks/config.d.D2ROskhv.js';
3
+ import { c as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport, b as TestProjectConfiguration } from './chunks/reporters.d.BuRON0I0.js';
4
+ export { f as TestProjectInlineConfiguration, g as WatcherTriggerPattern, W as WorkspaceProjectConfiguration } from './chunks/reporters.d.BuRON0I0.js';
5
+ import './chunks/vite.d.BnOPPc46.js';
6
+ import { F as FakeTimerInstallOpts } from './chunks/config.d.BKdhh7Zx.js';
7
7
  import '@vitest/runner';
8
8
  import './chunks/environment.d.cL3nLXbE.js';
9
9
  import 'vitest/optional-types.js';
@@ -12,7 +12,7 @@ import 'node:stream';
12
12
  import 'node:console';
13
13
  import '@vitest/mocker';
14
14
  import '@vitest/utils/source-map';
15
- import './chunks/worker.d.tQu2eJQy.js';
15
+ import './chunks/worker.d.CUgIPz9V.js';
16
16
  import 'vite-node';
17
17
  import '@vitest/snapshot';
18
18
  import '@vitest/pretty-format';
@@ -1,4 +1,4 @@
1
- import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.DL9pg5DB.js';
1
+ import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.BuRON0I0.js';
2
2
  import { TransformResult } from 'vite';
3
3
  import { A as AfterSuiteRunMeta } from './chunks/environment.d.cL3nLXbE.js';
4
4
  import '@vitest/runner';
@@ -7,9 +7,9 @@ import 'node:stream';
7
7
  import 'node:console';
8
8
  import '@vitest/mocker';
9
9
  import '@vitest/utils/source-map';
10
- import './chunks/worker.d.tQu2eJQy.js';
10
+ import './chunks/worker.d.CUgIPz9V.js';
11
11
  import 'vite-node';
12
- import './chunks/config.d.D2ROskhv.js';
12
+ import './chunks/config.d.BKdhh7Zx.js';
13
13
  import '@vitest/pretty-format';
14
14
  import '@vitest/snapshot';
15
15
  import '@vitest/snapshot/environment';
package/dist/coverage.js CHANGED
@@ -1,4 +1,4 @@
1
- export { B as BaseCoverageProvider } from './chunks/coverage.D1a3dTnj.js';
1
+ export { B as BaseCoverageProvider } from './chunks/coverage.DfSpMS-b.js';
2
2
  import 'node:fs';
3
3
  import 'pathe';
4
4
  import 'picomatch';
@@ -21,7 +21,7 @@ import 'vite';
21
21
  import './chunks/constants.DnKduX2e.js';
22
22
  import 'node:tty';
23
23
  import 'node:events';
24
- import './chunks/index.CJ0plNrh.js';
24
+ import './chunks/index.B521nVV-.js';
25
25
  import 'tinypool';
26
26
  import './chunks/typechecker.DRKU1-1g.js';
27
27
  import 'node:perf_hooks';
package/dist/execute.d.ts CHANGED
@@ -1,11 +1,11 @@
1
1
  import { ViteNodeRunnerOptions } from 'vite-node';
2
2
  import { ViteNodeRunner, ModuleExecutionInfo } from 'vite-node/client';
3
- import { R as RuntimeRPC, W as WorkerGlobalState } from './chunks/worker.d.tQu2eJQy.js';
3
+ import { R as RuntimeRPC, W as WorkerGlobalState } from './chunks/worker.d.CUgIPz9V.js';
4
4
  import vm from 'node:vm';
5
5
  import { MockedModule, MockedModuleType } from '@vitest/mocker';
6
6
  import { P as PendingSuiteMock, b as MockFactory, a as MockOptions } from './chunks/mocker.d.BE_2ls6u.js';
7
7
  import '@vitest/runner';
8
- import './chunks/config.d.D2ROskhv.js';
8
+ import './chunks/config.d.BKdhh7Zx.js';
9
9
  import '@vitest/pretty-format';
10
10
  import '@vitest/snapshot';
11
11
  import '@vitest/snapshot/environment';
package/dist/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
1
  import { File as File$1, TestAnnotation, TaskResultPack as TaskResultPack$1, TaskEventPack, TaskPopulated, Suite as Suite$1, Test as Test$1, Custom as Custom$1, Task as Task$1, TaskBase as TaskBase$1, TaskResult as TaskResult$1, DoneCallback as DoneCallback$1, RuntimeContext as RuntimeContext$1, SuiteHooks as SuiteHooks$1, SequenceHooks as SequenceHooks$1, SequenceSetupFiles as SequenceSetupFiles$1 } from '@vitest/runner';
2
2
  export { CancelReason, ExtendedContext, HookCleanupCallback, HookListener, ImportDuration, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Custom as RunnerCustomCase, 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, TaskContext, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestAnnotation, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
3
- import { S as SerializedTestSpecification, h as CoverageProvider$1, a as ReportContext$1, i as CoverageProviderModule$1, j as CoverageReporter$1, k as CoverageProviderName, l as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, m as CoverageIstanbulOptions$1, c as CoverageV8Options$1, n as CustomProviderOptions$1, o as Reporter$1, V as Vitest$1, p as BrowserScript$1, q as BrowserConfigOptions$1, r as BuiltinEnvironment$1, s as VitestEnvironment$1, P as Pool$1, t as PoolOptions$1, u as CSSModuleScopeStrategy$1, A as ApiConfig$1, v as VitestRunMode$1, D as DepsOptimizationOptions$1, w as TransformModePatterns$1, I as InlineConfig$1, x as TypecheckConfig$1, y as UserConfig$1, z as ResolvedConfig$1, E as ProjectConfig$1, U as UserWorkspaceConfig$1, F as BenchmarkUserOptions$1 } from './chunks/reporters.d.DL9pg5DB.js';
4
- export { G as BrowserTesterOptions } from './chunks/reporters.d.DL9pg5DB.js';
5
- import { W as WorkerContext$1 } from './chunks/worker.d.DvqK5Vmu.js';
3
+ import { S as SerializedTestSpecification, h as CoverageProvider$1, a as ReportContext$1, i as CoverageProviderModule$1, j as CoverageReporter$1, k as CoverageProviderName, l as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, m as CoverageIstanbulOptions$1, c as CoverageV8Options$1, n as CustomProviderOptions$1, o as Reporter$1, V as Vitest$1, p as BrowserScript$1, q as BrowserConfigOptions$1, r as BuiltinEnvironment$1, s as VitestEnvironment$1, P as Pool$1, t as PoolOptions$1, u as CSSModuleScopeStrategy$1, A as ApiConfig$1, v as VitestRunMode$1, D as DepsOptimizationOptions$1, w as TransformModePatterns$1, I as InlineConfig$1, x as TypecheckConfig$1, y as UserConfig$1, z as ResolvedConfig$1, E as ProjectConfig$1, U as UserWorkspaceConfig$1, F as BenchmarkUserOptions$1 } from './chunks/reporters.d.BuRON0I0.js';
4
+ export { G as BrowserTesterOptions } from './chunks/reporters.d.BuRON0I0.js';
5
+ import { W as WorkerContext$1 } from './chunks/worker.d.uzWsCv9X.js';
6
6
  import { R as RawErrsMap$1, T as TscErrorInfo$1, C as CollectLineNumbers$1, a as CollectLines$1, b as RootAndTarget$1, c as Context$1 } from './chunks/global.d.MAmajcmJ.js';
7
7
  import { b as Awaitable$1, U as UserConsoleLog, L as LabelColor, M as ModuleGraphData, P as ProvidedContext, N as Nullable$1, c as Arrayable$1, d as ArgumentsType$1, e as MutableArray$1, C as Constructable$1, a as EnvironmentReturn$1, V as VmEnvironmentReturn$1, E as Environment$1, R as ResolvedTestEnvironment$1, J as JSDOMOptions$1, H as HappyDOMOptions$1, f as EnvironmentOptions$1 } from './chunks/environment.d.cL3nLXbE.js';
8
8
  export { A as AfterSuiteRunMeta, g as ModuleCache } from './chunks/environment.d.cL3nLXbE.js';
9
- import { a as BirpcReturn, b as WorkerRPC$1 } from './chunks/worker.d.tQu2eJQy.js';
10
- export { C as ContextRPC, d as ContextTestEnvironment, e as ResolveIdFunction, c as RunnerRPC, R as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.tQu2eJQy.js';
11
- import './chunks/vite.d.CtvOcEqC.js';
12
- import { a as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.D2ROskhv.js';
13
- export { b as RuntimeConfig, S as SerializedCoverageConfig } from './chunks/config.d.D2ROskhv.js';
9
+ import { a as BirpcReturn, b as WorkerRPC$1 } from './chunks/worker.d.CUgIPz9V.js';
10
+ export { C as ContextRPC, d as ContextTestEnvironment, e as ResolveIdFunction, c as RunnerRPC, R as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.CUgIPz9V.js';
11
+ import './chunks/vite.d.BnOPPc46.js';
12
+ import { a as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.BKdhh7Zx.js';
13
+ export { b as RuntimeConfig, S as SerializedCoverageConfig } from './chunks/config.d.BKdhh7Zx.js';
14
14
  import { ExpectStatic } from '@vitest/expect';
15
15
  export { Assertion, AsymmetricMatchersContaining, DeeplyAllowMatchers, ExpectPollOptions, ExpectStatic, JestAssertion, Matchers } from '@vitest/expect';
16
16
  import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
package/dist/node.d.ts CHANGED
@@ -1,21 +1,21 @@
1
- import { z as ResolvedConfig, y as UserConfig, v as VitestRunMode, H as VitestOptions, V as Vitest, A as ApiConfig, T as TestProject, J as TestSequencer, K as TestSpecification, L as Logger, M as TestModule, N as ModuleDiagnostic } from './chunks/reporters.d.DL9pg5DB.js';
2
- export { B as BaseCoverageOptions, F as BenchmarkUserOptions, ag as BrowserBuiltinProvider, ah as BrowserCommand, ai as BrowserCommandContext, q as BrowserConfigOptions, aj as BrowserInstanceOption, ak as BrowserModuleMocker, al as BrowserOrchestrator, am as BrowserProvider, an as BrowserProviderInitializationOptions, ao as BrowserProviderModule, ap as BrowserProviderOptions, p as BrowserScript, aq as BrowserServerState, ar as BrowserServerStateSession, r as BuiltinEnvironment, as as CDPSession, u as CSSModuleScopeStrategy, m as CoverageIstanbulOptions, l as CoverageOptions, h as CoverageProvider, i as CoverageProviderModule, j as CoverageReporter, c as CoverageV8Options, n as CustomProviderOptions, D as DepsOptimizationOptions, a0 as HTMLOptions, I as InlineConfig, a2 as JUnitOptions, a1 as JsonOptions, O as OnServerRestartHandler, Q as OnTestsRerunHandler, at as ParentProjectBrowser, P as Pool, t as PoolOptions, Y as ProcessPool, au as ProjectBrowser, E as ProjectConfig, a as ReportContext, aA as ReportedHookContext, o as Reporter, ax as ResolveSnapshotPathHandler, ay as ResolveSnapshotPathHandlerContext, av as ResolvedBrowserOptions, R as ResolvedCoverageOptions, aw as ResolvedProjectConfig, $ as SerializedTestProject, a3 as TaskOptions, a4 as TestCase, a5 as TestCollection, a6 as TestDiagnostic, a7 as TestModuleState, a8 as TestResult, a9 as TestResultFailed, aa as TestResultPassed, ab as TestResultSkipped, aB as TestRunEndReason, az as TestRunResult, af as TestSequencerConstructor, ac as TestState, ad as TestSuite, ae as TestSuiteState, w as TransformModePatterns, x as TypecheckConfig, U as UserWorkspaceConfig, s as VitestEnvironment, X as VitestPackageInstaller, g as WatcherTriggerPattern, Z as WorkspaceSpec, _ as getFilePoolName } from './chunks/reporters.d.DL9pg5DB.js';
1
+ import { z as ResolvedConfig, y as UserConfig, v as VitestRunMode, H as VitestOptions, V as Vitest, A as ApiConfig, L as Logger, T as TestProject, J as TestSequencer, K as TestSpecification, M as TestModule, N as ModuleDiagnostic } from './chunks/reporters.d.BuRON0I0.js';
2
+ export { B as BaseCoverageOptions, F as BenchmarkUserOptions, ag as BrowserBuiltinProvider, ah as BrowserCommand, ai as BrowserCommandContext, q as BrowserConfigOptions, aj as BrowserInstanceOption, ak as BrowserModuleMocker, al as BrowserOrchestrator, am as BrowserProvider, an as BrowserProviderInitializationOptions, ao as BrowserProviderModule, ap as BrowserProviderOptions, p as BrowserScript, aq as BrowserServerState, ar as BrowserServerStateSession, r as BuiltinEnvironment, as as CDPSession, u as CSSModuleScopeStrategy, m as CoverageIstanbulOptions, l as CoverageOptions, h as CoverageProvider, i as CoverageProviderModule, j as CoverageReporter, c as CoverageV8Options, n as CustomProviderOptions, D as DepsOptimizationOptions, a0 as HTMLOptions, I as InlineConfig, a2 as JUnitOptions, a1 as JsonOptions, O as OnServerRestartHandler, Q as OnTestsRerunHandler, at as ParentProjectBrowser, P as Pool, t as PoolOptions, Y as ProcessPool, au as ProjectBrowser, E as ProjectConfig, a as ReportContext, aA as ReportedHookContext, o as Reporter, ax as ResolveSnapshotPathHandler, ay as ResolveSnapshotPathHandlerContext, av as ResolvedBrowserOptions, R as ResolvedCoverageOptions, aw as ResolvedProjectConfig, $ as SerializedTestProject, a3 as TaskOptions, a4 as TestCase, a5 as TestCollection, a6 as TestDiagnostic, a7 as TestModuleState, a8 as TestResult, a9 as TestResultFailed, aa as TestResultPassed, ab as TestResultSkipped, aB as TestRunEndReason, az as TestRunResult, af as TestSequencerConstructor, ac as TestState, ad as TestSuite, ae as TestSuiteState, w as TransformModePatterns, x as TypecheckConfig, U as UserWorkspaceConfig, s as VitestEnvironment, X as VitestPackageInstaller, g as WatcherTriggerPattern, Z as WorkspaceSpec, _ as getFilePoolName } from './chunks/reporters.d.BuRON0I0.js';
3
3
  import * as vite from 'vite';
4
4
  import { InlineConfig, UserConfig as UserConfig$1, Plugin, ResolvedConfig as ResolvedConfig$1, LogLevel, LoggerOptions, Logger as Logger$1 } from 'vite';
5
5
  export { vite as Vite };
6
- export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
6
+ export { esbuildVersion, isCSSRequest, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
7
7
  import { IncomingMessage } from 'node:http';
8
- import { R as RuntimeRPC } from './chunks/worker.d.tQu2eJQy.js';
9
- export { T as TestExecutionType } from './chunks/worker.d.tQu2eJQy.js';
8
+ import { R as RuntimeRPC } from './chunks/worker.d.CUgIPz9V.js';
9
+ export { T as TestExecutionType } from './chunks/worker.d.CUgIPz9V.js';
10
10
  import { Writable } from 'node:stream';
11
- export { V as VitestPluginContext } from './chunks/vite.d.CtvOcEqC.js';
12
- export { W as WorkerContext } from './chunks/worker.d.DvqK5Vmu.js';
11
+ export { V as VitestPluginContext } from './chunks/vite.d.BnOPPc46.js';
12
+ export { W as WorkerContext } from './chunks/worker.d.uzWsCv9X.js';
13
13
  export { C as TypeCheckCollectLineNumbers, a as TypeCheckCollectLines, c as TypeCheckContext, T as TypeCheckErrorInfo, R as TypeCheckRawErrorsMap, b as TypeCheckRootAndTarget } from './chunks/global.d.MAmajcmJ.js';
14
14
  import { Debugger } from 'debug';
15
15
  export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
16
16
  export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions } from './chunks/environment.d.cL3nLXbE.js';
17
17
  export { SerializedError } from '@vitest/utils';
18
- export { b as RuntimeConfig } from './chunks/config.d.D2ROskhv.js';
18
+ export { b as RuntimeConfig } from './chunks/config.d.BKdhh7Zx.js';
19
19
  export { generateFileHash } from '@vitest/runner/utils';
20
20
  import 'node:console';
21
21
  import '@vitest/mocker';
@@ -80,7 +80,7 @@ declare function parseCLI(argv: string | string[], config?: CliParseOptions): {
80
80
  options: CliOptions
81
81
  };
82
82
 
83
- declare function resolveApiServerConfig<Options extends ApiConfig & UserConfig>(options: Options, defaultPort: number): ApiConfig | undefined;
83
+ declare function resolveApiServerConfig<Options extends ApiConfig & UserConfig>(options: Options, defaultPort: number, parentApi?: ApiConfig, logger?: Logger): ApiConfig | undefined;
84
84
 
85
85
  declare function createVitest(mode: VitestRunMode, options: CliOptions, viteOverrides?: UserConfig$1, vitestOptions?: VitestOptions): Promise<Vitest>;
86
86
 
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
- export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
4
- import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.C37Ou0i1.js';
5
- export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, e as createViteLogger, c as createVitest, i as isValidApiRequest, d as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.C37Ou0i1.js';
6
- export { p as parseCLI } from './chunks/cac.Cs_fZ7zn.js';
7
- import { r as resolveConfig$2 } from './chunks/coverage.D1a3dTnj.js';
8
- export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.D1a3dTnj.js';
3
+ export { esbuildVersion, isCSSRequest, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
4
+ import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.OeDE3qqq.js';
5
+ export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, e as createViteLogger, c as createVitest, i as isValidApiRequest, d as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.OeDE3qqq.js';
6
+ export { p as parseCLI } from './chunks/cac.SLIZ-C4n.js';
7
+ import { r as resolveConfig$2 } from './chunks/coverage.DfSpMS-b.js';
8
+ export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.DfSpMS-b.js';
9
9
  import { slash, deepClone } from '@vitest/utils';
10
10
  import { f as findUp } from './chunks/index.X0nbfr6-.js';
11
11
  import { resolve } from 'pathe';
@@ -19,8 +19,8 @@ import 'node:path';
19
19
  import '@vitest/snapshot/manager';
20
20
  import 'vite-node/client';
21
21
  import 'vite-node/server';
22
- import './chunks/index.CJ0plNrh.js';
23
- import './chunks/index.CX5aIIXH.js';
22
+ import './chunks/index.B521nVV-.js';
23
+ import './chunks/index.VByaPkjc.js';
24
24
  import 'node:perf_hooks';
25
25
  import '@vitest/utils/source-map';
26
26
  import 'tinyrainbow';
@@ -53,7 +53,7 @@ import 'vite-node/utils';
53
53
  import '@vitest/mocker/node';
54
54
  import './chunks/defaults.B7q_naMc.js';
55
55
  import 'magic-string';
56
- import './chunks/index.CSxmp_dI.js';
56
+ import './chunks/index.BCWujgDG.js';
57
57
  import 'node:assert';
58
58
  import '@vitest/utils/error';
59
59
  import 'node:readline';
@@ -1,4 +1,4 @@
1
- export { aQ as BaseReporter, aC as BasicReporter, aR as BenchmarkBuiltinReporters, aD as BenchmarkReporter, aE as BenchmarkReportsMap, aS as BuiltinReporterOptions, aT as BuiltinReporters, aF as DefaultReporter, aG as DotReporter, aH as GithubActionsReporter, aI as HangingProcessReporter, aK as JUnitReporter, aU as JsonAssertionResult, aJ as JsonReporter, aV as JsonTestResult, aW as JsonTestResults, aA as ReportedHookContext, o as Reporter, aL as ReportersMap, aM as TapFlatReporter, aN as TapReporter, aB as TestRunEndReason, aO as VerboseBenchmarkReporter, aP as VerboseReporter } from './chunks/reporters.d.DL9pg5DB.js';
1
+ export { aQ as BaseReporter, aC as BasicReporter, aR as BenchmarkBuiltinReporters, aD as BenchmarkReporter, aE as BenchmarkReportsMap, aS as BuiltinReporterOptions, aT as BuiltinReporters, aF as DefaultReporter, aG as DotReporter, aH as GithubActionsReporter, aI as HangingProcessReporter, aK as JUnitReporter, aU as JsonAssertionResult, aJ as JsonReporter, aV as JsonTestResult, aW as JsonTestResults, aA as ReportedHookContext, o as Reporter, aL as ReportersMap, aM as TapFlatReporter, aN as TapReporter, aB as TestRunEndReason, aO as VerboseBenchmarkReporter, aP as VerboseReporter } from './chunks/reporters.d.BuRON0I0.js';
2
2
  import '@vitest/runner';
3
3
  import './chunks/environment.d.cL3nLXbE.js';
4
4
  import 'vitest/optional-types.js';
@@ -8,9 +8,9 @@ import 'vite';
8
8
  import 'node:console';
9
9
  import '@vitest/mocker';
10
10
  import '@vitest/utils/source-map';
11
- import './chunks/worker.d.tQu2eJQy.js';
11
+ import './chunks/worker.d.CUgIPz9V.js';
12
12
  import 'vite-node';
13
- import './chunks/config.d.D2ROskhv.js';
13
+ import './chunks/config.d.BKdhh7Zx.js';
14
14
  import '@vitest/pretty-format';
15
15
  import '@vitest/snapshot';
16
16
  import '@vitest/snapshot/environment';
package/dist/reporters.js CHANGED
@@ -1,5 +1,5 @@
1
- export { B as BasicReporter, 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.CX5aIIXH.js';
2
- export { B as BenchmarkReporter, a as BenchmarkReportsMap, V as VerboseBenchmarkReporter } from './chunks/index.CSxmp_dI.js';
1
+ export { B as BasicReporter, 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.VByaPkjc.js';
2
+ export { B as BenchmarkReporter, a as BenchmarkReportsMap, V as VerboseBenchmarkReporter } from './chunks/index.BCWujgDG.js';
3
3
  import 'node:perf_hooks';
4
4
  import '@vitest/runner/utils';
5
5
  import '@vitest/utils';
package/dist/runners.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import * as tinybench from 'tinybench';
2
2
  import { VitestRunner, VitestRunnerImportSource, Suite, File, Task, CancelReason, Test, TestContext, ImportDuration } from '@vitest/runner';
3
3
  export { VitestRunner } from '@vitest/runner';
4
- import { a as SerializedConfig } from './chunks/config.d.D2ROskhv.js';
4
+ import { a as SerializedConfig } from './chunks/config.d.BKdhh7Zx.js';
5
5
  import '@vitest/pretty-format';
6
6
  import '@vitest/snapshot';
7
7
  import '@vitest/snapshot/environment';
package/dist/runners.js CHANGED
@@ -6,7 +6,7 @@ import { setState, GLOBAL_EXPECT, getState } from '@vitest/expect';
6
6
  import { getTests, getNames, getTestName } from '@vitest/runner/utils';
7
7
  import { normalize } from 'pathe';
8
8
  import { g as getSnapshotClient, i as inject, c as createExpect, v as vi } from './chunks/vi.bdSIJ99Y.js';
9
- import { r as rpc } from './chunks/rpc.Iovn4oWe.js';
9
+ import { r as rpc } from './chunks/rpc.-pEldfrD.js';
10
10
  import 'chai';
11
11
  import './chunks/_commonjsHelpers.BFTU3MAI.js';
12
12
  import '@vitest/snapshot';
@@ -14,7 +14,7 @@ import '@vitest/utils/error';
14
14
  import '@vitest/spy';
15
15
  import '@vitest/utils/source-map';
16
16
  import './chunks/date.Bq6ZW5rf.js';
17
- import './chunks/index.CJ0plNrh.js';
17
+ import './chunks/index.B521nVV-.js';
18
18
 
19
19
  function createBenchmarkResult(name) {
20
20
  return {
package/dist/worker.js CHANGED
@@ -6,13 +6,13 @@ import { readFileSync } from 'node:fs';
6
6
  import { resolve, normalize } from 'pathe';
7
7
  import { e as environments } from './chunks/index.CmSc2RE5.js';
8
8
  import { s as setupInspect } from './chunks/inspector.C914Efll.js';
9
- import { c as createRuntimeRpc, a as rpcDone } from './chunks/rpc.Iovn4oWe.js';
9
+ import { c as createRuntimeRpc, a as rpcDone } from './chunks/rpc.-pEldfrD.js';
10
10
  import { i as isChildProcess, s as setProcessTitle } from './chunks/utils.XdZDrNZV.js';
11
11
  import { d as disposeInternalListeners } from './chunks/utils.CAioKnHs.js';
12
12
  import 'node:console';
13
13
  import 'node:module';
14
14
  import '@vitest/utils';
15
- import './chunks/index.CJ0plNrh.js';
15
+ import './chunks/index.B521nVV-.js';
16
16
 
17
17
  function isBuiltinEnvironment(env) {
18
18
  return env in environments;
@@ -1,5 +1,5 @@
1
1
  import v8 from 'node:v8';
2
- import { r as runBaseTests } from '../chunks/base.Cg0miDlQ.js';
2
+ import { r as runBaseTests } from '../chunks/base.DfmxU-tU.js';
3
3
  import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.CAioKnHs.js';
4
4
  import 'vite-node/client';
5
5
  import '../chunks/execute.B7h3T_Hc.js';
@@ -6,7 +6,7 @@ import util from 'node:util';
6
6
  import { startTests, collectTests } from '@vitest/runner';
7
7
  import { KNOWN_ASSET_TYPES } from 'vite-node/constants';
8
8
  import { installSourcemapsSupport } from 'vite-node/source-map';
9
- import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.BbB8_kAK.js';
9
+ import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.CwejwG0H.js';
10
10
  import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.Dd054P77.js';
11
11
  import { V as VitestIndex } from '../chunks/index.CdQS2e2Q.js';
12
12
  import { c as closeInspector } from '../chunks/inspector.C914Efll.js';
@@ -15,9 +15,9 @@ import 'chai';
15
15
  import 'node:path';
16
16
  import '../path.js';
17
17
  import 'node:url';
18
- import '../chunks/rpc.Iovn4oWe.js';
18
+ import '../chunks/rpc.-pEldfrD.js';
19
19
  import '@vitest/utils';
20
- import '../chunks/index.CJ0plNrh.js';
20
+ import '../chunks/index.B521nVV-.js';
21
21
  import '../chunks/coverage.DVF1vEu8.js';
22
22
  import '@vitest/snapshot';
23
23
  import '../chunks/vi.bdSIJ99Y.js';
@@ -1,4 +1,4 @@
1
- import { r as runBaseTests } from '../chunks/base.Cg0miDlQ.js';
1
+ import { r as runBaseTests } from '../chunks/base.DfmxU-tU.js';
2
2
  import { a as createThreadsRpcOptions } from '../chunks/utils.CAioKnHs.js';
3
3
  import 'vite-node/client';
4
4
  import '../chunks/execute.B7h3T_Hc.js';
package/dist/workers.d.ts CHANGED
@@ -1,8 +1,8 @@
1
- import { W as WorkerGlobalState, C as ContextRPC, B as BirpcOptions, R as RuntimeRPC } from './chunks/worker.d.tQu2eJQy.js';
1
+ import { W as WorkerGlobalState, C as ContextRPC, B as BirpcOptions, R as RuntimeRPC } from './chunks/worker.d.CUgIPz9V.js';
2
2
  import { Awaitable } from '@vitest/utils';
3
3
  import * as v8 from 'v8';
4
- import { a as SerializedConfig } from './chunks/config.d.D2ROskhv.js';
5
- import { W as WorkerContext } from './chunks/worker.d.DvqK5Vmu.js';
4
+ import { a as SerializedConfig } from './chunks/config.d.BKdhh7Zx.js';
5
+ import { W as WorkerContext } from './chunks/worker.d.uzWsCv9X.js';
6
6
  import '@vitest/runner';
7
7
  import 'vite-node';
8
8
  import './chunks/environment.d.cL3nLXbE.js';
package/dist/workers.js CHANGED
@@ -1,6 +1,6 @@
1
1
  export { p as provideWorkerState } from './chunks/utils.XdZDrNZV.js';
2
2
  export { collect as collectVitestWorkerTests, run as runVitestWorker } from './worker.js';
3
- export { r as runBaseTests } from './chunks/base.Cg0miDlQ.js';
3
+ export { r as runBaseTests } from './chunks/base.DfmxU-tU.js';
4
4
  export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './chunks/utils.CAioKnHs.js';
5
5
  export { r as runVmTests } from './chunks/vm.BThCzidc.js';
6
6
  import '@vitest/utils';
@@ -14,8 +14,8 @@ import './chunks/index.CmSc2RE5.js';
14
14
  import 'node:console';
15
15
  import './chunks/inspector.C914Efll.js';
16
16
  import 'node:module';
17
- import './chunks/rpc.Iovn4oWe.js';
18
- import './chunks/index.CJ0plNrh.js';
17
+ import './chunks/rpc.-pEldfrD.js';
18
+ import './chunks/index.B521nVV-.js';
19
19
  import './chunks/execute.B7h3T_Hc.js';
20
20
  import 'node:vm';
21
21
  import '@vitest/utils/error';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitest",
3
3
  "type": "module",
4
- "version": "3.2.3",
4
+ "version": "3.2.5",
5
5
  "description": "Next generation testing framework powered by Vite",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -119,8 +119,8 @@
119
119
  "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
120
120
  "happy-dom": "*",
121
121
  "jsdom": "*",
122
- "@vitest/browser": "3.2.3",
123
- "@vitest/ui": "3.2.3"
122
+ "@vitest/browser": "3.2.5",
123
+ "@vitest/ui": "3.2.5"
124
124
  },
125
125
  "peerDependenciesMeta": {
126
126
  "@edge-runtime/vm": {
@@ -157,18 +157,18 @@
157
157
  "tinybench": "^2.9.0",
158
158
  "tinyexec": "^0.3.2",
159
159
  "tinyglobby": "^0.2.14",
160
- "tinypool": "^1.1.0",
160
+ "tinypool": "^1.1.1",
161
161
  "tinyrainbow": "^2.0.0",
162
162
  "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0",
163
163
  "why-is-node-running": "^2.3.0",
164
- "@vitest/expect": "3.2.3",
165
- "@vitest/pretty-format": "^3.2.3",
166
- "@vitest/runner": "3.2.3",
167
- "@vitest/spy": "3.2.3",
168
- "@vitest/snapshot": "3.2.3",
169
- "@vitest/mocker": "3.2.3",
170
- "@vitest/utils": "3.2.3",
171
- "vite-node": "3.2.3"
164
+ "@vitest/expect": "3.2.5",
165
+ "@vitest/mocker": "3.2.5",
166
+ "@vitest/pretty-format": "^3.2.5",
167
+ "@vitest/snapshot": "3.2.5",
168
+ "@vitest/spy": "3.2.5",
169
+ "@vitest/utils": "3.2.5",
170
+ "vite-node": "3.2.5",
171
+ "@vitest/runner": "3.2.5"
172
172
  },
173
173
  "devDependencies": {
174
174
  "@ampproject/remapping": "^2.3.0",
@@ -176,22 +176,22 @@
176
176
  "@edge-runtime/vm": "^5.0.0",
177
177
  "@sinonjs/fake-timers": "14.0.0",
178
178
  "@types/debug": "^4.1.12",
179
- "@types/estree": "^1.0.7",
179
+ "@types/estree": "^1.0.8",
180
180
  "@types/istanbul-lib-coverage": "^2.0.6",
181
181
  "@types/istanbul-reports": "^3.0.4",
182
182
  "@types/jsdom": "^21.1.7",
183
183
  "@types/mime": "^4.0.0",
184
- "@types/node": "^22.15.29",
184
+ "@types/node": "^22.15.32",
185
185
  "@types/picomatch": "^4.0.0",
186
186
  "@types/prompts": "^2.4.9",
187
187
  "@types/sinonjs__fake-timers": "^8.1.5",
188
188
  "acorn-walk": "^8.3.4",
189
- "birpc": "2.3.0",
189
+ "birpc": "2.4.0",
190
190
  "cac": "^6.7.14",
191
191
  "chai-subset": "^1.6.0",
192
192
  "find-up": "^6.3.0",
193
193
  "flatted": "^3.3.3",
194
- "happy-dom": "^17.5.6",
194
+ "happy-dom": "^17.6.3",
195
195
  "jsdom": "^26.1.0",
196
196
  "local-pkg": "^1.1.1",
197
197
  "mime": "^4.0.7",