vitest 1.5.2 → 1.5.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 (43) hide show
  1. package/dist/browser.d.ts +1 -1
  2. package/dist/browser.js +1 -1
  3. package/dist/chunks/{integrations-globals.k0N5-dd1.js → integrations-globals.Hr6znn-f.js} +5 -4
  4. package/dist/chunks/{runtime-console.kbFEN7E-.js → runtime-console.EO5ha7qv.js} +3 -3
  5. package/dist/chunks/{runtime-runBaseTests.-x-nNuJ_.js → runtime-runBaseTests.l6qXp5eU.js} +11 -10
  6. package/dist/cli.js +1 -1
  7. package/dist/config.cjs +2 -1
  8. package/dist/config.d.ts +1 -1
  9. package/dist/config.js +2 -1
  10. package/dist/coverage.d.ts +1 -1
  11. package/dist/environments.d.ts +1 -1
  12. package/dist/execute.d.ts +1 -1
  13. package/dist/index.d.ts +3 -3
  14. package/dist/index.js +6 -5
  15. package/dist/node.d.ts +2 -2
  16. package/dist/node.js +9 -8
  17. package/dist/{reporters-xEmem8D4.d.ts → reporters-BXNXFKfg.d.ts} +1 -2
  18. package/dist/reporters.d.ts +1 -1
  19. package/dist/reporters.js +8 -7
  20. package/dist/runners.d.ts +1 -1
  21. package/dist/runners.js +6 -5
  22. package/dist/{suite-HPAKvIxA.d.ts → suite-KPWE530F.d.ts} +1 -1
  23. package/dist/suite.d.ts +3 -3
  24. package/dist/suite.js +5 -4
  25. package/dist/vendor/{base.gAwDs8Jc.js → base.oIzAvGLe.js} +1 -1
  26. package/dist/vendor/{benchmark.eeqk2rd8.js → benchmark.yGkUTKnC.js} +1 -1
  27. package/dist/vendor/{cac.8mXc9Oj6.js → cac.RDd_SGOd.js} +2 -2
  28. package/dist/vendor/{cli-api._n4_Wp_j.js → cli-api.AmIc1Dmz.js} +21 -10
  29. package/dist/vendor/env.AtSIuHFg.js +7 -0
  30. package/dist/vendor/{index.gHZzsRJQ.js → index.Fm6OikHU.js} +1 -1
  31. package/dist/vendor/{index.0RrMQKD8.js → index.QVcwRDVW.js} +1 -1
  32. package/dist/vendor/{index.ir9i0ywP.js → index.SMVOaj7F.js} +2 -6
  33. package/dist/vendor/{index.GlXSU9xI.js → index.X7lgIMc_.js} +519 -529
  34. package/dist/vendor/{setup-common.7SXMSI--.js → setup-common.5nUd4r76.js} +1 -1
  35. package/dist/vendor/{vm.I_IsyNig.js → vm.i4FO5N37.js} +4 -2
  36. package/dist/workers/forks.js +1 -1
  37. package/dist/workers/runVmTests.js +6 -5
  38. package/dist/workers/threads.js +1 -1
  39. package/dist/workers/vmForks.js +4 -4
  40. package/dist/workers/vmThreads.js +4 -4
  41. package/dist/workers.d.ts +1 -1
  42. package/dist/workers.js +5 -5
  43. package/package.json +9 -9
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-xEmem8D4.js';
2
+ import { R as ResolvedConfig, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule } from './reporters-BXNXFKfg.js';
3
3
  import { VitestExecutor } from './execute.js';
4
4
  import 'vite';
5
5
  import 'vite-node';
