vitest 1.6.0 → 2.0.0-beta.2

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 (72) hide show
  1. package/LICENSE.md +172 -0
  2. package/dist/browser.d.ts +1 -1
  3. package/dist/browser.js +4 -4
  4. package/dist/chunks/{environments-node.vcoXCoKs.js → environments-node.39w4gmlF.js} +2 -2
  5. package/dist/chunks/{install-pkg.LE8oaA1t.js → install-pkg.DNUmWFkO.js} +2 -2
  6. package/dist/chunks/integrations-globals.B5Jl0grA.js +31 -0
  7. package/dist/chunks/{runtime-console.EO5ha7qv.js → runtime-console.CUES-L8X.js} +9 -9
  8. package/dist/chunks/{runtime-runBaseTests.oAvMKtQC.js → runtime-runBaseTests._dXkRAZc.js} +18 -18
  9. package/dist/cli.js +3 -3
  10. package/dist/config.cjs +2 -3
  11. package/dist/config.d.ts +1 -1
  12. package/dist/config.js +2 -3
  13. package/dist/coverage.d.ts +1 -1
  14. package/dist/coverage.js +2 -2
  15. package/dist/environments.d.ts +1 -1
  16. package/dist/environments.js +1 -1
  17. package/dist/execute.d.ts +2 -1
  18. package/dist/execute.js +2 -2
  19. package/dist/index.d.ts +769 -21
  20. package/dist/index.js +12 -12
  21. package/dist/node.d.ts +2 -2
  22. package/dist/node.js +20 -21
  23. package/dist/{reporters-yx5ZTtEV.d.ts → reporters-DFgqsvtL.d.ts} +29 -32
  24. package/dist/reporters.d.ts +1 -1
  25. package/dist/reporters.js +10 -11
  26. package/dist/runners.d.ts +1 -1
  27. package/dist/runners.js +17 -18
  28. package/dist/snapshot.js +3 -3
  29. package/dist/{suite-IbNSsUWN.d.ts → suite-C_sqQjdz.d.ts} +1 -1
  30. package/dist/suite.d.ts +2 -2
  31. package/dist/suite.js +4 -4
  32. package/dist/vendor/{base.Ybri3C14.js → base.VFkIJ66g.js} +3 -3
  33. package/dist/vendor/{base.5NT-gWu5.js → base._gnK9Slw.js} +1 -2
  34. package/dist/vendor/{benchmark.yGkUTKnC.js → benchmark.BNLebNi5.js} +1 -1
  35. package/dist/vendor/{cac.EdDItJD-.js → cac.CtP0aXu-.js} +5 -6
  36. package/dist/vendor/{cli-api.E07AF1Yq.js → cli-api.B2QW76dQ.js} +3061 -362
  37. package/dist/vendor/{execute.fL3szUAI.js → execute.CLLNVNnK.js} +1 -1
  38. package/dist/vendor/{index.DpVgvm2P.js → index.BfoZyXD1.js} +5 -5
  39. package/dist/vendor/{index.8bPxjt7g.js → index.BpSiYbpB.js} +5 -1
  40. package/dist/vendor/{index.Q04MCqDO.js → index.CRxYS9H3.js} +414 -113
  41. package/dist/vendor/{index.dI9lHwVn.js → index.CmILuxzC.js} +8 -6
  42. package/dist/vendor/{index.xL8XjTLv.js → index.DP-km6lF.js} +1 -1
  43. package/dist/vendor/{index.SMVOaj7F.js → index._7XLd8Kd.js} +2 -2
  44. package/dist/vendor/{rpc.joBhAkyK.js → rpc.DRDE9Pu1.js} +2 -2
  45. package/dist/vendor/{run-once.Olz_Zkd8.js → run-once.DLomgGUH.js} +1 -1
  46. package/dist/vendor/{setup-common.8nJLd4ay.js → setup-common.XeoZAW8t.js} +2 -2
  47. package/dist/vendor/{tasks.IknbGB2n.js → tasks.WC7M-K-v.js} +4 -1
  48. package/dist/vendor/{utils.dEtNIEgr.js → utils.D5gGkwyH.js} +1 -1
  49. package/dist/vendor/{vi.YFlodzP_.js → vi.ClD3hi7L.js} +23 -10
  50. package/dist/vendor/{vm.QEE48c0T.js → vm.Bi3bljci.js} +47 -59
  51. package/dist/worker.js +6 -6
  52. package/dist/workers/forks.js +5 -5
  53. package/dist/workers/runVmTests.js +17 -17
  54. package/dist/workers/threads.js +5 -5
  55. package/dist/workers/vmForks.js +8 -8
  56. package/dist/workers/vmThreads.js +8 -8
  57. package/dist/workers.d.ts +1 -1
  58. package/dist/workers.js +13 -13
  59. package/package.json +29 -29
  60. package/vitest.mjs +1 -1
  61. package/dist/chunks/integrations-globals.kw4co3rx.js +0 -31
  62. package/dist/cli-wrapper.js +0 -119
  63. /package/dist/chunks/{node-git.Hw101KjS.js → node-git.CCI8evVZ.js} +0 -0
  64. /package/dist/vendor/{_commonjsHelpers.jjO7Zipk.js → _commonjsHelpers.BFTU3MAI.js} +0 -0
  65. /package/dist/vendor/{constants.5J7I254_.js → constants.5SOfHUj0.js} +0 -0
  66. /package/dist/vendor/{coverage.E7sG1b3r.js → coverage.ChSqD-qS.js} +0 -0
  67. /package/dist/vendor/{date.Ns1pGd_X.js → date.BKM1wewY.js} +0 -0
  68. /package/dist/vendor/{env.AtSIuHFg.js → env.bmJgw1qP.js} +0 -0
  69. /package/dist/vendor/{global.CkGT_TMy.js → global.7bFbnyXl.js} +0 -0
  70. /package/dist/vendor/{index.GVFv9dZ0.js → index.DeR1hhfY.js} +0 -0
  71. /package/dist/vendor/{inspector.IgLX3ur5.js → inspector.hPQncR7V.js} +0 -0
  72. /package/dist/vendor/{utils.0uYuCbzo.js → utils.CUjzkRH7.js} +0 -0
