vitest 4.0.0-beta.10 → 4.0.0-beta.12

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 (69) hide show
  1. package/LICENSE.md +85 -101
  2. package/dist/browser.d.ts +10 -6
  3. package/dist/browser.js +8 -5
  4. package/dist/chunks/{benchmark.CJUa-Hsa.js → benchmark.DHKMYAts.js} +2 -2
  5. package/dist/chunks/{browser.d.yFAklsD1.d.ts → browser.d.D9YV3JvA.d.ts} +1 -1
  6. package/dist/chunks/{cac.DCxo_nSu.js → cac.r1gel_VZ.js} +18 -11
  7. package/dist/chunks/{cli-api.BJJXh9BV.js → cli-api.CpywZzJV.js} +153 -176
  8. package/dist/chunks/{config.d.B_LthbQq.d.ts → config.d.DGazh2r6.d.ts} +3 -1
  9. package/dist/chunks/{console.7h5kHUIf.js → console.CTJL2nuH.js} +4 -6
  10. package/dist/chunks/{coverage.BCU-r2QL.js → coverage.CiB0fs_7.js} +57 -79
  11. package/dist/chunks/{creator.08Gi-vCA.js → creator.DfXDsUyL.js} +6 -8
  12. package/dist/chunks/{global.d.BK3X7FW1.d.ts → global.d.BcFPD2LN.d.ts} +0 -13
  13. package/dist/chunks/{globals.DG-S3xFe.js → globals.DC4ntO86.js} +8 -6
  14. package/dist/chunks/{index.DIWhzsUh.js → index.Bt-upxGS.js} +6 -12
  15. package/dist/chunks/{index.BIP7prJq.js → index.CHrBLuEH.js} +94 -103
  16. package/dist/chunks/{index.X0nbfr6-.js → index.Dc3xnDvT.js} +48 -289
  17. package/dist/chunks/{index.CMfqw92x.js → index.Dnl38iQ_.js} +2 -2
  18. package/dist/chunks/{index.BjKEiSn0.js → index.uLUz1RDt.js} +3 -3
  19. package/dist/chunks/{inspector.CvQD-Nie.js → inspector.Br76Q2Mb.js} +1 -4
  20. package/dist/chunks/{moduleRunner.d.D9nBoC4p.d.ts → moduleRunner.d.CeYc7nZ0.d.ts} +1 -1
  21. package/dist/chunks/{node.CyipiPvJ.js → node.BwAWWjHZ.js} +3 -4
  22. package/dist/chunks/{plugin.d.BMVSnsGV.d.ts → plugin.d.XreRXLXS.d.ts} +1 -1
  23. package/dist/chunks/{reporters.d.BUWjmRYq.d.ts → reporters.d.CJVTaaWb.d.ts} +54 -13
  24. package/dist/chunks/{resolveSnapshotEnvironment.Bkht6Yor.js → resolveSnapshotEnvironment.BsJpmVZR.js} +7 -8
  25. package/dist/chunks/{rpc.BKr6mtxz.js → rpc.cD77ENhU.js} +13 -14
  26. package/dist/chunks/{setup-common.uiMcU3cv.js → setup-common.BewgbkTd.js} +6 -6
  27. package/dist/chunks/{startModuleRunner.p67gbNo9.js → startModuleRunner.DPBo3mme.js} +65 -56
  28. package/dist/chunks/{test.BiqSKISg.js → test.CTuWuHYH.js} +7 -7
  29. package/dist/chunks/{typechecker.DB-fIMaH.js → typechecker.BfOQ86_a.js} +624 -14
  30. package/dist/chunks/{utils.D2R2NiOH.js → utils.CG9h5ccR.js} +2 -5
  31. package/dist/chunks/{vi.ZPgvtBao.js → vi.B2--mG9U.js} +38 -145
  32. package/dist/{worker.js → chunks/worker.DVTUM2IW.js} +71 -42
  33. package/dist/chunks/{worker.d.BDsXGkwh.d.ts → worker.d.buwuBpBt.d.ts} +2 -77
  34. package/dist/cli.js +7 -5
  35. package/dist/config.d.ts +6 -6
  36. package/dist/coverage.d.ts +5 -5
  37. package/dist/coverage.js +4 -5
  38. package/dist/environments.js +1 -1
  39. package/dist/index.d.ts +8 -8
  40. package/dist/index.js +8 -6
  41. package/dist/module-evaluator.d.ts +3 -3
  42. package/dist/module-evaluator.js +11 -13
  43. package/dist/module-runner.js +5 -5
  44. package/dist/node.d.ts +14 -11
  45. package/dist/node.js +18 -14
  46. package/dist/reporters.d.ts +5 -5
  47. package/dist/reporters.js +7 -5
  48. package/dist/runners.d.ts +1 -1
  49. package/dist/runners.js +9 -7
  50. package/dist/snapshot.js +3 -3
  51. package/dist/suite.js +4 -3
  52. package/dist/{chunks/base.Cjha6usc.js → worker-base.js} +104 -32
  53. package/dist/{chunks/vm.Ca0Y0W5f.js → worker-vm.js} +81 -31
  54. package/dist/workers/runVmTests.js +14 -11
  55. package/package.json +26 -26
  56. package/browser.d.ts +0 -1
  57. package/dist/chunks/moduleTransport.I-bgQy0S.js +0 -19
  58. package/dist/chunks/resolver.Bx6lE0iq.js +0 -119
  59. package/dist/chunks/utils.C2YI6McM.js +0 -52
  60. package/dist/chunks/worker.d.BNcX_2mH.d.ts +0 -8
  61. package/dist/workers/forks.js +0 -67
  62. package/dist/workers/threads.js +0 -55
  63. package/dist/workers/vmForks.js +0 -48
  64. package/dist/workers/vmThreads.js +0 -38
  65. package/dist/workers.d.ts +0 -38
  66. package/dist/workers.js +0 -48
  67. package/execute.d.ts +0 -1
  68. package/utils.d.ts +0 -1
  69. package/workers.d.ts +0 -1
