vitest 3.2.0-beta.1 → 3.2.0-beta.3

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 (74) hide show
  1. package/LICENSE.md +0 -232
  2. package/dist/browser.d.ts +5 -3
  3. package/dist/browser.js +3 -4
  4. package/dist/chunks/{base.SfTiRNZf.js → base.D4119yLM.js} +4 -3
  5. package/dist/chunks/{benchmark.BoF7jW0Q.js → benchmark.Cf_PACH1.js} +1 -1
  6. package/dist/chunks/{cac.TfX2-DVH.js → cac.DWaWHIIE.js} +21 -16
  7. package/dist/chunks/{cli-api.2970Nj9J.js → cli-api.CnmEXkxs.js} +292 -59
  8. package/dist/chunks/{config.d.UqE-KR0o.d.ts → config.d.D2ROskhv.d.ts} +2 -0
  9. package/dist/chunks/{console.K1NMVOSc.js → console.Cwr-MFPV.js} +3 -2
  10. package/dist/chunks/{constants.BZZyIeIE.js → constants.DnKduX2e.js} +1 -0
  11. package/dist/chunks/{coverage.z0LVMxgb.js → coverage.C73DaDgS.js} +241 -4226
  12. package/dist/chunks/{creator.CuL7xDWI.js → creator.C8WKy2eW.js} +26 -44
  13. package/dist/chunks/{date.CDOsz-HY.js → date.ByMsSlOr.js} +25 -0
  14. package/dist/chunks/{defaults.DSxsTG0h.js → defaults.DpVH7vbg.js} +1 -0
  15. package/dist/chunks/{environment.d.D8YDy2v5.d.ts → environment.d.cL3nLXbE.d.ts} +1 -0
  16. package/dist/chunks/{execute.BpmIjFTD.js → execute.B3q-2LPV.js} +28 -5
  17. package/dist/chunks/{global.d.BCOHQEpR.d.ts → global.d.BNLIi6yo.d.ts} +13 -11
  18. package/dist/chunks/{globals.Cg4NtV4P.js → globals.CI21aWXF.js} +7 -7
  19. package/dist/chunks/{index.DFXFpH3w.js → index.2jgTs_Q5.js} +19 -1
  20. package/dist/chunks/{index.CUacZlWG.js → index.Bter3jj9.js} +954 -954
  21. package/dist/chunks/{index.DbWBPwtH.js → index.CbT4iuwc.js} +7 -4
  22. package/dist/chunks/index.D3XRDfWc.js +213 -0
  23. package/dist/chunks/{index.BPc7M5ni.js → index.DNgLEKsQ.js} +5 -15
  24. package/dist/chunks/index.JOzufsrU.js +276 -0
  25. package/dist/chunks/{index.DBIGubLC.js → index.X0nbfr6-.js} +7 -7
  26. package/dist/chunks/{inspector.DbDkSkFn.js → inspector.BFsh5KO0.js} +3 -0
  27. package/dist/chunks/{node.3xsWotC9.js → node.Be-ntJnD.js} +1 -1
  28. package/dist/chunks/{reporters.d.DGm4k1Wx.d.ts → reporters.d.Bt4IGtsa.d.ts} +41 -6
  29. package/dist/chunks/{rpc.D9_013TY.js → rpc.BKExFSRG.js} +2 -1
  30. package/dist/chunks/{runBaseTests.CguliJB5.js → runBaseTests.B_M1TTsK.js} +19 -11
  31. package/dist/chunks/{setup-common.BP6KrF_Z.js → setup-common.CF-O-dZX.js} +2 -3
  32. package/dist/chunks/typechecker.BgzF-6iO.js +954 -0
  33. package/dist/chunks/{utils.CgTj3MsC.js → utils.BlI4TC7Y.js} +1 -0
  34. package/dist/chunks/{utils.BfxieIyZ.js → utils.DPCq3gzW.js} +3 -0
  35. package/dist/chunks/{vi.BFR5YIgu.js → vi.pkoYCV6A.js} +25 -2
  36. package/dist/chunks/{vite.d.DjP_ALCZ.d.ts → vite.d.B-Kx3KCF.d.ts} +3 -1
  37. package/dist/chunks/{vm.CuLHT1BG.js → vm.DPYem2so.js} +72 -4
  38. package/dist/chunks/{worker.d.CoCI7hzP.d.ts → worker.d.BKbBp2ga.d.ts} +2 -2
  39. package/dist/chunks/{worker.d.D5Xdi-Zr.d.ts → worker.d.Bl1O4kuf.d.ts} +1 -1
  40. package/dist/cli.js +21 -2
  41. package/dist/config.cjs +2 -0
  42. package/dist/config.d.ts +7 -6
  43. package/dist/config.js +2 -2
  44. package/dist/coverage.d.ts +4 -4
  45. package/dist/coverage.js +7 -10
  46. package/dist/environments.d.ts +6 -2
  47. package/dist/environments.js +1 -1
  48. package/dist/execute.d.ts +9 -3
  49. package/dist/execute.js +1 -1
  50. package/dist/index.d.ts +25 -35
  51. package/dist/index.js +5 -6
  52. package/dist/node.d.ts +18 -10
  53. package/dist/node.js +22 -22
  54. package/dist/reporters.d.ts +4 -4
  55. package/dist/reporters.js +14 -14
  56. package/dist/runners.d.ts +1 -1
  57. package/dist/runners.js +13 -5
  58. package/dist/snapshot.js +2 -2
  59. package/dist/suite.js +2 -2
  60. package/dist/worker.js +9 -5
  61. package/dist/workers/forks.js +6 -4
  62. package/dist/workers/runVmTests.js +14 -10
  63. package/dist/workers/threads.js +4 -4
  64. package/dist/workers/vmForks.js +6 -6
  65. package/dist/workers/vmThreads.js +6 -6
  66. package/dist/workers.d.ts +4 -4
  67. package/dist/workers.js +10 -10
  68. package/package.json +22 -26
  69. package/dist/chunks/index.Bw6JxgX8.js +0 -143
  70. package/dist/chunks/run-once.Dimr7O9f.js +0 -47
  71. package/dist/chunks/typechecker.DYQbn8uK.js +0 -956
  72. package/dist/chunks/utils.8gfOgtry.js +0 -207
  73. package/dist/utils.d.ts +0 -3
  74. package/dist/utils.js +0 -2
