vitest 4.0.0-beta.1 → 4.0.0-beta.11

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 (90) hide show
  1. package/LICENSE.md +83 -2
  2. package/dist/browser.d.ts +19 -16
  3. package/dist/browser.js +11 -7
  4. package/dist/chunks/{benchmark.CYdenmiT.js → benchmark.LXhJ0F0X.js} +7 -9
  5. package/dist/chunks/{benchmark.d.BwvBVTda.d.ts → benchmark.d.DAaHLpsq.d.ts} +4 -4
  6. package/dist/chunks/{browser.d.q8Z0P0q1.d.ts → browser.d.Dx7DO_Ce.d.ts} +5 -5
  7. package/dist/chunks/{cac.D3EzDDZd.js → cac.elvK37c9.js} +71 -153
  8. package/dist/chunks/{cli-api.Dn5gKePv.js → cli-api.C7plPyhs.js} +1376 -1693
  9. package/dist/chunks/{config.d.HJdfX-8k.d.ts → config.d.B_LthbQq.d.ts} +58 -63
  10. package/dist/chunks/{console.CtFJOzRO.js → console.CiTi59Jy.js} +35 -71
  11. package/dist/chunks/{constants.DnKduX2e.js → constants.D_Q9UYh-.js} +1 -9
  12. package/dist/chunks/{coverage.Cwa-XhJt.js → coverage.CG6Uhorw.js} +522 -792
  13. package/dist/chunks/{coverage.DVF1vEu8.js → coverage.D_JHT54q.js} +2 -2
  14. package/dist/chunks/{coverage.d.S9RMNXIe.d.ts → coverage.d.BZtK59WP.d.ts} +10 -8
  15. package/dist/chunks/{creator.GK6I-cL4.js → creator.08Gi-vCA.js} +93 -77
  16. package/dist/chunks/{date.Bq6ZW5rf.js → date.-jtEtIeV.js} +6 -17
  17. package/dist/chunks/{environment.d.CUq4cUgQ.d.ts → environment.d.BsToaxti.d.ts} +27 -6
  18. package/dist/chunks/{git.BVQ8w_Sw.js → git.BFNcloKD.js} +1 -2
  19. package/dist/chunks/{global.d.CVbXEflG.d.ts → global.d.BK3X7FW1.d.ts} +2 -5
  20. package/dist/chunks/{globals.Cxal6MLI.js → globals.BjvYA-AD.js} +11 -9
  21. package/dist/chunks/{index.BWf_gE5n.js → index.AZOjjqWP.js} +7 -6
  22. package/dist/chunks/{index.B521nVV-.js → index.Bgo3tNWt.js} +23 -4
  23. package/dist/chunks/{index.TfbsX-3I.js → index.BhY64fF0.js} +16 -26
  24. package/dist/chunks/{index.CZI_8rVt.js → index.BwBttQPf.js} +340 -663
  25. package/dist/chunks/{index.CmSc2RE5.js → index.DIWhzsUh.js} +72 -118
  26. package/dist/chunks/{inspector.C914Efll.js → inspector.CvQD-Nie.js} +10 -25
  27. package/dist/chunks/moduleRunner.d.BNa-CL9e.d.ts +201 -0
  28. package/dist/chunks/{node.fjCdwEIl.js → node.BsdMi6DV.js} +2 -2
  29. package/dist/chunks/{plugin.d.C2EcJUjo.d.ts → plugin.d.C5phQR6o.d.ts} +1 -1
  30. package/dist/chunks/{reporters.d.DxZg19fy.d.ts → reporters.d.CVzhsTvK.d.ts} +1233 -1293
  31. package/dist/chunks/resolveSnapshotEnvironment.DQVamkje.js +81 -0
  32. package/dist/chunks/rpc.jKGRSXIH.js +65 -0
  33. package/dist/chunks/{setup-common.D7ZqXFx-.js → setup-common.NAWRuMRP.js} +18 -30
  34. package/dist/chunks/startModuleRunner.oAuCu1yL.js +682 -0
  35. package/dist/chunks/{suite.d.FvehnV49.d.ts → suite.d.BJWk38HB.d.ts} +1 -1
  36. package/dist/chunks/test.KC5tH8hC.js +214 -0
  37. package/dist/chunks/typechecker.gXq-5P3n.js +1438 -0
  38. package/dist/chunks/{utils.XdZDrNZV.js → utils.DGKhod2J.js} +9 -28
  39. package/dist/chunks/{vi.bdSIJ99Y.js → vi.CiJ0Laa6.js} +159 -306
  40. package/dist/chunks/worker.d.B_Fd9M_w.d.ts +100 -0
  41. package/dist/chunks/worker.rPGLlbkW.js +200 -0
  42. package/dist/cli.js +8 -6
  43. package/dist/config.cjs +3 -9
  44. package/dist/config.d.ts +49 -54
  45. package/dist/config.js +1 -1
  46. package/dist/coverage.d.ts +27 -26
  47. package/dist/coverage.js +6 -8
  48. package/dist/environments.d.ts +9 -13
  49. package/dist/environments.js +1 -1
  50. package/dist/index.d.ts +38 -45
  51. package/dist/index.js +10 -10
  52. package/dist/module-evaluator.d.ts +13 -0
  53. package/dist/module-evaluator.js +276 -0
  54. package/dist/module-runner.js +15 -0
  55. package/dist/node.d.ts +44 -42
  56. package/dist/node.js +30 -36
  57. package/dist/reporters.d.ts +12 -13
  58. package/dist/reporters.js +7 -5
  59. package/dist/runners.d.ts +3 -3
  60. package/dist/runners.js +15 -232
  61. package/dist/snapshot.js +3 -3
  62. package/dist/suite.d.ts +2 -2
  63. package/dist/suite.js +4 -3
  64. package/dist/worker-base.js +203 -0
  65. package/dist/{chunks/vm.BThCzidc.js → worker-vm.js} +179 -228
  66. package/dist/workers/runVmTests.js +39 -56
  67. package/globals.d.ts +17 -17
  68. package/package.json +40 -38
  69. package/browser.d.ts +0 -1
  70. package/dist/chunks/base.Bj3pWTr1.js +0 -38
  71. package/dist/chunks/execute.B7h3T_Hc.js +0 -708
  72. package/dist/chunks/index.D-VkfKhf.js +0 -105
  73. package/dist/chunks/rpc.CsFtxqeq.js +0 -83
  74. package/dist/chunks/runBaseTests.BC7ZIH5L.js +0 -129
  75. package/dist/chunks/typechecker.CVytUJuF.js +0 -874
  76. package/dist/chunks/utils.CAioKnHs.js +0 -61
  77. package/dist/chunks/worker.d.CmvJfRGs.d.ts +0 -8
  78. package/dist/chunks/worker.d.DoNjFAiv.d.ts +0 -169
  79. package/dist/execute.d.ts +0 -148
  80. package/dist/execute.js +0 -13
  81. package/dist/worker.js +0 -124
  82. package/dist/workers/forks.js +0 -43
  83. package/dist/workers/threads.js +0 -31
  84. package/dist/workers/vmForks.js +0 -47
  85. package/dist/workers/vmThreads.js +0 -37
  86. package/dist/workers.d.ts +0 -37
  87. package/dist/workers.js +0 -30
  88. package/execute.d.ts +0 -1
  89. package/utils.d.ts +0 -1
  90. package/workers.d.ts +0 -1