package/LICENSE.md CHANGED
@@ -57,6 +57,87 @@ Repository: git+https://github.com/antfu/install-pkg.git
57
57
 
58
58
  ---------------------------------------
59
59
 
60
+ ## @jridgewell/resolve-uri
61
+ License: MIT
62
+ By: Justin Ridgewell
63
+ Repository: https://github.com/jridgewell/resolve-uri
64
+
65
+ > Copyright 2019 Justin Ridgewell <jridgewell@google.com>
66
+ >
67
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
68
+ > of this software and associated documentation files (the "Software"), to deal
69
+ > in the Software without restriction, including without limitation the rights
70
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
71
+ > copies of the Software, and to permit persons to whom the Software is
72
+ > furnished to do so, subject to the following conditions:
73
+ >
74
+ > The above copyright notice and this permission notice shall be included in
75
+ > all copies or substantial portions of the Software.
76
+ >
77
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
78
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
79
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
80
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
81
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
82
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
83
+ > SOFTWARE.
84
+
85
+ ---------------------------------------
86
+
87
+ ## @jridgewell/sourcemap-codec
88
+ License: MIT
89
+ By: Justin Ridgewell
90
+ Repository: git+https://github.com/jridgewell/sourcemaps.git
91
+
92
+ > Copyright 2024 Justin Ridgewell <justin@ridgewell.name>
93
+ >
94
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
95
+ > of this software and associated documentation files (the "Software"), to deal
96
+ > in the Software without restriction, including without limitation the rights
97
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
98
+ > copies of the Software, and to permit persons to whom the Software is
99
+ > furnished to do so, subject to the following conditions:
100
+ >
101
+ > The above copyright notice and this permission notice shall be included in
102
+ > all copies or substantial portions of the Software.
103
+ >
104
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
105
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
106
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
107
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
108
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
109
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
110
+ > SOFTWARE.
111
+
112
+ ---------------------------------------
113
+
114
+ ## @jridgewell/trace-mapping
115
+ License: MIT
116
+ By: Justin Ridgewell
117
+ Repository: git+https://github.com/jridgewell/sourcemaps.git
118
+
119
+ > Copyright 2024 Justin Ridgewell <justin@ridgewell.name>
120
+ >
121
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
122
+ > of this software and associated documentation files (the "Software"), to deal
123
+ > in the Software without restriction, including without limitation the rights
124
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
125
+ > copies of the Software, and to permit persons to whom the Software is
126
+ > furnished to do so, subject to the following conditions:
127
+ >
128
+ > The above copyright notice and this permission notice shall be included in
129
+ > all copies or substantial portions of the Software.
130
+ >
131
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
132
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
133
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
134
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
135
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
136
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
137
+ > SOFTWARE.
138
+
139
+ ---------------------------------------
140
+
60
141
  ## @sinonjs/commons