package/LICENSE.md CHANGED
@@ -170,35 +170,6 @@ Repository: git+https://github.com/antfu/birpc.git
170
170
 
171
171
  ---------------------------------------
172
172
 
173
- ## braces
174
- License: MIT
175
- By: Jon Schlinkert, Brian Woodward, Elan Shanker, Eugene Sharygin, hemanth.hm
176
- Repository: micromatch/braces
177
-
178
- > The MIT License (MIT)
179
- >
180
- > Copyright (c) 2014-present, Jon Schlinkert.
181
- >
182
- > Permission is hereby granted, free of charge, to any person obtaining a copy
183
- > of this software and associated documentation files (the "Software"), to deal
184
- > in the Software without restriction, including without limitation the rights
185
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
186
- > copies of the Software, and to permit persons to whom the Software is
187
- > furnished to do so, subject to the following conditions:
188
- >
189
- > The above copyright notice and this permission notice shall be included in
190
- > all copies or substantial portions of the Software.
191
- >
192
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
193
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
194
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
195
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
196
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
197
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
198
- > THE SOFTWARE.
199
-
200
- ---------------------------------------
201
-
202
173
  ## cac
203
174
  License: MIT
204
175
  By: egoist
@@ -257,35 +228,6 @@ Repository: https://github.com/debitoor/chai-subset.git
257
228
 
258
229
  ---------------------------------------
259
230
 