package/dist/browser.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export { processError, startTests } from '@vitest/runner';
2
- export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './vendor/setup-common.7SXMSI--.js';
2
+ export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './vendor/setup-common.5nUd4r76.js';
3
3
  export { g as getCoverageProvider, a as startCoverageInsideWorker, s as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './vendor/coverage.E7sG1b3r.js';
4
4
  import '@vitest/utils';
5
5
  import '@vitest/snapshot';
@@ -1,13 +1,14 @@
1
1
  import { g as globalApis } from '../vendor/constants.5J7I254_.js';
2
- import { V as VitestIndex } from '../vendor/index.0RrMQKD8.js';
2
+ import { V as VitestIndex } from '../vendor/index.QVcwRDVW.js';
3
3
  import '@vitest/runner';
4
- import '../vendor/benchmark.eeqk2rd8.js';
4
+ import '../vendor/benchmark.yGkUTKnC.js';
5
5
  import '@vitest/runner/utils';
6
6
  import '@vitest/utils';
7
- import '../vendor/index.ir9i0ywP.js';
7
+ import '../vendor/index.SMVOaj7F.js';
8
8
  import 'pathe';
9
- import 'std-env';
10
9
  import '../vendor/global.CkGT_TMy.js';
10
+ import '../vendor/env.AtSIuHFg.js';
11
+ import 'std-env';
11
12
  import '../vendor/run-once.Olz_Zkd8.js';
12
13
  import '../vendor/vi.Y_w82WR8.js';
13
14
  import 'chai';
@@ -3,11 +3,11 @@ import { Console } from 'node:console';
3
3
  import { relative } from 'node:path';
4
4
  import { getSafeTimers, getColors } from '@vitest/utils';
5
5
  import { R as RealDate } from '../vendor/date.Ns1pGd_X.js';
6
- import '../vendor/index.ir9i0ywP.js';
7
- import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
8
6
  import 'pathe';
9
- import 'std-env';
10
7
  import '@vitest/runner/utils';
8
+ import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
9
+ import '../vendor/env.AtSIuHFg.js';
10
+ import 'std-env';
11
11
 
12
12
  const UNKNOWN_TEST_ID = "__vitest__unknown_test__";
13
13
  function getTaskIdByStack(root) {
@@ -1,22 +1,22 @@
1
1
  import { performance } from 'node:perf_hooks';
2
2
  import { startTests } from '@vitest/runner';
3
- import '../vendor/index.ir9i0ywP.js';
3
+ import 'pathe';
4
+ import '@vitest/runner/utils';
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';
4
8
  import { a as globalExpect, r as resetModules, v as vi } from '../vendor/vi.Y_w82WR8.js';
5
9
  import { a as startCoverageInsideWorker, s as stopCoverageInsideWorker } from '../vendor/coverage.E7sG1b3r.js';
6
- import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.gHZzsRJQ.js';
10
+ import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.Fm6OikHU.js';
7
11
  import { createRequire } from 'node:module';
8
12
  import util from 'node:util';
9
13
  import timers from 'node:timers';
10
14
  import { isatty } from 'node:tty';
11
15
  import { installSourcemapsSupport } from 'vite-node/source-map';
12
- import { setupColors, createColors, getSafeTimers } from '@vitest/utils';
13
- import { V as VitestIndex } from '../vendor/index.0RrMQKD8.js';
14
- import { s as setupCommonEnv } from '../vendor/setup-common.7SXMSI--.js';
15
- import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
16
+ import { V as VitestIndex } from '../vendor/index.QVcwRDVW.js';
17
+ import { s as setupCommonEnv } from '../vendor/setup-common.5nUd4r76.js';
16
18
  import { c as closeInspector } from '../vendor/inspector.IgLX3ur5.js';
17
- import 'pathe';
18
19
  import 'std-env';
19
- import '@vitest/runner/utils';
20
20
  import 'chai';
21
21
  import '../vendor/_commonjsHelpers.jjO7Zipk.js';
22
22
  import '@vitest/expect';
@@ -32,7 +32,8 @@ import '../path.js';
32
32
  import 'node:url';
33
33
  import '../vendor/rpc.joBhAkyK.js';
34
34
  import '../vendor/index.8bPxjt7g.js';
35
- import '../vendor/benchmark.eeqk2rd8.js';
35
+ import '../vendor/benchmark.yGkUTKnC.js';
36
+ import '../vendor/index.SMVOaj7F.js';
36
37
  import '../vendor/run-once.Olz_Zkd8.js';
37
38
 
38
39
  let globalSetup = false;
@@ -70,7 +71,7 @@ async function setupGlobalEnv(config, { environment }) {
70
71
  await setupConsoleLogSpy();
71
72
  }
72
73
  async function setupConsoleLogSpy() {
73
- const { createCustomConsole } = await import('./runtime-console.kbFEN7E-.js');
74
+ const { createCustomConsole } = await import('./runtime-console.EO5ha7qv.js');
74
75
  globalThis.console = createCustomConsole();
75
76
  }
76
77
  async function withEnv({ environment }, options, fn) {
package/dist/cli.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as createCLI } from './vendor/cac.8mXc9Oj6.js';
1
+ import { c as createCLI } from './vendor/cac.RDd_SGOd.js';
2
2
  import 'pathe';
3
3
  import 'events';
4
4
  import 'picocolors';
package/dist/config.cjs CHANGED
@@ -5,7 +5,8 @@ var stdEnv = require('std-env');
5
5
  var vite = require('vite');
6
6
 
7
7
  var _a$1;
8
- typeof process < "u" && typeof process.stdout < "u" && !((_a$1 = process.versions) == null ? void 0 : _a$1.deno) && !globalThis.window;
8
+ const isNode = typeof process < "u" && typeof process.stdout < "u" && !((_a$1 = process.versions) == null ? void 0 : _a$1.deno) && !globalThis.window;
9
+ isNode && process.platform === "win32";
9
10
 
10
11
  var _a, _b;
11
12
  const defaultInclude = ["**/*.{test,spec}.?(c|m)[jt]s?(x)"];
package/dist/config.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  export { ConfigEnv, UserConfig, mergeConfig } from 'vite';
2
- export { av as UserConfigExport, au as UserConfigFn, as as UserConfigFnObject, at as UserConfigFnPromise, ax as UserProjectConfigExport, aw as UserProjectConfigFn, $ as UserWorkspaceConfig, aB as configDefaults, aE as coverageConfigDefaults, aD as defaultExclude, aC as defaultInclude, ay as defineConfig, az as defineProject, aA as defineWorkspace, aF as extraInlineDeps } from './reporters-xEmem8D4.js';
2
+ export { av as UserConfigExport, au as UserConfigFn, as as UserConfigFnObject, at as UserConfigFnPromise, ax as UserProjectConfigExport, aw as UserProjectConfigFn, $ as UserWorkspaceConfig, aB as configDefaults, aE as coverageConfigDefaults, aD as defaultExclude, aC as defaultInclude, ay as defineConfig, az as defineProject, aA as defineWorkspace, aF as extraInlineDeps } from './reporters-BXNXFKfg.js';
3
3
  import '@vitest/runner';
4
4
  import 'vite-node';
5
5
  import '@vitest/snapshot';
package/dist/config.js CHANGED
@@ -3,7 +3,8 @@ import { isCI } from 'std-env';
3
3
  export { mergeConfig } from 'vite';
4
4
 
5
5
  var _a$1;
6
- typeof process < "u" && typeof process.stdout < "u" && !((_a$1 = process.versions) == null ? void 0 : _a$1.deno) && !globalThis.window;
6
+ const isNode = typeof process < "u" && typeof process.stdout < "u" && !((_a$1 = process.versions) == null ? void 0 : _a$1.deno) && !globalThis.window;
7
+ isNode && process.platform === "win32";
7
8
 
8
9
  var _a, _b;
9
10
  const defaultInclude = ["**/*.{test,spec}.?(c|m)[jt]s?(x)"];
@@ -1,4 +1,4 @@
1
- import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-xEmem8D4.js';
1
+ import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-BXNXFKfg.js';
2
2
  import 'vite';
3
3
  import '@vitest/runner';
4
4
  import 'vite-node';
@@ -1,4 +1,4 @@
1
- import { E as Environment } from './reporters-xEmem8D4.js';
1
+ import { E as Environment } from './reporters-BXNXFKfg.js';
2
2
  import 'vite';
3
3
  import '@vitest/runner';
4
4
  import 'vite-node';
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 { ap as PendingSuiteMock, aq as MockFactory, e as RuntimeRPC, W as WorkerGlobalState, ar as MockMap } from './reporters-xEmem8D4.js';
4
+ import { ap as PendingSuiteMock, aq as MockFactory, e as RuntimeRPC, W as WorkerGlobalState, ar as MockMap } from './reporters-BXNXFKfg.js';
5
5
  import 'vite';
6
6
  import '@vitest/runner';
7
7
  import '@vitest/snapshot';
package/dist/index.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  import { TaskPopulated, File, TaskResultPack, CancelReason } from '@vitest/runner';
2
2
  export { Custom, DoneCallback, ExtendedContext, File, HookCleanupCallback, HookListener, OnTestFailedHandler, RunMode, RuntimeContext, SequenceHooks, SequenceSetupFiles, Suite, SuiteAPI, SuiteCollector, SuiteFactory, SuiteHooks, Task, TaskBase, TaskContext, TaskCustomOptions, TaskMeta, TaskResult, TaskResultPack, TaskState, Test, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
3
- export { b as bench } from './suite-HPAKvIxA.js';
3
+ export { b as bench } from './suite-KPWE530F.js';
4
4
  import { ExpectStatic } from '@vitest/expect';
5
5
  export { Assertion, AsymmetricMatchersContaining, ExpectStatic, JestAssertion } from '@vitest/expect';
6
- import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper, r as RuntimeConfig, P as ProvidedContext, A as AfterSuiteRunMeta, s as UserConsoleLog, R as ResolvedConfig, t as ModuleGraphData, u as Reporter } from './reporters-xEmem8D4.js';
7
- export { O as ApiConfig, a8 as ArgumentsType, a7 as Arrayable, a5 as Awaitable, B as BaseCoverageOptions, an as BenchFunction, al as Benchmark, ao as BenchmarkAPI, am as BenchmarkResult, ak as BenchmarkUserOptions, K as BuiltinEnvironment, N as CSSModuleScopeStrategy, x as CollectLineNumbers, y as CollectLines, aa as Constructable, D as Context, f as ContextRPC, a1 as ContextTestEnvironment, ah as CoverageIstanbulOptions, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule, ag as CoverageReporter, ai as CoverageV8Options, aj as CustomProviderOptions, S as DepsOptimizationOptions, E as Environment, Q as EnvironmentOptions, ac as EnvironmentReturn, I as HappyDOMOptions, Y as InlineConfig, J as JSDOMOptions, ab as ModuleCache, a9 as MutableArray, a6 as Nullable, ae as OnServerRestartHandler, G as Pool, H as PoolOptions, _ as ProjectConfig, v as RawErrsMap, af as ReportContext, a3 as ResolveIdFunction, a as ResolvedCoverageOptions, a2 as ResolvedTestEnvironment, z as RootAndTarget, a0 as RunnerRPC, e as RuntimeRPC, X as TransformModePatterns, w as TscErrorInfo, Z as TypecheckConfig, U as UserConfig, $ as UserWorkspaceConfig, i as Vitest, L as VitestEnvironment, V as VitestRunMode, ad as VmEnvironmentReturn, g as WorkerContext, W as WorkerGlobalState, a4 as WorkerRPC } from './reporters-xEmem8D4.js';
6
+ import { F as FakeTimerInstallOpts, M as MockFactoryWithHelper, r as RuntimeConfig, P as ProvidedContext, A as AfterSuiteRunMeta, s as UserConsoleLog, R as ResolvedConfig, t as ModuleGraphData, u as Reporter } from './reporters-BXNXFKfg.js';
7
+ export { O as ApiConfig, a8 as ArgumentsType, a7 as Arrayable, a5 as Awaitable, B as BaseCoverageOptions, an as BenchFunction, al as Benchmark, ao as BenchmarkAPI, am as BenchmarkResult, ak as BenchmarkUserOptions, K as BuiltinEnvironment, N as CSSModuleScopeStrategy, x as CollectLineNumbers, y as CollectLines, aa as Constructable, D as Context, f as ContextRPC, a1 as ContextTestEnvironment, ah as CoverageIstanbulOptions, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule, ag as CoverageReporter, ai as CoverageV8Options, aj as CustomProviderOptions, S as DepsOptimizationOptions, E as Environment, Q as EnvironmentOptions, ac as EnvironmentReturn, I as HappyDOMOptions, Y as InlineConfig, J as JSDOMOptions, ab as ModuleCache, a9 as MutableArray, a6 as Nullable, ae as OnServerRestartHandler, G as Pool, H as PoolOptions, _ as ProjectConfig, v as RawErrsMap, af as ReportContext, a3 as ResolveIdFunction, a as ResolvedCoverageOptions, a2 as ResolvedTestEnvironment, z as RootAndTarget, a0 as RunnerRPC, e as RuntimeRPC, X as TransformModePatterns, w as TscErrorInfo, Z as TypecheckConfig, U as UserConfig, $ as UserWorkspaceConfig, i as Vitest, L as VitestEnvironment, V as VitestRunMode, ad as VmEnvironmentReturn, g as WorkerContext, W as WorkerGlobalState, a4 as WorkerRPC } from './reporters-BXNXFKfg.js';
8
8
  import { spyOn, fn, MaybeMockedDeep, MaybeMocked, MaybePartiallyMocked, MaybePartiallyMockedDeep, MockInstance } from '@vitest/spy';
9
9
  export { Mock, MockContext, MockInstance, Mocked, MockedClass, MockedFunction, MockedObject, SpyInstance } from '@vitest/spy';
10
10
  export { SnapshotEnvironment } from '@vitest/snapshot/environment';
package/dist/index.js CHANGED
@@ -1,18 +1,19 @@
1
1
  export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
2
- export { b as bench } from './vendor/benchmark.eeqk2rd8.js';
2
+ export { b as bench } from './vendor/benchmark.yGkUTKnC.js';
3
3
  export { i as isFirstRun, a as runOnce } from './vendor/run-once.Olz_Zkd8.js';
4
4
  export { c as createExpect, a as expect, v as vi, b as vitest } from './vendor/vi.Y_w82WR8.js';
5
- import { d as dist } from './vendor/index.0RrMQKD8.js';
6
- export { b as assertType, g as getRunningMode, i as inject, a as isWatchMode } from './vendor/index.0RrMQKD8.js';
5
+ import { d as dist } from './vendor/index.QVcwRDVW.js';
6
+ export { b as assertType, g as getRunningMode, i as inject, a as isWatchMode } from './vendor/index.QVcwRDVW.js';
7
7
  import * as chai from 'chai';
8
8
  export { chai };
9
9
  export { assert, should } from 'chai';
10
10
  import '@vitest/runner/utils';
11
11
  import '@vitest/utils';
12
- import './vendor/index.ir9i0ywP.js';
12
+ import './vendor/index.SMVOaj7F.js';
13
13
  import 'pathe';
14
- import 'std-env';
15
14
  import './vendor/global.CkGT_TMy.js';
15
+ import './vendor/env.AtSIuHFg.js';
16
+ import 'std-env';
16
17
  import './vendor/_commonjsHelpers.jjO7Zipk.js';
17
18
  import '@vitest/expect';
18
19
  import '@vitest/snapshot';
package/dist/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { V as VitestRunMode, U as UserConfig, h as VitestOptions, i as Vitest, R as ResolvedConfig, P as ProvidedContext, j as WorkspaceProject, e as RuntimeRPC, T as TestSequencer, k as WorkspaceSpec } from './reporters-xEmem8D4.js';
2
- export { p as BrowserProvider, o as BrowserProviderInitializationOptions, q as BrowserProviderOptions, l as ProcessPool, n as TestSequencerConstructor, m as VitestPackageInstaller } from './reporters-xEmem8D4.js';
1
+ import { V as VitestRunMode, U as UserConfig, h as VitestOptions, i as Vitest, R as ResolvedConfig, P as ProvidedContext, j as WorkspaceProject, e as RuntimeRPC, T as TestSequencer, k as WorkspaceSpec } from './reporters-BXNXFKfg.js';
2
+ export { p as BrowserProvider, o as BrowserProviderInitializationOptions, q as BrowserProviderOptions, l as ProcessPool, n as TestSequencerConstructor, m as VitestPackageInstaller } from './reporters-BXNXFKfg.js';
3
3
  import { UserConfig as UserConfig$1, Plugin } from 'vite';
4
4
  import { Writable } from 'node:stream';
5
5
  import '@vitest/runner';
package/dist/node.js CHANGED
@@ -1,6 +1,6 @@
1
- export { b as VitestPackageInstaller, V as VitestPlugin, a as createMethodsRPC, c as createVitest, r as registerConsoleShortcuts, s as startVitest } from './vendor/cli-api._n4_Wp_j.js';
2
- export { p as parseCLI } from './vendor/cac.8mXc9Oj6.js';
3
- export { B as BaseSequencer } from './vendor/index.GlXSU9xI.js';
1
+ export { b as VitestPackageInstaller, V as VitestPlugin, a as createMethodsRPC, c as createVitest, r as registerConsoleShortcuts, s as startVitest } from './vendor/cli-api.AmIc1Dmz.js';
2
+ export { p as parseCLI } from './vendor/cac.RDd_SGOd.js';
3
+ export { B as BaseSequencer } from './vendor/index.X7lgIMc_.js';
4
4
  import 'pathe';
5
5
  import './vendor/constants.5J7I254_.js';
6
6
  import './vendor/coverage.E7sG1b3r.js';
@@ -24,11 +24,11 @@ import 'picocolors';
24
24
  import 'vite-node/client';
25
25
  import '@vitest/snapshot/manager';
26
26
  import 'vite-node/server';
27
- import './vendor/index.ir9i0ywP.js';
28
- import 'std-env';
29
27
  import '@vitest/runner/utils';
28
+ import './vendor/base.Xt0Omgh7.js';
30
29
  import '@vitest/utils';
31
- import './vendor/global.CkGT_TMy.js';
30
+ import './vendor/env.AtSIuHFg.js';
31
+ import 'std-env';
32
32
  import './path.js';
33
33
  import './vendor/index.8bPxjt7g.js';
34
34
  import 'zlib';
@@ -40,7 +40,6 @@ import 'net';
40
40
  import 'tls';
41
41
  import 'url';
42
42
  import '@vitest/utils/source-map';
43
- import './vendor/base.Xt0Omgh7.js';
44
43
  import 'node:v8';
45
44
  import 'node:os';
46
45
  import 'node:events';
@@ -54,11 +53,13 @@ import '@vitest/utils/ast';
54
53
  import 'strip-literal';
55
54
  import './vendor/utils.VYmeMh-u.js';
56
55
  import 'node:module';
56
+ import './vendor/index.SMVOaj7F.js';
57
+ import './vendor/global.CkGT_TMy.js';
57
58
  import 'node:readline';
58
59
  import 'readline';
59
60
  import './vendor/tasks.IknbGB2n.js';
60
61
  import 'node:perf_hooks';
61
- import './chunks/runtime-console.kbFEN7E-.js';
62
+ import './chunks/runtime-console.EO5ha7qv.js';
62
63
  import 'node:stream';
63
64
  import './vendor/date.Ns1pGd_X.js';
64
65
  import 'node:fs/promises';
@@ -6,7 +6,7 @@ import { RawSourceMap, FetchResult, ViteNodeResolveId, ModuleCacheMap, ViteNodeS
6
6
  import { SnapshotResult, SnapshotStateOptions, SnapshotState } from '@vitest/snapshot';
7
7
  import { ExpectStatic } from '@vitest/expect';
8
8
  import { ChainableFunction } from '@vitest/runner/utils';
9
- import { ParsedStack, Awaitable as Awaitable$1, ErrorWithDiff, Arrayable as Arrayable$1 } from '@vitest/utils';
9
+ import { ParsedStack, Awaitable as Awaitable$1, Arrayable as Arrayable$1 } from '@vitest/utils';
10
10
  import { TaskResult, Bench, Options as Options$1 } from 'tinybench';
11
11
  import { Writable } from 'node:stream';
12
12
  import { ViteNodeRunner } from 'vite-node/client';
@@ -1191,7 +1191,6 @@ declare class JUnitReporter implements Reporter {
1191
1191
  constructor(options: JUnitOptions);
1192
1192
  onInit(ctx: Vitest): Promise<void>;
1193
1193
  writeElement(name: string, attrs: Record<string, any>, children: () => Promise<void>): Promise<void>;
1194
- writeErrorDetails(task: Task, error: ErrorWithDiff): Promise<void>;
1195
1194
  writeLogs(task: Task, type: 'err' | 'out'): Promise<void>;
1196
1195
  writeTasks(tasks: Task[], filename: string): Promise<void>;
1197
1196
  onFinished(files?: _vitest_runner.File[]): Promise<void>;
@@ -1,4 +1,4 @@
1
- export { aQ as BaseReporter, aH as BasicReporter, aY as BenchmarkBuiltinReporters, aX as BenchmarkReportsMap, aT as BuiltinReporterOptions, aS as BuiltinReporters, aG as DefaultReporter, aI as DotReporter, aP as GithubActionsReporter, aO as HangingProcessReporter, aM as JUnitReporter, aU as JsonAssertionResult, aJ as JsonReporter, aV as JsonTestResult, aW as JsonTestResults, u as Reporter, aR as ReportersMap, aN as TapFlatReporter, aL as TapReporter, aK as VerboseReporter } from './reporters-xEmem8D4.js';
1
+ export { aQ as BaseReporter, aH as BasicReporter, aY as BenchmarkBuiltinReporters, aX as BenchmarkReportsMap, aT as BuiltinReporterOptions, aS as BuiltinReporters, aG as DefaultReporter, aI as DotReporter, aP as GithubActionsReporter, aO as HangingProcessReporter, aM as JUnitReporter, aU as JsonAssertionResult, aJ as JsonReporter, aV as JsonTestResult, aW as JsonTestResults, u as Reporter, aR as ReportersMap, aN as TapFlatReporter, aL as TapReporter, aK as VerboseReporter } from './reporters-BXNXFKfg.js';
2
2
  import 'vite';
3
3
  import '@vitest/runner';
4
4
  import 'vite-node';
package/dist/reporters.js CHANGED
@@ -1,24 +1,24 @@
1
- export { a as BasicReporter, e as BenchmarkReportsMap, D as DefaultReporter, b as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, c as JUnitReporter, J as JsonReporter, R as ReportersMap, d as TapFlatReporter, T as TapReporter, V as VerboseReporter } from './vendor/index.GlXSU9xI.js';
1
+ export { a as BasicReporter, e as BenchmarkReportsMap, D as DefaultReporter, b as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, c as JUnitReporter, J as JsonReporter, R as ReportersMap, d as TapFlatReporter, T as TapReporter, V as VerboseReporter } from './vendor/index.X7lgIMc_.js';
2
2
  import 'node:fs';
3
3
  import 'pathe';
4
- import './vendor/index.ir9i0ywP.js';
5
- import 'std-env';
6
4
  import '@vitest/runner/utils';
7
5
  import '@vitest/utils';
8
- import './vendor/global.CkGT_TMy.js';
6
+ import './vendor/env.AtSIuHFg.js';
7
+ import 'std-env';
9
8
  import 'picocolors';
9
+ import './vendor/tasks.IknbGB2n.js';
10
10
  import './vendor/utils.VYmeMh-u.js';
11
11
  import './vendor/base.Xt0Omgh7.js';
12
- import './vendor/tasks.IknbGB2n.js';
13
12
  import 'node:perf_hooks';
14
- import './chunks/runtime-console.kbFEN7E-.js';
13
+ import './vendor/index.SMVOaj7F.js';
14
+ import './vendor/global.CkGT_TMy.js';
15
+ import './chunks/runtime-console.EO5ha7qv.js';
15
16
  import 'node:stream';
16
17
  import 'node:console';
17
18
  import 'node:path';
18
19
  import './vendor/date.Ns1pGd_X.js';
19
20
  import '@vitest/utils/source-map';
20
21
  import 'node:os';
21
- import 'node:module';
22
22
  import 'node:fs/promises';
23
23
  import 'execa';
24
24
  import 'node:url';
@@ -33,3 +33,4 @@ import 'assert';
33
33
  import 'events';
34
34
  import 'node:crypto';
35
35
  import 'vite-node/utils';
36
+ import 'node:module';
package/dist/runners.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { VitestRunner, VitestRunnerImportSource, Suite, Task, CancelReason, Test, Custom, TaskContext, ExtendedContext } from '@vitest/runner';
2
- import { R as ResolvedConfig } from './reporters-xEmem8D4.js';
2
+ import { R as ResolvedConfig } from './reporters-BXNXFKfg.js';
3
3
  import * as tinybench from 'tinybench';
4
4
  import 'vite';
5
5
  import 'vite-node';
package/dist/runners.js CHANGED
@@ -1,13 +1,14 @@
1
1
  import { setState, GLOBAL_EXPECT, getState } from '@vitest/expect';
2
2
  import { g as getSnapshotClient, c as createExpect, v as vi } from './vendor/vi.Y_w82WR8.js';
3
- import './vendor/index.ir9i0ywP.js';
4
- import { r as rpc } from './vendor/rpc.joBhAkyK.js';
3
+ import 'pathe';
5
4
  import { g as getFullName } from './vendor/tasks.IknbGB2n.js';
5
+ import { createDefer, getSafeTimers } from '@vitest/utils';
6
6
  import { g as getWorkerState } from './vendor/global.CkGT_TMy.js';
7
+ import './vendor/env.AtSIuHFg.js';
8
+ import { r as rpc } from './vendor/rpc.joBhAkyK.js';
7
9
  import { getTests, getNames } from '@vitest/runner/utils';
8
10
  import { updateTask } from '@vitest/runner';
9
- import { createDefer, getSafeTimers } from '@vitest/utils';
10
- import { a as getBenchOptions, g as getBenchFn } from './vendor/benchmark.eeqk2rd8.js';
11
+ import { a as getBenchOptions, g as getBenchFn } from './vendor/benchmark.yGkUTKnC.js';
11
12
  import 'chai';
12
13
  import './vendor/_commonjsHelpers.jjO7Zipk.js';
13
14
  import '@vitest/snapshot';
@@ -16,9 +17,9 @@ import '@vitest/utils/source-map';
16
17
  import './vendor/base.Xt0Omgh7.js';
17
18
  import './vendor/date.Ns1pGd_X.js';
18
19
  import '@vitest/spy';
19
- import 'pathe';
20
20
  import 'std-env';
21
21
  import './vendor/index.8bPxjt7g.js';
22
+ import './vendor/index.SMVOaj7F.js';
22
23
 
23
24
  class VitestTestRunner {
24
25
  constructor(config) {
@@ -1,6 +1,6 @@
1
1
  import { Custom } from '@vitest/runner';
2
2
  import '@vitest/runner/utils';
3
- import { an as BenchFunction, ao as BenchmarkAPI } from './reporters-xEmem8D4.js';
3
+ import { an as BenchFunction, ao as BenchmarkAPI } from './reporters-BXNXFKfg.js';
4
4
  import { Options } from 'tinybench';
5
5
 
6
6
  declare function getBenchOptions(key: Custom): Options;
package/dist/suite.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- export { createTaskCollector, getCurrentSuite, getFn, getHooks, setFn, setHooks } from '@vitest/runner';
1
+ export { createTaskCollector, getCurrentSuite, getCurrentTest, getFn, getHooks, setFn, setHooks } from '@vitest/runner';
2
2
  export { createChainable } from '@vitest/runner/utils';
3
- export { g as getBenchFn, a as getBenchOptions } from './suite-HPAKvIxA.js';
4
- import './reporters-xEmem8D4.js';
3
+ export { g as getBenchFn, a as getBenchOptions } from './suite-KPWE530F.js';
4
+ import './reporters-BXNXFKfg.js';
5
5
  import 'vite';
6
6
  import 'vite-node';
7
7
  import '@vitest/snapshot';
package/dist/suite.js CHANGED
@@ -1,8 +1,9 @@
1
- export { createTaskCollector, getCurrentSuite, getFn, getHooks, setFn, setHooks } from '@vitest/runner';
1
+ export { createTaskCollector, getCurrentSuite, getCurrentTest, getFn, getHooks, setFn, setHooks } from '@vitest/runner';
2
2
  export { createChainable } from '@vitest/runner/utils';
3
- export { g as getBenchFn, a as getBenchOptions } from './vendor/benchmark.eeqk2rd8.js';
3
+ export { g as getBenchFn, a as getBenchOptions } from './vendor/benchmark.yGkUTKnC.js';
4
4
  import '@vitest/utils';
5
- import './vendor/index.ir9i0ywP.js';
5
+ import './vendor/index.SMVOaj7F.js';
6
6
  import 'pathe';
7
- import 'std-env';
8
7
  import './vendor/global.CkGT_TMy.js';
8
+ import './vendor/env.AtSIuHFg.js';
9
+ import 'std-env';
@@ -25,7 +25,7 @@ async function runBaseTests(state) {
25
25
  ctx.files.forEach((i) => state.moduleCache.delete(i));
26
26
  const [executor, { run }] = await Promise.all([
27
27
  startViteNode({ state, requestStubs: getDefaultRequestStubs() }),
28
- import('../chunks/runtime-runBaseTests.-x-nNuJ_.js')
28
+ import('../chunks/runtime-runBaseTests.l6qXp5eU.js')
29
29
  ]);
30
30
  await run(
31
31
  ctx.files,
@@ -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 { i as isRunningInBenchmark } from './index.ir9i0ywP.js';
4
+ import { i as isRunningInBenchmark } from './index.SMVOaj7F.js';
5
5
 
6
6
  const benchFns = /* @__PURE__ */ new WeakMap();
7
7
  const benchOptsMap = /* @__PURE__ */ new WeakMap();
@@ -618,7 +618,7 @@ class CAC extends EventEmitter {
618
618
 
619
619
  const cac = (name = "") => new CAC(name);
620
620
 
621
- var version = "1.5.2";
621
+ var version = "1.5.3";
622
622
 
623
623
  const apiConfig = (port) => ({
624
624
  port: {
@@ -1388,7 +1388,7 @@ async function start(mode, cliFilters, options) {
1388
1388
  } catch {
1389
1389
  }
1390
1390
  try {
1391
- const { startVitest } = await import('./cli-api._n4_Wp_j.js').then(function (n) { return n.d; });
1391
+ const { startVitest } = await import('./cli-api.AmIc1Dmz.js').then(function (n) { return n.d; });
1392
1392
  const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(options));
1393
1393
  if (!(ctx == null ? void 0 : ctx.shouldKeepServer()))
1394
1394
  await (ctx == null ? void 0 : ctx.exit());
@@ -6,7 +6,7 @@ import { isFileServingAllowed, searchForWorkspaceRoot, version as version$1, cre
6
6
  import path$8 from 'node:path';
7
7
  import url, { fileURLToPath } from 'node:url';
8
8
  import process$1 from 'node:process';
9
- import fs$8, { promises, existsSync } from 'node:fs';
9
+ import fs$8, { promises, existsSync, readFileSync } from 'node:fs';
10
10
  import { MessageChannel, isMainThread } from 'node:worker_threads';
11
11
  import { c as commonjsGlobal, g as getDefaultExportFromCjs } from './_commonjsHelpers.jjO7Zipk.js';
12
12
  import require$$0 from 'os';
@@ -19,7 +19,10 @@ import c from 'picocolors';
19
19
  import { ViteNodeRunner } from 'vite-node/client';
20
20
  import { SnapshotManager } from '@vitest/snapshot/manager';
21
21
  import { ViteNodeServer } from 'vite-node/server';
22
- import { b as removeUndefinedValues, c as isWindows } from './index.ir9i0ywP.js';
22
+ import { hasFailed, getTests } from '@vitest/runner/utils';
23
+ import { n as noop$2, b as isPrimitive, c as groupBy, A as AggregateErrorPonyfill, a as slash$1, t as toArray, d as deepMerge, w as wildcardPatternToRegExp, e as stdout } from './base.Xt0Omgh7.js';
24
+ import { createDefer, toArray as toArray$1, notNullish } from '@vitest/utils';
25
+ import { a as isWindows } from './env.AtSIuHFg.js';
23
26
  import { rootDir } from '../path.js';
24
27
  import { c as createBirpc } from './index.8bPxjt7g.js';
25
28
  import require$$0$4 from 'zlib';
@@ -30,20 +33,17 @@ import require$$2 from 'http';
30
33
  import require$$3 from 'net';
31
34
  import require$$4 from 'tls';
32
35
  import require$$7 from 'url';
33
- import { createDefer, toArray as toArray$1, notNullish } from '@vitest/utils';
34
36
  import { parseErrorStacktrace } from '@vitest/utils/source-map';
35
- import { n as noop$2, b as isPrimitive, c as groupBy, A as AggregateErrorPonyfill, a as slash$1, t as toArray, d as deepMerge, w as wildcardPatternToRegExp, e as stdout } from './base.Xt0Omgh7.js';
36
37
  import v8 from 'node:v8';
37
38
  import * as nodeos from 'node:os';
38
39
  import nodeos__default from 'node:os';
39
40
  import EventEmitter$2 from 'node:events';
40
41
  import Tinypool$1, { Tinypool } from 'tinypool';
41
- import { w as wrapSerializableConfig, f as Typechecker, R as ReportersMap, e as BenchmarkReportsMap, g as RandomSequencer, B as BaseSequencer, h as generateCodeFrame, i as highlightCode, L as Logger } from './index.GlXSU9xI.js';
42
- import { hasFailed, getTests } from '@vitest/runner/utils';
42
+ import { w as wrapSerializableConfig, f as Typechecker, R as ReportersMap, e as BenchmarkReportsMap, g as RandomSequencer, B as BaseSequencer, h as generateCodeFrame, i as highlightCode, L as Logger } from './index.X7lgIMc_.js';
43
43
  import { resolveModule, isPackageExists } from 'local-pkg';
44
44
  import { isCI, provider as provider$1 } from 'std-env';
45
45
  import crypto, { createHash as createHash$2 } from 'node:crypto';
46
- import { v as version } from './cac.8mXc9Oj6.js';
46
+ import { v as version } from './cac.RDd_SGOd.js';
47
47
  import { normalizeRequestId, cleanUrl } from 'vite-node/utils';
48
48
  import MagicString from 'magic-string';
49
49
  import { findNodeAround } from 'acorn-walk';
@@ -51,6 +51,7 @@ import { esmWalker } from '@vitest/utils/ast';
51
51
  import { stripLiteral } from 'strip-literal';
52
52
  import { d as divider, s as stripAnsi } from './utils.VYmeMh-u.js';
53
53
  import { createRequire } from 'node:module';
54
+ import { a as removeUndefinedValues } from './index.SMVOaj7F.js';
54
55
  import readline from 'node:readline';
55
56
  import require$$0$6 from 'readline';
56
57
 
@@ -8782,6 +8783,10 @@ function createPool(ctx) {
8782
8783
  ...ctx.config.env
8783
8784
  }
8784
8785
  };
8786
+ if (isWindows) {
8787
+ for (const name in options.env)
8788
+ options.env[name.toUpperCase()] = options.env[name];
8789
+ }
8785
8790
  const customPools = /* @__PURE__ */ new Map();
8786
8791
  async function resolveCustomPool(filepath) {
8787
8792
  if (customPools.has(filepath))
@@ -10250,10 +10255,16 @@ function WorkspaceVitestPlugin(project, options) {
10250
10255
  const root = testConfig.root || viteConfig.root || options.root;
10251
10256
  let name = testConfig.name;
10252
10257
  if (!name) {
10253
- if (typeof options.workspacePath === "string")
10254
- name = basename(options.workspacePath.endsWith("/") ? options.workspacePath.slice(0, -1) : dirname(options.workspacePath));
10255
- else
10258
+ if (typeof options.workspacePath === "string") {
10259
+ const dir = options.workspacePath.endsWith("/") ? options.workspacePath.slice(0, -1) : dirname(options.workspacePath);
10260
+ const pkgJsonPath = resolve(dir, "package.json");
10261
+ if (existsSync(pkgJsonPath))
10262
+ name = JSON.parse(readFileSync(pkgJsonPath, "utf-8")).name;
10263
+ if (typeof name !== "string" || !name)
10264
+ name = basename(dir);
10265
+ } else {
10256
10266
  name = options.workspacePath.toString();
10267
+ }
10257
10268
  }
10258
10269
  const config = {
10259
10270
  root,
@@ -0,0 +1,7 @@
1
+ import 'std-env';
2
+
3
+ var _a;
4
+ const isNode = typeof process < "u" && typeof process.stdout < "u" && !((_a = process.versions) == null ? void 0 : _a.deno) && !globalThis.window;
5
+ const isWindows = isNode && process.platform === "win32";
6
+
7
+ export { isWindows as a, isNode as i };
@@ -5,7 +5,7 @@ import { distDir } from '../path.js';
5
5
  import { g as getWorkerState } from './global.CkGT_TMy.js';
6
6
  import { r as rpc } from './rpc.joBhAkyK.js';
7
7
  import { t as takeCoverageInsideWorker } from './coverage.E7sG1b3r.js';
8
- import { l as loadDiffConfig, a as loadSnapshotSerializers } from './setup-common.7SXMSI--.js';
8
+ import { l as loadDiffConfig, a as loadSnapshotSerializers } from './setup-common.5nUd4r76.js';
9
9
 
10
10
  function setupChaiConfig(config) {
11
11
  Object.assign(chai.config, config);
@@ -1,5 +1,5 @@
1
1
  import { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
2
- import { b as bench } from './benchmark.eeqk2rd8.js';
2
+ import { b as bench } from './benchmark.yGkUTKnC.js';
3
3
  import { i as isFirstRun, a as runOnce } from './run-once.Olz_Zkd8.js';
4
4
  import { c as createExpect, a as globalExpect, v as vi, b as vitest } from './vi.Y_w82WR8.js';
5
5
  import { g as getWorkerState } from './global.CkGT_TMy.js';
@@ -1,13 +1,9 @@
1
1
  import { relative } from 'pathe';
2
- import 'std-env';
3
2
  import '@vitest/runner/utils';
4
3
  import '@vitest/utils';
5
4
  import { g as getWorkerState } from './global.CkGT_TMy.js';
5
+ import './env.AtSIuHFg.js';
6
6
 
7
- var _a;
8
- const isNode = typeof process < "u" && typeof process.stdout < "u" && !((_a = process.versions) == null ? void 0 : _a.deno) && !globalThis.window;
9
-
10
- const isWindows = isNode && process.platform === "win32";
11
7
  function getRunMode() {
12
8
  return getWorkerState().config.mode;
13
9
  }
@@ -23,4 +19,4 @@ function removeUndefinedValues(obj) {
23
19
  return obj;
24
20
  }
25
21
 
26
- export { isNode as a, removeUndefinedValues as b, isWindows as c, isRunningInBenchmark as i, relativePath as r };
22
+ export { removeUndefinedValues as a, isRunningInBenchmark as i, relativePath as r };