vitest 2.1.0-beta.5 → 2.1.0-beta.7

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 (62) hide show
  1. package/LICENSE.md +59 -320
  2. package/dist/browser.d.ts +6 -3
  3. package/dist/browser.js +2 -2
  4. package/dist/chunks/{RandomSequencer.B4M2ux5b.js → RandomSequencer.Bh5-tlNJ.js} +77 -58
  5. package/dist/chunks/{base.BH-FAiX7.js → base.BlXpj3e_.js} +1 -29
  6. package/dist/chunks/{base.BYvKfYzm.js → base.CchlWrnV.js} +2 -4
  7. package/dist/chunks/{cac.DosbLiJg.js → cac.B5XYKv2_.js} +26 -17
  8. package/dist/chunks/{cli-api.D8zgNrBU.js → cli-api.ByZPnilx.js} +7419 -7959
  9. package/dist/chunks/{constants.CaAN7icJ.js → constants.fzPh7AOq.js} +1 -1
  10. package/dist/chunks/{coverage.CqfT4xaf.js → coverage.zlNdAMHK.js} +5 -3
  11. package/dist/chunks/{creator.COdKw_ZN.js → creator.zfBZSJzo.js} +9 -9
  12. package/dist/chunks/{environment.0M5R1SX_.d.ts → environment.C5eAp3K6.d.ts} +1 -1
  13. package/dist/chunks/{execute.DT9BA6zp.js → execute._eQQfgI8.js} +322 -232
  14. package/dist/chunks/{git.ZtkbKc8u.js → git.B5SDxu-n.js} +5 -5
  15. package/dist/chunks/{globals.DRPLtPOv.js → globals.jM7MxN2t.js} +4 -4
  16. package/dist/chunks/{index.CM5UI-4O.js → index.Bn75ITYg.js} +3 -3
  17. package/dist/chunks/index.CPD77dLA.js +133 -0
  18. package/dist/chunks/{index.CxWPpGJz.js → index.CSjyR2-v.js} +2 -2
  19. package/dist/chunks/{index.Dx3f477d.js → index.DpJO1tkB.js} +1110 -1104
  20. package/dist/chunks/{index.CNZXZ9PJ.js → index.xm8OIiKD.js} +1 -1
  21. package/dist/chunks/mocker.cRtM890J.d.ts +17 -0
  22. package/dist/chunks/{reporters.DbwOGCsU.d.ts → reporters.WnPwkmgA.d.ts} +154 -129
  23. package/dist/chunks/{resolveConfig.RHsAM2_Q.js → resolveConfig.-K5hHm0S.js} +56 -34
  24. package/dist/chunks/{runBaseTests.BAhL8UH_.js → runBaseTests.Cztfoflv.js} +7 -7
  25. package/dist/chunks/{setup-common.KBrCO5LJ.js → setup-common.fGBFoQKJ.js} +1 -1
  26. package/dist/chunks/{utils.C3_cBsyn.js → utils.Cn0zI1t3.js} +16 -3
  27. package/dist/chunks/{utils.DO38lwfj.js → utils.Dbnmsfq1.js} +1 -1
  28. package/dist/chunks/{vi.B6QZ938s.js → vi.DGgiNzJE.js} +46 -37
  29. package/dist/chunks/vite.D2yAwzwa.d.ts +11 -0
  30. package/dist/chunks/{vm.kl9T_5ai.js → vm.CPXwWp4C.js} +1 -2
  31. package/dist/chunks/{worker.Cx2xE71X.d.ts → worker.Bws9Zuxu.d.ts} +1 -1
  32. package/dist/chunks/{worker.BANO5ak1.d.ts → worker.CmPmTxgH.d.ts} +2 -14
  33. package/dist/cli.js +3 -3
  34. package/dist/config.cjs +1 -0
  35. package/dist/config.d.ts +70 -2
  36. package/dist/config.js +1 -0
  37. package/dist/coverage.d.ts +4 -3
  38. package/dist/coverage.js +29 -5
  39. package/dist/environments.d.ts +2 -2
  40. package/dist/execute.d.ts +13 -14
  41. package/dist/execute.js +3 -2
  42. package/dist/index.d.ts +23 -16
  43. package/dist/index.js +4 -4
  44. package/dist/mocker.d.ts +1 -0
  45. package/dist/mocker.js +1 -0
  46. package/dist/node.d.ts +27 -9
  47. package/dist/node.js +44 -39
  48. package/dist/reporters.d.ts +2 -2
  49. package/dist/reporters.js +8 -8
  50. package/dist/runners.js +2 -2
  51. package/dist/utils.d.ts +1 -0
  52. package/dist/worker.js +3 -2
  53. package/dist/workers/forks.js +5 -4
  54. package/dist/workers/runVmTests.js +6 -6
  55. package/dist/workers/threads.js +5 -4
  56. package/dist/workers/vmForks.js +4 -4
  57. package/dist/workers/vmThreads.js +4 -4
  58. package/dist/workers.d.ts +4 -16
  59. package/dist/workers.js +6 -5
  60. package/mocker.d.ts +1 -0
  61. package/package.json +22 -17
  62. package/dist/chunks/index.DNUmWFkO.js +0 -319
