vitest 0.24.5 → 0.25.0

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 (48) hide show
  1. package/LICENSE.md +286 -57
  2. package/dist/browser.d.ts +3 -3
  3. package/dist/browser.js +17 -10
  4. package/dist/{chunk-api-setup.629f8133.js → chunk-api-setup.a13c5f9d.js} +38 -19
  5. package/dist/{chunk-install-pkg.22707ee4.js → chunk-install-pkg.55bfe508.js} +4 -5
  6. package/dist/{chunk-integrations-coverage.cca09977.js → chunk-integrations-coverage.befed097.js} +57 -1
  7. package/dist/chunk-integrations-globals.391b3839.js +25 -0
  8. package/dist/{chunk-node-git.82174cfe.js → chunk-node-git.af5c9d73.js} +5 -6
  9. package/dist/{chunk-runtime-chain.37ec5d73.js → chunk-runtime-chain.3b531731.js} +27 -23
  10. package/dist/{chunk-runtime-error.17751c39.js → chunk-runtime-error.3cc15c6f.js} +9 -2
  11. package/dist/{chunk-runtime-mocker.41b92ec9.js → chunk-runtime-mocker.a5d87666.js} +4 -4
  12. package/dist/{chunk-runtime-rpc.b418c0ab.js → chunk-runtime-rpc.4a2d45ab.js} +2 -2
  13. package/dist/chunk-runtime-setup.f644ac4c.js +1350 -0
  14. package/dist/{chunk-runtime-hooks.d748b085.js → chunk-runtime-test-state.31ce8643.js} +106 -6
  15. package/dist/{chunk-mock-date.030959d3.js → chunk-typecheck-constants.410fa7b2.js} +23 -4
  16. package/dist/{chunk-utils-env.b1281522.js → chunk-utils-env.7fe285cc.js} +2 -0
  17. package/dist/chunk-utils-source-map.1a66263d.js +90 -0
  18. package/dist/{chunk-utils-timers.8fca243e.js → chunk-utils-timers.d1fcc6bb.js} +86 -79
  19. package/dist/{chunk-vite-node-client.3868b3ba.js → chunk-vite-node-client.13ea0a59.js} +25 -5
  20. package/dist/{chunk-vite-node-externalize.d9033432.js → chunk-vite-node-externalize.01d0d22c.js} +821 -92
  21. package/dist/chunk-vite-node-utils.b89230f3.js +1400 -0
  22. package/dist/cli-wrapper.js +5 -6
  23. package/dist/cli.js +27 -13
  24. package/dist/config.cjs +6 -1
  25. package/dist/config.d.ts +6 -1
  26. package/dist/config.js +6 -1
  27. package/dist/entry.js +11 -10
  28. package/dist/environments.d.ts +1 -1
  29. package/dist/index-b68b3c09.d.ts +256 -0
  30. package/dist/index.d.ts +4 -4
  31. package/dist/index.js +13 -7
  32. package/dist/loader.js +4 -3
  33. package/dist/node.d.ts +2 -2
  34. package/dist/node.js +18 -11
  35. package/dist/suite.js +6 -6
  36. package/dist/{global-58e8e951.d.ts → types-b3ff5eea.d.ts} +215 -18
  37. package/dist/{vendor-index.cc8d244b.js → vendor-index.16d769d7.js} +1 -2
  38. package/dist/{vendor-index.12d51d29.js → vendor-index.22806ffb.js} +279 -7
  39. package/dist/{vendor-index.9c919048.js → vendor-index.808a85a6.js} +0 -0
  40. package/dist/worker.js +9 -8
  41. package/globals.d.ts +2 -0
  42. package/package.json +13 -9
  43. package/dist/chunk-integrations-globals.32ef80c3.js +0 -25
  44. package/dist/chunk-runtime-setup.ab6b6274.js +0 -676
  45. package/dist/chunk-utils-source-map.663e2952.js +0 -3429
  46. package/dist/chunk-vite-node-utils.2144000e.js +0 -6946
  47. package/dist/index-220c1d70.d.ts +0 -117
  48. package/dist/vendor-index.1a291e86.js +0 -275
@@ -1,4 +1,5 @@
1
1
  import { ViteDevServer, TransformResult as TransformResult$1, UserConfig as UserConfig$1, CommonServerOptions, AliasOptions } from 'vite';