61
142
  License: BSD-3-Clause
62
143
  Repository: git+https://github.com/sinonjs/commons.git
@@ -199,43 +280,14 @@ Repository: egoist/cac
199
280
 
200
281
  ---------------------------------------
201
282
 
202
- ## chai-subset
203
- License: MIT
204
- By: Andrii Shumada, Robert Herhold
205
- Repository: https://github.com/debitoor/chai-subset.git
206
-
207
- > The MIT License (MIT)
208
- >
209
- > Copyright (c) 2014
210
- >
211
- > Permission is hereby granted, free of charge, to any person obtaining a copy
212
- > of this software and associated documentation files (the "Software"), to deal
213
- > in the Software without restriction, including without limitation the rights
214
- > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
215
- > copies of the Software, and to permit persons to whom the Software is
216
- > furnished to do so, subject to the following conditions:
217
- >
218
- > The above copyright notice and this permission notice shall be included in all
219
- > copies or substantial portions of the Software.
220
- >
221
- > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
222
- > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
223
- > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
224
- > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
225
- > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
226
- > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
227
- > SOFTWARE.
228
-
229
- ---------------------------------------
230
-
231
- ## find-up
283
+ ## empathic
232
284
  License: MIT
233
- By: Sindre Sorhus
234
- Repository: sindresorhus/find-up
285
+ By: Luke Edwards
286
+ Repository: lukeed/empathic
235
287
 
236
288
  > MIT License
237
289
  >
238
- > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
290
+ > Copyright (c) Luke Edwards <luke.edwards05@gmail.com> (lukeed.com)
239
291
  >
240
292
  > 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:
241
293
  >
@@ -355,23 +407,6 @@ Repository: git+https://github.com/antfu-collective/local-pkg.git
355
407
 
356
408
  ---------------------------------------
357
409
 
358
- ## locate-path
359
- License: MIT
360
- By: Sindre Sorhus
361
- Repository: sindresorhus/locate-path
362
-
363
- > MIT License
364
- >
365
- > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
366
- >
367
- > 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:
368
- >
369
- > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
370
- >
371
- > 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.
372
-
373
- ---------------------------------------
374
-
375
410
  ## mime
376
411
  License: MIT
377
412
  By: Robert Kieffer
@@ -429,40 +464,6 @@ Repository: unjs/mlly
429
464
 
430
465
  ---------------------------------------
431
466
 
432
- ## p-limit
433
- License: MIT
434
- By: Sindre Sorhus
435
- Repository: sindresorhus/p-limit
436
-
437
- > MIT License
438
- >
439
- > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
440
- >
441
- > 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:
442
- >
443
- > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
444
- >
445
- > 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.
446
-
447
- ---------------------------------------
448
-
449
- ## p-locate
450
- License: MIT
451
- By: Sindre Sorhus
452
- Repository: sindresorhus/p-locate
453
-
454
- > MIT License
455
- >
456
- > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
457
- >
458
- > 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:
459
- >
460
- > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
461
- >
462
- > 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.
463
-
464
- ---------------------------------------
465
-
466
467
  ## package-manager-detector