package/LICENSE.md CHANGED
@@ -196,6 +196,35 @@ Repository: https://github.com/sinonjs/fake-timers.git
196
196
 
197
197
  ---------------------------------------
198
198
 
199
+ ## acorn-walk
200
+ License: MIT
201
+ By: Marijn Haverbeke, Ingvar Stepanyan, Adrian Heine
202
+ Repository: https://github.com/acornjs/acorn.git
203
+
204
+ > MIT License
205
+ >
206
+ > Copyright (C) 2012-2020 by various contributors (see AUTHORS)
207
+ >
208
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
209
+ > of this software and associated documentation files (the "Software"), to deal
210
+ > in the Software without restriction, including without limitation the rights
211
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
212
+ > copies of the Software, and to permit persons to whom the Software is
213
+ > furnished to do so, subject to the following conditions:
214
+ >
215
+ > The above copyright notice and this permission notice shall be included in
216
+ > all copies or substantial portions of the Software.
217
+ >
218
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
219
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
220
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
221
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
222
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
223
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
224
+ > THE SOFTWARE.
225
+
226
+ ---------------------------------------
227
+
199
228
  ## ansi-escapes
200
229
  License: MIT
201
230
  By: Sindre Sorhus
@@ -932,6 +961,35 @@ Repository: jonschlinkert/is-number
932
961
 
933
962
  ---------------------------------------
934
963
 
964
+ ## js-tokens
965
+ License: MIT
966
+ By: Simon Lydell
967
+ Repository: lydell/js-tokens
968
+
969
+ > The MIT License (MIT)
970
+ >
971
+ > Copyright (c) 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021, 2022, 2023, 2024 Simon Lydell
972
+ >
973
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
974
+ > of this software and associated documentation files (the "Software"), to deal
975
+ > in the Software without restriction, including without limitation the rights
976
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
977
+ > copies of the Software, and to permit persons to whom the Software is
978
+ > furnished to do so, subject to the following conditions:
979
+ >
980
+ > The above copyright notice and this permission notice shall be included in
981
+ > all copies or substantial portions of the Software.
982
+ >
983
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
984
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
985
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
986
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
987
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
988
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
989
+ > THE SOFTWARE.
990
+
991
+ ---------------------------------------
992
+
935
993
  ## kleur