@@ -43,4 +43,4 @@ const globalApis = [
43
43
  "onTestFailed"
44
44
  ];
45
45
 
46
- export { API_PATH as A, CONFIG_NAMES as C, defaultBrowserPort as a, defaultInspectPort as b, configFiles as c, defaultPort as d, extraInlineDeps as e, globalApis as g, workspacesFiles as w };
46
+ export { API_PATH as A, defaultBrowserPort as a, defaultInspectPort as b, configFiles as c, defaultPort as d, extraInlineDeps as e, globalApis as g, workspacesFiles as w };
@@ -8,9 +8,11 @@ async function resolveCoverageProviderModule(options, loader) {
8
8
  }
9
9
  const provider = options.provider;
10
10
  if (provider === "v8" || provider === "istanbul") {
11
- const { default: coverageModule } = await loader.executeId(
12
- CoverageProviderMap[provider]
13
- );
11
+ let builtInModule = CoverageProviderMap[provider];
12
+ if (provider === "v8" && loader.isBrowser) {
13
+ builtInModule += "/browser";
14
+ }
15
+ const { default: coverageModule } = await loader.executeId(builtInModule);
14
16
  if (!coverageModule) {
15
17
  throw new Error(
16
18
  `Failed to load ${CoverageProviderMap[provider]}. Default export is missing.`
@@ -1,20 +1,19 @@
1
1
  import { resolve, dirname, relative } from 'node:path';
2
2
  import { existsSync, writeFileSync, readFileSync } from 'node:fs';
3
3
  import { mkdir, writeFile } from 'node:fs/promises';
4
- import { p as prompt, f as findUp } from './index.CM5UI-4O.js';
4
+ import { p as prompt, f as findUp } from './index.Bn75ITYg.js';
5
5
  import c from 'tinyrainbow';
6
- import { detectPackageManager, installPackage } from './index.DNUmWFkO.js';
7
- import { execa } from 'execa';
8
- import { c as configFiles } from './constants.CaAN7icJ.js';
6
+ import { detectPackageManager, installPackage } from './index.CPD77dLA.js';
7
+ import { x } from 'tinyexec';
8
+ import { c as configFiles } from './constants.fzPh7AOq.js';
9
9
  import 'node:url';
10
10
  import 'node:process';
11
11
  import './_commonjsHelpers.BFTU3MAI.js';
12
12
  import 'readline';
13
13
  import 'events';
14
+ import 'process';
14
15
  import 'fs';
15
16
  import 'path';
16
- import 'process';
17
- import 'url';
18
17
 
19
18
  const jsxExample = {
20
19
  name: "HelloWorld.jsx",
@@ -655,9 +654,10 @@ async function create() {
655
654
  const allArgs = [...args, "playwright", "install", "--with-deps"];
656
655
  log(c.cyan("\u25FC"), `Installing Playwright dependencies with \`${c.bold(command)} ${c.bold(allArgs.join(" "))}\`...`);
657
656
  log();
658
- await execa(command, allArgs, {
659
- stdout: "inherit",
660
- stderr: "inherit"
657
+ await x(command, allArgs, {
658
+ nodeOptions: {
659
+ stdio: ["pipe", "inherit", "inherit"]
660
+ }
661
661
  });
662
662
  }
663
663
  if (lang === "ts") {
@@ -17,7 +17,7 @@ interface ModuleCache {
17
17
  }
18
18
  interface AfterSuiteRunMeta {
19
19
  coverage?: unknown;
20
- transformMode: TransformMode;
20
+ transformMode: TransformMode | 'browser';
21
21
  projectName?: string;
22
22
  }
23
23
  interface UserConsoleLog {