2
+ import * as tinybench from 'tinybench';
2
3
  import { Task as Task$1, Options, TaskResult as TaskResult$1, Bench } from 'tinybench';
3
4
  import { Stats } from 'fs';
4
5
  import { MessagePort } from 'worker_threads';
@@ -202,6 +203,7 @@ interface ErrorPayload {
202
203
 
203
204
  interface CustomEventMap {
204
205
  'vite:beforeUpdate': UpdatePayload
206
+ 'vite:afterUpdate': UpdatePayload
205
207
  'vite:beforePrune': PrunePayload
206
208
  'vite:beforeFullReload': FullReloadPayload
207
209
  'vite:error': ErrorPayload
@@ -263,6 +265,10 @@ declare class ModuleCacheMap extends Map<string, ModuleCache$1> {
263
265
  * Invalidate dependency modules of the given modules, down to the bottom-level dependencies
264
266
  */
265
267
  invalidateSubDepTree(ids: string[] | Set<string>, invalidated?: Set<string>): Set<string>;
268
+ /**
269
+ * Return parsed source map based on inlined source map of the module
270
+ */
271
+ getSourceMap(id: string): any;
266
272
  }
267
273
  declare class ViteNodeRunner {
268
274
  options: ViteNodeRunnerOptions;
@@ -276,6 +282,7 @@ declare class ViteNodeRunner {
276
282
  constructor(options: ViteNodeRunnerOptions);
277
283
  executeFile(file: string): Promise<any>;
278
284
  executeId(id: string): Promise<any>;
285
+ getSourceMap(id: string): any;
279
286
  /** @internal */
280
287
  cachedRequest(rawId: string, callstack: string[]): Promise<any>;
281
288
  /** @internal */
@@ -326,6 +333,7 @@ interface ModuleCache$1 {
326
333
  promise?: Promise<any>;
327
334
  exports?: any;
328
335
  code?: string;
336
+ map?: RawSourceMap;
329
337
  /**
330
338
  * Module ids that imports this module
331
339
  */
@@ -410,6 +418,7 @@ declare class ViteNodeServer {
410
418
  constructor(server: ViteDevServer, options?: ViteNodeServerOptions);
411
419
  shouldExternalize(id: string): Promise<string | false>;
412
420
  resolveId(id: string, importer?: string): Promise<ViteNodeResolveId | null>;
421
+ getSourceMap(source: string): RawSourceMap | null;
413
422
  fetchModule(id: string): Promise<FetchResult>;
414
423
  transformRequest(id: string): Promise<TransformResult$1 | null | undefined>;
415
424
  getTransformMode(id: string): "web" | "ssr";
@@ -427,6 +436,92 @@ declare class SnapshotManager {
427
436
  resolvePath(testPath: string): string;
428
437
  }
429
438
 
439
+ interface ParsedFile extends File {
440
+ start: number;
441
+ end: number;
442
+ }
443
+ interface ParsedSuite extends Suite {
444
+ start: number;
445
+ end: number;
446
+ }
447
+ interface LocalCallDefinition {
448
+ start: number;
449
+ end: number;
450
+ name: string;
451
+ type: string;
452
+ mode: 'run' | 'skip' | 'only' | 'todo';
453
+ task: ParsedSuite | ParsedFile;
454
+ }
455
+ interface FileInformation {
456
+ file: ParsedFile;
457
+ filepath: string;
458
+ parsed: string;
459
+ map: RawSourceMap | null;
460
+ definitions: LocalCallDefinition[];
461
+ }
462
+
463
+ declare class TypeCheckError extends Error {
464
+ message: string;
465
+ stacks: ParsedStack[];
466
+ name: string;
467
+ constructor(message: string, stacks: ParsedStack[]);
468
+ }
469
+ interface ErrorsCache {
470
+ files: File[];
471
+ sourceErrors: TypeCheckError[];
472
+ }
473
+ declare type Callback<Args extends Array<any> = []> = (...args: Args) => Awaitable<void>;
474
+ declare class Typechecker {
475
+ protected ctx: Vitest;
476
+ protected files: string[];
477
+ private _onParseStart?;
478
+ private _onParseEnd?;
479
+ private _onWatcherRerun?;
480
+ private _result;
481
+ private _tests;
482
+ private tempConfigPath?;
483
+ private process;
484
+ constructor(ctx: Vitest, files: string[]);
485
+ onParseStart(fn: Callback): void;
486
+ onParseEnd(fn: Callback<[ErrorsCache]>): void;
487
+ onWatcherRerun(fn: Callback): void;
488
+ protected collectFileTests(filepath: string): Promise<FileInformation | null>;
489
+ collectTests(): Promise<Record<string, FileInformation>>;
490
+ protected prepareResults(output: string): Promise<{
491
+ files: File[];
492
+ sourceErrors: TypeCheckError[];
493
+ }>;
494
+ protected parseTscLikeOutput(output: string): Promise<Map<string, {
495
+ error: TypeCheckError;
496
+ originalError: TscErrorInfo;
497
+ }[]>>;
498
+ clear(): Promise<void>;
499
+ stop(): Promise<void>;
500
+ protected ensurePackageInstalled(root: string, checker: string): Promise<void>;
501
+ start(): Promise<void>;
502
+ getResult(): ErrorsCache;
503
+ getTestFiles(): {
504
+ result: undefined;
505
+ start: number;
506
+ end: number;
507
+ filepath: string;
508
+ collectDuration?: number | undefined;
509
+ setupDuration?: number | undefined;
510
+ type: "suite";
511
+ tasks: Task[];
512
+ benchmark?: tinybench.Bench | undefined;
513
+ id: string;
514
+ name: string;
515
+ mode: RunMode;
516
+ concurrent?: boolean | undefined;
517
+ shuffle?: boolean | undefined;
518
+ suite?: Suite | undefined;
519
+ file?: File | undefined;
520
+ retry?: number | undefined;
521
+ logs?: UserConsoleLog[] | undefined;
522
+ }[];
523
+ }
524
+
430
525
  declare type RunWithFiles = (files: string[], invalidates?: string[]) => Promise<void>;
431
526
  interface WorkerPool {
432
527
  runTests: RunWithFiles;
@@ -479,12 +574,14 @@ declare class Logger {
479
574
  log(...args: any[]): void;
480
575
  error(...args: any[]): void;
481
576
  warn(...args: any[]): void;
577
+ clearFullScreen(message: string): void;
482
578
  clearScreen(message: string, force?: boolean): void;
483
579
  private _clearScreen;
484
580
  printError(err: unknown, fullStack?: boolean, type?: string): Promise<void>;
485
581
  printNoTestFound(filters?: string[]): void;
486
582
  printBanner(): void;
487
583
  printUnhandledErrors(errors: unknown[]): Promise<void>;
584
+ printSourceTypeErrors(errors: TypeCheckError[]): Promise<void>;
488
585
  }
489
586
 
490
587
  interface SuiteResultCache {
@@ -511,7 +608,12 @@ interface CliOptions extends UserConfig {
511
608
  */
512
609
  run?: boolean;
513
610
  }
514
- declare function startVitest(mode: VitestRunMode, cliFilters: string[], options: CliOptions, viteOverrides?: UserConfig$1): Promise<boolean>;
611
+ /**
612
+ * Start Vitest programmatically
613
+ *
614
+ * Returns a Vitest instance if initialized successfully.
615
+ */
616
+ declare function startVitest(mode: VitestRunMode, cliFilters: string[], options: CliOptions, viteOverrides?: UserConfig$1): Promise<Vitest | undefined>;
515
617
 
516
618
  declare type FileStatsCache = Pick<Stats, 'size'>;
517
619
  declare class FilesStatsCache {
@@ -547,6 +649,7 @@ declare class Vitest {
547
649
  coverageProvider: CoverageProvider | null | undefined;
548
650
  logger: Logger;
549
651
  pool: WorkerPool | undefined;
652
+ typechecker: Typechecker | undefined;
550
653
  vitenode: ViteNodeServer;
551
654
  invalidates: Set<string>;
552
655
  changedTests: Set<string>;
@@ -560,6 +663,7 @@ declare class Vitest {
560
663
  setServer(options: UserConfig, server: ViteDevServer): Promise<void>;
561
664
  initCoverageProvider(): Promise<CoverageProvider | null | undefined>;
562
665
  getSerializableConfig(): ResolvedConfig;
666
+ typecheck(filters?: string[]): Promise<void>;
563
667
  start(filters?: string[]): Promise<void>;
564
668
  private getTestDependencies;
565
669
  filterTestsBySource(tests: string[]): Promise<string[]>;
@@ -578,6 +682,9 @@ declare class Vitest {
578
682
  */
579
683
  private handleFileChanged;
580
684
  close(): Promise<void>;
685
+ /**
686
+ * Close the thread pool and exit the process
687
+ */
581
688
  exit(force?: boolean): Promise<void>;
582
689
  report<T extends keyof Reporter>(name: T, ...args: ArgumentsType$1<Reporter[T]>): Promise<void>;
583
690
  globTestFiles(filters?: string[]): Promise<string[]>;
@@ -617,7 +724,7 @@ declare abstract class BaseReporter implements Reporter {
617
724
  relative(path: string): string;
618
725
  onFinished(files?: File[], errors?: unknown[]): Promise<void>;
619
726
  onTaskUpdate(packs: TaskResultPack[]): void;
620
- onWatcherStart(): Promise<void>;
727
+ onWatcherStart(files?: File[], errors?: unknown[]): Promise<void>;
621
728
  private resetLastRunLog;
622
729
  onWatcherRerun(files: string[], trigger?: string): Promise<void>;
623
730
  onUserConsoleLog(log: UserConsoleLog): void;
@@ -631,12 +738,13 @@ declare abstract class BaseReporter implements Reporter {
631
738
  registerUnhandledRejection(): void;
632
739
  }
633
740
 
634
- interface ListRendererOptions {
741
+ interface ListRendererOptions$1 {
635
742
  renderSucceed?: boolean;
636
743
  logger: Logger;
637
744
  showHeap: boolean;
745
+ mode: VitestRunMode;
638
746
  }
639
- declare const createListRenderer: (_tasks: Task[], options: ListRendererOptions) => {
747
+ declare const createListRenderer: (_tasks: Task[], options: ListRendererOptions$1) => {
640
748
  start(): any;
641
749
  update(_tasks: Task[]): any;
642
750
  stop(): Promise<any>;
@@ -645,11 +753,11 @@ declare const createListRenderer: (_tasks: Task[], options: ListRendererOptions)
645
753
 
646
754
  declare class DefaultReporter extends BaseReporter {
647
755
  renderer?: ReturnType<typeof createListRenderer>;
648
- rendererOptions: ListRendererOptions;
756
+ rendererOptions: ListRendererOptions$1;
649
757
  onTestRemoved(trigger?: string): Promise<void>;
650
- onCollected(): void;
758
+ onCollected(files?: File[]): void;
651
759
  onFinished(files?: File[], errors?: unknown[]): Promise<void>;
652
- onWatcherStart(): Promise<void>;
760
+ onWatcherStart(files?: File[], errors?: unknown[]): Promise<void>;
653
761
  stopListRender(): Promise<void>;
654
762
  onWatcherRerun(files: string[], trigger?: string): Promise<void>;
655
763
  onUserConsoleLog(log: UserConsoleLog): void;
@@ -731,8 +839,33 @@ declare class JsonReporter implements Reporter {
731
839
  writeReport(report: string): Promise<void>;
732
840
  }
733
841
 
842
+ interface ListRendererOptions {
843
+ renderSucceed?: boolean;
844
+ logger: Logger;
845
+ showHeap: boolean;
846
+ }
847
+ declare const createTableRenderer: (_tasks: Task[], options: ListRendererOptions) => {
848
+ start(): any;
849
+ update(_tasks: Task[]): any;
850
+ stop(): Promise<any>;
851
+ clear(): void;
852
+ };
853
+
854
+ declare class TableReporter extends BaseReporter {
855
+ renderer?: ReturnType<typeof createTableRenderer>;
856
+ rendererOptions: ListRendererOptions$1;
857
+ onTestRemoved(trigger?: string): Promise<void>;
858
+ onCollected(): void;
859
+ onFinished(files?: File[], errors?: unknown[]): Promise<void>;
860
+ onWatcherStart(): Promise<void>;
861
+ stopListRender(): Promise<void>;
862
+ onWatcherRerun(files: string[], trigger?: string): Promise<void>;
863
+ onUserConsoleLog(log: UserConsoleLog): void;
864
+ }
865
+
734
866
  declare const BenchmarkReportsMap: {
735
- default: typeof VerboseReporter;
867
+ default: typeof TableReporter;
868
+ verbose: typeof VerboseReporter;
736
869
  json: typeof JsonReporter;
737
870
  };
738
871
  declare type BenchmarkBuiltinReporters = keyof typeof BenchmarkReportsMap;
@@ -1011,6 +1144,7 @@ interface ErrorWithDiff extends Error {
1011
1144
  expected?: any;
1012
1145
  operator?: string;
1013
1146
  type?: string;
1147
+ frame?: string;
1014
1148
  }
1015
1149
  interface ModuleGraphData {
1016
1150
  graph: Record<string, string[]>;
@@ -1134,8 +1268,12 @@ interface Test<ExtraContext = {}> extends TaskBase {
1134
1268
  result?: TaskResult;
1135
1269
  fails?: boolean;
1136
1270
  context: TestContext & ExtraContext;
1271
+ onFailed?: OnTestFailedHandler[];
1272
+ }
1273
+ interface TypeCheck extends TaskBase {
1274
+ type: 'typecheck';
1137
1275
  }
1138
- declare type Task = Test | Suite | File | Benchmark;
1276
+ declare type Task = Test | Suite | File | Benchmark | TypeCheck;
1139
1277
  declare type DoneCallback = (error?: any) => void;
1140
1278
  declare type TestFunction<ExtraContext = {}> = (context: TestContext & ExtraContext) => Awaitable<any> | void;
1141
1279
  declare type ExtractEachCallbackArgs<T extends ReadonlyArray<any>> = {
@@ -1233,7 +1371,12 @@ interface TestContext {
1233
1371
  * A expect instance bound to the test
1234
1372
  */
1235
1373
  expect: Vi.ExpectStatic;
1374
+ /**
1375
+ * Extract hooks on test failed
1376
+ */
1377
+ onTestFailed: (fn: OnTestFailedHandler) => void;
1236
1378
  }
1379
+ declare type OnTestFailedHandler = (result: TaskResult) => Awaitable<void>;
1237
1380
 
1238
1381
  declare type SnapshotData = Record<string, string>;
1239
1382
  declare type SnapshotUpdateState = 'all' | 'new' | 'none';
@@ -1535,7 +1678,7 @@ interface Reporter {
1535
1678
  onFinished?: (files?: File[], errors?: unknown[]) => Awaitable<void>;
1536
1679
  onTaskUpdate?: (packs: TaskResultPack[]) => Awaitable<void>;
1537
1680
  onTestRemoved?: (trigger?: string) => Awaitable<void>;
1538
- onWatcherStart?: () => Awaitable<void>;
1681
+ onWatcherStart?: (files?: File[], errors?: unknown[]) => Awaitable<void>;
1539
1682
  onWatcherRerun?: (files: string[], trigger?: string) => Awaitable<void>;
1540
1683
  onServerRestart?: (reason?: string) => Awaitable<void>;
1541
1684
  onUserConsoleLog?: (log: UserConsoleLog) => Awaitable<void>;
@@ -1553,7 +1696,7 @@ interface EnvironmentOptions {
1553
1696
  jsdom?: JSDOMOptions;
1554
1697
  [x: string]: unknown;
1555
1698
  }
1556
- declare type VitestRunMode = 'test' | 'benchmark';
1699
+ declare type VitestRunMode = 'test' | 'benchmark' | 'typecheck';
1557
1700
  interface InlineConfig {
1558
1701
  /**
1559
1702
  * Benchmark options.
@@ -1914,16 +2057,43 @@ interface InlineConfig {
1914
2057
  * Ignore any unhandled errors that occur
1915
2058
  */
1916
2059
  dangerouslyIgnoreUnhandledErrors?: boolean;
2060
+ /**
2061
+ * Options for configuring typechecking test environment.
2062
+ */
2063
+ typecheck?: Partial<TypecheckConfig>;
2064
+ }
2065
+ interface TypecheckConfig {
2066
+ /**
2067
+ * What tools to use for type checking.
2068
+ */
2069
+ checker: 'tsc' | 'vue-tsc' | (string & Record<never, never>);
2070
+ /**
2071
+ * Pattern for files that should be treated as test files
2072
+ */
2073
+ include: string[];
2074
+ /**
2075
+ * Pattern for files that should not be treated as test files
2076
+ */
2077
+ exclude: string[];
2078
+ /**
2079
+ * Check JS files that have `@ts-check` comment.
2080
+ * If you have it enabled in tsconfig, this will not overwrite it.
2081
+ */
2082
+ allowJs?: boolean;
2083
+ /**
2084
+ * Do not fail, if Vitest found errors outside the test files.
2085
+ */
2086
+ ignoreSourceErrors?: boolean;
2087
+ /**
2088
+ * Path to tsconfig, relative to the project root.
2089
+ */
2090
+ tsconfig?: string;
1917
2091
  }
1918
2092
  interface UserConfig extends InlineConfig {
1919
2093
  /**
1920
2094
  * Path to the config file.
1921
2095
  *
1922
- * Default resolving to one of:
1923
- * - `vitest.config.js`
1924
- * - `vitest.config.ts`
1925
- * - `vite.config.js`
1926
- * - `vite.config.ts`
2096
+ * Default resolving to `vitest.config.*`, `vite.config.*`
1927
2097
  */
1928
2098
  config?: string | undefined;
1929
2099
  /**
@@ -1953,7 +2123,7 @@ interface UserConfig extends InlineConfig {
1953
2123
  */
1954
2124
  shard?: string;
1955
2125
  }
1956
- interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters' | 'coverage' | 'testNamePattern' | 'related' | 'api' | 'reporters' | 'resolveSnapshotPath' | 'benchmark' | 'shard' | 'cache' | 'sequence'> {
2126
+ interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters' | 'coverage' | 'testNamePattern' | 'related' | 'api' | 'reporters' | 'resolveSnapshotPath' | 'benchmark' | 'shard' | 'cache' | 'sequence' | 'typecheck'> {
1957
2127
  mode: VitestRunMode;
1958
2128
  base?: string;
1959
2129
  config?: string;
@@ -1980,6 +2150,7 @@ interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters'
1980
2150
  shuffle?: boolean;
1981
2151
  seed?: number;
1982
2152
  };
2153
+ typecheck: TypecheckConfig;
1983
2154
  }
1984
2155
 
1985
2156
  declare type VitestInlineConfig = InlineConfig;
@@ -2243,4 +2414,30 @@ declare global {
2243
2414
  }
2244
2415
  }
2245
2416
 
2246
- export { MutableArray as $, ApiConfig as A, BuiltinEnvironment as B, CSSModuleScopeStrategy as C, DoneCallback as D, EnvironmentOptions as E, FakeTimerInstallOpts as F, SnapshotSummary as G, HookListener as H, InlineConfig as I, JSDOMOptions as J, ResolveIdFunction as K, AfterSuiteRunMeta as L, ModuleGraphData as M, WorkerRPC as N, WorkerGlobalState as O, Awaitable as P, Nullable as Q, ResolvedConfig as R, Suite as S, TaskResultPack as T, UserConfig as U, VitestEnvironment as V, WorkerContext as W, Arrayable as X, ArgumentsType$1 as Y, MergeInsertions as Z, DeepMerge as _, File as a, Constructable as a0, ModuleCache as a1, EnvironmentReturn as a2, Environment as a3, UserConsoleLog as a4, Position as a5, ParsedStack as a6, ErrorWithDiff as a7, OnServerRestartHandler as a8, CoverageProvider as a9, CoverageProviderModule as aa, CoverageReporter as ab, CoverageOptions as ac, ResolvedCoverageOptions as ad, BaseCoverageOptions as ae, CoverageIstanbulOptions as af, CoverageC8Options as ag, BenchmarkUserOptions as ah, Benchmark as ai, BenchmarkResult as aj, BenchFunction as ak, BenchmarkAPI as al, ModuleCacheMap as am, ViteNodeRunnerOptions as an, MockMap as ao, ViteNodeRunner as ap, TestSequencer as aq, startVitest as ar, TestSequencerConstructor as as, Reporter as b, VitestRunMode as c, RunMode as d, TaskState as e, TaskBase as f, TaskResult as g, Test as h, Task as i, TestFunction as j, TestOptions as k, TestAPI as l, SuiteAPI as m, HookCleanupCallback as n, SuiteHooks as o, SuiteCollector as p, SuiteFactory as q, RuntimeContext as r, TestContext as s, Vitest as t, SnapshotData as u, SnapshotUpdateState as v, SnapshotStateOptions as w, SnapshotMatchOptions as x, SnapshotResult as y, UncheckedSnapshot as z };
2417
+ declare type RawErrsMap = Map<string, TscErrorInfo[]>;
2418
+ interface TscErrorInfo {
2419
+ filePath: string;
2420
+ errCode: number;
2421
+ errMsg: string;
2422
+ line: number;
2423
+ column: number;
2424
+ }
2425
+ interface CollectLineNumbers {
2426
+ target: number;
2427
+ next: number;
2428
+ prev?: number;
2429
+ }
2430
+ declare type CollectLines = {
2431
+ [key in keyof CollectLineNumbers]: string;
2432
+ };
2433
+ interface RootAndTarget {
2434
+ root: string;
2435
+ targetAbsPath: string;
2436
+ }
2437
+ declare type Context = RootAndTarget & {
2438
+ rawErrsMap: RawErrsMap;
2439
+ openedDirs: Set<string>;
2440
+ lastActivePath?: string;
2441
+ };
2442
+
2443
+ export { AfterSuiteRunMeta as $, ApiConfig as A, BuiltinEnvironment as B, CollectLineNumbers as C, DoneCallback as D, EnvironmentOptions as E, FakeTimerInstallOpts as F, TestContext as G, HookListener as H, InlineConfig as I, JSDOMOptions as J, Vitest as K, SnapshotData as L, ModuleGraphData as M, SnapshotUpdateState as N, OnTestFailedHandler as O, SnapshotStateOptions as P, SnapshotMatchOptions as Q, ResolvedConfig as R, Suite as S, TaskResultPack as T, UserConfig as U, VitestEnvironment as V, SnapshotResult as W, UncheckedSnapshot as X, SnapshotSummary as Y, WorkerContext as Z, ResolveIdFunction as _, File as a, WorkerRPC as a0, WorkerGlobalState as a1, Awaitable as a2, Nullable as a3, Arrayable as a4, ArgumentsType$1 as a5, MergeInsertions as a6, DeepMerge as a7, MutableArray as a8, Constructable as a9, startVitest as aA, TestSequencerConstructor as aB, ModuleCache as aa, EnvironmentReturn as ab, Environment as ac, UserConsoleLog as ad, Position as ae, ParsedStack as af, ErrorWithDiff as ag, OnServerRestartHandler as ah, CoverageProvider as ai, CoverageProviderModule as aj, CoverageReporter as ak, CoverageOptions as al, ResolvedCoverageOptions as am, BaseCoverageOptions as an, CoverageIstanbulOptions as ao, CoverageC8Options as ap, BenchmarkUserOptions as aq, Benchmark as ar, BenchmarkResult as as, BenchFunction as at, BenchmarkAPI as au, ModuleCacheMap as av, ViteNodeRunnerOptions as aw, MockMap as ax, ViteNodeRunner as ay, TestSequencer as az, Reporter as b, RawErrsMap as c, TscErrorInfo as d, CollectLines as e, RootAndTarget as f, Context as g, CSSModuleScopeStrategy as h, VitestRunMode as i, TypecheckConfig as j, RunMode as k, TaskState as l, TaskBase as m, TaskResult as n, Test as o, TypeCheck as p, Task as q, TestFunction as r, TestOptions as s, TestAPI as t, SuiteAPI as u, HookCleanupCallback as v, SuiteHooks as w, SuiteCollector as x, SuiteFactory as y, RuntimeContext as z };
@@ -2,10 +2,9 @@ import { Buffer } from 'buffer';
2
2
  import path from 'path';
3
3
  import childProcess from 'child_process';
4
4
  import process$1 from 'process';
5
- import { m as mergeStream, g as getStream, c as crossSpawn } from './vendor-index.12d51d29.js';
5
+ import { s as signalExit, m as mergeStream, g as getStream, c as crossSpawn } from './vendor-index.22806ffb.js';
6
6
  import url from 'url';
7
7
  import require$$0, { constants } from 'os';
8
- import { s as signalExit } from './vendor-index.1a291e86.js';
9
8
 
10
9
  function stripFinalNewline(input) {
11
10
  const LF = typeof input === 'string' ? '\n' : '\n'.charCodeAt();