vitest 3.1.2 → 3.2.0-beta.1

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 (47) hide show
  1. package/dist/browser.d.ts +2 -2
  2. package/dist/browser.js +1 -1
  3. package/dist/chunks/{base.k5EeHg0m.js → base.SfTiRNZf.js} +2 -2
  4. package/dist/chunks/{cac.C5_4mAsf.js → cac.TfX2-DVH.js} +9 -7
  5. package/dist/chunks/{cli-api.z029PxYZ.js → cli-api.2970Nj9J.js} +937 -852
  6. package/dist/chunks/{coverage.BUdIvXbr.js → coverage.z0LVMxgb.js} +12 -11
  7. package/dist/chunks/{environment.d.Dmw5ulng.d.ts → environment.d.D8YDy2v5.d.ts} +2 -1
  8. package/dist/chunks/{execute.CwmnH2oH.js → execute.BpmIjFTD.js} +22 -12
  9. package/dist/chunks/{global.d.CXRAxnWc.d.ts → global.d.BCOHQEpR.d.ts} +7 -2
  10. package/dist/chunks/{globals.CZAEe_Gf.js → globals.Cg4NtV4P.js} +2 -2
  11. package/dist/chunks/{index.B0uVAVvx.js → index.BPc7M5ni.js} +1 -1
  12. package/dist/chunks/{index._vwY_KdO.js → index.CUacZlWG.js} +42 -21
  13. package/dist/chunks/{index.Cu2UlluP.js → index.DbWBPwtH.js} +2 -2
  14. package/dist/chunks/{reporters.d.79o4mouw.d.ts → reporters.d.DGm4k1Wx.d.ts} +59 -11
  15. package/dist/chunks/{runBaseTests.BV8m0B-u.js → runBaseTests.CguliJB5.js} +5 -5
  16. package/dist/chunks/{setup-common.AQcDs321.js → setup-common.BP6KrF_Z.js} +1 -1
  17. package/dist/chunks/{utils.Cc45eY3L.js → utils.8gfOgtry.js} +19 -12
  18. package/dist/chunks/{vi.ClIskdbk.js → vi.BFR5YIgu.js} +3 -0
  19. package/dist/chunks/{vite.d.BVr6Nvdj.d.ts → vite.d.DjP_ALCZ.d.ts} +1 -1
  20. package/dist/chunks/{vm.BmHENIuV.js → vm.CuLHT1BG.js} +1 -1
  21. package/dist/chunks/{worker.d.CHGSOG0s.d.ts → worker.d.CoCI7hzP.d.ts} +1 -1
  22. package/dist/chunks/{worker.d.C-KN07Ls.d.ts → worker.d.D5Xdi-Zr.d.ts} +1 -1
  23. package/dist/cli.js +1 -1
  24. package/dist/config.cjs +3 -0
  25. package/dist/config.d.ts +8 -5
  26. package/dist/config.js +3 -0
  27. package/dist/coverage.d.ts +3 -3
  28. package/dist/coverage.js +1 -1
  29. package/dist/environments.d.ts +2 -2
  30. package/dist/execute.d.ts +2 -2
  31. package/dist/execute.js +1 -1
  32. package/dist/index.d.ts +45 -10
  33. package/dist/index.js +2 -2
  34. package/dist/node.d.ts +8 -8
  35. package/dist/node.js +7 -7
  36. package/dist/reporters.d.ts +3 -3
  37. package/dist/reporters.js +2 -2
  38. package/dist/runners.d.ts +1 -1
  39. package/dist/runners.js +3 -3
  40. package/dist/workers/forks.js +2 -2
  41. package/dist/workers/runVmTests.js +5 -5
  42. package/dist/workers/threads.js +2 -2
  43. package/dist/workers/vmForks.js +2 -2
  44. package/dist/workers/vmThreads.js +2 -2
  45. package/dist/workers.d.ts +3 -3
  46. package/dist/workers.js +3 -3
  47. package/package.json +11 -11
package/dist/browser.d.ts CHANGED
@@ -10,8 +10,8 @@ import '@vitest/snapshot';
10
10
  import '@vitest/snapshot/environment';
11
11
  import 'vite-node/client';
12
12
  import 'vite-node';
13
- import './chunks/worker.d.CHGSOG0s.js';
14
- import './chunks/environment.d.Dmw5ulng.js';
13
+ import './chunks/worker.d.CoCI7hzP.js';
14
+ import './chunks/environment.d.D8YDy2v5.js';
15
15
  import 'vitest/optional-types.js';
16
16
  import 'node:vm';
17
17
  import '@vitest/mocker';