467
468
  License: MIT
468
469
  By: Anthony Fu
@@ -688,20 +689,3 @@ Repository: git+https://github.com/websockets/ws.git
688
689
  > COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
689
690
  > IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
690
691
  > CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
691
-
692
- ---------------------------------------
693
-
694
- ## yocto-queue
695
- License: MIT
696
- By: Sindre Sorhus
697
- Repository: sindresorhus/yocto-queue
698
-
699
- > MIT License
700
- >
701
- > Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (https://sindresorhus.com)
702
- >
703
- > 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:
704
- >
705
- > The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
706
- >
707
- > 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.
package/dist/browser.d.ts CHANGED
@@ -1,17 +1,21 @@
1
- import { S as SerializedCoverageConfig, a as SerializedConfig } from './chunks/config.d.B_LthbQq.js';
1
+ import { S as SerializedCoverageConfig, a as SerializedConfig } from './chunks/config.d.DGazh2r6.js';
2
2
  import { R as RuntimeCoverageModuleLoader } from './chunks/coverage.d.BZtK59WP.js';
3
3
  import { SerializedDiffOptions } from '@vitest/utils/diff';
4
- import { V as VitestModuleRunner } from './chunks/moduleRunner.d.D9nBoC4p.js';
5
- export { collectTests, processError, startTests } from '@vitest/runner';
4
+ import { V as VitestModuleRunner } from './chunks/moduleRunner.d.CeYc7nZ0.js';
5
+ export { collectTests, startTests } from '@vitest/runner';
6
6
  import * as _vitest_spy from '@vitest/spy';
7
7
  export { _vitest_spy as SpyModule };
8
- export { LoupeOptions, ParsedStack, StringifyOptions, format, getSafeTimers, getType, inspect, stringify } from '@vitest/utils';
9
- export { TraceMap, originalPositionFor } from '@vitest/utils/source-map';
8
+ export { LoupeOptions, ParsedStack, StringifyOptions } from '@vitest/utils';
9
+ export { format, inspect, stringify } from '@vitest/utils/display';
10
+ export { processError } from '@vitest/utils/error';
11
+ export { getType } from '@vitest/utils/helpers';
12
+ export { DecodedMap, getOriginalPosition } from '@vitest/utils/source-map';
13
+ export { getSafeTimers, setSafeTimers } from '@vitest/utils/timers';
10
14
  import '@vitest/pretty-format';
11
15
  import '@vitest/snapshot';
12
16
  import 'node:vm';
13
17
  import 'vite/module-runner';
14
- import './chunks/worker.d.BDsXGkwh.js';
18
+ import './chunks/worker.d.buwuBpBt.js';
15
19
  import './chunks/environment.d.BsToaxti.js';
16
20
  import '@vitest/mocker';
17
21
  import './chunks/mocker.d.BE_2ls6u.js';
package/dist/browser.js CHANGED
@@ -1,9 +1,12 @@
1
- export { l as loadDiffConfig, b as loadSnapshotSerializers, c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/setup-common.uiMcU3cv.js';
2
- export { collectTests, processError, startTests } from '@vitest/runner';
1
+ export { l as loadDiffConfig, b as loadSnapshotSerializers, c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/setup-common.BewgbkTd.js';
2
+ export { collectTests, startTests } from '@vitest/runner';
3
3
  import * as spyModule from '@vitest/spy';
4
4
  export { spyModule as SpyModule };
5
- export { format, getSafeTimers, getType, inspect, stringify } from '@vitest/utils';
6
- export { TraceMap, originalPositionFor } from '@vitest/utils/source-map';
5
+ export { format, inspect, stringify } from '@vitest/utils/display';
6
+ export { processError } from '@vitest/utils/error';
7
+ export { getType } from '@vitest/utils/helpers';
8
+ export { DecodedMap, getOriginalPosition } from '@vitest/utils/source-map';
9
+ export { getSafeTimers, setSafeTimers } from '@vitest/utils/timers';
7
10
  import './chunks/coverage.D_JHT54q.js';
8
11
  import '@vitest/snapshot';
9
- import './chunks/utils.D2R2NiOH.js';
12
+ import './chunks/utils.CG9h5ccR.js';
@@ -1,7 +1,7 @@
1
1
  import { getCurrentSuite } from '@vitest/runner';
2
2
  import { createChainable } from '@vitest/runner/utils';
3
- import { noop } from '@vitest/utils';
4
- import { g as getWorkerState } from './utils.D2R2NiOH.js';
3
+ import { noop } from '@vitest/utils/helpers';
4
+ import { g as getWorkerState } from './utils.CG9h5ccR.js';
5
5
 
6
6
  const benchFns = /* @__PURE__ */ new WeakMap(), benchOptsMap = /* @__PURE__ */ new WeakMap();
7
7
  function getBenchOptions(key) {
@@ -1,4 +1,4 @@
1
- import { T as TestExecutionMethod } from './worker.d.BDsXGkwh.js';
1
+ import { T as TestExecutionMethod } from './worker.d.buwuBpBt.js';
2
2
 
3
3
  type SerializedTestSpecification = [project: {
4
4
  name: string | undefined;
@@ -1,9 +1,9 @@
1
- import { toArray } from '@vitest/utils';
1
+ import { toArray } from '@vitest/utils/helpers';
2
2
  import { EventEmitter } from 'events';
3
3
  import { normalize } from 'pathe';
4
4
  import c from 'tinyrainbow';
5
5
  import { a as defaultPort, d as defaultBrowserPort } from './constants.D_Q9UYh-.js';
6
- import { R as ReportersMap } from './index.BIP7prJq.js';
6
+ import { R as ReportersMap } from './index.CHrBLuEH.js';
7
7
 
8
8
  function toArr(any) {
9
9
  return any == null ? [] : Array.isArray(any) ? any : [any];
@@ -619,7 +619,7 @@ class CAC extends EventEmitter {
619
619
 
620
620
  const cac = (name = "") => new CAC(name);
621
621
 
622
- var version = "4.0.0-beta.10";
622
+ var version = "4.0.0-beta.12";
623
623
 
624
624
  const apiConfig = (port) => ({
625
625
  port: {
@@ -877,6 +877,14 @@ const cliOptionsConfig = {
877
877
  argument: "<timeout>"
878
878
  },
879
879
  trackUnhandledErrors: { description: "Control if Vitest catches uncaught exceptions so they can be reported (default: `true`)" },
880
+ trace: {
881
+ description: "Enable trace view mode. Supported: \"on\", \"off\", \"on-first-retry\", \"on-all-retries\", \"retain-on-failure\".",
882
+ argument: "<mode>",
883
+ subcommands: null,
884
+ transform(value) {
885
+ return { mode: value };
886
+ }
887
+ },
880
888
  orchestratorScripts: null,
881
889
  commands: null,
882
890
  viewport: null,
@@ -1293,11 +1301,10 @@ function createCLI(options = {}) {
1293
1301
  }), cli.command("run [...filters]", void 0, options).action(run), cli.command("related [...filters]", void 0, options).action(runRelated), cli.command("watch [...filters]", void 0, options).action(watch), cli.command("dev [...filters]", void 0, options).action(watch), addCliOptions(cli.command("bench [...filters]", void 0, options).action(benchmark), benchCliOptionsConfig), cli.command("init <project>", void 0, options).action(init), addCliOptions(cli.command("list [...filters]", void 0, options).action((filters, options) => collect("test", filters, options)), collectCliOptionsConfig), cli.command("[...filters]", void 0, options).action((filters, options) => start("test", filters, options)), cli;
1294
1302
  }
1295
1303
  function removeQuotes(str) {
1296
- return typeof str === "string" ? str.startsWith("\"") && str.endsWith("\"") || str.startsWith(`'`) && str.endsWith(`'`) ? str.slice(1, -1) : str : Array.isArray(str) ? str.map(removeQuotes) : str;
1304
+ return typeof str === "string" ? str[0] === "\"" && str.endsWith("\"") || str.startsWith(`'`) && str.endsWith(`'`) ? str.slice(1, -1) : str : Array.isArray(str) ? str.map(removeQuotes) : str;
1297
1305
  }
1298
1306
  function splitArgv(argv) {
1299
- const reg = /(['"])(?:(?!\1).)+\1/g;
1300
- return argv = argv.replace(reg, (match) => match.replace(/\s/g, "\0")), argv.split(" ").map((arg) => {
1307
+ return argv = argv.replace(/(['"])(?:(?!\1).)+\1/g, (match) => match.replace(/\s/g, "\0")), argv.split(" ").map((arg) => {
1301
1308
  return arg = arg.replace(/\0/g, " "), removeQuotes(arg);
1302
1309
  });
1303
1310
  }
@@ -1334,22 +1341,22 @@ function normalizeCliOptions(cliFilters, argv) {
1334
1341
  }
1335
1342
  async function start(mode, cliFilters, options) {
1336
1343
  try {
1337
- const { startVitest } = await import('./cli-api.BJJXh9BV.js').then(function (n) { return n.j; }), ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
1344
+ const { startVitest } = await import('./cli-api.CpywZzJV.js').then(function (n) { return n.j; }), ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
1338
1345
  if (!ctx.shouldKeepServer()) await ctx.exit();
1339
1346
  } catch (e) {
1340
- const { errorBanner } = await import('./index.BIP7prJq.js').then(function (n) { return n.u; });
1347
+ const { errorBanner } = await import('./index.CHrBLuEH.js').then(function (n) { return n.u; });
1341
1348
  if (console.error(`\n${errorBanner("Startup Error")}`), console.error(e), console.error("\n\n"), process.exitCode == null) process.exitCode = 1;
1342
1349
  process.exit();
1343
1350
  }
1344
1351
  }
1345
1352
  async function init(project) {
1346
1353
  if (project !== "browser") console.error(/* @__PURE__ */ new Error("Only the \"browser\" project is supported. Use \"vitest init browser\" to create a new project.")), process.exit(1);
1347
- const { create } = await import('./creator.08Gi-vCA.js');
1354
+ const { create } = await import('./creator.DfXDsUyL.js');
1348
1355
  await create();
1349
1356
  }
1350
1357
  async function collect(mode, cliFilters, options) {
1351
1358
  try {
1352
- const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.BJJXh9BV.js').then(function (n) { return n.j; }), ctx = await prepareVitest(mode, {
1359
+ const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.CpywZzJV.js').then(function (n) { return n.j; }), ctx = await prepareVitest(mode, {
1353
1360
  ...normalizeCliOptions(cliFilters, options),
1354
1361
  watch: false,
1355
1362
  run: true
@@ -1367,7 +1374,7 @@ async function collect(mode, cliFilters, options) {
1367
1374
  }
1368
1375
  await ctx.close();
1369
1376
  } catch (e) {
1370
- const { errorBanner } = await import('./index.BIP7prJq.js').then(function (n) { return n.u; });
1377
+ const { errorBanner } = await import('./index.CHrBLuEH.js').then(function (n) { return n.u; });
1371
1378
  if (console.error(`\n${errorBanner("Collect Error")}`), console.error(e), console.error("\n\n"), process.exitCode == null) process.exitCode = 1;
1372
1379
  process.exit();
1373
1380
  }