260
- ## fill-range
261
- License: MIT
262
- By: Jon Schlinkert, Edo Rivai, Paul Miller, Rouven Weßling
263
- Repository: jonschlinkert/fill-range
264
-
265
- > The MIT License (MIT)
266
- >
267
- > Copyright (c) 2014-present, Jon Schlinkert.
268
- >
269
- > Permission is hereby granted, free of charge, to any person obtaining a copy
270
- > of this software and associated documentation files (the "Software"), to deal
271
- > in the Software without restriction, including without limitation the rights
272
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
273
- > copies of the Software, and to permit persons to whom the Software is
274
- > furnished to do so, subject to the following conditions:
275
- >
276
- > The above copyright notice and this permission notice shall be included in
277
- > all copies or substantial portions of the Software.
278
- >
279
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
280
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
281
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
282
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
283
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
284
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
285
- > THE SOFTWARE.
286
-
287
- ---------------------------------------
288
-
289
231
  ## find-up
290
232
  License: MIT
291
233
  By: Sindre Sorhus
@@ -326,64 +268,6 @@ Repository: git+https://github.com/WebReflection/flatted.git
326
268
 
327
269
  ---------------------------------------
328
270
 
329
- ## get-tsconfig
330
- License: MIT
331
- By: Hiroki Osame
332
- Repository: privatenumber/get-tsconfig
333
-
334
- > MIT License
335
- >
336
- > Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
337
- >
338
- > Permission is hereby granted, free of charge, to any person obtaining a copy
339
- > of this software and associated documentation files (the "Software"), to deal
340
- > in the Software without restriction, including without limitation the rights
341
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
342
- > copies of the Software, and to permit persons to whom the Software is
343
- > furnished to do so, subject to the following conditions:
344
- >
345
- > The above copyright notice and this permission notice shall be included in all
346
- > copies or substantial portions of the Software.
347
- >
348
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
349
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
350
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
351
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
352
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
353
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
354
- > SOFTWARE.
355
-
356
- ---------------------------------------
357
-
358
- ## is-number
359
- License: MIT
360
- By: Jon Schlinkert, Olsten Larck, Rouven Weßling
361
- Repository: jonschlinkert/is-number
362
-
363
- > The MIT License (MIT)
364
- >
365
- > Copyright (c) 2014-present, Jon Schlinkert.
366
- >
367
- > Permission is hereby granted, free of charge, to any person obtaining a copy
368
- > of this software and associated documentation files (the "Software"), to deal
369
- > in the Software without restriction, including without limitation the rights
370
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
371
- > copies of the Software, and to permit persons to whom the Software is
372
- > furnished to do so, subject to the following conditions:
373
- >
374
- > The above copyright notice and this permission notice shall be included in
375
- > all copies or substantial portions of the Software.
376
- >
377
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
378
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
379
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
380
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
381
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
382
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
383
- > THE SOFTWARE.
384
-
385
- ---------------------------------------
386
-
387
271
  ## js-tokens
388
272
  License: MIT
389
273
  By: Simon Lydell
@@ -488,35 +372,6 @@ Repository: sindresorhus/locate-path
488
372
 
489
373
  ---------------------------------------
490
374
 
491
- ## micromatch
492
- License: MIT
493
- By: Jon Schlinkert, Amila Welihinda, Bogdan Chadkin, Brian Woodward, Devon Govett, Elan Shanker, Fabrício Matté, Martin Kolárik, Olsten Larck, Paul Miller, Tom Byrer, Tyler Akins, Peter Bright, Kuba Juszczyk
494
- Repository: micromatch/micromatch
495
-
496
- > The MIT License (MIT)
497
- >
498
- > Copyright (c) 2014-present, Jon Schlinkert.
499
- >
500
- > Permission is hereby granted, free of charge, to any person obtaining a copy
501
- > of this software and associated documentation files (the "Software"), to deal
502
- > in the Software without restriction, including without limitation the rights
503
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
504
- > copies of the Software, and to permit persons to whom the Software is
505
- > furnished to do so, subject to the following conditions:
506
- >
507
- > The above copyright notice and this permission notice shall be included in
508
- > all copies or substantial portions of the Software.
509
- >
510
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
511
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
512
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
513
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
514
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
515
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
516
- > THE SOFTWARE.
517
-
518
- ---------------------------------------
519
-
520
375
  ## mlly