package/dist/workers.d.ts DELETED
@@ -1,37 +0,0 @@
1
- import { W as WorkerGlobalState, C as ContextRPC, B as BirpcOptions, R as RuntimeRPC } from './chunks/worker.d.DoNjFAiv.js';
2
- import { Awaitable } from '@vitest/utils';
3
- import * as v8 from 'v8';
4
- import { a as SerializedConfig } from './chunks/config.d.HJdfX-8k.js';
5
- import { W as WorkerContext } from './chunks/worker.d.CmvJfRGs.js';
6
- import '@vitest/runner';
7
- import './chunks/environment.d.CUq4cUgQ.js';
8
- import '@vitest/snapshot';
9
- import '@vitest/pretty-format';
10
- import '@vitest/utils/diff';
11
- import 'node:worker_threads';
12
-
13
- declare function provideWorkerState(context: any, state: WorkerGlobalState): WorkerGlobalState;
14
-
15
- declare function run(ctx: ContextRPC): Promise<void>;
16
- declare function collect(ctx: ContextRPC): Promise<void>;
17
-
18
- declare function runBaseTests(method: "run" | "collect", state: WorkerGlobalState): Promise<void>;
19
-
20
- type WorkerRpcOptions = Pick<BirpcOptions<RuntimeRPC>, "on" | "post" | "serialize" | "deserialize">;
21
- interface VitestWorker {
22
- getRpcOptions: (ctx: ContextRPC) => WorkerRpcOptions;
23
- runTests: (state: WorkerGlobalState) => Awaitable<unknown>;
24
- collectTests: (state: WorkerGlobalState) => Awaitable<unknown>;
25
- }
26
-
27
- declare function createThreadsRpcOptions({ port }: WorkerContext): WorkerRpcOptions;
28
- declare function createForksRpcOptions(nodeV8: typeof v8): WorkerRpcOptions;
29
- /**
30
- * Reverts the wrapping done by `utils/config-helpers.ts`'s `wrapSerializableConfig`
31
- */
32
- declare function unwrapSerializableConfig(config: SerializedConfig): SerializedConfig;
33
-
34
- declare function runVmTests(method: "run" | "collect", state: WorkerGlobalState): Promise<void>;
35
-
36
- export { collect as collectVitestWorkerTests, createForksRpcOptions, createThreadsRpcOptions, provideWorkerState, runBaseTests, run as runVitestWorker, runVmTests, unwrapSerializableConfig };
37
- export type { VitestWorker, WorkerRpcOptions };
package/dist/workers.js DELETED
@@ -1,30 +0,0 @@
1
- export { p as provideWorkerState } from './chunks/utils.XdZDrNZV.js';
2
- export { collect as collectVitestWorkerTests, run as runVitestWorker } from './worker.js';
3
- export { r as runBaseTests } from './chunks/base.Bj3pWTr1.js';
4
- export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './chunks/utils.CAioKnHs.js';
5
- export { r as runVmTests } from './chunks/vm.BThCzidc.js';
6
- import '@vitest/utils';
7
- import 'node:url';
8
- import '@vitest/utils/source-map';
9
- import 'tinypool';
10
- import 'vite-node/client';
11
- import 'node:fs';
12
- import 'pathe';
13
- import './chunks/index.CmSc2RE5.js';
14
- import 'node:console';
15
- import './chunks/inspector.C914Efll.js';
16
- import 'node:module';
17
- import './chunks/rpc.CsFtxqeq.js';
18
- import './chunks/index.B521nVV-.js';
19
- import './chunks/execute.B7h3T_Hc.js';
20
- import 'node:vm';
21
- import '@vitest/utils/error';
22
- import 'vite-node/utils';
23
- import './path.js';
24
- import 'node:path';
25
- import '@vitest/mocker';
26
- import './chunks/console.CtFJOzRO.js';
27
- import 'node:stream';
28
- import 'tinyrainbow';
29
- import './chunks/date.Bq6ZW5rf.js';
30
- import 'vite-node/constants';
package/execute.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './dist/execute.js'
package/utils.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './dist/utils.js'
package/workers.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './dist/workers.js'