vitest 1.4.0 → 1.5.1

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 (47) hide show
  1. package/dist/browser.d.ts +5 -1
  2. package/dist/browser.js +1 -1
  3. package/dist/chunks/{integrations-globals.trMeEBob.js → integrations-globals.k0N5-dd1.js} +3 -3
  4. package/dist/chunks/{runtime-console.tUKE_2UJ.js → runtime-console.kbFEN7E-.js} +14 -6
  5. package/dist/chunks/{runtime-runBaseTests.SKlFOhuq.js → runtime-runBaseTests.-x-nNuJ_.js} +11 -9
  6. package/dist/cli-wrapper.js +1 -1
  7. package/dist/cli.js +3 -61
  8. package/dist/config.cjs +1 -0
  9. package/dist/config.d.ts +2 -1
  10. package/dist/config.js +1 -0
  11. package/dist/coverage.d.ts +4 -2
  12. package/dist/coverage.js +2 -2
  13. package/dist/environments.d.ts +2 -1
  14. package/dist/execute.d.ts +2 -1
  15. package/dist/index.d.ts +5 -4
  16. package/dist/index.js +3 -3
  17. package/dist/node.d.ts +26 -4
  18. package/dist/node.js +15 -13
  19. package/dist/{reporters-P7C2ytIv.d.ts → reporters-xEmem8D4.d.ts} +124 -49
  20. package/dist/reporters.d.ts +2 -1
  21. package/dist/reporters.js +5 -4
  22. package/dist/runners.d.ts +2 -1
  23. package/dist/runners.js +3 -3
  24. package/dist/{suite-a18diDsI.d.ts → suite-HPAKvIxA.d.ts} +1 -1
  25. package/dist/suite.d.ts +3 -2
  26. package/dist/vendor/{base.nhvUBzQY.js → base.gAwDs8Jc.js} +1 -1
  27. package/dist/vendor/cac.4YOY8W-L.js +1406 -0
  28. package/dist/vendor/{cac.RvTIWZBK.js → cli-api.5cFYj0Lq.js} +178 -1499
  29. package/dist/vendor/{constants.K-Wf1PUy.js → constants.5J7I254_.js} +2 -1
  30. package/dist/vendor/{index.BeX1oZht.js → index.0RrMQKD8.js} +1 -1
  31. package/dist/vendor/{index.LNWuEnUT.js → index.gHZzsRJQ.js} +1 -1
  32. package/dist/vendor/{index.e9RDLAeW.js → index.waF5pgqJ.js} +52 -214
  33. package/dist/vendor/inspector.IgLX3ur5.js +54 -0
  34. package/dist/vendor/{setup-common.vyF1kALR.js → setup-common.7SXMSI--.js} +11 -1
  35. package/dist/vendor/{utils.w0xgzP1h.js → utils.0uYuCbzo.js} +5 -2
  36. package/dist/vendor/utils.VYmeMh-u.js +217 -0
  37. package/dist/vendor/{vi.JYQecGiw.js → vi.Y_w82WR8.js} +26 -21
  38. package/dist/vendor/{vm.cAHVDF92.js → vm.I_IsyNig.js} +2 -2
  39. package/dist/worker.js +2 -39
  40. package/dist/workers/forks.js +2 -2
  41. package/dist/workers/runVmTests.js +10 -4
  42. package/dist/workers/threads.js +2 -2
  43. package/dist/workers/vmForks.js +7 -7
  44. package/dist/workers/vmThreads.js +7 -7
  45. package/dist/workers.d.ts +2 -1
  46. package/dist/workers.js +8 -7
  47. package/package.json +11 -11
@@ -7,7 +7,8 @@ import { SnapshotResult, SnapshotStateOptions, SnapshotState } from '@vitest/sna
7
7
  import { ExpectStatic } from '@vitest/expect';
8
8
  import { ChainableFunction } from '@vitest/runner/utils';
9
9
  import { ParsedStack, Awaitable as Awaitable$1, ErrorWithDiff, Arrayable as Arrayable$1 } from '@vitest/utils';
10
- import { TaskResult, Bench, Options } from 'tinybench';
10
+ import { TaskResult, Bench, Options as Options$1 } from 'tinybench';
11
+ import { Writable } from 'node:stream';
11
12
  import { ViteNodeRunner } from 'vite-node/client';
