vitest 2.0.5 → 2.1.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 (54) hide show
  1. package/dist/browser.d.ts +3 -3
  2. package/dist/browser.js +1 -1
  3. package/dist/chunks/RandomSequencer.B4M2ux5b.js +952 -0
  4. package/dist/chunks/{base.DSsbfkDg.js → base.BH-FAiX7.js} +1 -1
  5. package/dist/chunks/{base.CC5R_kgU.js → base.BYvKfYzm.js} +2 -2
  6. package/dist/chunks/{benchmark.DDmpNjj-.js → benchmark.C8CRJYG4.js} +1 -1
  7. package/dist/chunks/{cac.DGgmCKmU.js → cac.CaYKA7Wt.js} +9 -8
  8. package/dist/chunks/{cli-api.OKfd3qJ0.js → cli-api.B8LE391_.js} +221 -4329
  9. package/dist/chunks/{config.DCnyCTbs.d.ts → config.CHuotKvS.d.ts} +3 -0
  10. package/dist/chunks/{console.Bgn7_A1x.js → console.DI3gHgtH.js} +1 -1
  11. package/dist/chunks/{creator.a3OfuIEW.js → creator.GreKbaUc.js} +2 -3
  12. package/dist/chunks/{env.BU041cs9.js → env.CmHVDJnw.js} +1 -1
  13. package/dist/chunks/{execute.Cjlr2CRw.js → execute.DT9BA6zp.js} +7 -7
  14. package/dist/chunks/{globals.BliuJFNR.js → globals.DRPLtPOv.js} +6 -6
  15. package/dist/chunks/{index.BfeNhc0N.js → index.CNZXZ9PJ.js} +2 -2
  16. package/dist/chunks/{index.DYufA6CZ.js → index.CxRxs566.js} +1 -1
  17. package/dist/chunks/{index.R1VjssW9.js → index.CxWPpGJz.js} +2 -2
  18. package/dist/chunks/{index.JbiJutJ_.js → index.YuPJueCg.js} +25 -965
  19. package/dist/chunks/{node.DS3zEPa7.js → node.Bx4JZjMG.js} +1 -1
  20. package/dist/chunks/{reporters.C_zwCd4j.d.ts → reporters.DRZ7ndzr.d.ts} +14 -1
  21. package/dist/chunks/resolveConfig.CGobt8AB.js +8120 -0
  22. package/dist/chunks/{runBaseTests.CyvqmuC9.js → runBaseTests.BAhL8UH_.js} +9 -9
  23. package/dist/chunks/{setup-common.CNzatKMx.js → setup-common.KBrCO5LJ.js} +1 -1
  24. package/dist/chunks/{utils.DpP_sDwr.js → utils.DO38lwfj.js} +1 -1
  25. package/dist/chunks/{vi.fiQ7lMRF.js → vi.B6QZ938s.js} +2 -2
  26. package/dist/chunks/{vm.DcSuuaHr.js → vm.kl9T_5ai.js} +3 -3
  27. package/dist/chunks/{worker.C5iHKIaJ.d.ts → worker.BANO5ak1.d.ts} +1 -1
  28. package/dist/chunks/{worker.DKkAC4Qw.d.ts → worker.Cx2xE71X.d.ts} +1 -1
  29. package/dist/cli.js +2 -2
  30. package/dist/config.d.ts +2 -2
  31. package/dist/coverage.d.ts +2 -2
  32. package/dist/coverage.js +34 -14
  33. package/dist/execute.d.ts +2 -2
  34. package/dist/execute.js +2 -2
  35. package/dist/index.d.ts +6 -6
  36. package/dist/index.js +7 -7
  37. package/dist/node.d.ts +5 -5
  38. package/dist/node.js +19 -18
  39. package/dist/reporters.d.ts +2 -2
  40. package/dist/reporters.js +10 -9
  41. package/dist/runners.d.ts +9 -2
  42. package/dist/runners.js +5 -5
  43. package/dist/snapshot.js +2 -2
  44. package/dist/suite.js +3 -3
  45. package/dist/worker.js +1 -1
  46. package/dist/workers/forks.js +3 -3
  47. package/dist/workers/runVmTests.js +8 -8
  48. package/dist/workers/threads.js +3 -3
  49. package/dist/workers/vmForks.js +5 -5
  50. package/dist/workers/vmThreads.js +5 -5
  51. package/dist/workers.d.ts +4 -4
  52. package/dist/workers.js +6 -6
  53. package/package.json +14 -15
  54. package/dist/chunks/index.BMmMjLIQ.js +0 -3975
@@ -123,4 +123,4 @@ function nanoid(size = 21) {
123
123
  return id;
124
124
  }
125
125
 
126
- export { AggregateErrorPonyfill as A, slash as a, isPrimitive as b, groupBy as c, deepMerge as d, nanoid as e, stdout as f, getAllMockableProperties as g, isChildProcess as i, noop as n, setProcessTitle as s, toArray as t, wildcardPatternToRegExp as w };
126
+ export { AggregateErrorPonyfill as A, slash as a, groupBy as b, isPrimitive as c, deepMerge as d, nanoid as e, stdout as f, getAllMockableProperties as g, isChildProcess as i, noop as n, setProcessTitle as s, toArray as t, wildcardPatternToRegExp as w };
@@ -1,6 +1,6 @@
1
1
  import { ModuleCacheMap } from 'vite-node/client';