521
376
  License: MIT
522
377
  Repository: unjs/mlly
@@ -608,35 +463,6 @@ Repository: git+https://github.com/antfu-collective/package-manager-detector.git
608
463
 
609
464
  ---------------------------------------
610
465
 
611
- ## picomatch
612
- License: MIT
613
- By: Jon Schlinkert
614
- Repository: micromatch/picomatch
615
-
616
- > The MIT License (MIT)
617
- >
618
- > Copyright (c) 2017-present, Jon Schlinkert.
619
- >
620
- > Permission is hereby granted, free of charge, to any person obtaining a copy
621
- > of this software and associated documentation files (the "Software"), to deal
622
- > in the Software without restriction, including without limitation the rights
623
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
624
- > copies of the Software, and to permit persons to whom the Software is
625
- > furnished to do so, subject to the following conditions:
626
- >
627
- > The above copyright notice and this permission notice shall be included in
628
- > all copies or substantial portions of the Software.
629
- >
630
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
631
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
632
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
633
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
634
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
635
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
636
- > THE SOFTWARE.
637
-
638
- ---------------------------------------
639
-
640
466
  ## prompts
641
467
  License: MIT
642
468
  By: Terkel Gjervig
@@ -695,35 +521,6 @@ Repository: git+https://github.com/quansync-dev/quansync.git
695
521
 
696
522
  ---------------------------------------
697
523
 
698
- ## resolve-pkg-maps
699
- License: MIT
700
- By: Hiroki Osame
701
- Repository: privatenumber/resolve-pkg-maps
702
-
703
- > MIT License
704
- >
705
- > Copyright (c) Hiroki Osame <hiroki.osame@gmail.com>
706
- >
707
- > Permission is hereby granted, free of charge, to any person obtaining a copy
708
- > of this software and associated documentation files (the "Software"), to deal
709
- > in the Software without restriction, including without limitation the rights
710
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
711
- > copies of the Software, and to permit persons to whom the Software is
712
- > furnished to do so, subject to the following conditions:
713
- >
714
- > The above copyright notice and this permission notice shall be included in all
715
- > copies or substantial portions of the Software.
716
- >
717
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
718
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
719
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
720
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
721
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
722
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
723
- > SOFTWARE.
724
-
725
- ---------------------------------------
726
-
727
524
  ## sisteransi
728
525
  License: MIT
729
526
  By: Terkel Gjervig
@@ -782,35 +579,6 @@ Repository: git+https://github.com/antfu/strip-literal.git
782
579
 
783
580
  ---------------------------------------
784
581
 
785
- ## to-regex-range
786
- License: MIT
787
- By: Jon Schlinkert, Rouven Weßling
788
- Repository: micromatch/to-regex-range
789
-
790
- > The MIT License (MIT)
791
- >
792
- > Copyright (c) 2015-present, Jon Schlinkert.
793
- >
794
- > Permission is hereby granted, free of charge, to any person obtaining a copy
795
- > of this software and associated documentation files (the "Software"), to deal
796
- > in the Software without restriction, including without limitation the rights
797
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
798
- > copies of the Software, and to permit persons to whom the Software is
799
- > furnished to do so, subject to the following conditions:
800
- >
801
- > The above copyright notice and this permission notice shall be included in
802
- > all copies or substantial portions of the Software.
803
- >
804
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
805
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
806
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
807
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
808
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
809
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
810
- > THE SOFTWARE.
811
-
812
- ---------------------------------------
813
-
814
582
  ## type-detect
815
583
  License: MIT
816
584
  By: Jake Luer, Keith Cirkel, David Losert, Aleksey Shvayka, Lucas Fernandes da Costa, Grant Snodgrass, Jeremy Tice, Edward Betts, dvlsg, Amila Welihinda, Jake Champion, Miroslav Bajtoš