936
994
  License: MIT
937
995
  By: Luke Edwards
@@ -961,6 +1019,35 @@ Repository: lukeed/kleur
961
1019
 
962
1020
  ---------------------------------------
963
1021
 
1022
+ ## local-pkg
1023
+ License: MIT
1024
+ By: Anthony Fu
1025
+ Repository: git+https://github.com/antfu/local-pkg.git
1026
+
1027
+ > MIT License
1028
+ >
1029
+ > Copyright (c) 2021 Anthony Fu <https://github.com/antfu>
1030
+ >
1031
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
1032
+ > of this software and associated documentation files (the "Software"), to deal
1033
+ > in the Software without restriction, including without limitation the rights
1034
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1035
+ > copies of the Software, and to permit persons to whom the Software is
1036
+ > furnished to do so, subject to the following conditions:
1037
+ >
1038
+ > The above copyright notice and this permission notice shall be included in all
1039
+ > copies or substantial portions of the Software.
1040
+ >
1041
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1042
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1043
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1044
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1045
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1046
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1047
+ > SOFTWARE.
1048
+
1049
+ ---------------------------------------
1050
+
964
1051
  ## locate-path
965
1052
  License: MIT
966
1053
  By: Sindre Sorhus
@@ -1069,6 +1156,34 @@ Repository: sindresorhus/mimic-fn
1069
1156
 
1070
1157
  ---------------------------------------
1071
1158
 
1159
+ ## mlly
1160
+ License: MIT
1161
+ Repository: unjs/mlly
1162
+
1163
+ > MIT License
1164
+ >
1165
+ > Copyright (c) Pooya Parsa <pooya@pi0.io>
1166
+ >
1167
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
1168
+ > of this software and associated documentation files (the "Software"), to deal
1169
+ > in the Software without restriction, including without limitation the rights
1170
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1171
+ > copies of the Software, and to permit persons to whom the Software is
1172
+ > furnished to do so, subject to the following conditions:
1173
+ >
1174
+ > The above copyright notice and this permission notice shall be included in all
1175
+ > copies or substantial portions of the Software.
1176
+ >
1177
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1178
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1179
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1180
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1181
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1182
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1183
+ > SOFTWARE.
1184
+
1185
+ ---------------------------------------
1186
+
1072
1187
  ## onetime
1073
1188
  License: MIT
1074
1189
  By: Sindre Sorhus
@@ -1413,6 +1528,35 @@ Repository: chalk/strip-ansi
1413
1528
 
1414
1529
  ---------------------------------------
1415
1530
 
1531
+ ## strip-literal
1532
+ License: MIT
1533
+ By: Anthony Fu
1534
+ Repository: git+https://github.com/antfu/strip-literal.git
1535
+
1536
+ > MIT License
1537
+ >
1538
+ > Copyright (c) 2022 Anthony Fu <https://github.com/antfu>
1539
+ >
1540
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
1541
+ > of this software and associated documentation files (the "Software"), to deal
1542
+ > in the Software without restriction, including without limitation the rights
1543
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1544
+ > copies of the Software, and to permit persons to whom the Software is
1545
+ > furnished to do so, subject to the following conditions:
1546
+ >
1547
+ > The above copyright notice and this permission notice shall be included in all
1548
+ > copies or substantial portions of the Software.
1549
+ >
1550
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1551
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1552
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1553
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1554
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1555
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1556
+ > SOFTWARE.
1557
+
1558
+ ---------------------------------------
1559
+
1416
1560
  ## to-regex-range
1417
1561
  License: MIT
1418
1562
  By: Jon Schlinkert, Rouven Weßling
@@ -1469,6 +1613,34 @@ Repository: git+ssh://git@github.com/chaijs/type-detect.git
1469
1613
 
1470
1614
  ---------------------------------------
1471
1615
 
