vitest 3.1.0-beta.2 → 3.1.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/chunks/{base.CylSMlTD.js → base.bV8rwssx.js} +1 -1
- package/dist/chunks/{cac.JtTXbKz0.js → cac.DK21mt6F.js} +10 -6
- package/dist/chunks/{cli-api.BTtPTYMs.js → cli-api.bwYuoT4p.js} +39 -37
- package/dist/chunks/{coverage.C2ohxaN0.js → coverage.SfnlalVs.js} +213 -8
- package/dist/chunks/{creator.BEXek7yQ.js → creator.CuL7xDWI.js} +65 -0
- package/dist/chunks/{execute.DZKwfrTs.js → execute.CwmnH2oH.js} +6 -6
- package/dist/chunks/{index.ZIOEXBQB.js → index.CwHmn5H5.js} +140 -100
- package/dist/chunks/{reporters.d.5g6jXhoW.d.ts → reporters.d.CfRkRKN2.d.ts} +39 -18
- package/dist/chunks/{typechecker.C2IpOhid.js → typechecker.CG0zmr19.js} +6 -6
- package/dist/chunks/{utils.OLmtDstN.js → utils.Lot3J_8U.js} +1 -1
- package/dist/chunks/{vite.d.Dh1jE-_V.d.ts → vite.d.4pkSbgmp.d.ts} +1 -1
- package/dist/chunks/{vm.BW5voG-u.js → vm.Lp7mPCVW.js} +91 -84
- package/dist/cli.js +1 -1
- package/dist/config.d.ts +6 -4
- package/dist/coverage.d.ts +2 -1
- package/dist/coverage.js +3 -3
- package/dist/execute.d.ts +0 -2
- package/dist/execute.js +1 -1
- package/dist/index.d.ts +6 -5
- package/dist/node.d.ts +17 -6
- package/dist/node.js +8 -8
- package/dist/reporters.d.ts +2 -1
- package/dist/reporters.js +3 -3
- package/dist/workers/forks.js +2 -2
- package/dist/workers/threads.js +2 -2
- package/dist/workers/vmForks.js +2 -2
- package/dist/workers/vmThreads.js +2 -2
- package/dist/workers.d.ts +2 -1
- package/dist/workers.js +3 -3
- package/package.json +17 -17
|
@@ -3,14 +3,44 @@ import vm, { isContext } from 'node:vm';
|
|
|
3
3
|
import { dirname, basename, extname, normalize, join, resolve } from 'pathe';
|
|
4
4
|
import { distDir } from '../path.js';
|
|
5
5
|
import { createCustomConsole } from './console.D6t261w0.js';
|
|
6
|
-
import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.
|
|
6
|
+
import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.CwmnH2oH.js';
|
|
7
7
|
import fs from 'node:fs';
|
|
8
8
|
import { dirname as dirname$1 } from 'node:path';
|
|
9
|
-
import {
|
|
9
|
+
import { isPrimitive, isNodeBuiltin, toArray, getCachedData, setCacheData } from 'vite-node/utils';
|
|
10
10
|
import { createRequire, Module } from 'node:module';
|
|
11
11
|
import { CSS_LANGS_RE, KNOWN_ASSET_RE } from 'vite-node/constants';
|
|
12
12
|
import { p as provideWorkerState } from './utils.CtocqOoE.js';
|
|
13
13
|
|
|
14
|
+
function interopCommonJsModule(interopDefault, mod) {
|
|
15
|
+
if (isPrimitive(mod) || Array.isArray(mod) || mod instanceof Promise) {
|
|
16
|
+
return {
|
|
17
|
+
keys: [],
|
|
18
|
+
moduleExports: {},
|
|
19
|
+
defaultExport: mod
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
if (interopDefault !== false && "__esModule" in mod && !isPrimitive(mod.default)) {
|
|
23
|
+
const defaultKets = Object.keys(mod.default);
|
|
24
|
+
const moduleKeys = Object.keys(mod);
|
|
25
|
+
const allKeys = new Set([...defaultKets, ...moduleKeys]);
|
|
26
|
+
allKeys.delete("default");
|
|
27
|
+
return {
|
|
28
|
+
keys: Array.from(allKeys),
|
|
29
|
+
moduleExports: new Proxy(mod, { get(mod, prop) {
|
|
30
|
+
return mod[prop] ?? mod.default?.[prop];
|
|
31
|
+
} }),
|
|
32
|
+
defaultExport: mod
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
return {
|
|
36
|
+
keys: Object.keys(mod).filter((key) => key !== "default"),
|
|
37
|
+
moduleExports: mod,
|
|
38
|
+
defaultExport: mod
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
const SyntheticModule = vm.SyntheticModule;
|
|
42
|
+
const SourceTextModule = vm.SourceTextModule;
|
|
43
|
+
|
|
14
44
|
const _require = createRequire(import.meta.url);
|
|
15
45
|
const requiresCache = new WeakMap();
|
|
16
46
|
class CommonjsExecutor {
|
|
@@ -22,9 +52,11 @@ class CommonjsExecutor {
|
|
|
22
52
|
extensions = Object.create(null);
|
|
23
53
|
fs;
|
|
24
54
|
Module;
|
|
55
|
+
interopDefault;
|
|
25
56
|
constructor(options) {
|
|
26
57
|
this.context = options.context;
|
|
27
58
|
this.fs = options.fileMap;
|
|
59
|
+
this.interopDefault = options.interopDefault;
|
|
28
60
|
const primitives = vm.runInContext("({ Object, Array, Error })", this.context);
|
|
29
61
|
const executor = this;
|
|
30
62
|
this.Module = class Module$1 {
|
|
@@ -86,7 +118,7 @@ class CommonjsExecutor {
|
|
|
86
118
|
static findSourceMap = Module.findSourceMap;
|
|
87
119
|
static SourceMap = Module.SourceMap;
|
|
88
120
|
static syncBuiltinESMExports = Module.syncBuiltinESMExports;
|
|
89
|
-
static _cache = executor.
|
|
121
|
+
static _cache = executor.publicRequireCache;
|
|
90
122
|
static _extensions = executor.extensions;
|
|
91
123
|
static createRequire = (filename) => {
|
|
92
124
|
return executor.createRequire(filename);
|
|
@@ -184,6 +216,42 @@ class CommonjsExecutor {
|
|
|
184
216
|
}
|
|
185
217
|
return ".js";
|
|
186
218
|
}
|
|
219
|
+
getCoreSyntheticModule(identifier) {
|
|
220
|
+
if (this.moduleCache.has(identifier)) {
|
|
221
|
+
return this.moduleCache.get(identifier);
|
|
222
|
+
}
|
|
223
|
+
const exports = this.require(identifier);
|
|
224
|
+
const keys = Object.keys(exports);
|
|
225
|
+
const module = new SyntheticModule([...keys, "default"], () => {
|
|
226
|
+
for (const key of keys) {
|
|
227
|
+
module.setExport(key, exports[key]);
|
|
228
|
+
}
|
|
229
|
+
module.setExport("default", exports);
|
|
230
|
+
}, {
|
|
231
|
+
context: this.context,
|
|
232
|
+
identifier
|
|
233
|
+
});
|
|
234
|
+
this.moduleCache.set(identifier, module);
|
|
235
|
+
return module;
|
|
236
|
+
}
|
|
237
|
+
getCjsSyntheticModule(path, identifier) {
|
|
238
|
+
if (this.moduleCache.has(identifier)) {
|
|
239
|
+
return this.moduleCache.get(identifier);
|
|
240
|
+
}
|
|
241
|
+
const exports = this.require(path);
|
|
242
|
+
const { keys, moduleExports, defaultExport } = interopCommonJsModule(this.interopDefault, exports);
|
|
243
|
+
const module = new SyntheticModule([...keys, "default"], function() {
|
|
244
|
+
for (const key of keys) {
|
|
245
|
+
this.setExport(key, moduleExports[key]);
|
|
246
|
+
}
|
|
247
|
+
this.setExport("default", defaultExport);
|
|
248
|
+
}, {
|
|
249
|
+
context: this.context,
|
|
250
|
+
identifier
|
|
251
|
+
});
|
|
252
|
+
this.moduleCache.set(identifier, module);
|
|
253
|
+
return module;
|
|
254
|
+
}
|
|
187
255
|
require(identifier) {
|
|
188
256
|
const ext = extname(identifier);
|
|
189
257
|
if (ext === ".node" || isNodeBuiltin(identifier)) {
|
|
@@ -209,36 +277,6 @@ class CommonjsExecutor {
|
|
|
209
277
|
}
|
|
210
278
|
}
|
|
211
279
|
|
|
212
|
-
function interopCommonJsModule(interopDefault, mod) {
|
|
213
|
-
if (isPrimitive(mod) || Array.isArray(mod) || mod instanceof Promise) {
|
|
214
|
-
return {
|
|
215
|
-
keys: [],
|
|
216
|
-
moduleExports: {},
|
|
217
|
-
defaultExport: mod
|
|
218
|
-
};
|
|
219
|
-
}
|
|
220
|
-
if (interopDefault !== false && "__esModule" in mod && !isPrimitive(mod.default)) {
|
|
221
|
-
const defaultKets = Object.keys(mod.default);
|
|
222
|
-
const moduleKeys = Object.keys(mod);
|
|
223
|
-
const allKeys = new Set([...defaultKets, ...moduleKeys]);
|
|
224
|
-
allKeys.delete("default");
|
|
225
|
-
return {
|
|
226
|
-
keys: Array.from(allKeys),
|
|
227
|
-
moduleExports: new Proxy(mod, { get(mod, prop) {
|
|
228
|
-
return mod[prop] ?? mod.default?.[prop];
|
|
229
|
-
} }),
|
|
230
|
-
defaultExport: mod
|
|
231
|
-
};
|
|
232
|
-
}
|
|
233
|
-
return {
|
|
234
|
-
keys: Object.keys(mod).filter((key) => key !== "default"),
|
|
235
|
-
moduleExports: mod,
|
|
236
|
-
defaultExport: mod
|
|
237
|
-
};
|
|
238
|
-
}
|
|
239
|
-
const SyntheticModule$1 = vm.SyntheticModule;
|
|
240
|
-
const SourceTextModule = vm.SourceTextModule;
|
|
241
|
-
|
|
242
280
|
const dataURIRegex = /^data:(?<mime>text\/javascript|application\/json|application\/wasm)(?:;(?<encoding>charset=utf-8|base64))?,(?<code>.*)$/;
|
|
243
281
|
class EsmExecutor {
|
|
244
282
|
moduleCache = new Map();
|
|
@@ -271,9 +309,9 @@ class EsmExecutor {
|
|
|
271
309
|
async loadEsModule(fileURL, getCode) {
|
|
272
310
|
const code = await getCode();
|
|
273
311
|
if (fileURL.endsWith(".json")) {
|
|
274
|
-
const m = new SyntheticModule
|
|
312
|
+
const m = new SyntheticModule(["default"], function() {
|
|
275
313
|
const result = JSON.parse(code);
|
|
276
|
-
|
|
314
|
+
this.setExport("default", result);
|
|
277
315
|
});
|
|
278
316
|
this.moduleCache.set(fileURL, m);
|
|
279
317
|
return m;
|
|
@@ -332,18 +370,19 @@ class EsmExecutor {
|
|
|
332
370
|
moduleLookup[module] = await this.executor.resolveModule(module, identifier);
|
|
333
371
|
}
|
|
334
372
|
}
|
|
335
|
-
const
|
|
373
|
+
const evaluateModule = (module) => this.evaluateModule(module);
|
|
374
|
+
const syntheticModule = new SyntheticModule(exports.map(({ name }) => name), async function() {
|
|
336
375
|
const importsObject = {};
|
|
337
376
|
for (const { module, name } of imports) {
|
|
338
377
|
if (!importsObject[module]) {
|
|
339
378
|
importsObject[module] = {};
|
|
340
379
|
}
|
|
341
|
-
await
|
|
380
|
+
await evaluateModule(moduleLookup[module]);
|
|
342
381
|
importsObject[module][name] = moduleLookup[module].namespace[name];
|
|
343
382
|
}
|
|
344
383
|
const wasmInstance = new WebAssembly.Instance(wasmModule, importsObject);
|
|
345
384
|
for (const { name } of exports) {
|
|
346
|
-
|
|
385
|
+
this.setExport(name, wasmInstance.exports[name]);
|
|
347
386
|
}
|
|
348
387
|
}, {
|
|
349
388
|
context: this.context,
|
|
@@ -388,9 +427,9 @@ class EsmExecutor {
|
|
|
388
427
|
throw new Error(`Invalid data URI encoding: ${encoding}`);
|
|
389
428
|
}
|
|
390
429
|
if (mime === "application/json") {
|
|
391
|
-
const module = new SyntheticModule
|
|
430
|
+
const module = new SyntheticModule(["default"], function() {
|
|
392
431
|
const obj = JSON.parse(code);
|
|
393
|
-
|
|
432
|
+
this.setExport("default", obj);
|
|
394
433
|
}, {
|
|
395
434
|
context: this.context,
|
|
396
435
|
identifier
|
|
@@ -466,9 +505,9 @@ class ViteExecutor {
|
|
|
466
505
|
}
|
|
467
506
|
const stub = this.options.viteClientModule;
|
|
468
507
|
const moduleKeys = Object.keys(stub);
|
|
469
|
-
const module = new SyntheticModule
|
|
508
|
+
const module = new SyntheticModule(moduleKeys, function() {
|
|
470
509
|
moduleKeys.forEach((key) => {
|
|
471
|
-
|
|
510
|
+
this.setExport(key, stub[key]);
|
|
472
511
|
});
|
|
473
512
|
}, {
|
|
474
513
|
context: this.options.context,
|
|
@@ -500,7 +539,6 @@ class ViteExecutor {
|
|
|
500
539
|
};
|
|
501
540
|
}
|
|
502
541
|
|
|
503
|
-
const SyntheticModule = vm.SyntheticModule;
|
|
504
542
|
const { existsSync, statSync } = fs;
|
|
505
543
|
const nativeResolve = import.meta.resolve;
|
|
506
544
|
class ExternalModulesExecutor {
|
|
@@ -519,7 +557,8 @@ class ExternalModulesExecutor {
|
|
|
519
557
|
this.cjs = new CommonjsExecutor({
|
|
520
558
|
context: this.context,
|
|
521
559
|
importModuleDynamically: this.importModuleDynamically,
|
|
522
|
-
fileMap: options.fileMap
|
|
560
|
+
fileMap: options.fileMap,
|
|
561
|
+
interopDefault: options.interopDefault
|
|
523
562
|
});
|
|
524
563
|
this.vite = new ViteExecutor({
|
|
525
564
|
esmExecutor: this.esm,
|
|
@@ -586,32 +625,6 @@ class ExternalModulesExecutor {
|
|
|
586
625
|
}
|
|
587
626
|
return {};
|
|
588
627
|
}
|
|
589
|
-
wrapCoreSyntheticModule(identifier, exports) {
|
|
590
|
-
const moduleKeys = Object.keys(exports);
|
|
591
|
-
const m = new SyntheticModule([...moduleKeys, "default"], () => {
|
|
592
|
-
for (const key of moduleKeys) {
|
|
593
|
-
m.setExport(key, exports[key]);
|
|
594
|
-
}
|
|
595
|
-
m.setExport("default", exports);
|
|
596
|
-
}, {
|
|
597
|
-
context: this.context,
|
|
598
|
-
identifier
|
|
599
|
-
});
|
|
600
|
-
return m;
|
|
601
|
-
}
|
|
602
|
-
wrapCommonJsSynteticModule(identifier, exports) {
|
|
603
|
-
const { keys, moduleExports, defaultExport } = interopCommonJsModule(this.options.interopDefault, exports);
|
|
604
|
-
const m = new SyntheticModule([...keys, "default"], () => {
|
|
605
|
-
for (const key of keys) {
|
|
606
|
-
m.setExport(key, moduleExports[key]);
|
|
607
|
-
}
|
|
608
|
-
m.setExport("default", defaultExport);
|
|
609
|
-
}, {
|
|
610
|
-
context: this.context,
|
|
611
|
-
identifier
|
|
612
|
-
});
|
|
613
|
-
return m;
|
|
614
|
-
}
|
|
615
628
|
getModuleInformation(identifier) {
|
|
616
629
|
if (identifier.startsWith("data:")) {
|
|
617
630
|
return {
|
|
@@ -657,7 +670,7 @@ class ExternalModulesExecutor {
|
|
|
657
670
|
url: fileUrl
|
|
658
671
|
};
|
|
659
672
|
}
|
|
660
|
-
|
|
673
|
+
createModule(identifier) {
|
|
661
674
|
const { type, url, path } = this.getModuleInformation(identifier);
|
|
662
675
|
if ((type === "module" || type === "commonjs" || type === "wasm") && !existsSync(path)) {
|
|
663
676
|
const error = new Error(`Cannot find module '${path}'`);
|
|
@@ -665,19 +678,13 @@ class ExternalModulesExecutor {
|
|
|
665
678
|
throw error;
|
|
666
679
|
}
|
|
667
680
|
switch (type) {
|
|
668
|
-
case "data": return
|
|
669
|
-
case "builtin":
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
|
|
673
|
-
case "
|
|
674
|
-
case "
|
|
675
|
-
case "module": return await this.esm.createEsModule(url, () => this.fs.readFileAsync(path));
|
|
676
|
-
case "commonjs": {
|
|
677
|
-
const exports = this.require(path);
|
|
678
|
-
return this.wrapCommonJsSynteticModule(identifier, exports);
|
|
679
|
-
}
|
|
680
|
-
case "network": return await this.esm.createNetworkModule(url);
|
|
681
|
+
case "data": return this.esm.createDataModule(identifier);
|
|
682
|
+
case "builtin": return this.cjs.getCoreSyntheticModule(identifier);
|
|
683
|
+
case "vite": return this.vite.createViteModule(url);
|
|
684
|
+
case "wasm": return this.esm.createWebAssemblyModule(url, () => this.fs.readBuffer(path));
|
|
685
|
+
case "module": return this.esm.createEsModule(url, () => this.fs.readFileAsync(path));
|
|
686
|
+
case "commonjs": return this.cjs.getCjsSyntheticModule(path, identifier);
|
|
687
|
+
case "network": return this.esm.createNetworkModule(url);
|
|
681
688
|
default: {
|
|
682
689
|
const _deadend = type;
|
|
683
690
|
return _deadend;
|
package/dist/cli.js
CHANGED
package/dist/config.d.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { UserConfig as UserConfig$1, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
|
|
3
|
-
import { c as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport, b as TestProjectConfiguration } from './chunks/reporters.d.
|
|
4
|
-
export { f as TestProjectInlineConfiguration, W as WorkspaceProjectConfiguration } from './chunks/reporters.d.
|
|
5
|
-
import './chunks/vite.d.
|
|
3
|
+
import { c as CoverageV8Options, R as ResolvedCoverageOptions, U as UserWorkspaceConfig, d as UserProjectConfigFn, e as UserProjectConfigExport, b as TestProjectConfiguration } from './chunks/reporters.d.CfRkRKN2.js';
|
|
4
|
+
export { f as TestProjectInlineConfiguration, W as WorkspaceProjectConfiguration } from './chunks/reporters.d.CfRkRKN2.js';
|
|
5
|
+
import './chunks/vite.d.4pkSbgmp.js';
|
|
6
6
|
import { F as FakeTimerInstallOpts } from './chunks/config.d.DevWltVl.js';
|
|
7
7
|
import '@vitest/runner';
|
|
8
8
|
import './chunks/environment.d.C8UItCbf.js';
|
|
9
9
|
import '@vitest/utils';
|
|
10
10
|
import 'node:stream';
|
|
11
11
|
import 'node:console';
|
|
12
|
+
import '@vitest/mocker';
|
|
12
13
|
import '@vitest/utils/source-map';
|
|
13
14
|
import '@vitest/pretty-format';
|
|
14
15
|
import '@vitest/snapshot';
|
|
@@ -89,4 +90,5 @@ declare function defineProject(config: UserProjectConfigFn): UserProjectConfigFn
|
|
|
89
90
|
declare function defineProject(config: UserProjectConfigExport): UserProjectConfigExport;
|
|
90
91
|
declare function defineWorkspace(config: TestProjectConfiguration[]): TestProjectConfiguration[];
|
|
91
92
|
|
|
92
|
-
export { TestProjectConfiguration,
|
|
93
|
+
export { TestProjectConfiguration, UserProjectConfigExport, UserProjectConfigFn, UserWorkspaceConfig, configDefaults, coverageConfigDefaults, defaultBrowserPort, defaultExclude, defaultInclude, defineConfig, defineProject, defineWorkspace, extraInlineDeps };
|
|
94
|
+
export type { UserConfig, UserConfigExport, UserConfigFn, UserConfigFnObject, UserConfigFnPromise };
|
package/dist/coverage.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.
|
|
1
|
+
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.d.CfRkRKN2.js';
|
|
2
2
|
import { TransformResult } from 'vite';
|
|
3
3
|
import { A as AfterSuiteRunMeta } from './chunks/environment.d.C8UItCbf.js';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import '@vitest/utils';
|
|
6
6
|
import 'node:stream';
|
|
7
7
|
import 'node:console';
|
|
8
|
+
import '@vitest/mocker';
|
|
8
9
|
import '@vitest/utils/source-map';
|
|
9
10
|
import './chunks/config.d.DevWltVl.js';
|
|
10
11
|
import '@vitest/pretty-format';
|
package/dist/coverage.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BaseCoverageProvider } from './chunks/coverage.
|
|
1
|
+
export { B as BaseCoverageProvider } from './chunks/coverage.SfnlalVs.js';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
4
4
|
import 'util';
|
|
@@ -11,10 +11,10 @@ import './chunks/env.Dq0hM4Xv.js';
|
|
|
11
11
|
import 'std-env';
|
|
12
12
|
import 'node:crypto';
|
|
13
13
|
import '@vitest/utils';
|
|
14
|
-
import 'node:fs/promises';
|
|
15
14
|
import 'node:module';
|
|
16
15
|
import 'node:path';
|
|
17
16
|
import 'node:process';
|
|
17
|
+
import 'node:fs/promises';
|
|
18
18
|
import 'node:url';
|
|
19
19
|
import 'node:assert';
|
|
20
20
|
import 'node:v8';
|
|
@@ -25,7 +25,7 @@ import 'vite';
|
|
|
25
25
|
import 'node:events';
|
|
26
26
|
import './chunks/index.68735LiX.js';
|
|
27
27
|
import 'tinypool';
|
|
28
|
-
import './chunks/typechecker.
|
|
28
|
+
import './chunks/typechecker.CG0zmr19.js';
|
|
29
29
|
import 'node:perf_hooks';
|
|
30
30
|
import '@vitest/utils/source-map';
|
|
31
31
|
import 'tinyexec';
|
package/dist/execute.d.ts
CHANGED
|
@@ -64,8 +64,6 @@ declare class ExternalModulesExecutor {
|
|
|
64
64
|
resolveModule: (specifier: string, referencer: string) => Promise<VMModule>;
|
|
65
65
|
resolve(specifier: string, parent: string): string;
|
|
66
66
|
private findNearestPackageData;
|
|
67
|
-
private wrapCoreSyntheticModule;
|
|
68
|
-
private wrapCommonJsSynteticModule;
|
|
69
67
|
private getModuleInformation;
|
|
70
68
|
private createModule;
|
|
71
69
|
private get isNetworkSupported();
|
package/dist/execute.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { File as File$1, TaskResultPack as TaskResultPack$1, TaskEventPack, TaskPopulated, Suite as Suite$1, Test as Test$1, Custom as Custom$1, Task as Task$1, TaskBase as TaskBase$1, TaskResult as TaskResult$1, DoneCallback as DoneCallback$1, RuntimeContext as RuntimeContext$1, SuiteHooks as SuiteHooks$1, SequenceHooks as SequenceHooks$1, SequenceSetupFiles as SequenceSetupFiles$1 } from '@vitest/runner';
|
|
2
|
-
export { CancelReason, ExtendedContext, HookCleanupCallback, HookListener, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Custom as RunnerCustomCase, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskContext, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
3
|
-
import { S as SerializedTestSpecification, g as CoverageProvider$1, a as ReportContext$1, h as CoverageProviderModule$1, i as CoverageReporter$1, j as CoverageProviderName, k as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, l as CoverageIstanbulOptions$1, c as CoverageV8Options$1, m as CustomProviderOptions$1, n as Reporter$1, V as Vitest$1, o as BrowserScript$1, p as BrowserConfigOptions$1, q as BuiltinEnvironment$1, r as VitestEnvironment$1, P as Pool$1, s as PoolOptions$1, t as CSSModuleScopeStrategy$1, A as ApiConfig$1, u as VitestRunMode$1, D as DepsOptimizationOptions$1, v as TransformModePatterns$1, I as InlineConfig$1, w as TypecheckConfig$1, x as UserConfig$1, y as ResolvedConfig$1, z as ProjectConfig$1, U as UserWorkspaceConfig$1, E as BenchmarkUserOptions$1 } from './chunks/reporters.d.
|
|
2
|
+
export { CancelReason, ExtendedContext, HookCleanupCallback, HookListener, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Custom as RunnerCustomCase, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskEventPack as RunnerTaskEventPack, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskContext, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
3
|
+
import { S as SerializedTestSpecification, g as CoverageProvider$1, a as ReportContext$1, h as CoverageProviderModule$1, i as CoverageReporter$1, j as CoverageProviderName, k as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, l as CoverageIstanbulOptions$1, c as CoverageV8Options$1, m as CustomProviderOptions$1, n as Reporter$1, V as Vitest$1, o as BrowserScript$1, p as BrowserConfigOptions$1, q as BuiltinEnvironment$1, r as VitestEnvironment$1, P as Pool$1, s as PoolOptions$1, t as CSSModuleScopeStrategy$1, A as ApiConfig$1, u as VitestRunMode$1, D as DepsOptimizationOptions$1, v as TransformModePatterns$1, I as InlineConfig$1, w as TypecheckConfig$1, x as UserConfig$1, y as ResolvedConfig$1, z as ProjectConfig$1, U as UserWorkspaceConfig$1, E as BenchmarkUserOptions$1 } from './chunks/reporters.d.CfRkRKN2.js';
|
|
4
4
|
import { W as WorkerContext$1 } from './chunks/worker.d.CSFlSYJg.js';
|
|
5
5
|
import { R as RawErrsMap$1, T as TscErrorInfo$1, C as CollectLineNumbers$1, a as CollectLines$1, b as RootAndTarget$1, c as Context$1 } from './chunks/global.d.Cg2sEPIm.js';
|
|
6
6
|
import { b as Awaitable$1, U as UserConsoleLog, M as ModuleGraphData, P as ProvidedContext, N as Nullable$1, c as Arrayable$1, d as ArgumentsType$1, e as MutableArray$1, C as Constructable$1, a as EnvironmentReturn$1, V as VmEnvironmentReturn$1, E as Environment$1, R as ResolvedTestEnvironment$1, J as JSDOMOptions$1, H as HappyDOMOptions$1, f as EnvironmentOptions$1 } from './chunks/environment.d.C8UItCbf.js';
|
|
7
7
|
export { A as AfterSuiteRunMeta, g as ModuleCache } from './chunks/environment.d.C8UItCbf.js';
|
|
8
8
|
import { a as BirpcReturn, b as WorkerRPC$1 } from './chunks/worker.d.C58isfFm.js';
|
|
9
9
|
export { C as ContextRPC, d as ContextTestEnvironment, e as ResolveIdFunction, c as RunnerRPC, R as RuntimeRPC, W as WorkerGlobalState } from './chunks/worker.d.C58isfFm.js';
|
|
10
|
-
import './chunks/vite.d.
|
|
10
|
+
import './chunks/vite.d.4pkSbgmp.js';
|
|
11
11
|
import { a as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.DevWltVl.js';
|
|
12
12
|
export { b as RuntimeConfig, S as SerializedCoverageConfig } from './chunks/config.d.DevWltVl.js';
|
|
13
13
|
import { ExpectStatic } from '@vitest/expect';
|
|
@@ -28,6 +28,7 @@ export { Bench as BenchFactory, Options as BenchOptions, Task as BenchTask, Task
|
|
|
28
28
|
import 'node:stream';
|
|
29
29
|
import 'vite';
|
|
30
30
|
import 'node:console';
|
|
31
|
+
import '@vitest/mocker';
|
|
31
32
|
import '@vitest/utils/source-map';
|
|
32
33
|
import '@vitest/pretty-format';
|
|
33
34
|
import 'vite-node';
|
|
@@ -37,7 +38,6 @@ import '@vitest/snapshot/manager';
|
|
|
37
38
|
import 'node:fs';
|
|
38
39
|
import 'node:worker_threads';
|
|
39
40
|
import '@vitest/snapshot/environment';
|
|
40
|
-
import '@vitest/mocker';
|
|
41
41
|
import '@vitest/runner/utils';
|
|
42
42
|
|
|
43
43
|
interface SourceMap {
|
|
@@ -619,4 +619,5 @@ type SerializableSpec = SerializedTestSpecification;
|
|
|
619
619
|
/** @deprecated import from `vitest/node` instead */
|
|
620
620
|
type BenchmarkUserOptions = BenchmarkUserOptions$1;
|
|
621
621
|
|
|
622
|
-
export {
|
|
622
|
+
export { ModuleGraphData, ProvidedContext, SerializedConfig, SerializedTestSpecification, UserConsoleLog, assertType, createExpect, globalExpect as expect, getRunningMode, inject, isFirstRun, isWatchMode, runOnce, vi, vitest };
|
|
623
|
+
export type { ApiConfig, ArgumentsType, Arrayable, AssertType, Awaitable, BaseCoverageOptions, BenchmarkUserOptions, BrowserConfigOptions, BrowserScript, BrowserUI, BuiltinEnvironment, CSSModuleScopeStrategy, CollectLineNumbers, CollectLines, Constructable, Context, CoverageIstanbulOptions, CoverageOptions, CoverageProvider, CoverageProviderModule, CoverageReporter, CoverageV8Options, Custom, CustomProviderOptions, DepsOptimizationOptions, DoneCallback, Environment, EnvironmentOptions, EnvironmentReturn, File, HappyDOMOptions, InlineConfig, JSDOMOptions, MutableArray, Nullable, Pool, PoolOptions, ProjectConfig, RawErrsMap, ReportContext, Reporter, ResolvedConfig, ResolvedCoverageOptions, ResolvedTestEnvironment, RootAndTarget, RuntimeContext, SequenceHooks, SequenceSetupFiles, SerializableSpec, Suite, SuiteHooks, Task, TaskBase, TaskResult, TaskResultPack, Test, TransformModePatterns, TransformResultWithSource, TscErrorInfo, TypecheckConfig, UserConfig, UserWorkspaceConfig, Vitest, VitestEnvironment, VitestRunMode, VitestUtils, VmEnvironmentReturn, WebSocketEvents, WebSocketHandlers, WebSocketRPC, WorkerContext, WorkerRPC };
|
package/dist/node.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { y as ResolvedConfig, x as UserConfig, u as VitestRunMode, F as VitestOptions, V as Vitest, A as ApiConfig, T as TestProject, G as TestSequencer, H as TestSpecification, L as Logger, J as TestModule, M as ModuleDiagnostic } from './chunks/reporters.d.
|
|
2
|
-
export { B as BaseCoverageOptions, E as BenchmarkUserOptions, ae as BrowserBuiltinProvider, af as BrowserCommand, ag as BrowserCommandContext, p as BrowserConfigOptions, ah as BrowserInstanceOption, ai as
|
|
3
|
-
import { UserConfig as UserConfig$1, Plugin, ResolvedConfig as ResolvedConfig$1, LogLevel, LoggerOptions, Logger as Logger$1, createServer as createServer$1 } from 'vite';
|
|
1
|
+
import { y as ResolvedConfig, x as UserConfig, u as VitestRunMode, F as VitestOptions, V as Vitest, A as ApiConfig, T as TestProject, G as TestSequencer, H as TestSpecification, L as Logger, J as TestModule, M as ModuleDiagnostic } from './chunks/reporters.d.CfRkRKN2.js';
|
|
2
|
+
export { B as BaseCoverageOptions, E as BenchmarkUserOptions, ae as BrowserBuiltinProvider, af as BrowserCommand, ag as BrowserCommandContext, p as BrowserConfigOptions, ah as BrowserInstanceOption, ai as BrowserModuleMocker, aj as BrowserOrchestrator, ak as BrowserProvider, al as BrowserProviderInitializationOptions, am as BrowserProviderModule, an as BrowserProviderOptions, o as BrowserScript, ao as BrowserServerState, ap as BrowserServerStateSession, q as BuiltinEnvironment, aq as CDPSession, t as CSSModuleScopeStrategy, l as CoverageIstanbulOptions, k as CoverageOptions, g as CoverageProvider, h as CoverageProviderModule, i as CoverageReporter, c as CoverageV8Options, m as CustomProviderOptions, D as DepsOptimizationOptions, _ as HTMLOptions, I as InlineConfig, a0 as JUnitOptions, $ as JsonOptions, O as OnServerRestartHandler, K as OnTestsRerunHandler, ar as ParentProjectBrowser, P as Pool, s as PoolOptions, Q as ProcessPool, as as ProjectBrowser, z as ProjectConfig, a as ReportContext, ay as ReportedHookContext, n as Reporter, av as ResolveSnapshotPathHandler, aw as ResolveSnapshotPathHandlerContext, at as ResolvedBrowserOptions, R as ResolvedCoverageOptions, au as ResolvedProjectConfig, Z as SerializedTestProject, a1 as TaskOptions, a2 as TestCase, a3 as TestCollection, a4 as TestDiagnostic, a5 as TestModuleState, a6 as TestResult, a7 as TestResultFailed, a8 as TestResultPassed, a9 as TestResultSkipped, az as TestRunEndReason, ax as TestRunResult, ad as TestSequencerConstructor, aa as TestState, ab as TestSuite, ac as TestSuiteState, v as TransformModePatterns, w as TypecheckConfig, U as UserWorkspaceConfig, r as VitestEnvironment, N as VitestPackageInstaller, X as WorkspaceSpec, Y as getFilePoolName } from './chunks/reporters.d.CfRkRKN2.js';
|
|
3
|
+
import { InlineConfig, UserConfig as UserConfig$1, Plugin, ResolvedConfig as ResolvedConfig$1, LogLevel, LoggerOptions, Logger as Logger$1, createServer as createServer$1 } from 'vite';
|
|
4
4
|
import * as vite from 'vite';
|
|
5
5
|
export { vite as Vite };
|
|
6
6
|
export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
7
7
|
import { IncomingMessage } from 'node:http';
|
|
8
8
|
import { R as RuntimeRPC } from './chunks/worker.d.C58isfFm.js';
|
|
9
9
|
import { Writable } from 'node:stream';
|
|
10
|
-
export { V as VitestPluginContext } from './chunks/vite.d.
|
|
10
|
+
export { V as VitestPluginContext } from './chunks/vite.d.4pkSbgmp.js';
|
|
11
11
|
export { W as WorkerContext } from './chunks/worker.d.CSFlSYJg.js';
|
|
12
12
|
export { C as TypeCheckCollectLineNumbers, a as TypeCheckCollectLines, c as TypeCheckContext, T as TypeCheckErrorInfo, R as TypeCheckRawErrorsMap, b as TypeCheckRootAndTarget } from './chunks/global.d.Cg2sEPIm.js';
|
|
13
13
|
import { Debugger } from 'debug';
|
|
@@ -17,6 +17,7 @@ export { SerializedError } from '@vitest/utils';
|
|
|
17
17
|
export { b as RuntimeConfig } from './chunks/config.d.DevWltVl.js';
|
|
18
18
|
export { generateFileHash } from '@vitest/runner/utils';
|
|
19
19
|
import 'node:console';
|
|
20
|
+
import '@vitest/mocker';
|
|
20
21
|
import '@vitest/utils/source-map';
|
|
21
22
|
import '@vitest/pretty-format';
|
|
22
23
|
import '@vitest/snapshot';
|
|
@@ -52,6 +53,15 @@ interface CliOptions extends UserConfig {
|
|
|
52
53
|
* Output collected test files only
|
|
53
54
|
*/
|
|
54
55
|
filesOnly?: boolean;
|
|
56
|
+
/**
|
|
57
|
+
* Override vite config's configLoader from cli.
|
|
58
|
+
* Use `bundle` to bundle the config with esbuild or `runner` (experimental) to process it on the fly (default: `bundle`).
|
|
59
|
+
* This is only available with **vite version 6.1.0** and above.
|
|
60
|
+
* @experimental
|
|
61
|
+
*/
|
|
62
|
+
configLoader?: InlineConfig extends {
|
|
63
|
+
configLoader?: infer T
|
|
64
|
+
} ? T : never;
|
|
55
65
|
}
|
|
56
66
|
/**
|
|
57
67
|
* Start Vitest programmatically
|
|
@@ -70,7 +80,7 @@ declare function parseCLI(argv: string | string[], config?: CliParseOptions): {
|
|
|
70
80
|
|
|
71
81
|
declare function resolveApiServerConfig<Options extends ApiConfig & UserConfig>(options: Options, defaultPort: number): ApiConfig | undefined;
|
|
72
82
|
|
|
73
|
-
declare function createVitest(mode: VitestRunMode, options:
|
|
83
|
+
declare function createVitest(mode: VitestRunMode, options: CliOptions, viteOverrides?: UserConfig$1, vitestOptions?: VitestOptions): Promise<Vitest>;
|
|
74
84
|
|
|
75
85
|
declare class FilesNotFoundError extends Error {
|
|
76
86
|
code: string;
|
|
@@ -131,4 +141,5 @@ declare const TestFile: typeof TestModule;
|
|
|
131
141
|
*/
|
|
132
142
|
type FileDiagnostic = ModuleDiagnostic;
|
|
133
143
|
|
|
134
|
-
export { ApiConfig, BaseSequencer,
|
|
144
|
+
export { ApiConfig, BaseSequencer, GitNotFoundError, ModuleDiagnostic, ResolvedConfig, TestFile, TestModule, TestProject, TestSequencer, TestSpecification, FilesNotFoundError as TestsNotFoundError, UserConfig, Vitest, VitestOptions, VitestPlugin, VitestRunMode, TestProject as WorkspaceProject, createDebugger, createMethodsRPC, createServer, createViteLogger, createViteServer, createVitest, distDir, isValidApiRequest, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest, version };
|
|
145
|
+
export type { CliParseOptions, FileDiagnostic, GlobalSetupContext };
|
package/dist/node.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { resolveConfig as resolveConfig$1, mergeConfig, createServer as createServer$1 } from 'vite';
|
|
2
2
|
export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
3
|
-
import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.
|
|
4
|
-
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, e as createViteLogger, c as createVitest, i as isValidApiRequest, d as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.
|
|
5
|
-
export { p as parseCLI } from './chunks/cac.
|
|
6
|
-
import { r as resolveConfig$2 } from './chunks/coverage.
|
|
7
|
-
export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.
|
|
3
|
+
import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.bwYuoT4p.js';
|
|
4
|
+
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, e as createViteLogger, c as createVitest, i as isValidApiRequest, d as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.bwYuoT4p.js';
|
|
5
|
+
export { p as parseCLI } from './chunks/cac.DK21mt6F.js';
|
|
6
|
+
import { r as resolveConfig$2 } from './chunks/coverage.SfnlalVs.js';
|
|
7
|
+
export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.SfnlalVs.js';
|
|
8
8
|
import { slash } from '@vitest/utils';
|
|
9
9
|
import { f as findUp } from './chunks/index.DBIGubLC.js';
|
|
10
10
|
import { resolve } from 'pathe';
|
|
@@ -19,15 +19,15 @@ import '@vitest/snapshot/manager';
|
|
|
19
19
|
import 'vite-node/client';
|
|
20
20
|
import 'vite-node/server';
|
|
21
21
|
import './chunks/index.68735LiX.js';
|
|
22
|
-
import './chunks/index.
|
|
22
|
+
import './chunks/index.CwHmn5H5.js';
|
|
23
23
|
import 'tinyrainbow';
|
|
24
|
-
import './chunks/utils.
|
|
24
|
+
import './chunks/utils.Lot3J_8U.js';
|
|
25
25
|
import 'node:util';
|
|
26
26
|
import 'node:perf_hooks';
|
|
27
27
|
import '@vitest/utils/source-map';
|
|
28
28
|
import './chunks/env.Dq0hM4Xv.js';
|
|
29
29
|
import 'std-env';
|
|
30
|
-
import './chunks/typechecker.
|
|
30
|
+
import './chunks/typechecker.CG0zmr19.js';
|
|
31
31
|
import 'node:fs/promises';
|
|
32
32
|
import 'tinyexec';
|
|
33
33
|
import 'node:os';
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { aO as BaseReporter, aA as BasicReporter, aP as BenchmarkBuiltinReporters, aB as BenchmarkReporter, aC as BenchmarkReportsMap, aQ as BuiltinReporterOptions, aR as BuiltinReporters, aD as DefaultReporter, aE as DotReporter, aF as GithubActionsReporter, aG as HangingProcessReporter, aI as JUnitReporter, aS as JsonAssertionResult, aH as JsonReporter, aT as JsonTestResult, aU as JsonTestResults, ay as ReportedHookContext, n as Reporter, aJ as ReportersMap, aK as TapFlatReporter, aL as TapReporter, az as TestRunEndReason, aM as VerboseBenchmarkReporter, aN as VerboseReporter } from './chunks/reporters.d.CfRkRKN2.js';
|
|
2
2
|
import '@vitest/runner';
|
|
3
3
|
import './chunks/environment.d.C8UItCbf.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'node:stream';
|
|
6
6
|
import 'vite';
|
|
7
7
|
import 'node:console';
|
|
8
|
+
import '@vitest/mocker';
|
|
8
9
|
import '@vitest/utils/source-map';
|
|
9
10
|
import './chunks/config.d.DevWltVl.js';
|
|
10
11
|
import '@vitest/pretty-format';
|
package/dist/reporters.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { B as BasicReporter, a as BenchmarkReporter, b as BenchmarkReportsMap, D as DefaultReporter, c as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, d as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, e as TapReporter, V as VerboseBenchmarkReporter, f as VerboseReporter } from './chunks/index.
|
|
1
|
+
export { B as BasicReporter, a as BenchmarkReporter, b as BenchmarkReportsMap, D as DefaultReporter, c as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, d as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, e as TapReporter, V as VerboseBenchmarkReporter, f as VerboseReporter } from './chunks/index.CwHmn5H5.js';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import '@vitest/runner/utils';
|
|
4
4
|
import 'pathe';
|
|
5
5
|
import 'tinyrainbow';
|
|
6
|
-
import './chunks/utils.
|
|
6
|
+
import './chunks/utils.Lot3J_8U.js';
|
|
7
7
|
import 'node:util';
|
|
8
8
|
import '@vitest/utils';
|
|
9
9
|
import 'node:perf_hooks';
|
|
10
10
|
import '@vitest/utils/source-map';
|
|
11
11
|
import './chunks/env.Dq0hM4Xv.js';
|
|
12
12
|
import 'std-env';
|
|
13
|
-
import './chunks/typechecker.
|
|
13
|
+
import './chunks/typechecker.CG0zmr19.js';
|
|
14
14
|
import 'node:fs/promises';
|
|
15
15
|
import 'tinyexec';
|
|
16
16
|
import 'vite';
|
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.
|
|
2
|
+
import { r as runBaseTests } from '../chunks/base.bV8rwssx.js';
|
|
3
3
|
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.BfxieIyZ.js';
|
|
4
4
|
import 'vite-node/client';
|
|
5
|
-
import '../chunks/execute.
|
|
5
|
+
import '../chunks/execute.CwmnH2oH.js';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:vm';
|
package/dist/workers/threads.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
1
|
+
import { r as runBaseTests } from '../chunks/base.bV8rwssx.js';
|
|
2
2
|
import { a as createThreadsRpcOptions } from '../chunks/utils.BfxieIyZ.js';
|
|
3
3
|
import 'vite-node/client';
|
|
4
|
-
import '../chunks/execute.
|
|
4
|
+
import '../chunks/execute.CwmnH2oH.js';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'node:vm';
|
package/dist/workers/vmForks.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
2
|
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.BfxieIyZ.js';
|
|
3
|
-
import { r as runVmTests } from '../chunks/vm.
|
|
3
|
+
import { r as runVmTests } from '../chunks/vm.Lp7mPCVW.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'node:vm';
|
|
@@ -13,7 +13,7 @@ import 'node:stream';
|
|
|
13
13
|
import 'tinyrainbow';
|
|
14
14
|
import '../chunks/date.CDOsz-HY.js';
|
|
15
15
|
import '../chunks/utils.CtocqOoE.js';
|
|
16
|
-
import '../chunks/execute.
|
|
16
|
+
import '../chunks/execute.CwmnH2oH.js';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import '@vitest/utils/error';
|
|
19
19
|
import 'vite-node/client';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { a as createThreadsRpcOptions } from '../chunks/utils.BfxieIyZ.js';
|
|
2
|
-
import { r as runVmTests } from '../chunks/vm.
|
|
2
|
+
import { r as runVmTests } from '../chunks/vm.Lp7mPCVW.js';
|
|
3
3
|
import '@vitest/utils';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'node:vm';
|
|
@@ -12,7 +12,7 @@ import 'node:stream';
|
|
|
12
12
|
import 'tinyrainbow';
|
|
13
13
|
import '../chunks/date.CDOsz-HY.js';
|
|
14
14
|
import '../chunks/utils.CtocqOoE.js';
|
|
15
|
-
import '../chunks/execute.
|
|
15
|
+
import '../chunks/execute.CwmnH2oH.js';
|
|
16
16
|
import 'node:fs';
|
|
17
17
|
import '@vitest/utils/error';
|
|
18
18
|
import 'vite-node/client';
|
package/dist/workers.d.ts
CHANGED
|
@@ -35,4 +35,5 @@ declare function unwrapSerializableConfig(config: SerializedConfig): SerializedC
|
|
|
35
35
|
|
|
36
36
|
declare function runVmTests(method: "run" | "collect", state: WorkerGlobalState): Promise<void>;
|
|
37
37
|
|
|
38
|
-
export {
|
|
38
|
+
export { collect as collectVitestWorkerTests, createForksRpcOptions, createThreadsRpcOptions, provideWorkerState, runBaseTests, run as runVitestWorker, runVmTests, unwrapSerializableConfig };
|
|
39
|
+
export type { VitestWorker, WorkerRpcOptions };
|