vitest 0.7.12 → 0.8.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.
- package/LICENSE.md +35 -0
- package/dist/{chunk-api-setup.699124b9.js → chunk-api-setup.f537ec22.js} +5 -5
- package/dist/{chunk-constants.a717efa1.js → chunk-constants.6062c404.js} +2 -2
- package/dist/{chunk-defaults.720fd914.js → chunk-defaults.e5535971.js} +2 -2
- package/dist/{chunk-install-pkg.1d3b155f.js → chunk-install-pkg.7dd40977.js} +4 -4
- package/dist/{chunk-integrations-globals.fabbbd60.js → chunk-integrations-globals.1039302d.js} +6 -6
- package/dist/{chunk-runtime-chain.21f49330.js → chunk-runtime-chain.f873402e.js} +4 -4
- package/dist/{chunk-runtime-rpc.5f9e77bc.js → chunk-runtime-rpc.e8aa1ebe.js} +2 -2
- package/dist/{chunk-utils-base.8397dafe.js → chunk-utils-base.8408f73a.js} +2 -2
- package/dist/{chunk-utils-path.bd53cafb.js → chunk-utils-path.02d3f287.js} +4 -4
- package/dist/{chunk-utils-timers.997e0602.js → chunk-utils-timers.7bdeea22.js} +2 -2
- package/dist/chunk-vite-node-externalize.a988e519.js +13469 -0
- package/dist/chunk-vite-node-utils.386c09c4.js +9153 -0
- package/dist/cli.js +8 -8
- package/dist/entry.js +6 -6
- package/dist/index.d.ts +2 -6
- package/dist/index.js +4 -4
- package/dist/node.d.ts +4 -5
- package/dist/node.js +10 -10
- package/dist/vendor-index.87b2fc14.js +1111 -0
- package/dist/worker.js +5 -5
- package/package.json +9 -12
- package/dist/chunk-vite-node-externalize.7ad22924.js +0 -10883
- package/dist/chunk-vite-node-utils.71f7ea0f.js +0 -9479
- package/dist/vendor-index.16e6622e.js +0 -1109
package/dist/cli.js
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
1
|
import { EventEmitter } from 'events';
|
|
2
|
-
import { d as c } from './chunk-utils-base.
|
|
3
|
-
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.
|
|
2
|
+
import { d as c } from './chunk-utils-base.8408f73a.js';
|
|
3
|
+
import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.a988e519.js';
|
|
4
4
|
import 'path';
|
|
5
5
|
import 'tty';
|
|
6
6
|
import 'local-pkg';
|
|
7
7
|
import 'buffer';
|
|
8
8
|
import 'child_process';
|
|
9
9
|
import 'process';
|
|
10
|
-
import './vendor-index.
|
|
10
|
+
import './vendor-index.87b2fc14.js';
|
|
11
11
|
import './vendor-_commonjsHelpers.34b404ce.js';
|
|
12
12
|
import 'fs';
|
|
13
|
+
import 'assert';
|
|
13
14
|
import 'stream';
|
|
14
15
|
import 'util';
|
|
15
|
-
import 'assert';
|
|
16
16
|
import 'url';
|
|
17
17
|
import 'os';
|
|
18
18
|
import 'vite';
|
|
19
|
-
import './chunk-constants.
|
|
20
|
-
import './chunk-vite-node-utils.
|
|
19
|
+
import './chunk-constants.6062c404.js';
|
|
20
|
+
import './chunk-vite-node-utils.386c09c4.js';
|
|
21
21
|
import 'module';
|
|
22
22
|
import 'vm';
|
|
23
|
-
import './chunk-defaults.
|
|
23
|
+
import './chunk-defaults.e5535971.js';
|
|
24
24
|
import 'perf_hooks';
|
|
25
|
-
import './chunk-utils-timers.
|
|
25
|
+
import './chunk-utils-timers.7bdeea22.js';
|
|
26
26
|
import 'worker_threads';
|
|
27
27
|
import 'tinypool';
|
|
28
28
|
import './chunk-magic-string.d5e0e473.js';
|
package/dist/entry.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { promises } from 'fs';
|
|
2
|
-
import { t as toArray, r as relative, B as partitionSuiteChildren, C as hasTests, m as hasFailed, l as getFullName } from './chunk-utils-base.
|
|
2
|
+
import { t as toArray, r as relative, B as partitionSuiteChildren, C as hasTests, m as hasFailed, l as getFullName } from './chunk-utils-base.8408f73a.js';
|
|
3
3
|
import { Console } from 'console';
|
|
4
4
|
import { Writable } from 'stream';
|
|
5
5
|
import { importModule } from 'local-pkg';
|
|
6
|
-
import { r as resetRunOnceCounter, i as index, R as RealDate, s as stringify, c as clearContext, d as defaultSuite, a as setHooks, g as getHooks, b as context, e as getSnapshotClient, f as setState, h as getFn, j as getState, v as vi } from './chunk-runtime-chain.
|
|
7
|
-
import { r as rpc } from './chunk-runtime-rpc.
|
|
8
|
-
import { c as clearTimeout, s as setTimeout } from './chunk-utils-timers.
|
|
6
|
+
import { r as resetRunOnceCounter, i as index, R as RealDate, s as stringify, c as clearContext, d as defaultSuite, a as setHooks, g as getHooks, b as context, e as getSnapshotClient, f as setState, h as getFn, j as getState, v as vi } from './chunk-runtime-chain.f873402e.js';
|
|
7
|
+
import { r as rpc } from './chunk-runtime-rpc.e8aa1ebe.js';
|
|
8
|
+
import { c as clearTimeout, s as setTimeout } from './chunk-utils-timers.7bdeea22.js';
|
|
9
9
|
import { g as getWorkerState } from './chunk-utils-global.7bcfa03c.js';
|
|
10
10
|
import { performance } from 'perf_hooks';
|
|
11
|
-
import { t as takeCoverage } from './chunk-defaults.
|
|
11
|
+
import { t as takeCoverage } from './chunk-defaults.e5535971.js';
|
|
12
12
|
import { createHash } from 'crypto';
|
|
13
13
|
import { format } from 'util';
|
|
14
14
|
import 'path';
|
|
@@ -404,7 +404,7 @@ async function setupGlobalEnv(config) {
|
|
|
404
404
|
globalSetup = true;
|
|
405
405
|
setupConsoleLogSpy();
|
|
406
406
|
if (config.globals)
|
|
407
|
-
(await import('./chunk-integrations-globals.
|
|
407
|
+
(await import('./chunk-integrations-globals.1039302d.js')).registerApiGlobally();
|
|
408
408
|
}
|
|
409
409
|
function setupDefines(defines) {
|
|
410
410
|
for (const key in defines)
|
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
|
-
|
|
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.
|
|
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.
|
|
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.
|
|
10
|
+
import './chunk-utils-timers.7bdeea22.js';
|
|
11
11
|
import './vendor-_commonjsHelpers.34b404ce.js';
|
|
12
|
-
import './chunk-runtime-rpc.
|
|
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,
|
|
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.
|
|
2
|
-
export { V as VitestRunner } from './chunk-utils-path.
|
|
1
|
+
export { V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.a988e519.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.
|
|
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.
|
|
16
|
+
import './chunk-utils-base.8408f73a.js';
|
|
17
17
|
import 'tty';
|
|
18
18
|
import 'local-pkg';
|
|
19
19
|
import 'vite';
|
|
20
|
-
import './chunk-constants.
|
|
21
|
-
import './chunk-vite-node-utils.
|
|
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.
|
|
24
|
+
import './chunk-defaults.e5535971.js';
|
|
25
25
|
import 'perf_hooks';
|
|
26
|
-
import './chunk-utils-timers.
|
|
26
|
+
import './chunk-utils-timers.7bdeea22.js';
|
|
27
27
|
import 'worker_threads';
|
|
28
28
|
import 'tinypool';
|
|
29
29
|
import './chunk-magic-string.d5e0e473.js';
|