vitest 3.2.0-beta.3 → 3.2.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 +29 -0
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +2 -2
- package/dist/chunks/{base.D4119yLM.js → base.Cg0miDlQ.js} +10 -14
- package/dist/chunks/{benchmark.Cf_PACH1.js → benchmark.CYdenmiT.js} +4 -6
- package/dist/chunks/{cac.DWaWHIIE.js → cac.C8BzMmTW.js} +66 -136
- package/dist/chunks/{cli-api.CnmEXkxs.js → cli-api.DmupRhea.js} +1251 -1336
- package/dist/chunks/{console.Cwr-MFPV.js → console.CtFJOzRO.js} +24 -45
- package/dist/chunks/{coverage.0iPg4Wrz.js → coverage.DVF1vEu8.js} +4 -12
- package/dist/chunks/{coverage.C73DaDgS.js → coverage.EIiagJJP.js} +484 -1003
- package/dist/chunks/{creator.C8WKy2eW.js → creator.GK6I-cL4.js} +29 -76
- package/dist/chunks/{date.ByMsSlOr.js → date.Bq6ZW5rf.js} +3 -8
- package/dist/chunks/{defaults.DpVH7vbg.js → defaults.B7q_naMc.js} +1 -1
- package/dist/chunks/{env.Dq0hM4Xv.js → env.D4Lgay0q.js} +1 -1
- package/dist/chunks/{execute.B3q-2LPV.js → execute.B7h3T_Hc.js} +104 -220
- package/dist/chunks/{git.DXfdBEfR.js → git.BVQ8w_Sw.js} +1 -3
- package/dist/chunks/{global.d.BNLIi6yo.d.ts → global.d.MAmajcmJ.d.ts} +2 -0
- package/dist/chunks/{globals.CI21aWXF.js → globals.DEHgCU4V.js} +5 -5
- package/dist/chunks/{index.Bter3jj9.js → index.BZ0g1JD2.js} +366 -628
- package/dist/chunks/{index.CbT4iuwc.js → index.BbB8_kAK.js} +22 -24
- package/dist/chunks/{index.JOzufsrU.js → index.CIyJn3t1.js} +37 -82
- package/dist/chunks/{index.DNgLEKsQ.js → index.CdQS2e2Q.js} +2 -2
- package/dist/chunks/{index.2jgTs_Q5.js → index.CmSc2RE5.js} +69 -107
- package/dist/chunks/{inspector.BFsh5KO0.js → inspector.C914Efll.js} +1 -1
- package/dist/chunks/{node.Be-ntJnD.js → node.fjCdwEIl.js} +1 -1
- package/dist/chunks/{reporters.d.Bt4IGtsa.d.ts → reporters.d.C1ogPriE.d.ts} +24 -4
- package/dist/chunks/{rpc.BKExFSRG.js → rpc.Iovn4oWe.js} +9 -19
- package/dist/chunks/{runBaseTests.B_M1TTsK.js → runBaseTests.Dd85QTll.js} +18 -31
- package/dist/chunks/{setup-common.CF-O-dZX.js → setup-common.Dd054P77.js} +15 -42
- package/dist/chunks/{typechecker.BgzF-6iO.js → typechecker.DRKU1-1g.js} +106 -186
- package/dist/chunks/{utils.DPCq3gzW.js → utils.CAioKnHs.js} +6 -14
- package/dist/chunks/{utils.BlI4TC7Y.js → utils.XdZDrNZV.js} +5 -13
- package/dist/chunks/{vi.pkoYCV6A.js → vi.bdSIJ99Y.js} +118 -267
- package/dist/chunks/{vite.d.B-Kx3KCF.d.ts → vite.d.DqE4-hhK.d.ts} +1 -1
- package/dist/chunks/{vm.DPYem2so.js → vm.BThCzidc.js} +98 -214
- package/dist/chunks/{worker.d.Bl1O4kuf.d.ts → worker.d.DvqK5Vmu.d.ts} +1 -1
- package/dist/chunks/{worker.d.BKbBp2ga.d.ts → worker.d.tQu2eJQy.d.ts} +3 -1
- package/dist/cli.js +4 -4
- package/dist/config.cjs +1 -1
- package/dist/config.d.ts +4 -4
- package/dist/config.js +2 -2
- package/dist/coverage.d.ts +2 -2
- package/dist/coverage.js +5 -5
- package/dist/environments.js +1 -1
- package/dist/execute.d.ts +1 -1
- package/dist/execute.js +1 -1
- package/dist/index.d.ts +12 -11
- package/dist/index.js +5 -5
- package/dist/node.d.ts +7 -7
- package/dist/node.js +12 -14
- package/dist/reporters.d.ts +2 -2
- package/dist/reporters.js +4 -4
- package/dist/runners.d.ts +5 -2
- package/dist/runners.js +51 -80
- package/dist/snapshot.js +2 -2
- package/dist/suite.js +2 -2
- package/dist/worker.js +36 -42
- package/dist/workers/forks.js +4 -4
- package/dist/workers/runVmTests.js +15 -21
- package/dist/workers/threads.js +4 -4
- package/dist/workers/vmForks.js +6 -6
- package/dist/workers/vmThreads.js +6 -6
- package/dist/workers.d.ts +2 -2
- package/dist/workers.js +10 -10
- package/package.json +16 -14
package/dist/worker.js
CHANGED
|
@@ -4,11 +4,11 @@ import { workerId } from 'tinypool';
|
|
|
4
4
|
import { ViteNodeRunner, ModuleCacheMap } from 'vite-node/client';
|
|
5
5
|
import { readFileSync } from 'node:fs';
|
|
6
6
|
import { resolve, normalize } from 'pathe';
|
|
7
|
-
import { e as environments } from './chunks/index.
|
|
8
|
-
import { s as setupInspect } from './chunks/inspector.
|
|
9
|
-
import { c as createRuntimeRpc, a as rpcDone } from './chunks/rpc.
|
|
10
|
-
import { i as isChildProcess, s as setProcessTitle } from './chunks/utils.
|
|
11
|
-
import { d as disposeInternalListeners } from './chunks/utils.
|
|
7
|
+
import { e as environments } from './chunks/index.CmSc2RE5.js';
|
|
8
|
+
import { s as setupInspect } from './chunks/inspector.C914Efll.js';
|
|
9
|
+
import { c as createRuntimeRpc, a as rpcDone } from './chunks/rpc.Iovn4oWe.js';
|
|
10
|
+
import { i as isChildProcess, s as setProcessTitle } from './chunks/utils.XdZDrNZV.js';
|
|
11
|
+
import { d as disposeInternalListeners } from './chunks/utils.CAioKnHs.js';
|
|
12
12
|
import 'node:console';
|
|
13
13
|
import 'node:module';
|
|
14
14
|
import '@vitest/utils';
|
|
@@ -17,7 +17,7 @@ import './chunks/index.CJ0plNrh.js';
|
|
|
17
17
|
function isBuiltinEnvironment(env) {
|
|
18
18
|
return env in environments;
|
|
19
19
|
}
|
|
20
|
-
const _loaders = new Map();
|
|
20
|
+
const _loaders = /* @__PURE__ */ new Map();
|
|
21
21
|
async function createEnvironmentLoader(options) {
|
|
22
22
|
if (!_loaders.has(options.root)) {
|
|
23
23
|
const loader = new ViteNodeRunner(options);
|
|
@@ -28,42 +28,42 @@ async function createEnvironmentLoader(options) {
|
|
|
28
28
|
}
|
|
29
29
|
async function loadEnvironment(ctx, rpc) {
|
|
30
30
|
const name = ctx.environment.name;
|
|
31
|
-
if (isBuiltinEnvironment(name))
|
|
32
|
-
return environments[name];
|
|
33
|
-
}
|
|
31
|
+
if (isBuiltinEnvironment(name)) return environments[name];
|
|
34
32
|
const loader = await createEnvironmentLoader({
|
|
35
33
|
root: ctx.config.root,
|
|
36
34
|
fetchModule: async (id) => {
|
|
37
35
|
const result = await rpc.fetch(id, "ssr");
|
|
38
|
-
if (result.id) {
|
|
39
|
-
return { code: readFileSync(result.id, "utf-8") };
|
|
40
|
-
}
|
|
36
|
+
if (result.id) return { code: readFileSync(result.id, "utf-8") };
|
|
41
37
|
return result;
|
|
42
38
|
},
|
|
43
39
|
resolveId: (id, importer) => rpc.resolveId(id, importer, "ssr")
|
|
44
40
|
});
|
|
45
41
|
const root = loader.root;
|
|
46
|
-
const packageId = name[0] === "." || name[0] === "/" ? resolve(root, name) : (await rpc.resolveId(`vitest-environment-${name}`,
|
|
42
|
+
const packageId = name[0] === "." || name[0] === "/" ? resolve(root, name) : (await rpc.resolveId(`vitest-environment-${name}`, void 0, "ssr"))?.id ?? resolve(root, name);
|
|
47
43
|
const pkg = await loader.executeId(normalize(packageId));
|
|
48
|
-
if (!pkg || !pkg.default || typeof pkg.default !== "object") {
|
|
49
|
-
throw new TypeError(`Environment "${name}" is not a valid environment. ` + `Path "${packageId}" should export default object with a "setup" or/and "setupVM" method.`);
|
|
50
|
-
}
|
|
44
|
+
if (!pkg || !pkg.default || typeof pkg.default !== "object") throw new TypeError(`Environment "${name}" is not a valid environment. Path "${packageId}" should export default object with a "setup" or/and "setupVM" method.`);
|
|
51
45
|
const environment = pkg.default;
|
|
52
|
-
if (environment.transformMode !== "web" && environment.transformMode !== "ssr") {
|
|
53
|
-
throw new TypeError(`Environment "${name}" is not a valid environment. ` + `Path "${packageId}" should export default object with a "transformMode" method equal to "ssr" or "web".`);
|
|
54
|
-
}
|
|
46
|
+
if (environment.transformMode !== "web" && environment.transformMode !== "ssr") throw new TypeError(`Environment "${name}" is not a valid environment. Path "${packageId}" should export default object with a "transformMode" method equal to "ssr" or "web".`);
|
|
55
47
|
return environment;
|
|
56
48
|
}
|
|
57
49
|
|
|
50
|
+
const listeners = /* @__PURE__ */ new Set();
|
|
51
|
+
function addCleanupListener(listener) {
|
|
52
|
+
listeners.add(listener);
|
|
53
|
+
}
|
|
54
|
+
async function cleanup() {
|
|
55
|
+
const promises = [...listeners].map((l) => l());
|
|
56
|
+
await Promise.all(promises);
|
|
57
|
+
}
|
|
58
|
+
|
|
58
59
|
if (isChildProcess()) {
|
|
59
60
|
setProcessTitle(`vitest ${workerId}`);
|
|
60
61
|
const isProfiling = process.execArgv.some((execArg) => execArg.startsWith("--prof") || execArg.startsWith("--cpu-prof") || execArg.startsWith("--heap-prof") || execArg.startsWith("--diagnostic-dir"));
|
|
61
|
-
if (isProfiling)
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
}
|
|
62
|
+
if (isProfiling)
|
|
63
|
+
// Work-around for nodejs/node#55094
|
|
64
|
+
process.on("SIGTERM", () => {
|
|
65
|
+
process.exit();
|
|
66
|
+
});
|
|
67
67
|
}
|
|
68
68
|
// this is what every pool executes when running tests
|
|
69
69
|
async function execute(method, ctx) {
|
|
@@ -74,29 +74,21 @@ async function execute(method, ctx) {
|
|
|
74
74
|
process.env.VITEST_POOL_ID = String(workerId);
|
|
75
75
|
try {
|
|
76
76
|
// worker is a filepath or URL to a file that exposes a default export with "getRpcOptions" and "runTests" methods
|
|
77
|
-
if (ctx.worker[0] === ".") {
|
|
78
|
-
throw new Error(`Path to the test runner cannot be relative, received "${ctx.worker}"`);
|
|
79
|
-
}
|
|
77
|
+
if (ctx.worker[0] === ".") throw new Error(`Path to the test runner cannot be relative, received "${ctx.worker}"`);
|
|
80
78
|
const file = ctx.worker.startsWith("file:") ? ctx.worker : pathToFileURL(ctx.worker).toString();
|
|
81
79
|
const testRunnerModule = await import(file);
|
|
82
|
-
if (!testRunnerModule.default || typeof testRunnerModule.default !== "object") {
|
|
83
|
-
throw new TypeError(`Test worker object should be exposed as a default export. Received "${typeof testRunnerModule.default}"`);
|
|
84
|
-
}
|
|
80
|
+
if (!testRunnerModule.default || typeof testRunnerModule.default !== "object") throw new TypeError(`Test worker object should be exposed as a default export. Received "${typeof testRunnerModule.default}"`);
|
|
85
81
|
const worker = testRunnerModule.default;
|
|
86
|
-
if (!worker.getRpcOptions || typeof worker.getRpcOptions !== "function") {
|
|
87
|
-
throw new TypeError(`Test worker should expose "getRpcOptions" method. Received "${typeof worker.getRpcOptions}".`);
|
|
88
|
-
}
|
|
82
|
+
if (!worker.getRpcOptions || typeof worker.getRpcOptions !== "function") throw new TypeError(`Test worker should expose "getRpcOptions" method. Received "${typeof worker.getRpcOptions}".`);
|
|
89
83
|
// RPC is used to communicate between worker (be it a thread worker or child process or a custom implementation) and the main thread
|
|
90
84
|
const { rpc, onCancel } = createRuntimeRpc(worker.getRpcOptions(ctx));
|
|
91
85
|
const beforeEnvironmentTime = performance.now();
|
|
92
86
|
const environment = await loadEnvironment(ctx, rpc);
|
|
93
|
-
if (ctx.environment.transformMode)
|
|
94
|
-
environment.transformMode = ctx.environment.transformMode;
|
|
95
|
-
}
|
|
87
|
+
if (ctx.environment.transformMode) environment.transformMode = ctx.environment.transformMode;
|
|
96
88
|
const state = {
|
|
97
89
|
ctx,
|
|
98
90
|
moduleCache: new ModuleCacheMap(),
|
|
99
|
-
moduleExecutionInfo: new Map(),
|
|
91
|
+
moduleExecutionInfo: /* @__PURE__ */ new Map(),
|
|
100
92
|
config: ctx.config,
|
|
101
93
|
onCancel,
|
|
102
94
|
environment,
|
|
@@ -105,15 +97,14 @@ async function execute(method, ctx) {
|
|
|
105
97
|
prepare: prepareStart
|
|
106
98
|
},
|
|
107
99
|
rpc,
|
|
100
|
+
onCleanup: (listener) => addCleanupListener(listener),
|
|
108
101
|
providedContext: ctx.providedContext,
|
|
109
102
|
onFilterStackTrace(stack) {
|
|
110
103
|
return createStackString(parseStacktrace(stack));
|
|
111
104
|
}
|
|
112
105
|
};
|
|
113
106
|
const methodName = method === "collect" ? "collectTests" : "runTests";
|
|
114
|
-
if (!worker[methodName] || typeof worker[methodName] !== "function") {
|
|
115
|
-
throw new TypeError(`Test worker should expose "runTests" method. Received "${typeof worker.runTests}".`);
|
|
116
|
-
}
|
|
107
|
+
if (!worker[methodName] || typeof worker[methodName] !== "function") throw new TypeError(`Test worker should expose "runTests" method. Received "${typeof worker.runTests}".`);
|
|
117
108
|
await worker[methodName](state);
|
|
118
109
|
} finally {
|
|
119
110
|
await rpcDone().catch(() => {});
|
|
@@ -126,5 +117,8 @@ function run(ctx) {
|
|
|
126
117
|
function collect(ctx) {
|
|
127
118
|
return execute("collect", ctx);
|
|
128
119
|
}
|
|
120
|
+
async function teardown() {
|
|
121
|
+
return cleanup();
|
|
122
|
+
}
|
|
129
123
|
|
|
130
|
-
export { collect, run };
|
|
124
|
+
export { collect, run, teardown };
|
package/dist/workers/forks.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
3
|
-
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.
|
|
2
|
+
import { r as runBaseTests } from '../chunks/base.Cg0miDlQ.js';
|
|
3
|
+
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.CAioKnHs.js';
|
|
4
4
|
import 'vite-node/client';
|
|
5
|
-
import '../chunks/execute.
|
|
5
|
+
import '../chunks/execute.B7h3T_Hc.js';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:vm';
|
|
@@ -14,7 +14,7 @@ import 'node:path';
|
|
|
14
14
|
import '@vitest/mocker';
|
|
15
15
|
import 'node:module';
|
|
16
16
|
import '@vitest/utils';
|
|
17
|
-
import '../chunks/utils.
|
|
17
|
+
import '../chunks/utils.XdZDrNZV.js';
|
|
18
18
|
|
|
19
19
|
class ForksBaseWorker {
|
|
20
20
|
getRpcOptions() {
|
|
@@ -6,29 +6,29 @@ import util from 'node:util';
|
|
|
6
6
|
import { startTests, collectTests } from '@vitest/runner';
|
|
7
7
|
import { KNOWN_ASSET_TYPES } from 'vite-node/constants';
|
|
8
8
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
9
|
-
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.
|
|
10
|
-
import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.
|
|
11
|
-
import { V as VitestIndex } from '../chunks/index.
|
|
12
|
-
import { c as closeInspector } from '../chunks/inspector.
|
|
13
|
-
import { g as getWorkerState } from '../chunks/utils.
|
|
9
|
+
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.BbB8_kAK.js';
|
|
10
|
+
import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.Dd054P77.js';
|
|
11
|
+
import { V as VitestIndex } from '../chunks/index.CdQS2e2Q.js';
|
|
12
|
+
import { c as closeInspector } from '../chunks/inspector.C914Efll.js';
|
|
13
|
+
import { g as getWorkerState } from '../chunks/utils.XdZDrNZV.js';
|
|
14
14
|
import 'chai';
|
|
15
15
|
import 'node:path';
|
|
16
16
|
import '../path.js';
|
|
17
17
|
import 'node:url';
|
|
18
|
-
import '../chunks/rpc.
|
|
18
|
+
import '../chunks/rpc.Iovn4oWe.js';
|
|
19
19
|
import '@vitest/utils';
|
|
20
20
|
import '../chunks/index.CJ0plNrh.js';
|
|
21
|
-
import '../chunks/coverage.
|
|
21
|
+
import '../chunks/coverage.DVF1vEu8.js';
|
|
22
22
|
import '@vitest/snapshot';
|
|
23
|
-
import '../chunks/vi.
|
|
23
|
+
import '../chunks/vi.bdSIJ99Y.js';
|
|
24
24
|
import '@vitest/expect';
|
|
25
25
|
import '@vitest/runner/utils';
|
|
26
26
|
import '../chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
27
27
|
import '@vitest/utils/error';
|
|
28
28
|
import '@vitest/spy';
|
|
29
29
|
import '@vitest/utils/source-map';
|
|
30
|
-
import '../chunks/date.
|
|
31
|
-
import '../chunks/benchmark.
|
|
30
|
+
import '../chunks/date.Bq6ZW5rf.js';
|
|
31
|
+
import '../chunks/benchmark.CYdenmiT.js';
|
|
32
32
|
import 'expect-type';
|
|
33
33
|
|
|
34
34
|
async function run(method, files, config, executor) {
|
|
@@ -50,9 +50,7 @@ async function run(method, files, config, executor) {
|
|
|
50
50
|
_require.extensions[`.${type}`] = resolveAsset;
|
|
51
51
|
});
|
|
52
52
|
process.env.SSR = "";
|
|
53
|
-
} else
|
|
54
|
-
process.env.SSR = "1";
|
|
55
|
-
}
|
|
53
|
+
} else process.env.SSR = "1";
|
|
56
54
|
// @ts-expect-error not typed global for patched timers
|
|
57
55
|
globalThis.__vitest_required__ = {
|
|
58
56
|
util,
|
|
@@ -61,11 +59,10 @@ async function run(method, files, config, executor) {
|
|
|
61
59
|
};
|
|
62
60
|
installSourcemapsSupport({ getSourceMap: (source) => workerState.moduleCache.getSourceMap(source) });
|
|
63
61
|
await startCoverageInsideWorker(config.coverage, executor, { isolate: false });
|
|
64
|
-
if (config.chaiConfig)
|
|
65
|
-
setupChaiConfig(config.chaiConfig);
|
|
66
|
-
}
|
|
62
|
+
if (config.chaiConfig) setupChaiConfig(config.chaiConfig);
|
|
67
63
|
const [runner, snapshotEnvironment] = await Promise.all([resolveTestRunner(config, executor), resolveSnapshotEnvironment(config, executor)]);
|
|
68
64
|
config.snapshotOptions.snapshotEnvironment = snapshotEnvironment;
|
|
65
|
+
runner.getWorkerContext = void 0;
|
|
69
66
|
workerState.onCancel.then((reason) => {
|
|
70
67
|
closeInspector(config);
|
|
71
68
|
runner.cancel?.(reason);
|
|
@@ -74,11 +71,8 @@ async function run(method, files, config, executor) {
|
|
|
74
71
|
const { vi } = VitestIndex;
|
|
75
72
|
for (const file of files) {
|
|
76
73
|
workerState.filepath = file.filepath;
|
|
77
|
-
if (method === "run")
|
|
78
|
-
|
|
79
|
-
} else {
|
|
80
|
-
await collectTests([file], runner);
|
|
81
|
-
}
|
|
74
|
+
if (method === "run") await startTests([file], runner);
|
|
75
|
+
else await collectTests([file], runner);
|
|
82
76
|
// reset after tests, because user might call `vi.setConfig` in setupFile
|
|
83
77
|
vi.resetConfig();
|
|
84
78
|
// mocks should not affect different files
|
package/dist/workers/threads.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
2
|
-
import { a as createThreadsRpcOptions } from '../chunks/utils.
|
|
1
|
+
import { r as runBaseTests } from '../chunks/base.Cg0miDlQ.js';
|
|
2
|
+
import { a as createThreadsRpcOptions } from '../chunks/utils.CAioKnHs.js';
|
|
3
3
|
import 'vite-node/client';
|
|
4
|
-
import '../chunks/execute.
|
|
4
|
+
import '../chunks/execute.B7h3T_Hc.js';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'node:vm';
|
|
@@ -13,7 +13,7 @@ import 'node:path';
|
|
|
13
13
|
import '@vitest/mocker';
|
|
14
14
|
import 'node:module';
|
|
15
15
|
import '@vitest/utils';
|
|
16
|
-
import '../chunks/utils.
|
|
16
|
+
import '../chunks/utils.XdZDrNZV.js';
|
|
17
17
|
|
|
18
18
|
class ThreadsBaseWorker {
|
|
19
19
|
getRpcOptions(ctx) {
|
package/dist/workers/vmForks.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
|
-
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.
|
|
3
|
-
import { r as runVmTests } from '../chunks/vm.
|
|
2
|
+
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.CAioKnHs.js';
|
|
3
|
+
import { r as runVmTests } from '../chunks/vm.BThCzidc.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'node:vm';
|
|
7
7
|
import 'pathe';
|
|
8
8
|
import '../path.js';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import '../chunks/console.
|
|
10
|
+
import '../chunks/console.CtFJOzRO.js';
|
|
11
11
|
import 'node:console';
|
|
12
12
|
import 'node:stream';
|
|
13
13
|
import 'tinyrainbow';
|
|
14
|
-
import '../chunks/date.
|
|
15
|
-
import '../chunks/utils.
|
|
16
|
-
import '../chunks/execute.
|
|
14
|
+
import '../chunks/date.Bq6ZW5rf.js';
|
|
15
|
+
import '../chunks/utils.XdZDrNZV.js';
|
|
16
|
+
import '../chunks/execute.B7h3T_Hc.js';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import '@vitest/utils/error';
|
|
19
19
|
import 'vite-node/client';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { a as createThreadsRpcOptions } from '../chunks/utils.
|
|
2
|
-
import { r as runVmTests } from '../chunks/vm.
|
|
1
|
+
import { a as createThreadsRpcOptions } from '../chunks/utils.CAioKnHs.js';
|
|
2
|
+
import { r as runVmTests } from '../chunks/vm.BThCzidc.js';
|
|
3
3
|
import '@vitest/utils';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'node:vm';
|
|
6
6
|
import 'pathe';
|
|
7
7
|
import '../path.js';
|
|
8
8
|
import 'node:path';
|
|
9
|
-
import '../chunks/console.
|
|
9
|
+
import '../chunks/console.CtFJOzRO.js';
|
|
10
10
|
import 'node:console';
|
|
11
11
|
import 'node:stream';
|
|
12
12
|
import 'tinyrainbow';
|
|
13
|
-
import '../chunks/date.
|
|
14
|
-
import '../chunks/utils.
|
|
15
|
-
import '../chunks/execute.
|
|
13
|
+
import '../chunks/date.Bq6ZW5rf.js';
|
|
14
|
+
import '../chunks/utils.XdZDrNZV.js';
|
|
15
|
+
import '../chunks/execute.B7h3T_Hc.js';
|
|
16
16
|
import 'node:fs';
|
|
17
17
|
import '@vitest/utils/error';
|
|
18
18
|
import 'vite-node/client';
|
package/dist/workers.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { W as WorkerGlobalState, C as ContextRPC, B as BirpcOptions, R as RuntimeRPC } from './chunks/worker.d.
|
|
1
|
+
import { W as WorkerGlobalState, C as ContextRPC, B as BirpcOptions, R as RuntimeRPC } from './chunks/worker.d.tQu2eJQy.js';
|
|
2
2
|
import { Awaitable } from '@vitest/utils';
|
|
3
3
|
import * as v8 from 'v8';
|
|
4
4
|
import { a as SerializedConfig } from './chunks/config.d.D2ROskhv.js';
|
|
5
|
-
import { W as WorkerContext } from './chunks/worker.d.
|
|
5
|
+
import { W as WorkerContext } from './chunks/worker.d.DvqK5Vmu.js';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import 'vite-node';
|
|
8
8
|
import './chunks/environment.d.cL3nLXbE.js';
|
package/dist/workers.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { p as provideWorkerState } from './chunks/utils.
|
|
1
|
+
export { p as provideWorkerState } from './chunks/utils.XdZDrNZV.js';
|
|
2
2
|
export { collect as collectVitestWorkerTests, run as runVitestWorker } from './worker.js';
|
|
3
|
-
export { r as runBaseTests } from './chunks/base.
|
|
4
|
-
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './chunks/utils.
|
|
5
|
-
export { r as runVmTests } from './chunks/vm.
|
|
3
|
+
export { r as runBaseTests } from './chunks/base.Cg0miDlQ.js';
|
|
4
|
+
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './chunks/utils.CAioKnHs.js';
|
|
5
|
+
export { r as runVmTests } from './chunks/vm.BThCzidc.js';
|
|
6
6
|
import '@vitest/utils';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import '@vitest/utils/source-map';
|
|
@@ -10,21 +10,21 @@ import 'tinypool';
|
|
|
10
10
|
import 'vite-node/client';
|
|
11
11
|
import 'node:fs';
|
|
12
12
|
import 'pathe';
|
|
13
|
-
import './chunks/index.
|
|
13
|
+
import './chunks/index.CmSc2RE5.js';
|
|
14
14
|
import 'node:console';
|
|
15
|
-
import './chunks/inspector.
|
|
15
|
+
import './chunks/inspector.C914Efll.js';
|
|
16
16
|
import 'node:module';
|
|
17
|
-
import './chunks/rpc.
|
|
17
|
+
import './chunks/rpc.Iovn4oWe.js';
|
|
18
18
|
import './chunks/index.CJ0plNrh.js';
|
|
19
|
-
import './chunks/execute.
|
|
19
|
+
import './chunks/execute.B7h3T_Hc.js';
|
|
20
20
|
import 'node:vm';
|
|
21
21
|
import '@vitest/utils/error';
|
|
22
22
|
import 'vite-node/utils';
|
|
23
23
|
import './path.js';
|
|
24
24
|
import 'node:path';
|
|
25
25
|
import '@vitest/mocker';
|
|
26
|
-
import './chunks/console.
|
|
26
|
+
import './chunks/console.CtFJOzRO.js';
|
|
27
27
|
import 'node:stream';
|
|
28
28
|
import 'tinyrainbow';
|
|
29
|
-
import './chunks/date.
|
|
29
|
+
import './chunks/date.Bq6ZW5rf.js';
|
|
30
30
|
import 'vite-node/constants';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.2.
|
|
4
|
+
"version": "3.2.1",
|
|
5
5
|
"description": "Next generation testing framework powered by Vite",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -119,8 +119,8 @@
|
|
|
119
119
|
"@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
|
|
120
120
|
"happy-dom": "*",
|
|
121
121
|
"jsdom": "*",
|
|
122
|
-
"@vitest/browser": "3.2.
|
|
123
|
-
"@vitest/ui": "3.2.
|
|
122
|
+
"@vitest/browser": "3.2.1",
|
|
123
|
+
"@vitest/ui": "3.2.1"
|
|
124
124
|
},
|
|
125
125
|
"peerDependenciesMeta": {
|
|
126
126
|
"@edge-runtime/vm": {
|
|
@@ -157,18 +157,18 @@
|
|
|
157
157
|
"tinybench": "^2.9.0",
|
|
158
158
|
"tinyexec": "^0.3.2",
|
|
159
159
|
"tinyglobby": "^0.2.14",
|
|
160
|
-
"tinypool": "^1.0
|
|
160
|
+
"tinypool": "^1.1.0",
|
|
161
161
|
"tinyrainbow": "^2.0.0",
|
|
162
162
|
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0",
|
|
163
163
|
"why-is-node-running": "^2.3.0",
|
|
164
|
-
"@vitest/
|
|
165
|
-
"@vitest/
|
|
166
|
-
"@vitest/
|
|
167
|
-
"@vitest/
|
|
168
|
-
"@vitest/
|
|
169
|
-
"
|
|
170
|
-
"
|
|
171
|
-
"@vitest/
|
|
164
|
+
"@vitest/mocker": "3.2.1",
|
|
165
|
+
"@vitest/pretty-format": "^3.2.1",
|
|
166
|
+
"@vitest/runner": "3.2.1",
|
|
167
|
+
"@vitest/snapshot": "3.2.1",
|
|
168
|
+
"@vitest/expect": "3.2.1",
|
|
169
|
+
"@vitest/spy": "3.2.1",
|
|
170
|
+
"vite-node": "3.2.1",
|
|
171
|
+
"@vitest/utils": "3.2.1"
|
|
172
172
|
},
|
|
173
173
|
"devDependencies": {
|
|
174
174
|
"@ampproject/remapping": "^2.3.0",
|
|
@@ -180,7 +180,8 @@
|
|
|
180
180
|
"@types/istanbul-lib-coverage": "^2.0.6",
|
|
181
181
|
"@types/istanbul-reports": "^3.0.4",
|
|
182
182
|
"@types/jsdom": "^21.1.7",
|
|
183
|
-
"@types/
|
|
183
|
+
"@types/mime": "^4.0.0",
|
|
184
|
+
"@types/node": "^22.15.29",
|
|
184
185
|
"@types/picomatch": "^4.0.0",
|
|
185
186
|
"@types/prompts": "^2.4.9",
|
|
186
187
|
"@types/sinonjs__fake-timers": "^8.1.5",
|
|
@@ -190,9 +191,10 @@
|
|
|
190
191
|
"chai-subset": "^1.6.0",
|
|
191
192
|
"find-up": "^6.3.0",
|
|
192
193
|
"flatted": "^3.3.3",
|
|
193
|
-
"happy-dom": "^17.
|
|
194
|
+
"happy-dom": "^17.5.6",
|
|
194
195
|
"jsdom": "^26.1.0",
|
|
195
196
|
"local-pkg": "^1.1.1",
|
|
197
|
+
"mime": "^4.0.7",
|
|
196
198
|
"pretty-format": "^29.7.0",
|
|
197
199
|
"prompts": "^2.4.2",
|
|
198
200
|
"strip-literal": "^3.0.0",
|