1616
+ ## ufo
1617
+ License: MIT
1618
+ Repository: unjs/ufo
1619
+
1620
+ > MIT License
1621
+ >
1622
+ > Copyright (c) Pooya Parsa <pooya@pi0.io>
1623
+ >
1624
+ > Permission is hereby granted, free of charge, to any person obtaining a copy
1625
+ > of this software and associated documentation files (the "Software"), to deal
1626
+ > in the Software without restriction, including without limitation the rights
1627
+ > to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
1628
+ > copies of the Software, and to permit persons to whom the Software is
1629
+ > furnished to do so, subject to the following conditions:
1630
+ >
1631
+ > The above copyright notice and this permission notice shall be included in all
1632
+ > copies or substantial portions of the Software.
1633
+ >
1634
+ > THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1635
+ > IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1636
+ > FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1637
+ > AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1638
+ > LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1639
+ > OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
1640
+ > SOFTWARE.
1641
+
1642
+ ---------------------------------------
1643
+
1472
1644
  ## wrap-ansi
1473
1645
  License: MIT
1474
1646
  By: Sindre Sorhus
package/dist/browser.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { processError, startTests } from '@vitest/runner';
2
- import { R as ResolvedConfig, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule } from './reporters-yx5ZTtEV.js';
2
+ import { R as ResolvedConfig, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule } from './reporters-DFgqsvtL.js';
3
3
  import { VitestExecutor } from './execute.js';
4
4
  import 'vite';
5
5
  import 'vite-node';
