vitest 5.0.0-beta.3 → 5.0.0-beta.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 (58) hide show
  1. package/LICENSE.md +0 -17
  2. package/dist/browser.d.ts +8 -6
  3. package/dist/browser.js +5 -3
  4. package/dist/chunks/artifact.C0OHWdod.js +2770 -0
  5. package/dist/chunks/{base.Bay6B1Dz.js → base.BPbmtl-C.js} +12 -12
  6. package/dist/chunks/browser.d.B-p-y0sB.d.ts +64 -0
  7. package/dist/chunks/{cac.DoK9yX-i.js → cac.DYQRhgb-.js} +31 -32
  8. package/dist/chunks/{cli-api.BCY9ylNq.js → cli-api.SMst4llK.js} +682 -1294
  9. package/dist/chunks/config.d.Bkl6J5iR.d.ts +2916 -0
  10. package/dist/chunks/{console.B3IRP8fX.js → console.DjVIMaXT.js} +4 -4
  11. package/dist/chunks/{coverage.d.g2xbl2sP.d.ts → coverage.d.Dn6XbyQq.d.ts} +2 -0
  12. package/dist/chunks/{creator.BqL2U_x4.js → creator.CJiHagNv.js} +21 -6
  13. package/dist/chunks/{defaults.DVfzlTkU.js → defaults.CUUnbOrq.js} +5 -3
  14. package/dist/chunks/{globals.8_qjZdeE.js → globals.D2wDMk06.js} +11 -10
  15. package/dist/chunks/{index.og1WyBLx.js → index.6dZyLbho.js} +618 -58
  16. package/dist/chunks/{index.ukHtlBbI.js → index.CXzZ7KB8.js} +373 -149
  17. package/dist/chunks/{nativeModuleRunner.BOeMnHl4.js → index.CesbTg1C.js} +3 -34
  18. package/dist/chunks/{index.PuMGMNHF.js → index.DugGyGng.js} +7 -7
  19. package/dist/chunks/{index.CbgUM9E5.js → index.DzNNaFWy.js} +12 -4
  20. package/dist/chunks/{init-forks.OoZmDo1g.js → init-forks.CDWjf0q6.js} +1 -1
  21. package/dist/chunks/{init-threads.eSHAowcx.js → init-threads.B-vZ8N2q.js} +1 -1
  22. package/dist/chunks/{init.YjNsCb-_.js → init.gslB1aqB.js} +38 -6
  23. package/dist/chunks/{nativeModuleMocker.DKpFw0pk.js → nativeModuleMocker.CrcWvO03.js} +2 -3
  24. package/dist/chunks/nativeModuleRunner.WlMdOB52.js +36 -0
  25. package/dist/chunks/{node.CwFbQqI1.js → node.C9I1sbE9.js} +1 -2
  26. package/dist/chunks/{plugin.d.C00LxKL6.d.ts → plugin.d.BuiCQSo8.d.ts} +114 -89
  27. package/dist/chunks/{rpc.DFRWVnRh.js → rpc.DZEh5xnQ.js} +1 -1
  28. package/dist/chunks/{rpc.d.7JZuxZ8u.d.ts → rpc.d.BLxNuPAq.d.ts} +18 -3
  29. package/dist/chunks/{setup-common.eQsbxe88.js → setup-common.DRlwpHsL.js} +2 -2
  30. package/dist/chunks/{global.d.DZbA5YnY.d.ts → task-utils.d.CLWcZaUf.d.ts} +42 -27
  31. package/dist/chunks/{utils.BX5Fg8C4.js → utils.DYj33du9.js} +1 -17
  32. package/dist/chunks/{vm.BE_VOfSs.js → vm._FqKqltU.js} +4 -4
  33. package/dist/chunks/{worker.d.Dv3hDCFf.d.ts → worker.d.Cb0Z-SnE.d.ts} +4 -3
  34. package/dist/cli.js +1 -1
  35. package/dist/config.cjs +1 -1
  36. package/dist/config.d.ts +11 -14
  37. package/dist/config.js +1 -1
  38. package/dist/index.d.ts +197 -44
  39. package/dist/index.js +7 -6
  40. package/dist/module-evaluator.d.ts +10 -4
  41. package/dist/module-evaluator.js +14 -19
  42. package/dist/node.d.ts +26 -16
  43. package/dist/node.js +22 -17
  44. package/dist/runtime.d.ts +8 -2
  45. package/dist/runtime.js +4 -5
  46. package/dist/task-utils.js +296 -0
  47. package/dist/worker.d.ts +7 -6
  48. package/dist/worker.js +16 -14
  49. package/dist/workers/forks.js +17 -15
  50. package/dist/workers/runVmTests.js +9 -8
  51. package/dist/workers/threads.js +17 -15
  52. package/dist/workers/vmForks.js +8 -8
  53. package/dist/workers/vmThreads.js +8 -8
  54. package/package.json +15 -16
  55. package/dist/chunks/browser.d.DM1g8UNp.d.ts +0 -899
  56. package/dist/chunks/config.d.C0UMwus7.d.ts +0 -263
  57. package/dist/chunks/environment.d-DOJxxZV9.d.DOJxxZV9.d.ts +0 -17
  58. package/dist/chunks/general.d.DFAHgpC2.d.ts +0 -247