package/dist/browser.d.ts CHANGED
@@ -1,17 +1,19 @@
1
- import { S as SerializedCoverageConfig, a as SerializedConfig } from './chunks/config.d.UqE-KR0o.js';
1
+ import { S as SerializedCoverageConfig, a as SerializedConfig } from './chunks/config.d.D2ROskhv.js';
2
2
  import { R as RuntimeCoverageModuleLoader } from './chunks/coverage.d.S9RMNXIe.js';
3
3
  import { SerializedDiffOptions } from '@vitest/utils/diff';
4
4
  import { VitestExecutor } from './execute.js';
5
5
  export { collectTests, processError, startTests } from '@vitest/runner';
6
6
  import * as spy from '@vitest/spy';
7
7
  export { spy as SpyModule };
8
+ export { LoupeOptions, ParsedStack, StringifyOptions, format, getSafeTimers, inspect, stringify } from '@vitest/utils';
9
+ export { TraceMap, originalPositionFor } from '@vitest/utils/source-map';
8
10
  import '@vitest/pretty-format';
9
11
  import '@vitest/snapshot';
10
12
  import '@vitest/snapshot/environment';
11
13
  import 'vite-node/client';
12
14
  import 'vite-node';
13
- import './chunks/worker.d.CoCI7hzP.js';
14
- import './chunks/environment.d.D8YDy2v5.js';
15
+ import './chunks/worker.d.BKbBp2ga.js';
16
+ import './chunks/environment.d.cL3nLXbE.js';
15
17
  import 'vitest/optional-types.js';
16
18
  import 'node:vm';
17
19
  import '@vitest/mocker';
