vitest 0.7.11 → 0.8.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.
package/dist/index.d.ts CHANGED
@@ -899,10 +899,6 @@ interface InlineConfig {
899
899
  * @default false
900
900
  */
901
901
  globals?: boolean;
902
- /**
903
- * @deprecated
904
- */
905
- global?: boolean;
906
902
  /**
907
903
  * Running environment
908
904
  *
@@ -1122,7 +1118,7 @@ interface ResolvedConfig extends Omit<Required<UserConfig>, 'config' | 'filters'
1122
1118
 
1123
1119
  declare type ArgumentsType<T> = T extends (...args: infer A) => any ? A : never;
1124
1120
  declare type ReturnType$1<T> = T extends (...args: any) => infer R ? R : never;
1125
- declare type BirpcFn<T> = {
1121
+ interface BirpcFn<T> {
1126
1122
  /**
1127
1123
  * Call the remote function and wait for the result.
1128
1124
  */
@@ -1131,7 +1127,7 @@ declare type BirpcFn<T> = {
1131
1127
  * Send event without asking for response
1132
1128
  */
1133
1129
  asEvent(...args: ArgumentsType<T>): void;
1134
- };
1130
+ }
1135
1131
  declare type BirpcReturn<RemoteFunctions> = {
1136
1132
  [K in keyof RemoteFunctions]: BirpcFn<RemoteFunctions[K]>;
1137
1133
  };
package/dist/index.js CHANGED
@@ -1,15 +1,15 @@
1
- export { q as afterAll, w as afterEach, p as beforeAll, u as beforeEach, l as describe, x as expect, z as getRunningMode, o as isFirstRun, A as isWatchMode, m as it, n as runOnce, k as suite, t as test, v as vi, y as vitest } from './chunk-runtime-chain.45b5ea3a.js';
1
+ export { q as afterAll, w as afterEach, p as beforeAll, u as beforeEach, l as describe, x as expect, z as getRunningMode, o as isFirstRun, A as isWatchMode, m as it, n as runOnce, k as suite, t as test, v as vi, y as vitest } from './chunk-runtime-chain.f873402e.js';
2
2
  export { fn, isMockFunction, spies, spyOn } from './jest-mock.js';
3
3
  export { assert, default as chai, should } from 'chai';
4
4
  import 'util';
5
- import './chunk-utils-base.8397dafe.js';
5
+ import './chunk-utils-base.8408f73a.js';
6
6
  import 'path';
7
7
  import 'tty';
8
8
  import 'local-pkg';
9
9
  import './chunk-utils-global.7bcfa03c.js';
10
- import './chunk-utils-timers.997e0602.js';
10
+ import './chunk-utils-timers.7bdeea22.js';
11
11
  import './vendor-_commonjsHelpers.34b404ce.js';
12
- import './chunk-runtime-rpc.5f9e77bc.js';
12
+ import './chunk-runtime-rpc.e8aa1ebe.js';
13
13
  import 'fs';
14
14
  import 'tinyspy';
15
15
  //# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VzIjpbXSwic291cmNlc0NvbnRlbnQiOltdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7OyJ9
package/dist/node.d.ts CHANGED
@@ -9,6 +9,7 @@ declare class ModuleCacheMap extends Map<string, ModuleCache> {
9
9
  declare class ViteNodeRunner {
10
10
  options: ViteNodeRunnerOptions;
11
11
  root: string;
12
+ debug: boolean;
12
13
  /**
13
14
  * Holds the cache of modules
14
15
  * Keys of the map are filepaths, or plain package names
@@ -20,7 +21,7 @@ declare class ViteNodeRunner {
20
21
  /** @internal */
21
22
  cachedRequest(rawId: string, callstack: string[]): Promise<any>;
22
23
  /** @internal */
23
- directRequest(id: string, fsPath: string, callstack: string[]): Promise<any>;
24
+ directRequest(id: string, fsPath: string, _callstack: string[]): Promise<any>;
24
25
  prepareContext(context: Record<string, any>): Record<string, any>;
25
26
  shouldResolveId(dep: string): boolean;
26
27
  /**
@@ -33,6 +34,7 @@ declare class ViteNodeRunner {
33
34
  */
34
35
  interopedImport(path: string): Promise<any>;
35
36
  hasNestedDefault(target: any): any;
37
+ private debugLog;
36
38
  }
37
39
 
38
40
  interface DepsHandlingOptions {
@@ -75,6 +77,7 @@ interface ViteNodeRunnerOptions {
75
77
  moduleCache?: ModuleCacheMap;
76
78
  interopDefault?: boolean;
77
79
  requestStubs?: Record<string, any>;
80
+ debug?: boolean;
78
81
  }
79
82
  interface ViteNodeResolveId {
80
83
  external?: boolean | 'absolute' | 'relative';
@@ -651,10 +654,6 @@ interface InlineConfig {
651
654
  * @default false
652
655
  */
653
656
  globals?: boolean;
654
- /**
655
- * @deprecated
656
- */
657
- global?: boolean;
658
657
  /**
659
658
  * Running environment
660
659
  *
package/dist/node.js CHANGED
@@ -1,29 +1,29 @@
1
- export { V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.458f885a.js';
2
- export { V as VitestRunner } from './chunk-utils-path.bd53cafb.js';
1
+ export { V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.aad5d50c.js';
2
+ export { V as VitestRunner } from './chunk-utils-path.02d3f287.js';
3
3
  import 'buffer';
4
4
  import 'path';
5
5
  import 'child_process';
6
6
  import 'process';
7
- import './vendor-index.16e6622e.js';
7
+ import './vendor-index.87b2fc14.js';
8
8
  import './vendor-_commonjsHelpers.34b404ce.js';
9
9
  import 'fs';
10
- import 'stream';
11
- import 'util';
12
10
  import 'assert';
13
11
  import 'events';
12
+ import 'stream';
13
+ import 'util';
14
14
  import 'url';
15
15
  import 'os';
16
- import './chunk-utils-base.8397dafe.js';
16
+ import './chunk-utils-base.8408f73a.js';
17
17
  import 'tty';
18
18
  import 'local-pkg';
19
19
  import 'vite';
20
- import './chunk-constants.a717efa1.js';
21
- import './chunk-vite-node-utils.71f7ea0f.js';
20
+ import './chunk-constants.6062c404.js';
21
+ import './chunk-vite-node-utils.386c09c4.js';
22
22
  import 'module';
23
23
  import 'vm';
24
- import './chunk-defaults.720fd914.js';
24
+ import './chunk-defaults.e5535971.js';
25
25
  import 'perf_hooks';
26
- import './chunk-utils-timers.997e0602.js';
26
+ import './chunk-utils-timers.7bdeea22.js';
27
27
  import 'worker_threads';
28
28
  import 'tinypool';
29
29
  import './chunk-magic-string.d5e0e473.js';