2
2
  import { p as provideWorkerState } from './utils.Ck2hJTRs.js';
3
- import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.Cjlr2CRw.js';
3
+ import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.DT9BA6zp.js';
4
4
 
5
5
  let _viteNode;
6
6
  const moduleCache = new ModuleCacheMap();
@@ -26,7 +26,7 @@ async function runBaseTests(method, state) {
26
26
  ctx.files.forEach((i) => state.moduleCache.delete(i));
27
27
  const [executor, { run }] = await Promise.all([
28
28
  startViteNode({ state, requestStubs: getDefaultRequestStubs() }),
29
- import('./runBaseTests.CyvqmuC9.js')
29
+ import('./runBaseTests.BAhL8UH_.js')
30
30
  ]);
31
31
  await run(
32
32
  method,
@@ -1,7 +1,7 @@
1
1
  import { getCurrentSuite } from '@vitest/runner';
2
2
  import { createChainable } from '@vitest/runner/utils';
3
3
  import { noop } from '@vitest/utils';
4
- import { i as isRunningInBenchmark } from './index.DYufA6CZ.js';
4
+ import { i as isRunningInBenchmark } from './index.CxRxs566.js';
5
5
 
6
6
  const benchFns = /* @__PURE__ */ new WeakMap();
7
7
  const benchOptsMap = /* @__PURE__ */ new WeakMap();
@@ -1,7 +1,7 @@
1
1
  import { normalize } from 'pathe';
2
2
  import { EventEmitter } from 'events';
3
3
  import c from 'tinyrainbow';
4
- import { t as toArray } from './base.DSsbfkDg.js';
4
+ import { t as toArray } from './base.BH-FAiX7.js';
5
5
  import { d as defaultPort, a as defaultBrowserPort } from './constants.CaAN7icJ.js';
6
6
 
7
7
  function toArr(any) {
@@ -618,7 +618,7 @@ class CAC extends EventEmitter {
618
618
 
619
619
  const cac = (name = "") => new CAC(name);
620
620
 
621
- var version = "2.0.5";
621
+ var version = "2.1.0-beta.1";
622
622
 
623
623
  const apiConfig = (port) => ({
624
624
  port: {
@@ -956,7 +956,8 @@ const cliOptionsConfig = {
956
956
  commands: null,
957
957
  viewport: null,
958
958
  screenshotDirectory: null,
959
- screenshotFailures: null
959
+ screenshotFailures: null,
960
+ locators: null
960
961
  }
961
962
  },
962
963
  pool: {
@@ -1495,13 +1496,13 @@ async function start(mode, cliFilters, options) {
1495
1496
  } catch {
1496
1497
  }
1497
1498
  try {
1498
- const { startVitest } = await import('./cli-api.OKfd3qJ0.js').then(function (n) { return n.h; });
1499
+ const { startVitest } = await import('./cli-api.B8LE391_.js').then(function (n) { return n.d; });
1499
1500
  const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(options));
1500
1501
  if (!ctx?.shouldKeepServer()) {
1501
1502
  await ctx?.exit();
1502
1503
  }
1503
1504
  } catch (e) {
1504
- const { divider } = await import('./utils.DpP_sDwr.js').then(function (n) { return n.u; });
1505
+ const { divider } = await import('./utils.DO38lwfj.js').then(function (n) { return n.u; });
1505
1506
  console.error(`
1506
1507
  ${c.red(divider(c.bold(c.inverse(" Startup Error "))))}`);
1507
1508
  console.error(e);
@@ -1517,7 +1518,7 @@ async function init(project) {
1517
1518
  console.error(new Error('Only the "browser" project is supported. Use "vitest init browser" to create a new project.'));
1518
1519
  process.exit(1);
1519
1520
  }
1520
- const { create } = await import('./creator.a3OfuIEW.js');
1521
+ const { create } = await import('./creator.GreKbaUc.js');
1521
1522
  await create();
1522
1523
  }
1523
1524
  async function collect(mode, cliFilters, options) {
@@ -1526,7 +1527,7 @@ async function collect(mode, cliFilters, options) {
1526
1527
  } catch {
1527
1528
  }
1528
1529
  try {
1529
- const { prepareVitest, processCollected } = await import('./cli-api.OKfd3qJ0.js').then(function (n) { return n.h; });
1530
+ const { prepareVitest, processCollected } = await import('./cli-api.B8LE391_.js').then(function (n) { return n.d; });
1530
1531
  const ctx = await prepareVitest(mode, {
1531
1532
  ...normalizeCliOptions(options),
1532
1533
  watch: false,
@@ -1543,7 +1544,7 @@ async function collect(mode, cliFilters, options) {
1543
1544
  processCollected(ctx, tests, options);
1544
1545
  await ctx.close();
1545
1546
  } catch (e) {
1546
- const { divider } = await import('./utils.DpP_sDwr.js').then(function (n) { return n.u; });
1547
+ const { divider } = await import('./utils.DO38lwfj.js').then(function (n) { return n.u; });
1547
1548
  console.error(`
1548
1549
  ${c.red(divider(c.bold(c.inverse(" Collect Error "))))}`);
1549
1550
  console.error(e);