package/dist/browser.js CHANGED
@@ -1,9 +1,8 @@
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';
1
+ export { l as loadDiffConfig, b as loadSnapshotSerializers, c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/setup-common.CF-O-dZX.js';
2
2
  export { collectTests, processError, startTests } from '@vitest/runner';
3
3
  import * as spy from '@vitest/spy';
4
4
  export { spy as SpyModule };
5
+ export { format, getSafeTimers, inspect, stringify } from '@vitest/utils';
6
+ export { TraceMap, originalPositionFor } from '@vitest/utils/source-map';
5
7
  import './chunks/coverage.0iPg4Wrz.js';
6
8
  import '@vitest/snapshot';
7
- import '@vitest/utils';
8
- import './chunks/run-once.Dimr7O9f.js';
9
- import './chunks/utils.CgTj3MsC.js';
@@ -1,6 +1,6 @@
1
1
  import { ModuleCacheMap } from 'vite-node/client';
2
- import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.BpmIjFTD.js';
3
- import { p as provideWorkerState } from './utils.CgTj3MsC.js';
2
+ import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.B3q-2LPV.js';
3
+ import { p as provideWorkerState } from './utils.BlI4TC7Y.js';
4
4
 
5
5
  let _viteNode;
6
6
  const moduleCache = new ModuleCacheMap();
@@ -14,6 +14,7 @@ async function startViteNode(options) {
14
14
  }
15
15
  async function runBaseTests(method, state) {
16
16
  const { ctx } = state;
17
+ // state has new context, but we want to reuse existing ones
17
18
  state.moduleCache = moduleCache;
18
19
  state.moduleExecutionInfo = moduleExecutionInfo;
19
20
  provideWorkerState(globalThis, state);
@@ -27,7 +28,7 @@ async function runBaseTests(method, state) {
27
28
  const [executor, { run }] = await Promise.all([startViteNode({
28
29
  state,
29
30
  requestStubs: getDefaultRequestStubs()
30
- }), import('./runBaseTests.CguliJB5.js')]);
31
+ }), import('./runBaseTests.B_M1TTsK.js')]);
31
32
  const fileSpecs = ctx.files.map((f) => typeof f === "string" ? {
32
33
  filepath: f,
33
34
  testLocations: undefined
@@ -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 { g as getWorkerState } from './utils.CgTj3MsC.js';
4
+ import { g as getWorkerState } from './utils.BlI4TC7Y.js';
5
5
 
6
6
  const benchFns = new WeakMap();
7
7
  const benchOptsMap = new WeakMap();
@@ -2,7 +2,8 @@ import { toArray } from '@vitest/utils';
2
2
  import { EventEmitter } from 'events';
3
3
  import { normalize } from 'pathe';
4
4
  import c from 'tinyrainbow';
5
- import { a as defaultPort, d as defaultBrowserPort } from './constants.BZZyIeIE.js';
5
+ import { a as defaultPort, d as defaultBrowserPort } from './constants.DnKduX2e.js';
6
+ import { R as ReportersMap } from './index.Bter3jj9.js';
6
7
 
7
8
  function toArr(any) {
8
9
  return any == null ? [] : Array.isArray(any) ? any : [any];
@@ -618,7 +619,7 @@ class CAC extends EventEmitter {
618
619
 
619
620
  const cac = (name = "") => new CAC(name);
620
621
 
621
- var version = "3.2.0-beta.1";
622
+ var version = "3.2.0-beta.3";
622
623
 
623
624
  const apiConfig = (port) => ({
624
625
  port: {
@@ -716,7 +717,7 @@ const cliOptionsConfig = {
716
717
  hideSkippedTests: { description: "Hide logs for skipped tests" },
717
718
  reporters: {
718
719
  alias: "reporter",
719
- description: "Specify reporters",
720
+ description: `Specify reporters (${Object.keys(ReportersMap).join(", ")})`,
720
721
  argument: "<name>",
721
722
  subcommands: null,
722
723
  array: true
@@ -864,10 +865,7 @@ const cliOptionsConfig = {
864
865
  return { enabled: browser === "yes" };
865
866
  }
866
867
  if (typeof browser === "string") {
867
- return {
868
- enabled: true,
869
- name: browser
870
- };
868
+ return { name: browser };
871
869
  }
872
870
  return browser;
873
871
  },
@@ -1004,7 +1002,8 @@ const cliOptionsConfig = {
1004
1002
  setupFiles: {
1005
1003
  description: "Changes the order in which setup files are executed. Accepted values are: \"list\" and \"parallel\". If set to \"list\", will run setup files in the order they are defined. If set to \"parallel\", will run setup files in parallel (default: `\"parallel\"`)",
1006
1004
  argument: "<order>"
1007
- }
1005
+ },
1006
+ groupOrder: null
1008
1007
  }
1009
1008
  },
1010
1009
  inspect: {
@@ -1126,6 +1125,10 @@ const cliOptionsConfig = {
1126
1125
  argument: "<path>",
1127
1126
  normalize: true
1128
1127
  },
1128
+ spawnTimeout: {
1129
+ description: "Minimum time in milliseconds it takes to spawn the typechecker",
1130
+ argument: "<time>"
1131
+ },
1129
1132
  include: null,
1130
1133
  exclude: null
1131
1134
  }
@@ -1337,6 +1340,7 @@ function createCLI(options = {}) {
1337
1340
  const helpIndex = process.argv.findIndex((arg) => arg === "--help");
1338
1341
  const subcommands = process.argv.slice(helpIndex + 1);
1339
1342
  const defaultOutput = options.body.split("\n").filter((line) => /^\s+--\S+\./.test(line) === false).join("\n");
1343
+ // Filter out options with dot-notation if --help is not called with a subcommand (default behavior)
1340
1344
  if (subcommands.length === 0) {
1341
1345
  options.body = defaultOutput;
1342
1346
  return info;
@@ -1354,16 +1358,20 @@ function createCLI(options = {}) {
1354
1358
  banner.body = `${banner.body}\n WARN: ${warning}`;
1355
1359
  }
1356
1360
  }
1361
+ // If other subcommand combinations are used, only show options for the subcommand
1357
1362
  for (let i = 0; i < subcommands.length; i++) {
1358
1363
  const subcommand = subcommands[i];
1364
+ // --help --expand-help can't be called with multiple subcommands and is handled above
1359
1365
  if (subcommand === "--expand-help" || subcommand === "--expandHelp") {
1360
1366
  addBannerWarning("--expand-help subcommand ignored because, when used with --help, it must be the only subcommand");
1361
1367
  continue;
1362
1368
  }
1369
+ // Mark the help section for the subcommands
1363
1370
  if (subcommand.startsWith("--")) {
1364
1371
  options.body = options.body.split("\n").map((line) => line.trim().startsWith(subcommand) ? `${subcommandMarker}${line}` : line).join("\n");
1365
1372
  }
1366
1373
  }
1374
+ // Filter based on the marked options to preserve the original sort order
1367
1375
  options.body = options.body.split("\n").map((line) => line.startsWith(subcommandMarker) ? line.split(subcommandMarker)[1] : "").filter((line) => line.length !== 0).join("\n");
1368
1376
  if (!options.body) {
1369
1377
  addBannerWarning("no options were found for your subcommands so we printed the whole output");
@@ -1453,9 +1461,6 @@ function normalizeCliOptions(cliFilters, argv) {
1453
1461
  if (cliFilters.some((filter) => filter.includes(":"))) {
1454
1462
  argv.includeTaskLocation ??= true;
1455
1463
  }
1456
- if (typeof argv.browser === "object" && !("enabled" in argv.browser)) {
1457
- argv.browser.enabled = true;
1458
- }
1459
1464
  if (typeof argv.typecheck?.only === "boolean") {
1460
1465
  argv.typecheck.enabled ??= true;
1461
1466
  }
@@ -1466,13 +1471,13 @@ async function start(mode, cliFilters, options) {
1466
1471
  process.title = "node (vitest)";
1467
1472
  } catch {}
1468
1473
  try {
1469
- const { startVitest } = await import('./cli-api.2970Nj9J.js').then(function (n) { return n.f; });
1474
+ const { startVitest } = await import('./cli-api.CnmEXkxs.js').then(function (n) { return n.f; });
1470
1475
  const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
1471
1476
  if (!ctx.shouldKeepServer()) {
1472
1477
  await ctx.exit();
1473
1478
  }
1474
1479
  } catch (e) {
1475
- const { errorBanner } = await import('./utils.8gfOgtry.js').then(function (n) { return n.u; });
1480
+ const { errorBanner } = await import('./index.Bter3jj9.js').then(function (n) { return n.u; });
1476
1481
  console.error(`\n${errorBanner("Startup Error")}`);
1477
1482
  console.error(e);
1478
1483
  console.error("\n\n");
@@ -1487,7 +1492,7 @@ async function init(project) {
1487
1492
  console.error(new Error("Only the \"browser\" project is supported. Use \"vitest init browser\" to create a new project."));
1488
1493
  process.exit(1);
1489
1494
  }
1490
- const { create } = await import('./creator.CuL7xDWI.js');
1495
+ const { create } = await import('./creator.C8WKy2eW.js');
1491
1496
  await create();
1492
1497
  }
1493
1498
  async function collect(mode, cliFilters, options) {
@@ -1495,7 +1500,7 @@ async function collect(mode, cliFilters, options) {
1495
1500
  process.title = "node (vitest)";
1496
1501
  } catch {}
1497
1502
  try {
1498
- const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.2970Nj9J.js').then(function (n) { return n.f; });
1503
+ const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.CnmEXkxs.js').then(function (n) { return n.f; });
1499
1504
  const ctx = await prepareVitest(mode, {
1500
1505
  ...normalizeCliOptions(cliFilters, options),
1501
1506
  watch: false,
@@ -1517,7 +1522,7 @@ async function collect(mode, cliFilters, options) {
1517
1522
  }
1518
1523
  await ctx.close();
1519
1524
  } catch (e) {
1520
- const { errorBanner } = await import('./utils.8gfOgtry.js').then(function (n) { return n.u; });
1525
+ const { errorBanner } = await import('./index.Bter3jj9.js').then(function (n) { return n.u; });
1521
1526
  console.error(`\n${errorBanner("Collect Error")}`);
1522
1527
  console.error(e);
1523
1528
  console.error("\n\n");