package/dist/browser.js CHANGED
@@ -1,4 +1,4 @@
1
- export { l as loadDiffConfig, b as loadSnapshotSerializers, c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/setup-common.AQcDs321.js';
1
+ export { l as loadDiffConfig, b as loadSnapshotSerializers, c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/setup-common.BP6KrF_Z.js';
2
2
  export { collectTests, processError, startTests } from '@vitest/runner';
3
3
  import * as spy from '@vitest/spy';
4
4
  export { spy as SpyModule };
@@ -1,5 +1,5 @@
1
1
  import { ModuleCacheMap } from 'vite-node/client';
2
- import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.CwmnH2oH.js';
2
+ import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.BpmIjFTD.js';
3
3
  import { p as provideWorkerState } from './utils.CgTj3MsC.js';
4
4
 
5
5
  let _viteNode;
@@ -27,7 +27,7 @@ async function runBaseTests(method, state) {
27
27
  const [executor, { run }] = await Promise.all([startViteNode({
28
28
  state,
29
29
  requestStubs: getDefaultRequestStubs()
30
- }), import('./runBaseTests.BV8m0B-u.js')]);
30
+ }), import('./runBaseTests.CguliJB5.js')]);
31
31
  const fileSpecs = ctx.files.map((f) => typeof f === "string" ? {
32
32
  filepath: f,
33
33
  testLocations: undefined
@@ -618,7 +618,7 @@ class CAC extends EventEmitter {
618
618
 
619
619
  const cac = (name = "") => new CAC(name);
620
620
 
621
- var version = "3.1.2";
621
+ var version = "3.2.0-beta.1";
622
622
 
623
623
  const apiConfig = (port) => ({
624
624
  port: {
@@ -843,7 +843,7 @@ const cliOptionsConfig = {
843
843
  argument: "<name>"
844
844
  },
845
845
  workspace: {
846
- description: "Path to a workspace configuration file",
846
+ description: "[deprecated] Path to a workspace configuration file",
847
847
  argument: "<path>",
848
848
  normalize: true
849
849
  },
@@ -1252,7 +1252,9 @@ const cliOptionsConfig = {
1252
1252
  outputJson: null,
1253
1253
  json: null,
1254
1254
  provide: null,
1255
- filesOnly: null
1255
+ filesOnly: null,
1256
+ projects: null,
1257
+ watchTriggerPatterns: null
1256
1258
  };
1257
1259
  const benchCliOptionsConfig = {
1258
1260
  compare: {
@@ -1464,13 +1466,13 @@ async function start(mode, cliFilters, options) {
1464
1466
  process.title = "node (vitest)";
1465
1467
  } catch {}
1466
1468
  try {
1467
- const { startVitest } = await import('./cli-api.z029PxYZ.js').then(function (n) { return n.f; });
1469
+ const { startVitest } = await import('./cli-api.2970Nj9J.js').then(function (n) { return n.f; });
1468
1470
  const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
1469
1471
  if (!ctx.shouldKeepServer()) {
1470
1472
  await ctx.exit();
1471
1473
  }
1472
1474
  } catch (e) {
1473
- const { errorBanner } = await import('./utils.Cc45eY3L.js').then(function (n) { return n.u; });
1475
+ const { errorBanner } = await import('./utils.8gfOgtry.js').then(function (n) { return n.u; });
1474
1476
  console.error(`\n${errorBanner("Startup Error")}`);
1475
1477
  console.error(e);
1476
1478
  console.error("\n\n");
@@ -1493,7 +1495,7 @@ async function collect(mode, cliFilters, options) {
1493
1495
  process.title = "node (vitest)";
1494
1496
  } catch {}
1495
1497
  try {
1496
- const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.z029PxYZ.js').then(function (n) { return n.f; });
1498
+ const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.2970Nj9J.js').then(function (n) { return n.f; });
1497
1499
  const ctx = await prepareVitest(mode, {
1498
1500
  ...normalizeCliOptions(cliFilters, options),
1499
1501
  watch: false,
@@ -1515,7 +1517,7 @@ async function collect(mode, cliFilters, options) {
1515
1517
  }
1516
1518
  await ctx.close();
1517
1519
  } catch (e) {
1518
- const { errorBanner } = await import('./utils.Cc45eY3L.js').then(function (n) { return n.u; });
1520
+ const { errorBanner } = await import('./utils.8gfOgtry.js').then(function (n) { return n.u; });
1519
1521
  console.error(`\n${errorBanner("Collect Error")}`);
1520
1522
  console.error(e);
1521
1523
  console.error("\n\n");