package/dist/browser.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { processError, startTests } from '@vitest/runner';
2
- export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './vendor/setup-common.8nJLd4ay.js';
3
- export { g as getCoverageProvider, a as startCoverageInsideWorker, s as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './vendor/coverage.E7sG1b3r.js';
2
+ export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './vendor/setup-common.XeoZAW8t.js';
3
+ export { g as getCoverageProvider, a as startCoverageInsideWorker, s as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './vendor/coverage.ChSqD-qS.js';
4
4
  import '@vitest/utils';
5
5
  import '@vitest/snapshot';
6
- import './vendor/run-once.Olz_Zkd8.js';
7
- import './vendor/global.CkGT_TMy.js';
6
+ import './vendor/run-once.DLomgGUH.js';
7
+ import './vendor/global.7bFbnyXl.js';
@@ -2,8 +2,8 @@ import { NodeSnapshotEnvironment } from '@vitest/snapshot/environment';
2
2
  import 'pathe';
3
3
  import '@vitest/runner/utils';
4
4
  import '@vitest/utils';
5
- import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
6
- import '../vendor/env.AtSIuHFg.js';
5
+ import { g as getWorkerState } from '../vendor/global.7bFbnyXl.js';
6
+ import '../vendor/env.bmJgw1qP.js';
7
7
  import 'std-env';
8
8
 
9
9
  class VitestNodeSnapshotEnvironment extends NodeSnapshotEnvironment {
@@ -25,12 +25,12 @@ var __privateAdd = (obj, member, value) => {
25
25
  };
26
26
  var __privateSet = (obj, member, value, setter) => {
27
27
  __accessCheck(obj, member, "write to private field");
28
- setter ? setter.call(obj, value) : member.set(obj, value);
28
+ member.set(obj, value);
29
29
  return value;
30
30
  };
31
31
  var __privateWrapper = (obj, member, setter, getter) => ({
32
32
  set _(value) {
33
- __privateSet(obj, member, value, setter);
33
+ __privateSet(obj, member, value);
34
34
  },
35
35
  get _() {
36
36
  return __privateGet(obj, member, getter);
@@ -0,0 +1,31 @@
1
+ import { g as globalApis } from '../vendor/constants.5SOfHUj0.js';
2
+ import { V as VitestIndex } from '../vendor/index.CmILuxzC.js';
3
+ import '@vitest/runner';
4
+ import '../vendor/benchmark.BNLebNi5.js';
5
+ import '@vitest/runner/utils';
6
+ import '@vitest/utils';
7
+ import '../vendor/index._7XLd8Kd.js';
8
+ import 'pathe';
9
+ import '../vendor/global.7bFbnyXl.js';
10
+ import '../vendor/env.bmJgw1qP.js';
11
+ import 'std-env';
12
+ import '../vendor/run-once.DLomgGUH.js';
13
+ import '../vendor/vi.ClD3hi7L.js';
14
+ import 'chai';
15
+ import '../vendor/_commonjsHelpers.BFTU3MAI.js';
16
+ import '@vitest/expect';
17
+ import '@vitest/snapshot';
18
+ import '@vitest/utils/error';
19
+ import '../vendor/tasks.WC7M-K-v.js';
20
+ import '@vitest/utils/source-map';
21
+ import '../vendor/base._gnK9Slw.js';
22
+ import '../vendor/date.BKM1wewY.js';
23
+ import '@vitest/spy';
24
+
25
+ function registerApiGlobally() {
26
+ globalApis.forEach((api) => {
27
+ globalThis[api] = VitestIndex[api];
28
+ });
29
+ }
30
+
31
+ export { registerApiGlobally };
@@ -2,11 +2,11 @@ import { Writable } from 'node:stream';
2
2
  import { Console } from 'node:console';
3
3
  import { relative } from 'node:path';
4
4
  import { getSafeTimers, getColors } from '@vitest/utils';
5
- import { R as RealDate } from '../vendor/date.Ns1pGd_X.js';
5
+ import { R as RealDate } from '../vendor/date.BKM1wewY.js';
6
6
  import 'pathe';
7
7
  import '@vitest/runner/utils';
8
- import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
9
- import '../vendor/env.AtSIuHFg.js';
8
+ import { g as getWorkerState } from '../vendor/global.7bFbnyXl.js';
9
+ import '../vendor/env.bmJgw1qP.js';
10
10
  import 'std-env';
11
11
 
12
12
  const UNKNOWN_TEST_ID = "__vitest__unknown_test__";
@@ -24,12 +24,12 @@ function getTaskIdByStack(root) {
24
24
  return relative(root, filepath);
25
25
  return UNKNOWN_TEST_ID;
26
26
  }
27
- function createCustomConsole() {
27
+ function createCustomConsole(defaultState) {
28
28
  const stdoutBuffer = /* @__PURE__ */ new Map();
29
29
  const stderrBuffer = /* @__PURE__ */ new Map();
30
30
  const timers = /* @__PURE__ */ new Map();
31
31
  const { setTimeout, clearTimeout } = getSafeTimers();
32
- const state = () => getWorkerState();
32
+ const state = () => defaultState || getWorkerState();
33
33
  function schedule(taskId) {
34
34
  const timer = timers.get(taskId);
35
35
  const { stdoutTime, stderrTime } = timer;
@@ -78,9 +78,9 @@ function createCustomConsole() {
78
78
  }
79
79
  const stdout = new Writable({
80
80
  write(data, encoding, callback) {
81
- var _a, _b, _c;
81
+ var _a, _b, _c, _d;
82
82
  const s = state();
83
- const id = ((_a = s == null ? void 0 : s.current) == null ? void 0 : _a.id) || ((_c = (_b = s == null ? void 0 : s.current) == null ? void 0 : _b.file) == null ? void 0 : _c.id) || getTaskIdByStack(s.config.root);
83
+ const id = ((_a = s == null ? void 0 : s.current) == null ? void 0 : _a.id) || ((_c = (_b = s == null ? void 0 : s.current) == null ? void 0 : _b.suite) == null ? void 0 : _c.id) || ((_d = s.current) == null ? void 0 : _d.file.id) || getTaskIdByStack(s.config.root);
84
84
  let timer = timers.get(id);
85
85
  if (timer) {
86
86
  timer.stdoutTime = timer.stdoutTime || RealDate.now();
@@ -100,9 +100,9 @@ function createCustomConsole() {
100
100
  });
101
101
  const stderr = new Writable({
102
102
  write(data, encoding, callback) {
103
- var _a, _b, _c;
103
+ var _a, _b, _c, _d;
104
104
  const s = state();
105
- const id = ((_a = s == null ? void 0 : s.current) == null ? void 0 : _a.id) || ((_c = (_b = s == null ? void 0 : s.current) == null ? void 0 : _b.file) == null ? void 0 : _c.id) || getTaskIdByStack(s.config.root);
105
+ const id = ((_a = s == null ? void 0 : s.current) == null ? void 0 : _a.id) || ((_c = (_b = s == null ? void 0 : s.current) == null ? void 0 : _b.suite) == null ? void 0 : _c.id) || ((_d = s.current) == null ? void 0 : _d.file.id) || getTaskIdByStack(s.config.root);
106
106
  let timer = timers.get(id);
107
107
  if (timer) {
108
108
  timer.stderrTime = timer.stderrTime || RealDate.now();
@@ -3,37 +3,37 @@ import { startTests } from '@vitest/runner';
3
3
  import 'pathe';
4
4
  import '@vitest/runner/utils';
5
5
  import { setupColors, createColors, getSafeTimers } from '@vitest/utils';
6
- import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
7
- import '../vendor/env.AtSIuHFg.js';
8
- import { a as globalExpect, r as resetModules, v as vi } from '../vendor/vi.YFlodzP_.js';
9
- import { a as startCoverageInsideWorker, s as stopCoverageInsideWorker } from '../vendor/coverage.E7sG1b3r.js';
10
- import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.DpVgvm2P.js';
6
+ import { g as getWorkerState } from '../vendor/global.7bFbnyXl.js';
7
+ import '../vendor/env.bmJgw1qP.js';
8
+ import { a as globalExpect, r as resetModules, v as vi } from '../vendor/vi.ClD3hi7L.js';
9
+ import { a as startCoverageInsideWorker, s as stopCoverageInsideWorker } from '../vendor/coverage.ChSqD-qS.js';
10
+ import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.BfoZyXD1.js';
11
11
  import { createRequire } from 'node:module';
12
12
  import util from 'node:util';
13
13
  import timers from 'node:timers';
14
14
  import { isatty } from 'node:tty';
15
15
  import { installSourcemapsSupport } from 'vite-node/source-map';
16
- import { V as VitestIndex } from '../vendor/index.dI9lHwVn.js';
17
- import { s as setupCommonEnv } from '../vendor/setup-common.8nJLd4ay.js';
18
- import { c as closeInspector } from '../vendor/inspector.IgLX3ur5.js';
16
+ import { V as VitestIndex } from '../vendor/index.CmILuxzC.js';
17
+ import { s as setupCommonEnv } from '../vendor/setup-common.XeoZAW8t.js';
18
+ import { c as closeInspector } from '../vendor/inspector.hPQncR7V.js';
19
19
  import 'std-env';
20
20
  import 'chai';
21
- import '../vendor/_commonjsHelpers.jjO7Zipk.js';
21
+ import '../vendor/_commonjsHelpers.BFTU3MAI.js';
22
22
  import '@vitest/expect';
23
23
  import '@vitest/snapshot';
24
24
  import '@vitest/utils/error';
25
- import '../vendor/tasks.IknbGB2n.js';
25
+ import '../vendor/tasks.WC7M-K-v.js';
26
26
  import '@vitest/utils/source-map';
27
- import '../vendor/base.5NT-gWu5.js';
28
- import '../vendor/date.Ns1pGd_X.js';
27
+ import '../vendor/base._gnK9Slw.js';
28
+ import '../vendor/date.BKM1wewY.js';
29
29
  import '@vitest/spy';
30
30
  import '../path.js';
31
31
  import 'node:url';
32
- import '../vendor/rpc.joBhAkyK.js';
33
- import '../vendor/index.8bPxjt7g.js';
34
- import '../vendor/benchmark.yGkUTKnC.js';
35
- import '../vendor/index.SMVOaj7F.js';
36
- import '../vendor/run-once.Olz_Zkd8.js';
32
+ import '../vendor/rpc.DRDE9Pu1.js';
33
+ import '../vendor/index.BpSiYbpB.js';
34
+ import '../vendor/benchmark.BNLebNi5.js';
35
+ import '../vendor/index._7XLd8Kd.js';
36
+ import '../vendor/run-once.DLomgGUH.js';
37
37
 
38
38
  let globalSetup = false;
39
39
  async function setupGlobalEnv(config, { environment }, executor) {
@@ -70,7 +70,7 @@ async function setupGlobalEnv(config, { environment }, executor) {
70
70
  await setupConsoleLogSpy();
71
71
  }
72
72
  async function setupConsoleLogSpy() {
73
- const { createCustomConsole } = await import('./runtime-console.EO5ha7qv.js');
73
+ const { createCustomConsole } = await import('./runtime-console.CUES-L8X.js');
74
74
  globalThis.console = createCustomConsole();
75
75
  }
76
76
  async function withEnv({ environment }, options, fn) {
package/dist/cli.js CHANGED
@@ -1,9 +1,9 @@
1
- import { c as createCLI } from './vendor/cac.EdDItJD-.js';
1
+ import { c as createCLI } from './vendor/cac.CtP0aXu-.js';
2
2
  import 'pathe';
3
3
  import 'events';
4
4
  import 'picocolors';
5
- import './vendor/base.5NT-gWu5.js';
5
+ import './vendor/base._gnK9Slw.js';
6
6
  import '@vitest/utils';
7
- import './vendor/constants.5J7I254_.js';
7
+ import './vendor/constants.5SOfHUj0.js';
8
8
 
9
9
  createCLI().parse();
package/dist/config.cjs CHANGED
@@ -41,7 +41,7 @@ const coverageConfigDefaults = {
41
41
  reporter: [["text", {}], ["html", {}], ["clover", {}], ["json", {}]],
42
42
  extension: [".js", ".cjs", ".mjs", ".ts", ".mts", ".cts", ".tsx", ".jsx", ".vue", ".svelte", ".marko"],
43
43
  allowExternal: false,
44
- ignoreEmptyLines: false,
44
+ ignoreEmptyLines: true,
45
45
  processingConcurrency: Math.min(20, ((_b = (_a = os).availableParallelism) == null ? void 0 : _b.call(_a)) ?? os.cpus().length)
46
46
  };
47
47
  const fakeTimersDefaults = {
@@ -63,7 +63,7 @@ const config = {
63
63
  watch: !stdEnv.isCI,
64
64
  globals: false,
65
65
  environment: "node",
66
- pool: "threads",
66
+ pool: "forks",
67
67
  clearMocks: false,
68
68
  restoreMocks: false,
69
69
  mockReset: false,
@@ -72,7 +72,6 @@ const config = {
72
72
  testTimeout: 5e3,
73
73
  hookTimeout: 1e4,
74
74
  teardownTimeout: 1e4,
75
- watchExclude: ["**/node_modules/**", "**/dist/**"],
76
75
  forceRerunTriggers: [
77
76
  "**/package.json/**",
78
77
  "**/{vitest,vite}.config.*/**"
package/dist/config.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { ConfigEnv, UserConfig, mergeConfig } from 'vite';
2
- export { ax as UserConfigExport, aw as UserConfigFn, au as UserConfigFnObject, av as UserConfigFnPromise, az as UserProjectConfigExport, ay as UserProjectConfigFn, a1 as UserWorkspaceConfig, aD as configDefaults, aG as coverageConfigDefaults, aF as defaultExclude, aE as defaultInclude, aA as defineConfig, aB as defineProject, aC as defineWorkspace, aH as extraInlineDeps } from './reporters-yx5ZTtEV.js';
2
+ export { ax as UserConfigExport, aw as UserConfigFn, au as UserConfigFnObject, av as UserConfigFnPromise, az as UserProjectConfigExport, ay as UserProjectConfigFn, a1 as UserWorkspaceConfig, aD as configDefaults, aG as coverageConfigDefaults, aF as defaultExclude, aE as defaultInclude, aA as defineConfig, aB as defineProject, aC as defineWorkspace, aH as extraInlineDeps } from './reporters-DFgqsvtL.js';
3
3
  import '@vitest/runner';
4
4
  import 'vite-node';
5
5
  import '@vitest/snapshot';
package/dist/config.js CHANGED
@@ -39,7 +39,7 @@ const coverageConfigDefaults = {
39
39
  reporter: [["text", {}], ["html", {}], ["clover", {}], ["json", {}]],
40
40
  extension: [".js", ".cjs", ".mjs", ".ts", ".mts", ".cts", ".tsx", ".jsx", ".vue", ".svelte", ".marko"],
41
41
  allowExternal: false,
42
- ignoreEmptyLines: false,
42
+ ignoreEmptyLines: true,
43
43
  processingConcurrency: Math.min(20, ((_b = (_a = os).availableParallelism) == null ? void 0 : _b.call(_a)) ?? os.cpus().length)
44
44
  };
45
45
  const fakeTimersDefaults = {
@@ -61,7 +61,7 @@ const config = {
61
61
  watch: !isCI,
62
62
  globals: false,
63
63
  environment: "node",
64
- pool: "threads",
64
+ pool: "forks",
65
65
  clearMocks: false,
66
66
  restoreMocks: false,
67
67
  mockReset: false,
@@ -70,7 +70,6 @@ const config = {
70
70
  testTimeout: 5e3,
71
71
  hookTimeout: 1e4,
72
72
  teardownTimeout: 1e4,
73
- watchExclude: ["**/node_modules/**", "**/dist/**"],
74
73
  forceRerunTriggers: [
75
74
  "**/package.json/**",
76
75
  "**/{vitest,vite}.config.*/**"
@@ -1,4 +1,4 @@
1
- import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-yx5ZTtEV.js';
1
+ import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-DFgqsvtL.js';
2
2
  import 'vite';
3
3
  import '@vitest/runner';
4
4
  import 'vite-node';
package/dist/coverage.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { relative } from 'pathe';
2
- import { m as mm } from './vendor/index.xL8XjTLv.js';
3
- import './vendor/_commonjsHelpers.jjO7Zipk.js';
2
+ import { m as mm } from './vendor/index.DP-km6lF.js';
3
+ import './vendor/_commonjsHelpers.BFTU3MAI.js';
4
4
  import 'util';
5
5
  import 'path';
6
6
 
@@ -1,4 +1,4 @@
1
- import { E as Environment } from './reporters-yx5ZTtEV.js';
1
+ import { E as Environment } from './reporters-DFgqsvtL.js';
2
2
  import 'vite';
3
3
  import '@vitest/runner';
4
4
  import 'vite-node';
@@ -1,2 +1,2 @@
1
- export { e as builtinEnvironments, p as populateGlobal } from './vendor/index.GVFv9dZ0.js';
1
+ export { e as builtinEnvironments, p as populateGlobal } from './vendor/index.DeR1hhfY.js';
2
2
  import 'node:console';
package/dist/execute.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import vm from 'node:vm';
2
2
  import { ViteNodeRunner } from 'vite-node/client';
3
3
  import { ViteNodeRunnerOptions } from 'vite-node';
4
- import { ar as PendingSuiteMock, as as MockFactory, e as RuntimeRPC, W as WorkerGlobalState, at as MockMap } from './reporters-yx5ZTtEV.js';
4
+ import { ar as PendingSuiteMock, as as MockFactory, e as RuntimeRPC, W as WorkerGlobalState, at as MockMap } from './reporters-DFgqsvtL.js';
5
5
  import 'vite';
6
6
  import '@vitest/runner';
7
7
  import '@vitest/snapshot';
@@ -84,6 +84,7 @@ declare class VMModule {
84
84
  declare class FileMap {
85
85
  private fsCache;
86
86
  private fsBufferCache;
87
+ readFileAsync(path: string): Promise<string>;
87
88
  readFile(path: string): string;
88
89
  readBuffer(path: string): Buffer;
89
90
  }
package/dist/execute.js CHANGED
@@ -1,4 +1,4 @@
1
- export { V as VitestExecutor } from './vendor/execute.fL3szUAI.js';
1
+ export { V as VitestExecutor } from './vendor/execute.CLLNVNnK.js';
2
2
  import 'node:vm';
3
3
  import 'node:url';
4
4
  import 'node:fs';
@@ -8,4 +8,4 @@ import 'pathe';
8
8
  import '@vitest/utils/error';
9
9
  import './path.js';
10
10
  import '@vitest/utils';
11
- import './vendor/base.5NT-gWu5.js';
11
+ import './vendor/base._gnK9Slw.js';