12
13
  import { SnapshotManager } from '@vitest/snapshot/manager';
13
14
  import { ViteNodeServer } from 'vite-node/server';
@@ -315,13 +316,15 @@ interface FakeTimerInstallOpts {
315
316
  now?: number | Date | undefined;
316
317
 
317
318
  /**
318
- * An array with names of global methods and APIs to fake. By default, `@sinonjs/fake-timers` does not replace `nextTick()` and `queueMicrotask()`.
319
- * For instance, `FakeTimers.install({ toFake: ['setTimeout', 'nextTick'] })` will fake only `setTimeout()` and `nextTick()`
319
+ * An array with names of global methods and APIs to fake.
320
+ * For instance, `vi.useFakeTimer({ toFake: ['setTimeout', 'performance'] })` will fake only `setTimeout()` and `performance.now()`
321
+ * @default ['setTimeout', 'clearTimeout', 'setImmediate', 'clearImmediate', 'setInterval', 'clearInterval', 'Date']
320
322
  */
321
323
  toFake?: FakeMethod[] | undefined;
322
324
 
323
325
  /**
324
- * The maximum number of timers that will be run when calling runAll() (default: 1000)
326
+ * The maximum number of timers that will be run when calling runAll()
327
+ * @default 10000
325
328
  */
326
329
  loopLimit?: number | undefined;
327
330
 
@@ -338,8 +341,8 @@ interface FakeTimerInstallOpts {
338
341
  advanceTimeDelta?: number | undefined;
339
342
 
340
343
  /**
341
- * Tells FakeTimers to clear 'native' (i.e. not fake) timers by delegating to their respective handlers. These are not cleared by
342
- * default, leading to potentially unexpected behavior if timers existed prior to installing FakeTimers. (default: false)
344
+ * Tells FakeTimers to clear 'native' (i.e. not fake) timers by delegating to their respective handlers.
345
+ * @default true
343
346
  */
344
347
  shouldClearNativeTimers?: boolean | undefined;
345
348
  }
@@ -451,6 +454,81 @@ interface VmOptions {
451
454
  execArgv?: string[];
452
455
  }
453
456
 
457
+ interface Options {
458
+ /**
459
+ Show the cursor. This can be useful when a CLI accepts input from a user.
460
+
461
+ @example
462
+ ```
463
+ import {createLogUpdate} from 'log-update';
464
+
465
+ // Write output but don't hide the cursor
466
+ const log = createLogUpdate(process.stdout, {
467
+ showCursor: true
468
+ });
469
+ ```
470
+ */
471
+ readonly showCursor?: boolean;
472
+ }
473
+
474
+ type LogUpdateMethods = {
475
+ /**
476
+ Clear the logged output.
477
+ */
478
+ clear(): void;
479
+
480
+ /**
481
+ Persist the logged output. Useful if you want to start a new log session below the current one.
482
+ */
483
+ done(): void;
484
+ };
485
+
486
+ /**
487
+ Log to `stdout` by overwriting the previous output in the terminal.
488
+
489
+ @param text - The text to log to `stdout`.
490
+
491
+ @example
492
+ ```
493
+ import logUpdate from 'log-update';
494
+
495
+ const frames = ['-', '\\', '|', '/'];
496
+ let index = 0;
497
+
498
+ setInterval(() => {
499
+ const frame = frames[index = ++index % frames.length];
500
+
501
+ logUpdate(
502
+ `
503
+ ♥♥
504
+ ${frame} unicorns ${frame}
505
+ ♥♥
506
+ `
507
+ );
508
+ }, 80);
509
+ ```
510
+ */
511
+ declare const logUpdate: ((...text: string[]) => void) & LogUpdateMethods;
512
+
513
+
514
+ /**
515
+ Get a `logUpdate` method that logs to the specified stream.
516
+
517
+ @param stream - The stream to log to.
518
+
519
+ @example
520
+ ```
521
+ import {createLogUpdate} from 'log-update';
522
+
523
+ // Write output but don't hide the cursor
524
+ const log = createLogUpdate(process.stdout);
525
+ ```
526
+ */
527
+ declare function createLogUpdate(
528
+ stream: NodeJS.WritableStream,
529
+ options?: Options
530
+ ): typeof logUpdate;
531
+
454
532
  interface ParsedFile extends File {
455
533
  start: number;
456
534
  end: number;
@@ -541,20 +619,13 @@ interface ErrorOptions {
541
619
  }
542
620
  declare class Logger {
543
621
  ctx: Vitest;
544
- console: Console;
545
- outputStream: NodeJS.WriteStream & {
546
- fd: 1;
547
- };
548
- errorStream: NodeJS.WriteStream & {
549
- fd: 2;
550
- };
551
- logUpdate: ((...text: string[]) => void) & {
552
- clear(): void;
553
- done(): void;
554
- };
622
+ outputStream: NodeJS.WriteStream | Writable;
623
+ errorStream: NodeJS.WriteStream | Writable;
624
+ logUpdate: ReturnType<typeof createLogUpdate>;
555
625
  private _clearScreenPending;
556
626
  private _highlights;
557
- constructor(ctx: Vitest, console?: Console);
627
+ console: Console;
628
+ constructor(ctx: Vitest, outputStream?: NodeJS.WriteStream | Writable, errorStream?: NodeJS.WriteStream | Writable);
558
629
  log(...args: any[]): void;
559
630
  error(...args: any[]): void;
560
631
  warn(...args: any[]): void;
@@ -679,7 +750,7 @@ declare class WorkspaceProject {
679
750
  constructor(path: string | number, ctx: Vitest, options?: InitializeProjectOptions | undefined);
680
751
  getName(): string;
681
752
  isCore(): boolean;
682
- provide: (key: string, value: unknown) => void;
753
+ provide: <T extends never>(key: T, value: ProvidedContext[T]) => void;
683
754
  getProvidedContext(): ProvidedContext;
684
755
  initializeGlobalSetup(): Promise<void>;
685
756
  teardownGlobalSetup(): Promise<void>;
@@ -695,7 +766,7 @@ declare class WorkspaceProject {
695
766
  globFiles(include: string[], exclude: string[], cwd: string): Promise<string[]>;
696
767
  isTargetFile(id: string, source?: string): Promise<boolean>;
697
768
  isInSourceTestFile(code: string): boolean;
698
- filterFiles(testFiles: string[], filters: string[] | undefined, dir: string): string[];
769
+ filterFiles(testFiles: string[], filters: string[], dir: string): string[];
699
770
  initBrowserServer(configFile: string | undefined): Promise<void>;
700
771
  static createBasicProject(ctx: Vitest): WorkspaceProject;
701
772
  static createCoreProject(ctx: Vitest): Promise<WorkspaceProject>;
@@ -809,27 +880,6 @@ declare class ResultsCache {
809
880
  writeToCache(): Promise<void>;
810
881
  }
811
882
 
812
- interface CliOptions extends UserConfig {
813
- /**
814
- * Override the watch mode
815
- */
816
- run?: boolean;
817
- /**
818
- * Retry the test suite if it crashes due to a segfault (default: true)
819
- */
820
- segfaultRetry?: number;
821
- /**
822
- * Removes colors from the console output
823
- */
824
- color?: boolean;
825
- }
826
- /**
827
- * Start Vitest programmatically
828
- *
829
- * Returns a Vitest instance if initialized successfully.
830
- */
831
- declare function startVitest(mode: VitestRunMode, cliFilters?: string[], options?: CliOptions, viteOverrides?: UserConfig$1, vitestOptions?: VitestOptions): Promise<Vitest | undefined>;
832
-
833
883
  type FileStatsCache = Pick<Stats, 'size'>;
834
884
  declare class FilesStatsCache {
835
885
  cache: Map<string, FileStatsCache>;
@@ -847,10 +897,6 @@ declare class VitestCache {
847
897
  size: number;
848
898
  } | undefined;
849
899
  static resolveCacheDir(root: string, dir?: string, projectName?: string): string;
850
- static clearCache(options: CliOptions): Promise<{
851
- dir: string;
852
- cleared: boolean;
853
- }>;
854
900
  }
855
901
 
856
902
  declare class VitestPackageInstaller {
@@ -859,6 +905,9 @@ declare class VitestPackageInstaller {
859
905
 
860
906
  interface VitestOptions {
861
907
  packageInstaller?: VitestPackageInstaller;
908
+ stdin?: NodeJS.ReadStream;
909
+ stdout?: NodeJS.WriteStream | Writable;
910
+ stderr?: NodeJS.WriteStream | Writable;
862
911
  }
863
912
  declare class Vitest {
864
913
  readonly mode: VitestRunMode;
@@ -1197,6 +1246,7 @@ declare class TableReporter extends BaseReporter {
1197
1246
  rendererOptions: TableRendererOptions;
1198
1247
  onTestRemoved(trigger?: string): Promise<void>;
1199
1248
  onCollected(): void;
1249
+ onTaskUpdate(packs: TaskResultPack[]): void;
1200
1250
  onFinished(files?: _vitest_runner.File[], errors?: unknown[]): Promise<void>;
1201
1251
  onWatcherStart(): Promise<void>;
1202
1252
  stopListRender(): Promise<void>;
@@ -1640,6 +1690,10 @@ interface CoverageIstanbulOptions extends BaseCoverageOptions {
1640
1690
  ignoreClassMethods?: string[];
1641
1691
  }
1642
1692
  interface CoverageV8Options extends BaseCoverageOptions {
1693
+ /**
1694
+ * Ignore empty lines, comments and other non-runtime code, e.g. Typescript types
1695
+ */
1696
+ ignoreEmptyLines?: boolean;
1643
1697
  }
1644
1698
  interface CustomProviderOptions extends Pick<BaseCoverageOptions, FieldsWithDefaultValues> {
1645
1699
  /** Name of the module or path to a file to load the custom provider from */
@@ -1812,7 +1866,7 @@ interface BenchmarkResult extends TaskResult {
1812
1866
  rank: number;
1813
1867
  }
1814
1868
  type BenchFunction = (this: Bench) => Promise<void> | void;
1815
- type ChainableBenchmarkAPI = ChainableFunction<'skip' | 'only' | 'todo', (name: string | Function, fn?: BenchFunction, options?: Options) => void>;
1869
+ type ChainableBenchmarkAPI = ChainableFunction<'skip' | 'only' | 'todo', (name: string | Function, fn?: BenchFunction, options?: Options$1) => void>;
1816
1870
  type BenchmarkAPI = ChainableBenchmarkAPI & {
1817
1871
  skipIf: (condition: any) => ChainableBenchmarkAPI;
1818
1872
  runIf: (condition: any) => ChainableBenchmarkAPI;
@@ -2460,14 +2514,35 @@ interface InlineConfig {
2460
2514
  *
2461
2515
  * Requires `poolOptions.threads.singleThread: true` OR `poolOptions.forks.singleFork: true`.
2462
2516
  */
2463
- inspect?: boolean;
2517
+ inspect?: boolean | string;
2464
2518
  /**
2465
2519
  * Debug tests by opening `node:inspector` in worker / child process and wait for debugger to connect.
2466
2520
  * Provides similar experience as `--inspect-brk` Node CLI argument.
2467
2521
  *
2468
2522
  * Requires `poolOptions.threads.singleThread: true` OR `poolOptions.forks.singleFork: true`.
2469
2523
  */
2470
- inspectBrk?: boolean;
2524
+ inspectBrk?: boolean | string;
2525
+ /**
2526
+ * Inspector options. If `--inspect` or `--inspect-brk` is enabled, these options will be passed to the inspector.
2527
+ */
2528
+ inspector?: {
2529
+ /**
2530
+ * Enable inspector
2531
+ */
2532
+ enabled?: boolean;
2533
+ /**
2534
+ * Port to run inspector on
2535
+ */
2536
+ port?: number;
2537
+ /**
2538
+ * Host to run inspector on
2539
+ */
2540
+ host?: string;
2541
+ /**
2542
+ * Wait for debugger to connect before running tests
2543
+ */
2544
+ waitForDebugger?: boolean;
2545
+ };
2471
2546
  /**
2472
2547
  * Modify default Chai config. Vitest uses Chai for `expect` and `assert` matches.
2473
2548
  * https://github.com/chaijs/chai/blob/4.x.x/lib/chai/config.js
@@ -2744,4 +2819,4 @@ type Context = RootAndTarget & {
2744
2819
  lastActivePath?: string;
2745
2820
  };
2746
2821
 
2747
- export { type TypecheckConfig as $, type AfterSuiteRunMeta as A, type BaseCoverageOptions as B, type CoverageOptions as C, type CollectLines as D, type Environment as E, type FakeTimerInstallOpts as F, type RootAndTarget as G, type Context as H, type Pool as I, type PoolOptions as J, type JSDOMOptions as K, type HappyDOMOptions as L, type MockFactoryWithHelper as M, type BuiltinEnvironment as N, type VitestEnvironment as O, type ProvidedContext as P, type CSSModuleScopeStrategy as Q, type ResolvedConfig as R, type ApiConfig as S, type TestSequencer as T, type UserConfig as U, type VitestRunMode as V, type WorkerGlobalState as W, type EnvironmentOptions as X, type DepsOptimizationOptions as Y, type TransformModePatterns as Z, type InlineConfig as _, type ResolvedCoverageOptions as a, type ProjectConfig as a0, type UserWorkspaceConfig as a1, type RunnerRPC as a2, type ContextTestEnvironment as a3, type ResolvedTestEnvironment as a4, type ResolveIdFunction as a5, type WorkerRPC as a6, type Awaitable as a7, type Nullable as a8, type Arrayable as a9, defineConfig as aA, defineProject as aB, defineWorkspace as aC, configDefaults as aD, defaultInclude as aE, defaultExclude as aF, coverageConfigDefaults as aG, extraInlineDeps as aH, DefaultReporter as aI, BasicReporter as aJ, DotReporter as aK, JsonReporter$1 as aL, VerboseReporter as aM, TapReporter as aN, JUnitReporter as aO, TapFlatReporter as aP, HangingProcessReporter as aQ, GithubActionsReporter as aR, BaseReporter as aS, ReportersMap as aT, type BuiltinReporters as aU, type BuiltinReporterOptions as aV, type JsonAssertionResult as aW, type JsonTestResult as aX, type JsonTestResults as aY, BenchmarkReportsMap as aZ, type BenchmarkBuiltinReporters as a_, type ArgumentsType$1 as aa, type MutableArray as ab, type Constructable as ac, type ModuleCache as ad, type EnvironmentReturn as ae, type VmEnvironmentReturn as af, type OnServerRestartHandler as ag, type ReportContext as ah, type CoverageReporter as ai, type CoverageIstanbulOptions as aj, type CoverageV8Options as ak, type CustomProviderOptions as al, type BenchmarkUserOptions as am, type Benchmark as an, type BenchmarkResult as ao, type BenchFunction as ap, type BenchmarkAPI as aq, type PendingSuiteMock as ar, type MockFactory as as, type MockMap as at, type UserConfigFnObject as au, type UserConfigFnPromise as av, type UserConfigFn as aw, type UserConfigExport as ax, type UserProjectConfigFn as ay, type UserProjectConfigExport as az, type CoverageProvider as b, type CoverageProviderModule as c, type BirpcOptions as d, type RuntimeRPC as e, type ContextRPC as f, type WorkerContext as g, type VitestOptions as h, Vitest as i, type CliOptions as j, WorkspaceProject as k, type WorkspaceSpec as l, type ProcessPool as m, VitestPackageInstaller as n, type TestSequencerConstructor as o, type BrowserProviderInitializationOptions as p, type BrowserProvider as q, type BrowserProviderOptions as r, startVitest as s, type RuntimeConfig as t, type UserConsoleLog as u, type ModuleGraphData as v, type Reporter as w, type RawErrsMap as x, type TscErrorInfo as y, type CollectLineNumbers as z };
2822
+ export { type UserWorkspaceConfig as $, type AfterSuiteRunMeta as A, type BaseCoverageOptions as B, type CoverageOptions as C, type Context as D, type Environment as E, type FakeTimerInstallOpts as F, type Pool as G, type PoolOptions as H, type HappyDOMOptions as I, type JSDOMOptions as J, type BuiltinEnvironment as K, type VitestEnvironment as L, type MockFactoryWithHelper as M, type CSSModuleScopeStrategy as N, type ApiConfig as O, type ProvidedContext as P, type EnvironmentOptions as Q, type ResolvedConfig as R, type DepsOptimizationOptions as S, type TestSequencer as T, type UserConfig as U, type VitestRunMode as V, type WorkerGlobalState as W, type TransformModePatterns as X, type InlineConfig as Y, type TypecheckConfig as Z, type ProjectConfig as _, type ResolvedCoverageOptions as a, type RunnerRPC as a0, type ContextTestEnvironment as a1, type ResolvedTestEnvironment as a2, type ResolveIdFunction as a3, type WorkerRPC as a4, type Awaitable as a5, type Nullable as a6, type Arrayable as a7, type ArgumentsType$1 as a8, type MutableArray as a9, defineWorkspace as aA, configDefaults as aB, defaultInclude as aC, defaultExclude as aD, coverageConfigDefaults as aE, extraInlineDeps as aF, DefaultReporter as aG, BasicReporter as aH, DotReporter as aI, JsonReporter$1 as aJ, VerboseReporter as aK, TapReporter as aL, JUnitReporter as aM, TapFlatReporter as aN, HangingProcessReporter as aO, GithubActionsReporter as aP, BaseReporter as aQ, ReportersMap as aR, type BuiltinReporters as aS, type BuiltinReporterOptions as aT, type JsonAssertionResult as aU, type JsonTestResult as aV, type JsonTestResults as aW, BenchmarkReportsMap as aX, type BenchmarkBuiltinReporters as aY, type Constructable as aa, type ModuleCache as ab, type EnvironmentReturn as ac, type VmEnvironmentReturn as ad, type OnServerRestartHandler as ae, type ReportContext as af, type CoverageReporter as ag, type CoverageIstanbulOptions as ah, type CoverageV8Options as ai, type CustomProviderOptions as aj, type BenchmarkUserOptions as ak, type Benchmark as al, type BenchmarkResult as am, type BenchFunction as an, type BenchmarkAPI as ao, type PendingSuiteMock as ap, type MockFactory as aq, type MockMap as ar, type UserConfigFnObject as as, type UserConfigFnPromise as at, type UserConfigFn as au, type UserConfigExport as av, type UserProjectConfigFn as aw, type UserProjectConfigExport as ax, defineConfig as ay, defineProject as az, type CoverageProvider as b, type CoverageProviderModule as c, type BirpcOptions as d, type RuntimeRPC as e, type ContextRPC as f, type WorkerContext as g, type VitestOptions as h, Vitest as i, WorkspaceProject as j, type WorkspaceSpec as k, type ProcessPool as l, VitestPackageInstaller as m, type TestSequencerConstructor as n, type BrowserProviderInitializationOptions as o, type BrowserProvider as p, type BrowserProviderOptions as q, type RuntimeConfig as r, type UserConsoleLog as s, type ModuleGraphData as t, type Reporter as u, type RawErrsMap as v, type TscErrorInfo as w, type CollectLineNumbers as x, type CollectLines as y, type RootAndTarget as z };
@@ -1,4 +1,4 @@
1
- export { aS as BaseReporter, aJ as BasicReporter, a_ as BenchmarkBuiltinReporters, aZ as BenchmarkReportsMap, aV as BuiltinReporterOptions, aU as BuiltinReporters, aI as DefaultReporter, aK as DotReporter, aR as GithubActionsReporter, aQ as HangingProcessReporter, aO as JUnitReporter, aW as JsonAssertionResult, aL as JsonReporter, aX as JsonTestResult, aY as JsonTestResults, w as Reporter, aT as ReportersMap, aP as TapFlatReporter, aN as TapReporter, aM as VerboseReporter } from './reporters-P7C2ytIv.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-xEmem8D4.js';
2
2
  import 'vite';
3
3
  import '@vitest/runner';
4
4
  import 'vite-node';
@@ -7,6 +7,7 @@ import '@vitest/expect';
7
7
  import '@vitest/runner/utils';
8
8
  import '@vitest/utils';
9
9
  import 'tinybench';
10
+ import 'node:stream';
10
11
  import 'vite-node/client';
11
12
  import '@vitest/snapshot/manager';
12
13
  import 'vite-node/server';
package/dist/reporters.js CHANGED
@@ -1,4 +1,4 @@
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.e9RDLAeW.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.waF5pgqJ.js';
2
2
  import 'node:fs';
3
3
  import 'pathe';
4
4
  import './vendor/index.ir9i0ywP.js';
@@ -7,14 +7,15 @@ import '@vitest/runner/utils';
7
7
  import '@vitest/utils';
8
8
  import './vendor/global.CkGT_TMy.js';
9
9
  import 'picocolors';
10
+ import './vendor/utils.VYmeMh-u.js';
11
+ import './vendor/base.Xt0Omgh7.js';
12
+ import './vendor/tasks.IknbGB2n.js';
10
13
  import 'node:perf_hooks';
11
- import './chunks/runtime-console.tUKE_2UJ.js';
14
+ import './chunks/runtime-console.kbFEN7E-.js';
12
15
  import 'node:stream';
13
16
  import 'node:console';
14
17
  import 'node:path';
15
18
  import './vendor/date.Ns1pGd_X.js';
16
- import './vendor/base.Xt0Omgh7.js';
17
- import './vendor/tasks.IknbGB2n.js';
18
19
  import '@vitest/utils/source-map';
19
20
  import 'node:os';
20
21
  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-P7C2ytIv.js';
2
+ import { R as ResolvedConfig } from './reporters-xEmem8D4.js';
3
3
  import * as tinybench from 'tinybench';
4
4
  import 'vite';
5
5
  import 'vite-node';
@@ -7,6 +7,7 @@ import '@vitest/snapshot';
7
7
  import '@vitest/expect';
8
8
  import '@vitest/runner/utils';
9
9
  import '@vitest/utils';
10
+ import 'node:stream';
10
11
  import 'vite-node/client';
11
12
  import '@vitest/snapshot/manager';
12
13
  import 'vite-node/server';
package/dist/runners.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { setState, GLOBAL_EXPECT, getState } from '@vitest/expect';
2
- import { g as getSnapshotClient, c as createExpect, v as vi } from './vendor/vi.JYQecGiw.js';
2
+ import { g as getSnapshotClient, c as createExpect, v as vi } from './vendor/vi.Y_w82WR8.js';
3
3
  import './vendor/index.ir9i0ywP.js';
4
4
  import { r as rpc } from './vendor/rpc.joBhAkyK.js';
5
5
  import { g as getFullName } from './vendor/tasks.IknbGB2n.js';
@@ -161,8 +161,8 @@ async function runBenchmarkSuite(suite, runner) {
161
161
  else if (task.type === "suite")
162
162
  benchmarkSuiteGroup.push(task);
163
163
  }
164
- if (benchmarkSuiteGroup.length)
165
- await Promise.all(benchmarkSuiteGroup.map((subSuite) => runBenchmarkSuite(subSuite, runner)));
164
+ for (const subSuite of benchmarkSuiteGroup)
165
+ await runBenchmarkSuite(subSuite, runner);
166
166
  if (benchmarkGroup.length) {
167
167
  const defer = createDefer();
168
168
  suite.result = {
@@ -1,6 +1,6 @@
1
1
  import { Custom } from '@vitest/runner';
2
2
  import '@vitest/runner/utils';
3
- import { ap as BenchFunction, aq as BenchmarkAPI } from './reporters-P7C2ytIv.js';
3
+ import { an as BenchFunction, ao as BenchmarkAPI } from './reporters-xEmem8D4.js';
4
4
  import { Options } from 'tinybench';
5
5
 
6
6
  declare function getBenchOptions(key: Custom): Options;
package/dist/suite.d.ts CHANGED
@@ -1,13 +1,14 @@
1
1
  export { createTaskCollector, getCurrentSuite, 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-a18diDsI.js';
4
- import './reporters-P7C2ytIv.js';
3
+ export { g as getBenchFn, a as getBenchOptions } from './suite-HPAKvIxA.js';
4
+ import './reporters-xEmem8D4.js';
5
5
  import 'vite';
6
6
  import 'vite-node';
7
7
  import '@vitest/snapshot';
8
8
  import '@vitest/expect';
9
9
  import '@vitest/utils';
10
10
  import 'tinybench';
11
+ import 'node:stream';
11
12
  import 'vite-node/client';
12
13
  import '@vitest/snapshot/manager';
13
14
  import 'vite-node/server';
@@ -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.SKlFOhuq.js')
28
+ import('../chunks/runtime-runBaseTests.-x-nNuJ_.js')
29
29
  ]);
30
30
  await run(
31
31
  ctx.files,