package/LICENSE.md CHANGED
@@ -316,23 +316,6 @@ Repository: egoist/cac
316
316
 
317
317
  ---------------------------------------
318
318
 
319
- ## empathic
320
- License: MIT
321
- By: Luke Edwards
322
- Repository: lukeed/empathic
323
-
324
- > MIT License
325
- >
326
- > Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
327
- >
328
- > Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
329
- >
330
- > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
331
- >
332
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
333
-
334
- ---------------------------------------
335
-
336
319
  ## flatted
337
320
  License: ISC
338
321
  By: Andrea Giammarchi
package/dist/browser.d.ts CHANGED
@@ -1,7 +1,6 @@
1
- import { c as SerializedCoverageConfig, a as SerializedConfig } from './chunks/config.d.C0UMwus7.js';
2
- import { R as RuntimeCoverageModuleLoader } from './chunks/coverage.d.g2xbl2sP.js';
1
+ import { a4 as SerializedCoverageConfig, aH as FileSpecification, V as VitestRunner, F as File, n as SerializedConfig } from './chunks/config.d.Bkl6J5iR.js';
2
+ import { R as RuntimeCoverageModuleLoader } from './chunks/coverage.d.Dn6XbyQq.js';
3
3
  import { SerializedDiffOptions } from '@vitest/utils/diff';
4
- export { collectTests, startTests } from '@vitest/runner';
5
4
  import * as _vitest_spy from '@vitest/spy';
6
5
  export { _vitest_spy as SpyModule };
7
6
  export { ParsedStack, StringifyOptions } from '@vitest/utils';
@@ -11,8 +10,8 @@ export { getType } from '@vitest/utils/helpers';
11
10
  export { DecodedMap, getOriginalPosition } from '@vitest/utils/source-map';
12
11
  export { getSafeTimers, setSafeTimers } from '@vitest/utils/timers';
13
12
  import '@vitest/pretty-format';
14
- import './chunks/general.d.DFAHgpC2.js';
15
- import './chunks/environment.d-DOJxxZV9.d.DOJxxZV9.js';
13
+ import 'tinyrainbow';
14
+ import 'tinybench';
16
15
 
17
16
  declare function startCoverageInsideWorker(options: SerializedCoverageConfig, loader: RuntimeCoverageModuleLoader, runtimeOptions: {
18
17
  isolate: boolean;
@@ -22,6 +21,9 @@ declare function stopCoverageInsideWorker(options: SerializedCoverageConfig, loa
22
21
  isolate: boolean;
23
22
  }): Promise<unknown>;
24
23
 
24
+ declare function startTests(specs: string[] | FileSpecification[], runner: VitestRunner): Promise<File[]>;
25
+ declare function publicCollect(specs: string[] | FileSpecification[], runner: VitestRunner): Promise<File[]>;
26
+
25
27
  interface PublicModuleRunner {
26
28
  import: (id: string) => Promise<any>;
27
29
  }
@@ -43,5 +45,5 @@ interface BrowserCommands {
43
45
  }
44
46
  interface CDPSession {}
45
47
 
46
- export { loadDiffConfig, loadSnapshotSerializers, setupCommonEnv, startCoverageInsideWorker, stopCoverageInsideWorker, takeCoverageInsideWorker };
48
+ export { FileSpecification, publicCollect as collectTests, loadDiffConfig, loadSnapshotSerializers, setupCommonEnv, startCoverageInsideWorker, startTests, stopCoverageInsideWorker, takeCoverageInsideWorker };
47
49
  export type { BrowserCommands, CDPSession, FsOptions };
package/dist/browser.js CHANGED
@@ -1,5 +1,5 @@
1
- export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv, b as startCoverageInsideWorker, c as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/setup-common.eQsbxe88.js';
2
- export { collectTests, startTests } from '@vitest/runner';
1
+ export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv, b as startCoverageInsideWorker, c as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/setup-common.DRlwpHsL.js';
2
+ export { p as collectTests, s as startTests } from './chunks/artifact.C0OHWdod.js';
3
3
  import * as spyModule from '@vitest/spy';
4
4
  export { spyModule as SpyModule };
5
5
  export { format, inspect, stringify } from '@vitest/utils/display';
@@ -8,9 +8,11 @@ export { getType } from '@vitest/utils/helpers';
8
8
  export { DecodedMap, getOriginalPosition } from '@vitest/utils/source-map';
9
9
  export { getSafeTimers, setSafeTimers } from '@vitest/utils/timers';
10
10
  import './chunks/coverage.CTzCuANN.js';
11
- import './chunks/utils.BX5Fg8C4.js';
11
+ import './chunks/utils.DYj33du9.js';
12
12
  import './chunks/plugins.DrsmdUE2.js';
13
13
  import '@vitest/pretty-format';
14
+ import './task-utils.js';
15
+ import 'pathe';
14
16
 
15
17
  /**
16
18
  * @internal