vitest 3.2.2 → 3.2.4
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/browser.d.ts +1 -1
- package/dist/chunks/{base.Cg0miDlQ.js → base.DfmxU-tU.js} +1 -1
- package/dist/chunks/{cac.DId3f5oR.js → cac.Cb-PYCCB.js} +9 -8
- package/dist/chunks/{cli-api.DYcKW0ri.js → cli-api.BkDphVBG.js} +75 -45
- package/dist/chunks/{coverage.ChgzEmIc.js → coverage.DL5VHqXY.js} +34 -11
- package/dist/chunks/{index.CJ0plNrh.js → index.B521nVV-.js} +4 -2
- package/dist/chunks/{index.CSxmp_dI.js → index.BCWujgDG.js} +1 -1
- package/dist/chunks/{index.BbB8_kAK.js → index.CwejwG0H.js} +1 -1
- package/dist/chunks/{index.CX5aIIXH.js → index.VByaPkjc.js} +8 -5
- package/dist/chunks/{reporters.d.DL9pg5DB.d.ts → reporters.d.BFLkQcL6.d.ts} +10 -9
- package/dist/chunks/{rpc.Iovn4oWe.js → rpc.-pEldfrD.js} +1 -1
- package/dist/chunks/{runBaseTests.Dd85QTll.js → runBaseTests.9Ij9_de-.js} +3 -3
- package/dist/chunks/{vite.d.CtvOcEqC.d.ts → vite.d.CMLlLIFP.d.ts} +1 -1
- package/dist/chunks/{worker.d.tQu2eJQy.d.ts → worker.d.1GmBbd7G.d.ts} +1 -0
- package/dist/chunks/{worker.d.DvqK5Vmu.d.ts → worker.d.CKwWzBSj.d.ts} +1 -1
- package/dist/cli.js +2 -2
- package/dist/config.d.ts +4 -4
- package/dist/coverage.d.ts +2 -2
- package/dist/coverage.js +2 -2
- package/dist/execute.d.ts +1 -1
- package/dist/index.d.ts +6 -6
- package/dist/node.d.ts +7 -7
- package/dist/node.js +9 -9
- package/dist/reporters.d.ts +2 -2
- package/dist/reporters.js +2 -2
- package/dist/runners.js +2 -2
- package/dist/worker.js +2 -2
- package/dist/workers/forks.js +1 -1
- package/dist/workers/runVmTests.js +3 -3
- package/dist/workers/threads.js +1 -1
- package/dist/workers.d.ts +2 -2
- package/dist/workers.js +3 -3
- package/package.json +16 -16
package/dist/browser.d.ts
CHANGED
|
@@ -12,7 +12,7 @@ import '@vitest/snapshot';
|
|
|
12
12
|
import '@vitest/snapshot/environment';
|
|
13
13
|
import 'vite-node/client';
|
|
14
14
|
import 'vite-node';
|
|
15
|
-
import './chunks/worker.d.
|
|
15
|
+
import './chunks/worker.d.1GmBbd7G.js';
|
|
16
16
|
import './chunks/environment.d.cL3nLXbE.js';
|
|
17
17
|
import 'vitest/optional-types.js';
|
|
18
18
|
import 'node:vm';
|
|
@@ -24,7 +24,7 @@ async function runBaseTests(method, state) {
|
|
|
24
24
|
const [executor, { run }] = await Promise.all([startViteNode({
|
|
25
25
|
state,
|
|
26
26
|
requestStubs: getDefaultRequestStubs()
|
|
27
|
-
}), import('./runBaseTests.
|
|
27
|
+
}), import('./runBaseTests.9Ij9_de-.js')]);
|
|
28
28
|
const fileSpecs = ctx.files.map((f) => typeof f === "string" ? {
|
|
29
29
|
filepath: f,
|
|
30
30
|
testLocations: void 0
|
|
@@ -3,7 +3,7 @@ import { EventEmitter } from 'events';
|
|
|
3
3
|
import { normalize } from 'pathe';
|
|
4
4
|
import c from 'tinyrainbow';
|
|
5
5
|
import { a as defaultPort, d as defaultBrowserPort } from './constants.DnKduX2e.js';
|
|
6
|
-
import { R as ReportersMap } from './index.
|
|
6
|
+
import { R as ReportersMap } from './index.VByaPkjc.js';
|
|
7
7
|
|
|
8
8
|
function toArr(any) {
|
|
9
9
|
return any == null ? [] : Array.isArray(any) ? any : [any];
|
|
@@ -619,7 +619,7 @@ class CAC extends EventEmitter {
|
|
|
619
619
|
|
|
620
620
|
const cac = (name = "") => new CAC(name);
|
|
621
621
|
|
|
622
|
-
var version = "3.2.
|
|
622
|
+
var version = "3.2.4";
|
|
623
623
|
|
|
624
624
|
const apiConfig = (port) => ({
|
|
625
625
|
port: {
|
|
@@ -1365,7 +1365,7 @@ function parseCLI(argv, config = {}) {
|
|
|
1365
1365
|
arrayArgs.unshift("node");
|
|
1366
1366
|
let { args, options } = createCLI(config).parse(arrayArgs, { run: false });
|
|
1367
1367
|
if (arrayArgs[2] === "watch" || arrayArgs[2] === "dev") options.watch = true;
|
|
1368
|
-
if (arrayArgs[2] === "run") options.run = true;
|
|
1368
|
+
if (arrayArgs[2] === "run" && !options.watch) options.run = true;
|
|
1369
1369
|
if (arrayArgs[2] === "related") {
|
|
1370
1370
|
options.related = args;
|
|
1371
1371
|
options.passWithNoTests ??= true;
|
|
@@ -1386,7 +1386,8 @@ async function watch(cliFilters, options) {
|
|
|
1386
1386
|
await start("test", cliFilters, options);
|
|
1387
1387
|
}
|
|
1388
1388
|
async function run(cliFilters, options) {
|
|
1389
|
-
|
|
1389
|
+
// "vitest run --watch" should still be watch mode
|
|
1390
|
+
options.run = !options.watch;
|
|
1390
1391
|
await start("test", cliFilters, options);
|
|
1391
1392
|
}
|
|
1392
1393
|
async function benchmark(cliFilters, options) {
|
|
@@ -1407,11 +1408,11 @@ async function start(mode, cliFilters, options) {
|
|
|
1407
1408
|
process.title = "node (vitest)";
|
|
1408
1409
|
} catch {}
|
|
1409
1410
|
try {
|
|
1410
|
-
const { startVitest } = await import('./cli-api.
|
|
1411
|
+
const { startVitest } = await import('./cli-api.BkDphVBG.js').then(function (n) { return n.f; });
|
|
1411
1412
|
const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
|
|
1412
1413
|
if (!ctx.shouldKeepServer()) await ctx.exit();
|
|
1413
1414
|
} catch (e) {
|
|
1414
|
-
const { errorBanner } = await import('./index.
|
|
1415
|
+
const { errorBanner } = await import('./index.VByaPkjc.js').then(function (n) { return n.u; });
|
|
1415
1416
|
console.error(`\n${errorBanner("Startup Error")}`);
|
|
1416
1417
|
console.error(e);
|
|
1417
1418
|
console.error("\n\n");
|
|
@@ -1432,7 +1433,7 @@ async function collect(mode, cliFilters, options) {
|
|
|
1432
1433
|
process.title = "node (vitest)";
|
|
1433
1434
|
} catch {}
|
|
1434
1435
|
try {
|
|
1435
|
-
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.
|
|
1436
|
+
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.BkDphVBG.js').then(function (n) { return n.f; });
|
|
1436
1437
|
const ctx = await prepareVitest(mode, {
|
|
1437
1438
|
...normalizeCliOptions(cliFilters, options),
|
|
1438
1439
|
watch: false,
|
|
@@ -1454,7 +1455,7 @@ async function collect(mode, cliFilters, options) {
|
|
|
1454
1455
|
}
|
|
1455
1456
|
await ctx.close();
|
|
1456
1457
|
} catch (e) {
|
|
1457
|
-
const { errorBanner } = await import('./index.
|
|
1458
|
+
const { errorBanner } = await import('./index.VByaPkjc.js').then(function (n) { return n.u; });
|
|
1458
1459
|
console.error(`\n${errorBanner("Collect Error")}`);
|
|
1459
1460
|
console.error(e);
|
|
1460
1461
|
console.error("\n\n");
|
|
@@ -11,9 +11,9 @@ import { generateFileHash, limitConcurrency, createFileTask, hasFailed, getTasks
|
|
|
11
11
|
import { SnapshotManager } from '@vitest/snapshot/manager';
|
|
12
12
|
import { ViteNodeRunner } from 'vite-node/client';
|
|
13
13
|
import { ViteNodeServer } from 'vite-node/server';
|
|
14
|
-
import { v as version$1 } from './cac.
|
|
15
|
-
import { c as createBirpc } from './index.
|
|
16
|
-
import { p as parse, s as stringify, d as printError, f as formatProjectName, w as withLabel, e as errorBanner, h as divider, i as generateCodeFrame, R as ReportersMap, j as BlobReporter, r as readBlobs, H as HangingProcessReporter } from './index.
|
|
14
|
+
import { v as version$1 } from './cac.Cb-PYCCB.js';
|
|
15
|
+
import { c as createBirpc } from './index.B521nVV-.js';
|
|
16
|
+
import { p as parse, s as stringify, d as printError, f as formatProjectName, w as withLabel, e as errorBanner, h as divider, i as generateCodeFrame, R as ReportersMap, j as BlobReporter, r as readBlobs, H as HangingProcessReporter } from './index.VByaPkjc.js';
|
|
17
17
|
import require$$0$3 from 'events';
|
|
18
18
|
import require$$1$1 from 'https';
|
|
19
19
|
import require$$2 from 'http';
|
|
@@ -28,7 +28,7 @@ import { g as getDefaultExportFromCjs } from './_commonjsHelpers.BFTU3MAI.js';
|
|
|
28
28
|
import { parseErrorStacktrace } from '@vitest/utils/source-map';
|
|
29
29
|
import crypto, { createHash } from 'node:crypto';
|
|
30
30
|
import { distDir, rootDir } from '../path.js';
|
|
31
|
-
import { h as hash, R as RandomSequencer, i as isPackageExists, g as getFilePoolName, d as isBrowserEnabled, r as resolveConfig, e as groupBy, f as getCoverageProvider, j as createPool, w as wildcardPatternToRegExp, a as resolveApiServerConfig, s as stdout } from './coverage.
|
|
31
|
+
import { h as hash, R as RandomSequencer, i as isPackageExists, g as getFilePoolName, d as isBrowserEnabled, r as resolveConfig, e as groupBy, f as getCoverageProvider, j as createPool, w as wildcardPatternToRegExp, a as resolveApiServerConfig, s as stdout } from './coverage.DL5VHqXY.js';
|
|
32
32
|
import { c as convertTasksToEvents } from './typechecker.DRKU1-1g.js';
|
|
33
33
|
import { Console } from 'node:console';
|
|
34
34
|
import c from 'tinyrainbow';
|
|
@@ -43,7 +43,7 @@ import { normalizeRequestId, cleanUrl } from 'vite-node/utils';
|
|
|
43
43
|
import { hoistMocksPlugin, automockPlugin } from '@vitest/mocker/node';
|
|
44
44
|
import { c as configDefaults } from './defaults.B7q_naMc.js';
|
|
45
45
|
import MagicString from 'magic-string';
|
|
46
|
-
import { a as BenchmarkReportsMap } from './index.
|
|
46
|
+
import { a as BenchmarkReportsMap } from './index.BCWujgDG.js';
|
|
47
47
|
import assert$1 from 'node:assert';
|
|
48
48
|
import { serializeError } from '@vitest/utils/error';
|
|
49
49
|
import readline from 'node:readline';
|
|
@@ -5572,7 +5572,7 @@ class Logger {
|
|
|
5572
5572
|
const output = project.isRootProject() ? "" : formatProjectName(project);
|
|
5573
5573
|
const provider = project.browser.provider.name;
|
|
5574
5574
|
const providerString = provider === "preview" ? "" : ` by ${c.reset(c.bold(provider))}`;
|
|
5575
|
-
this.log(c.dim(`${output}Browser runner started${providerString} ${c.dim("at")} ${c.blue(new URL("/", origin))}\n`));
|
|
5575
|
+
this.log(c.dim(`${output}Browser runner started${providerString} ${c.dim("at")} ${c.blue(new URL("/__vitest_test__/", origin))}\n`));
|
|
5576
5576
|
}
|
|
5577
5577
|
printUnhandledErrors(errors) {
|
|
5578
5578
|
const errorMessage = c.red(c.bold(`\nVitest caught ${errors.length} unhandled error${errors.length > 1 ? "s" : ""} during the test run.
|
|
@@ -6709,15 +6709,10 @@ function VitestCoreResolver(ctx) {
|
|
|
6709
6709
|
function WorkspaceVitestPlugin(project, options) {
|
|
6710
6710
|
return [
|
|
6711
6711
|
{
|
|
6712
|
-
name: "vitest:project",
|
|
6712
|
+
name: "vitest:project:name",
|
|
6713
6713
|
enforce: "post",
|
|
6714
|
-
options() {
|
|
6715
|
-
this.meta.watchMode = false;
|
|
6716
|
-
},
|
|
6717
6714
|
config(viteConfig) {
|
|
6718
|
-
const defines = deleteDefineConfig(viteConfig);
|
|
6719
6715
|
const testConfig = viteConfig.test || {};
|
|
6720
|
-
const root = testConfig.root || viteConfig.root || options.root;
|
|
6721
6716
|
let { label: name, color } = typeof testConfig.name === "string" ? { label: testConfig.name } : {
|
|
6722
6717
|
label: "",
|
|
6723
6718
|
...testConfig.name
|
|
@@ -6729,6 +6724,45 @@ function WorkspaceVitestPlugin(project, options) {
|
|
|
6729
6724
|
if (existsSync(pkgJsonPath)) name = JSON.parse(readFileSync(pkgJsonPath, "utf-8")).name;
|
|
6730
6725
|
if (typeof name !== "string" || !name) name = basename(dir);
|
|
6731
6726
|
} else name = options.workspacePath.toString();
|
|
6727
|
+
const isUserBrowserEnabled = viteConfig.test?.browser?.enabled;
|
|
6728
|
+
const isBrowserEnabled = isUserBrowserEnabled ?? (viteConfig.test?.browser && project.vitest._cliOptions.browser?.enabled);
|
|
6729
|
+
// keep project names to potentially filter it out
|
|
6730
|
+
const workspaceNames = [name];
|
|
6731
|
+
const browser = viteConfig.test.browser || {};
|
|
6732
|
+
if (isBrowserEnabled && browser.name && !browser.instances?.length)
|
|
6733
|
+
// vitest injects `instances` in this case later on
|
|
6734
|
+
workspaceNames.push(name ? `${name} (${browser.name})` : browser.name);
|
|
6735
|
+
viteConfig.test?.browser?.instances?.forEach((instance) => {
|
|
6736
|
+
// every instance is a potential project
|
|
6737
|
+
instance.name ??= name ? `${name} (${instance.browser})` : instance.browser;
|
|
6738
|
+
if (isBrowserEnabled) workspaceNames.push(instance.name);
|
|
6739
|
+
});
|
|
6740
|
+
const filters = project.vitest.config.project;
|
|
6741
|
+
// if there is `--project=...` filter, check if any of the potential projects match
|
|
6742
|
+
// if projects don't match, we ignore the test project altogether
|
|
6743
|
+
// if some of them match, they will later be filtered again by `resolveWorkspace`
|
|
6744
|
+
if (filters.length) {
|
|
6745
|
+
const hasProject = workspaceNames.some((name) => {
|
|
6746
|
+
return project.vitest.matchesProjectFilter(name);
|
|
6747
|
+
});
|
|
6748
|
+
if (!hasProject) throw new VitestFilteredOutProjectError();
|
|
6749
|
+
}
|
|
6750
|
+
return { test: { name: {
|
|
6751
|
+
label: name,
|
|
6752
|
+
color
|
|
6753
|
+
} } };
|
|
6754
|
+
}
|
|
6755
|
+
},
|
|
6756
|
+
{
|
|
6757
|
+
name: "vitest:project",
|
|
6758
|
+
enforce: "pre",
|
|
6759
|
+
options() {
|
|
6760
|
+
this.meta.watchMode = false;
|
|
6761
|
+
},
|
|
6762
|
+
config(viteConfig) {
|
|
6763
|
+
const defines = deleteDefineConfig(viteConfig);
|
|
6764
|
+
const testConfig = viteConfig.test || {};
|
|
6765
|
+
const root = testConfig.root || viteConfig.root || options.root;
|
|
6732
6766
|
const resolveOptions = getDefaultResolveOptions();
|
|
6733
6767
|
const config = {
|
|
6734
6768
|
root,
|
|
@@ -6752,35 +6786,9 @@ function WorkspaceVitestPlugin(project, options) {
|
|
|
6752
6786
|
fs: { allow: resolveFsAllow(project.vitest.config.root, project.vitest.vite.config.configFile) }
|
|
6753
6787
|
},
|
|
6754
6788
|
environments: { ssr: { resolve: resolveOptions } },
|
|
6755
|
-
test: {
|
|
6756
|
-
label: name,
|
|
6757
|
-
color
|
|
6758
|
-
} }
|
|
6789
|
+
test: {}
|
|
6759
6790
|
};
|
|
6760
6791
|
config.test.defines = defines;
|
|
6761
|
-
const isUserBrowserEnabled = viteConfig.test?.browser?.enabled;
|
|
6762
|
-
const isBrowserEnabled = isUserBrowserEnabled ?? (viteConfig.test?.browser && project.vitest._cliOptions.browser?.enabled);
|
|
6763
|
-
// keep project names to potentially filter it out
|
|
6764
|
-
const workspaceNames = [name];
|
|
6765
|
-
const browser = viteConfig.test.browser || {};
|
|
6766
|
-
if (isBrowserEnabled && browser.name && !browser.instances?.length)
|
|
6767
|
-
// vitest injects `instances` in this case later on
|
|
6768
|
-
workspaceNames.push(name ? `${name} (${browser.name})` : browser.name);
|
|
6769
|
-
viteConfig.test?.browser?.instances?.forEach((instance) => {
|
|
6770
|
-
// every instance is a potential project
|
|
6771
|
-
instance.name ??= name ? `${name} (${instance.browser})` : instance.browser;
|
|
6772
|
-
if (isBrowserEnabled) workspaceNames.push(instance.name);
|
|
6773
|
-
});
|
|
6774
|
-
const filters = project.vitest.config.project;
|
|
6775
|
-
// if there is `--project=...` filter, check if any of the potential projects match
|
|
6776
|
-
// if projects don't match, we ignore the test project altogether
|
|
6777
|
-
// if some of them match, they will later be filtered again by `resolveWorkspace`
|
|
6778
|
-
if (filters.length) {
|
|
6779
|
-
const hasProject = workspaceNames.some((name) => {
|
|
6780
|
-
return project.vitest.matchesProjectFilter(name);
|
|
6781
|
-
});
|
|
6782
|
-
if (!hasProject) throw new VitestFilteredOutProjectError();
|
|
6783
|
-
}
|
|
6784
6792
|
const classNameStrategy = typeof testConfig.css !== "boolean" && testConfig.css?.modules?.classNameStrategy || "stable";
|
|
6785
6793
|
if (classNameStrategy !== "scoped") {
|
|
6786
6794
|
config.css ??= {};
|
|
@@ -6793,7 +6801,11 @@ function WorkspaceVitestPlugin(project, options) {
|
|
|
6793
6801
|
config.customLogger = createViteLogger(project.vitest.logger, viteConfig.logLevel || "warn", { allowClearScreen: false });
|
|
6794
6802
|
config.customLogger = silenceImportViteIgnoreWarning(config.customLogger);
|
|
6795
6803
|
return config;
|
|
6796
|
-
}
|
|
6804
|
+
}
|
|
6805
|
+
},
|
|
6806
|
+
{
|
|
6807
|
+
name: "vitest:project:server",
|
|
6808
|
+
enforce: "post",
|
|
6797
6809
|
async configureServer(server) {
|
|
6798
6810
|
const options = deepMerge({}, configDefaults, server.config.test || {});
|
|
6799
6811
|
await project._configureServer(options, server);
|
|
@@ -9053,6 +9065,21 @@ class VitestWatcher {
|
|
|
9053
9065
|
if (needsRerun) this.scheduleRerun(id);
|
|
9054
9066
|
}
|
|
9055
9067
|
};
|
|
9068
|
+
handleSetupFile(filepath) {
|
|
9069
|
+
let isSetupFile = false;
|
|
9070
|
+
this.vitest.projects.forEach((project) => {
|
|
9071
|
+
if (!project.config.setupFiles.includes(filepath)) return;
|
|
9072
|
+
this.vitest.state.filesMap.forEach((files) => {
|
|
9073
|
+
files.forEach((file) => {
|
|
9074
|
+
if (file.projectName === project.name) {
|
|
9075
|
+
isSetupFile = true;
|
|
9076
|
+
this.changedTests.add(file.filepath);
|
|
9077
|
+
}
|
|
9078
|
+
});
|
|
9079
|
+
});
|
|
9080
|
+
});
|
|
9081
|
+
return isSetupFile;
|
|
9082
|
+
}
|
|
9056
9083
|
/**
|
|
9057
9084
|
* @returns A value indicating whether rerun is needed (changedTests was mutated)
|
|
9058
9085
|
*/
|
|
@@ -9062,6 +9089,7 @@ class VitestWatcher {
|
|
|
9062
9089
|
this.vitest.state.getFilepaths().forEach((file) => this.changedTests.add(file));
|
|
9063
9090
|
return true;
|
|
9064
9091
|
}
|
|
9092
|
+
if (this.handleSetupFile(filepath)) return true;
|
|
9065
9093
|
const projects = this.vitest.projects.filter((project) => {
|
|
9066
9094
|
const moduleGraph = project.browser?.vite.moduleGraph || project.vite.moduleGraph;
|
|
9067
9095
|
return moduleGraph.getModulesByFile(filepath)?.size;
|
|
@@ -9386,11 +9414,11 @@ class Vitest {
|
|
|
9386
9414
|
async resolveProjects(cliOptions) {
|
|
9387
9415
|
const names = /* @__PURE__ */ new Set();
|
|
9388
9416
|
if (this.config.projects) {
|
|
9389
|
-
if (typeof this.config.workspace !== "undefined") this.logger.warn("Both `
|
|
9417
|
+
if (typeof this.config.workspace !== "undefined") this.logger.warn("Both `test.projects` and `test.workspace` are defined. Ignoring the `test.workspace` option.");
|
|
9390
9418
|
return resolveProjects(this, cliOptions, void 0, this.config.projects, names);
|
|
9391
9419
|
}
|
|
9392
9420
|
if (Array.isArray(this.config.workspace)) {
|
|
9393
|
-
this.logger.deprecate("The `workspace` option is deprecated and will be removed in the next major. To hide this warning, rename `workspace` option to `projects`.");
|
|
9421
|
+
this.logger.deprecate("The `test.workspace` option is deprecated and will be removed in the next major. To hide this warning, rename `test.workspace` option to `test.projects`.");
|
|
9394
9422
|
return resolveProjects(this, cliOptions, void 0, this.config.workspace, names);
|
|
9395
9423
|
}
|
|
9396
9424
|
const workspaceConfigPath = await this.resolveWorkspaceConfigPath();
|
|
@@ -9404,7 +9432,7 @@ class Vitest {
|
|
|
9404
9432
|
return resolveBrowserProjects(this, new Set([project.name]), [project]);
|
|
9405
9433
|
}
|
|
9406
9434
|
const configFile = this.vite.config.configFile ? resolve(this.vite.config.root, this.vite.config.configFile) : "the root config file";
|
|
9407
|
-
this.logger.deprecate(`The workspace file is deprecated and will be removed in the next major. Please, use the \`projects\` field in ${configFile} instead.`);
|
|
9435
|
+
this.logger.deprecate(`The workspace file is deprecated and will be removed in the next major. Please, use the \`test.projects\` field in ${configFile} instead.`);
|
|
9408
9436
|
const workspaceModule = await this.import(workspaceConfigPath);
|
|
9409
9437
|
if (!workspaceModule.default || !Array.isArray(workspaceModule.default)) throw new TypeError(`Workspace config file "${workspaceConfigPath}" must export a default array of project paths.`);
|
|
9410
9438
|
return resolveProjects(this, cliOptions, workspaceConfigPath, workspaceModule.default, names);
|
|
@@ -10121,6 +10149,9 @@ async function VitestPlugin(options = {}, vitest = new Vitest("test", deepClone(
|
|
|
10121
10149
|
for (const name in envs) process.env[name] ??= envs[name];
|
|
10122
10150
|
// don't watch files in run mode
|
|
10123
10151
|
if (!options.watch) viteConfig.server.watch = null;
|
|
10152
|
+
if (options.ui)
|
|
10153
|
+
// @ts-expect-error mutate readonly
|
|
10154
|
+
viteConfig.plugins.push(await UIPlugin());
|
|
10124
10155
|
Object.defineProperty(viteConfig, "_vitest", {
|
|
10125
10156
|
value: options,
|
|
10126
10157
|
enumerable: false,
|
|
@@ -10146,7 +10177,6 @@ async function VitestPlugin(options = {}, vitest = new Vitest("test", deepClone(
|
|
|
10146
10177
|
...CSSEnablerPlugin(vitest),
|
|
10147
10178
|
CoverageTransform(vitest),
|
|
10148
10179
|
VitestCoreResolver(vitest),
|
|
10149
|
-
options.ui ? await UIPlugin() : null,
|
|
10150
10180
|
...MocksPlugins(),
|
|
10151
10181
|
VitestOptimizer(),
|
|
10152
10182
|
NormalizeURLPlugin()
|
|
@@ -10603,7 +10633,7 @@ const envPackageNames = {
|
|
|
10603
10633
|
function getEnvPackageName(env) {
|
|
10604
10634
|
if (env === "node") return null;
|
|
10605
10635
|
if (env in envPackageNames) return envPackageNames[env];
|
|
10606
|
-
if (env[0] === "." || env
|
|
10636
|
+
if (env[0] === "." || isAbsolute(env)) return null;
|
|
10607
10637
|
return `vitest-environment-${env}`;
|
|
10608
10638
|
}
|
|
10609
10639
|
|
|
@@ -20,7 +20,7 @@ import * as nodeos from 'node:os';
|
|
|
20
20
|
import nodeos__default from 'node:os';
|
|
21
21
|
import { isatty } from 'node:tty';
|
|
22
22
|
import EventEmitter from 'node:events';
|
|
23
|
-
import { c as createBirpc } from './index.
|
|
23
|
+
import { c as createBirpc } from './index.B521nVV-.js';
|
|
24
24
|
import Tinypool$1, { Tinypool } from 'tinypool';
|
|
25
25
|
import { w as wrapSerializableConfig, a as Typechecker } from './typechecker.DRKU1-1g.js';
|
|
26
26
|
import { MessageChannel } from 'node:worker_threads';
|
|
@@ -2581,7 +2581,17 @@ function createChildProcessChannel$1(project, collect = false) {
|
|
|
2581
2581
|
}), {
|
|
2582
2582
|
eventNames: ["onCancel"],
|
|
2583
2583
|
serialize: v8.serialize,
|
|
2584
|
-
deserialize: (v) =>
|
|
2584
|
+
deserialize: (v) => {
|
|
2585
|
+
try {
|
|
2586
|
+
return v8.deserialize(Buffer.from(v));
|
|
2587
|
+
} catch (error) {
|
|
2588
|
+
let stringified = "";
|
|
2589
|
+
try {
|
|
2590
|
+
stringified = `\nReceived value: ${JSON.stringify(v)}`;
|
|
2591
|
+
} catch {}
|
|
2592
|
+
throw new Error(`[vitest-pool]: Unexpected call to process.send(). Make sure your test cases are not interfering with process's channel.${stringified}`, { cause: error });
|
|
2593
|
+
}
|
|
2594
|
+
},
|
|
2585
2595
|
post(v) {
|
|
2586
2596
|
emitter.emit(events.message, v);
|
|
2587
2597
|
},
|
|
@@ -2600,7 +2610,7 @@ function createForksPool(vitest, { execArgv, env }) {
|
|
|
2600
2610
|
const threadsCount = vitest.config.watch ? Math.max(Math.floor(numCpus / 2), 1) : Math.max(numCpus - 1, 1);
|
|
2601
2611
|
const poolOptions = vitest.config.poolOptions?.forks ?? {};
|
|
2602
2612
|
const maxThreads = poolOptions.maxForks ?? vitest.config.maxWorkers ?? threadsCount;
|
|
2603
|
-
const minThreads = poolOptions.minForks ?? vitest.config.minWorkers ?? threadsCount;
|
|
2613
|
+
const minThreads = poolOptions.minForks ?? vitest.config.minWorkers ?? Math.min(threadsCount, maxThreads);
|
|
2604
2614
|
const worker = resolve(vitest.distPath, "workers/forks.js");
|
|
2605
2615
|
const options = {
|
|
2606
2616
|
runtime: "child_process",
|
|
@@ -2736,7 +2746,7 @@ function createThreadsPool(vitest, { execArgv, env }) {
|
|
|
2736
2746
|
const threadsCount = vitest.config.watch ? Math.max(Math.floor(numCpus / 2), 1) : Math.max(numCpus - 1, 1);
|
|
2737
2747
|
const poolOptions = vitest.config.poolOptions?.threads ?? {};
|
|
2738
2748
|
const maxThreads = poolOptions.maxThreads ?? vitest.config.maxWorkers ?? threadsCount;
|
|
2739
|
-
const minThreads = poolOptions.minThreads ?? vitest.config.minWorkers ?? threadsCount;
|
|
2749
|
+
const minThreads = poolOptions.minThreads ?? vitest.config.minWorkers ?? Math.min(threadsCount, maxThreads);
|
|
2740
2750
|
const worker = resolve(vitest.distPath, "workers/threads.js");
|
|
2741
2751
|
const options = {
|
|
2742
2752
|
filename: resolve(vitest.distPath, "worker.js"),
|
|
@@ -3032,7 +3042,17 @@ function createChildProcessChannel(project, collect) {
|
|
|
3032
3042
|
}), {
|
|
3033
3043
|
eventNames: ["onCancel"],
|
|
3034
3044
|
serialize: v8.serialize,
|
|
3035
|
-
deserialize: (v) =>
|
|
3045
|
+
deserialize: (v) => {
|
|
3046
|
+
try {
|
|
3047
|
+
return v8.deserialize(Buffer.from(v));
|
|
3048
|
+
} catch (error) {
|
|
3049
|
+
let stringified = "";
|
|
3050
|
+
try {
|
|
3051
|
+
stringified = `\nReceived value: ${JSON.stringify(v)}`;
|
|
3052
|
+
} catch {}
|
|
3053
|
+
throw new Error(`[vitest-pool]: Unexpected call to process.send(). Make sure your test cases are not interfering with process's channel.${stringified}`, { cause: error });
|
|
3054
|
+
}
|
|
3055
|
+
},
|
|
3036
3056
|
post(v) {
|
|
3037
3057
|
emitter.emit(events.message, v);
|
|
3038
3058
|
},
|
|
@@ -3054,7 +3074,7 @@ function createVmForksPool(vitest, { execArgv, env }) {
|
|
|
3054
3074
|
const threadsCount = vitest.config.watch ? Math.max(Math.floor(numCpus / 2), 1) : Math.max(numCpus - 1, 1);
|
|
3055
3075
|
const poolOptions = vitest.config.poolOptions?.vmForks ?? {};
|
|
3056
3076
|
const maxThreads = poolOptions.maxForks ?? vitest.config.maxWorkers ?? threadsCount;
|
|
3057
|
-
const minThreads = poolOptions.maxForks ?? vitest.config.minWorkers ?? threadsCount;
|
|
3077
|
+
const minThreads = poolOptions.maxForks ?? vitest.config.minWorkers ?? Math.min(threadsCount, maxThreads);
|
|
3058
3078
|
const worker = resolve(vitest.distPath, "workers/vmForks.js");
|
|
3059
3079
|
const options = {
|
|
3060
3080
|
runtime: "child_process",
|
|
@@ -3174,7 +3194,7 @@ function createVmThreadsPool(vitest, { execArgv, env }) {
|
|
|
3174
3194
|
const threadsCount = vitest.config.watch ? Math.max(Math.floor(numCpus / 2), 1) : Math.max(numCpus - 1, 1);
|
|
3175
3195
|
const poolOptions = vitest.config.poolOptions?.vmThreads ?? {};
|
|
3176
3196
|
const maxThreads = poolOptions.maxThreads ?? vitest.config.maxWorkers ?? threadsCount;
|
|
3177
|
-
const minThreads = poolOptions.minThreads ?? vitest.config.minWorkers ?? threadsCount;
|
|
3197
|
+
const minThreads = poolOptions.minThreads ?? vitest.config.minWorkers ?? Math.min(threadsCount, maxThreads);
|
|
3178
3198
|
const worker = resolve(vitest.distPath, "workers/vmThreads.js");
|
|
3179
3199
|
const options = {
|
|
3180
3200
|
filename: resolve(vitest.distPath, "worker.js"),
|
|
@@ -3281,7 +3301,7 @@ function getDefaultPoolName(project) {
|
|
|
3281
3301
|
}
|
|
3282
3302
|
function getFilePoolName(project, file) {
|
|
3283
3303
|
for (const [glob, pool] of project.config.poolMatchGlobs) {
|
|
3284
|
-
if (pool === "browser") throw new Error("Since Vitest 0.31.0 \"browser\" pool is not supported in
|
|
3304
|
+
if (pool === "browser") throw new Error("Since Vitest 0.31.0 \"browser\" pool is not supported in `poolMatchGlobs`. You can create a project to run some of your tests in browser in parallel. Read more: https://vitest.dev/guide/projects");
|
|
3285
3305
|
if (pm.isMatch(file, glob, { cwd: project.config.root })) return pool;
|
|
3286
3306
|
}
|
|
3287
3307
|
return getDefaultPoolName(project);
|
|
@@ -3376,7 +3396,10 @@ function createPool(ctx) {
|
|
|
3376
3396
|
const Sequencer = ctx.config.sequence.sequencer;
|
|
3377
3397
|
const sequencer = new Sequencer(ctx);
|
|
3378
3398
|
async function sortSpecs(specs) {
|
|
3379
|
-
if (ctx.config.shard)
|
|
3399
|
+
if (ctx.config.shard) {
|
|
3400
|
+
if (!ctx.config.passWithNoTests && ctx.config.shard.count > specs.length) throw new Error(`--shard <count> must be a smaller than count of test files. Resolved ${specs.length} test files for --shard=${ctx.config.shard.index}/${ctx.config.shard.count}.`);
|
|
3401
|
+
specs = await sequencer.shard(specs);
|
|
3402
|
+
}
|
|
3380
3403
|
return sequencer.sort(specs);
|
|
3381
3404
|
}
|
|
3382
3405
|
const sortedGroups = Array.from(groups).sort();
|
|
@@ -3747,7 +3770,7 @@ function resolveConfig$1(vitest, options, viteConfig) {
|
|
|
3747
3770
|
// if passed down from the CLI and it's relative, resolve relative to CWD
|
|
3748
3771
|
resolved.workspace = typeof options.workspace === "string" && options.workspace[0] === "." ? resolve$1(process.cwd(), options.workspace) : resolvePath(resolved.workspace, resolved.root);
|
|
3749
3772
|
if (!builtinPools.includes(resolved.pool)) resolved.pool = resolvePath(resolved.pool, resolved.root);
|
|
3750
|
-
if (resolved.poolMatchGlobs) logger.
|
|
3773
|
+
if (resolved.poolMatchGlobs) logger.deprecate("`poolMatchGlobs` is deprecated. Use `test.projects` to define different configurations instead.");
|
|
3751
3774
|
resolved.poolMatchGlobs = (resolved.poolMatchGlobs || []).map(([glob, pool]) => {
|
|
3752
3775
|
if (!builtinPools.includes(pool)) pool = resolvePath(pool, resolved.root);
|
|
3753
3776
|
return [glob, pool];
|
|
@@ -3849,7 +3872,7 @@ function resolveConfig$1(vitest, options, viteConfig) {
|
|
|
3849
3872
|
...configDefaults.typecheck,
|
|
3850
3873
|
...resolved.typecheck
|
|
3851
3874
|
};
|
|
3852
|
-
if (resolved.environmentMatchGlobs) logger.
|
|
3875
|
+
if (resolved.environmentMatchGlobs) logger.deprecate("\"environmentMatchGlobs\" is deprecated. Use `test.projects` to define different configurations instead.");
|
|
3853
3876
|
resolved.environmentMatchGlobs = (resolved.environmentMatchGlobs || []).map((i) => [resolve$1(resolved.root, i[0]), i[1]]);
|
|
3854
3877
|
resolved.typecheck ??= {};
|
|
3855
3878
|
resolved.typecheck.enabled ??= false;
|
|
@@ -29,8 +29,10 @@ function createBirpc(functions, options) {
|
|
|
29
29
|
return functions;
|
|
30
30
|
if (method === "$close")
|
|
31
31
|
return close;
|
|
32
|
+
if (method === "$closed")
|
|
33
|
+
return closed;
|
|
32
34
|
if (method === "then" && !eventNames.includes("then") && !("then" in functions))
|
|
33
|
-
return
|
|
35
|
+
return undefined;
|
|
34
36
|
const sendEvent = (...args) => {
|
|
35
37
|
post(serialize({ m: method, a: args, t: TYPE_REQUEST }));
|
|
36
38
|
};
|
|
@@ -45,7 +47,7 @@ function createBirpc(functions, options) {
|
|
|
45
47
|
try {
|
|
46
48
|
await _promise;
|
|
47
49
|
} finally {
|
|
48
|
-
_promise =
|
|
50
|
+
_promise = undefined;
|
|
49
51
|
}
|
|
50
52
|
}
|
|
51
53
|
return new Promise((resolve, reject) => {
|
|
@@ -2,7 +2,7 @@ import fs from 'node:fs';
|
|
|
2
2
|
import { getTasks, getFullName, getTests } from '@vitest/runner/utils';
|
|
3
3
|
import * as pathe from 'pathe';
|
|
4
4
|
import c from 'tinyrainbow';
|
|
5
|
-
import { g as getStateSymbol, t as truncateString, F as F_RIGHT, D as DefaultReporter, f as formatProjectName } from './index.
|
|
5
|
+
import { g as getStateSymbol, t as truncateString, F as F_RIGHT, D as DefaultReporter, f as formatProjectName } from './index.VByaPkjc.js';
|
|
6
6
|
import { stripVTControlCharacters } from 'node:util';
|
|
7
7
|
import { notNullish } from '@vitest/utils';
|
|
8
8
|
|
|
@@ -2,7 +2,7 @@ import * as chai from 'chai';
|
|
|
2
2
|
import { resolve } from 'node:path';
|
|
3
3
|
import { l as loadDiffConfig, b as loadSnapshotSerializers, t as takeCoverageInsideWorker } from './setup-common.Dd054P77.js';
|
|
4
4
|
import { distDir } from '../path.js';
|
|
5
|
-
import { r as rpc } from './rpc.
|
|
5
|
+
import { r as rpc } from './rpc.-pEldfrD.js';
|
|
6
6
|
import { g as getWorkerState } from './utils.XdZDrNZV.js';
|
|
7
7
|
|
|
8
8
|
function setupChaiConfig(config) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { performance as performance$1 } from 'node:perf_hooks';
|
|
2
|
-
import { getTestName,
|
|
2
|
+
import { getTestName, getFullName, hasFailed, getTests, getSuites, getTasks } from '@vitest/runner/utils';
|
|
3
3
|
import { slash, toArray, isPrimitive, inspect, positionToOffset, lineSplitRE } from '@vitest/utils';
|
|
4
4
|
import { parseStacktrace, parseErrorStacktrace } from '@vitest/utils/source-map';
|
|
5
5
|
import { isAbsolute, relative, dirname, basename, resolve, normalize } from 'pathe';
|
|
@@ -299,6 +299,9 @@ class BaseReporter {
|
|
|
299
299
|
getTestName(test, separator) {
|
|
300
300
|
return getTestName(test, separator);
|
|
301
301
|
}
|
|
302
|
+
getFullName(test, separator) {
|
|
303
|
+
return getFullName(test, separator);
|
|
304
|
+
}
|
|
302
305
|
formatShortError(error) {
|
|
303
306
|
return `${F_RIGHT} ${error.message}`;
|
|
304
307
|
}
|
|
@@ -361,7 +364,7 @@ class BaseReporter {
|
|
|
361
364
|
const write = (msg) => output.write(msg);
|
|
362
365
|
let headerText = "unknown test";
|
|
363
366
|
const task = log.taskId ? this.ctx.state.idMap.get(log.taskId) : void 0;
|
|
364
|
-
if (task) headerText = getFullName(task, c.dim(" > "));
|
|
367
|
+
if (task) headerText = this.getFullName(task, c.dim(" > "));
|
|
365
368
|
else if (log.taskId && log.taskId !== "__vitest__unknown_test__") headerText = log.taskId;
|
|
366
369
|
write(c.gray(log.type + c.dim(` | ${headerText}\n`)) + log.content);
|
|
367
370
|
if (log.origin) {
|
|
@@ -469,7 +472,7 @@ class BaseReporter {
|
|
|
469
472
|
for (const bench of topBenches) {
|
|
470
473
|
const group = bench.suite || bench.file;
|
|
471
474
|
if (!group) continue;
|
|
472
|
-
const groupName = getFullName(group, c.dim(" > "));
|
|
475
|
+
const groupName = this.getFullName(group, c.dim(" > "));
|
|
473
476
|
const project = this.ctx.projects.find((p) => p.name === bench.file.projectName);
|
|
474
477
|
this.log(` ${formatProjectName(project)}${bench.name}${c.dim(` - ${groupName}`)}`);
|
|
475
478
|
const siblings = group.tasks.filter((i) => i.meta.benchmark && i.result?.benchmark && i !== bench).sort((a, b) => a.result.benchmark.rank - b.result.benchmark.rank);
|
|
@@ -502,7 +505,7 @@ class BaseReporter {
|
|
|
502
505
|
const filepath = task?.filepath || "";
|
|
503
506
|
const projectName = task?.projectName || task.file?.projectName || "";
|
|
504
507
|
const project = this.ctx.projects.find((p) => p.name === projectName);
|
|
505
|
-
let name = getFullName(task, c.dim(" > "));
|
|
508
|
+
let name = this.getFullName(task, c.dim(" > "));
|
|
506
509
|
if (filepath) name += c.dim(` [ ${this.relative(filepath)} ]`);
|
|
507
510
|
this.ctx.logger.error(`${c.bgRed(c.bold(" FAIL "))} ${formatProjectName(project)}${name}`);
|
|
508
511
|
}
|
|
@@ -1364,7 +1367,7 @@ function printErrorInner(error, project, options) {
|
|
|
1364
1367
|
const stacks = options.parseErrorStacktrace(e);
|
|
1365
1368
|
const nearest = error instanceof TypeCheckError ? error.stacks[0] : stacks.find((stack) => {
|
|
1366
1369
|
try {
|
|
1367
|
-
return project.
|
|
1370
|
+
return project._vite && project.getModuleById(stack.file) && existsSync(stack.file);
|
|
1368
1371
|
} catch {
|
|
1369
1372
|
return false;
|
|
1370
1373
|
}
|
|
@@ -6,7 +6,7 @@ import { TransformResult as TransformResult$1, UserConfig as UserConfig$1, DepOp
|
|
|
6
6
|
import { Console } from 'node:console';
|
|
7
7
|
import { MockedModule } from '@vitest/mocker';
|
|
8
8
|
import { StackTraceParserOptions } from '@vitest/utils/source-map';
|
|
9
|
-
import { T as TestExecutionMethod } from './worker.d.
|
|
9
|
+
import { T as TestExecutionMethod } from './worker.d.1GmBbd7G.js';
|
|
10
10
|
import { a as SerializedConfig, F as FakeTimerInstallOpts } from './config.d.D2ROskhv.js';
|
|
11
11
|
import { PrettyFormatOptions } from '@vitest/pretty-format';
|
|
12
12
|
import { SnapshotSummary, SnapshotStateOptions } from '@vitest/snapshot';
|
|
@@ -676,6 +676,7 @@ declare abstract class BaseReporter implements Reporter {
|
|
|
676
676
|
private getModuleLog;
|
|
677
677
|
protected printTestSuite(_suite: TestSuite): void;
|
|
678
678
|
protected getTestName(test: Task, separator?: string): string;
|
|
679
|
+
protected getFullName(test: Task, separator?: string): string;
|
|
679
680
|
protected formatShortError(error: ErrorWithDiff): string;
|
|
680
681
|
protected getTestIndentation(_test: Task): string;
|
|
681
682
|
protected printAnnotations(test: TestCase, console: "log" | "error", padding?: number): void;
|
|
@@ -1041,15 +1042,15 @@ declare const BenchmarkReportsMap: {
|
|
|
1041
1042
|
type BenchmarkBuiltinReporters = keyof typeof BenchmarkReportsMap;
|
|
1042
1043
|
|
|
1043
1044
|
declare const ReportersMap: {
|
|
1044
|
-
|
|
1045
|
-
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1049
|
-
|
|
1050
|
-
|
|
1045
|
+
default: typeof DefaultReporter
|
|
1046
|
+
basic: typeof BasicReporter
|
|
1047
|
+
blob: typeof BlobReporter
|
|
1048
|
+
verbose: typeof VerboseReporter
|
|
1049
|
+
dot: typeof DotReporter
|
|
1050
|
+
json: typeof JsonReporter
|
|
1051
|
+
tap: typeof TapReporter
|
|
1051
1052
|
"tap-flat": typeof TapFlatReporter
|
|
1052
|
-
|
|
1053
|
+
junit: typeof JUnitReporter
|
|
1053
1054
|
"hanging-process": typeof HangingProcessReporter
|
|
1054
1055
|
"github-actions": typeof GithubActionsReporter
|
|
1055
1056
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { performance } from 'node:perf_hooks';
|
|
2
2
|
import { startTests, collectTests } from '@vitest/runner';
|
|
3
|
-
import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './index.
|
|
3
|
+
import { a as resolveSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './index.CwejwG0H.js';
|
|
4
4
|
import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './setup-common.Dd054P77.js';
|
|
5
5
|
import { a as globalExpect, v as vi } from './vi.bdSIJ99Y.js';
|
|
6
6
|
import { c as closeInspector } from './inspector.C914Efll.js';
|
|
@@ -17,8 +17,8 @@ import 'chai';
|
|
|
17
17
|
import 'node:path';
|
|
18
18
|
import '../path.js';
|
|
19
19
|
import 'node:url';
|
|
20
|
-
import './rpc.
|
|
21
|
-
import './index.
|
|
20
|
+
import './rpc.-pEldfrD.js';
|
|
21
|
+
import './index.B521nVV-.js';
|
|
22
22
|
import './coverage.DVF1vEu8.js';
|
|
23
23
|
import '@vitest/snapshot';
|
|
24
24
|
import '@vitest/expect';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { HookHandler } from 'vite';
|
|
2
|
-
import { V as Vitest, T as TestProject, b as TestProjectConfiguration, I as InlineConfig } from './reporters.d.
|
|
2
|
+
import { V as Vitest, T as TestProject, b as TestProjectConfiguration, I as InlineConfig } from './reporters.d.BFLkQcL6.js';
|
|
3
3
|
|
|
4
4
|
interface VitestPluginContext {
|
|
5
5
|
vitest: Vitest;
|
package/dist/cli.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { c as createCLI } from './chunks/cac.
|
|
1
|
+
import { c as createCLI } from './chunks/cac.Cb-PYCCB.js';
|
|
2
2
|
import '@vitest/utils';
|
|
3
3
|
import 'events';
|
|
4
4
|
import 'pathe';
|
|
5
5
|
import 'tinyrainbow';
|
|
6
6
|
import './chunks/constants.DnKduX2e.js';
|
|
7
|
-
import './chunks/index.
|
|
7
|
+
import './chunks/index.VByaPkjc.js';
|
|
8
8
|
import 'node:perf_hooks';
|
|
9
9
|
import '@vitest/runner/utils';
|
|
10
10
|
import '@vitest/utils/source-map';
|
package/dist/config.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
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, g as WatcherTriggerPattern, 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.BFLkQcL6.js';
|
|
4
|
+
export { f as TestProjectInlineConfiguration, g as WatcherTriggerPattern, W as WorkspaceProjectConfiguration } from './chunks/reporters.d.BFLkQcL6.js';
|
|
5
|
+
import './chunks/vite.d.CMLlLIFP.js';
|
|
6
6
|
import { F as FakeTimerInstallOpts } from './chunks/config.d.D2ROskhv.js';
|
|
7
7
|
import '@vitest/runner';
|
|
8
8
|
import './chunks/environment.d.cL3nLXbE.js';
|
|
@@ -12,7 +12,7 @@ import 'node:stream';
|
|
|
12
12
|
import 'node:console';
|
|
13
13
|
import '@vitest/mocker';
|
|
14
14
|
import '@vitest/utils/source-map';
|
|
15
|
-
import './chunks/worker.d.
|
|
15
|
+
import './chunks/worker.d.1GmBbd7G.js';
|
|
16
16
|
import 'vite-node';
|
|
17
17
|
import '@vitest/snapshot';
|
|
18
18
|
import '@vitest/pretty-format';
|
package/dist/coverage.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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.BFLkQcL6.js';
|
|
2
2
|
import { TransformResult } from 'vite';
|
|
3
3
|
import { A as AfterSuiteRunMeta } from './chunks/environment.d.cL3nLXbE.js';
|
|
4
4
|
import '@vitest/runner';
|
|
@@ -7,7 +7,7 @@ import 'node:stream';
|
|
|
7
7
|
import 'node:console';
|
|
8
8
|
import '@vitest/mocker';
|
|
9
9
|
import '@vitest/utils/source-map';
|
|
10
|
-
import './chunks/worker.d.
|
|
10
|
+
import './chunks/worker.d.1GmBbd7G.js';
|
|
11
11
|
import 'vite-node';
|
|
12
12
|
import './chunks/config.d.D2ROskhv.js';
|
|
13
13
|
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.DL5VHqXY.js';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import 'pathe';
|
|
4
4
|
import 'picomatch';
|
|
@@ -21,7 +21,7 @@ import 'vite';
|
|
|
21
21
|
import './chunks/constants.DnKduX2e.js';
|
|
22
22
|
import 'node:tty';
|
|
23
23
|
import 'node:events';
|
|
24
|
-
import './chunks/index.
|
|
24
|
+
import './chunks/index.B521nVV-.js';
|
|
25
25
|
import 'tinypool';
|
|
26
26
|
import './chunks/typechecker.DRKU1-1g.js';
|
|
27
27
|
import 'node:perf_hooks';
|
package/dist/execute.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ViteNodeRunnerOptions } from 'vite-node';
|
|
2
2
|
import { ViteNodeRunner, ModuleExecutionInfo } from 'vite-node/client';
|
|
3
|
-
import { R as RuntimeRPC, W as WorkerGlobalState } from './chunks/worker.d.
|
|
3
|
+
import { R as RuntimeRPC, W as WorkerGlobalState } from './chunks/worker.d.1GmBbd7G.js';
|
|
4
4
|
import vm from 'node:vm';
|
|
5
5
|
import { MockedModule, MockedModuleType } from '@vitest/mocker';
|
|
6
6
|
import { P as PendingSuiteMock, b as MockFactory, a as MockOptions } from './chunks/mocker.d.BE_2ls6u.js';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import { File as File$1, TestAnnotation, 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
2
|
export { CancelReason, ExtendedContext, HookCleanupCallback, HookListener, ImportDuration, 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, TestAnnotation, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
3
|
-
import { S as SerializedTestSpecification, h as CoverageProvider$1, a as ReportContext$1, i as CoverageProviderModule$1, j as CoverageReporter$1, k as CoverageProviderName, l as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, m as CoverageIstanbulOptions$1, c as CoverageV8Options$1, n as CustomProviderOptions$1, o as Reporter$1, V as Vitest$1, p as BrowserScript$1, q as BrowserConfigOptions$1, r as BuiltinEnvironment$1, s as VitestEnvironment$1, P as Pool$1, t as PoolOptions$1, u as CSSModuleScopeStrategy$1, A as ApiConfig$1, v as VitestRunMode$1, D as DepsOptimizationOptions$1, w as TransformModePatterns$1, I as InlineConfig$1, x as TypecheckConfig$1, y as UserConfig$1, z as ResolvedConfig$1, E as ProjectConfig$1, U as UserWorkspaceConfig$1, F as BenchmarkUserOptions$1 } from './chunks/reporters.d.
|
|
4
|
-
export { G as BrowserTesterOptions } from './chunks/reporters.d.
|
|
5
|
-
import { W as WorkerContext$1 } from './chunks/worker.d.
|
|
3
|
+
import { S as SerializedTestSpecification, h as CoverageProvider$1, a as ReportContext$1, i as CoverageProviderModule$1, j as CoverageReporter$1, k as CoverageProviderName, l as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, m as CoverageIstanbulOptions$1, c as CoverageV8Options$1, n as CustomProviderOptions$1, o as Reporter$1, V as Vitest$1, p as BrowserScript$1, q as BrowserConfigOptions$1, r as BuiltinEnvironment$1, s as VitestEnvironment$1, P as Pool$1, t as PoolOptions$1, u as CSSModuleScopeStrategy$1, A as ApiConfig$1, v as VitestRunMode$1, D as DepsOptimizationOptions$1, w as TransformModePatterns$1, I as InlineConfig$1, x as TypecheckConfig$1, y as UserConfig$1, z as ResolvedConfig$1, E as ProjectConfig$1, U as UserWorkspaceConfig$1, F as BenchmarkUserOptions$1 } from './chunks/reporters.d.BFLkQcL6.js';
|
|
4
|
+
export { G as BrowserTesterOptions } from './chunks/reporters.d.BFLkQcL6.js';
|
|
5
|
+
import { W as WorkerContext$1 } from './chunks/worker.d.CKwWzBSj.js';
|
|
6
6
|
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.MAmajcmJ.js';
|
|
7
7
|
import { b as Awaitable$1, U as UserConsoleLog, L as LabelColor, 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.cL3nLXbE.js';
|
|
8
8
|
export { A as AfterSuiteRunMeta, g as ModuleCache } from './chunks/environment.d.cL3nLXbE.js';
|
|
9
|
-
import { a as BirpcReturn, b as WorkerRPC$1 } from './chunks/worker.d.
|
|
10
|
-
export { C as ContextRPC, d as ContextTestEnvironment, e as ResolveIdFunction, c as RunnerRPC, R as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.
|
|
11
|
-
import './chunks/vite.d.
|
|
9
|
+
import { a as BirpcReturn, b as WorkerRPC$1 } from './chunks/worker.d.1GmBbd7G.js';
|
|
10
|
+
export { C as ContextRPC, d as ContextTestEnvironment, e as ResolveIdFunction, c as RunnerRPC, R as RuntimeRPC, T as TestExecutionMethod, W as WorkerGlobalState } from './chunks/worker.d.1GmBbd7G.js';
|
|
11
|
+
import './chunks/vite.d.CMLlLIFP.js';
|
|
12
12
|
import { a as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.d.D2ROskhv.js';
|
|
13
13
|
export { b as RuntimeConfig, S as SerializedCoverageConfig } from './chunks/config.d.D2ROskhv.js';
|
|
14
14
|
import { ExpectStatic } from '@vitest/expect';
|
package/dist/node.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { z as ResolvedConfig, y as UserConfig, v as VitestRunMode, H as VitestOptions, V as Vitest, A as ApiConfig, T as TestProject, J as TestSequencer, K as TestSpecification, L as Logger, M as TestModule, N as ModuleDiagnostic } from './chunks/reporters.d.
|
|
2
|
-
export { B as BaseCoverageOptions, F as BenchmarkUserOptions, ag as BrowserBuiltinProvider, ah as BrowserCommand, ai as BrowserCommandContext, q as BrowserConfigOptions, aj as BrowserInstanceOption, ak as BrowserModuleMocker, al as BrowserOrchestrator, am as BrowserProvider, an as BrowserProviderInitializationOptions, ao as BrowserProviderModule, ap as BrowserProviderOptions, p as BrowserScript, aq as BrowserServerState, ar as BrowserServerStateSession, r as BuiltinEnvironment, as as CDPSession, u as CSSModuleScopeStrategy, m as CoverageIstanbulOptions, l as CoverageOptions, h as CoverageProvider, i as CoverageProviderModule, j as CoverageReporter, c as CoverageV8Options, n as CustomProviderOptions, D as DepsOptimizationOptions, a0 as HTMLOptions, I as InlineConfig, a2 as JUnitOptions, a1 as JsonOptions, O as OnServerRestartHandler, Q as OnTestsRerunHandler, at as ParentProjectBrowser, P as Pool, t as PoolOptions, Y as ProcessPool, au as ProjectBrowser, E as ProjectConfig, a as ReportContext, aA as ReportedHookContext, o as Reporter, ax as ResolveSnapshotPathHandler, ay as ResolveSnapshotPathHandlerContext, av as ResolvedBrowserOptions, R as ResolvedCoverageOptions, aw as ResolvedProjectConfig, $ as SerializedTestProject, a3 as TaskOptions, a4 as TestCase, a5 as TestCollection, a6 as TestDiagnostic, a7 as TestModuleState, a8 as TestResult, a9 as TestResultFailed, aa as TestResultPassed, ab as TestResultSkipped, aB as TestRunEndReason, az as TestRunResult, af as TestSequencerConstructor, ac as TestState, ad as TestSuite, ae as TestSuiteState, w as TransformModePatterns, x as TypecheckConfig, U as UserWorkspaceConfig, s as VitestEnvironment, X as VitestPackageInstaller, g as WatcherTriggerPattern, Z as WorkspaceSpec, _ as getFilePoolName } from './chunks/reporters.d.
|
|
1
|
+
import { z as ResolvedConfig, y as UserConfig, v as VitestRunMode, H as VitestOptions, V as Vitest, A as ApiConfig, T as TestProject, J as TestSequencer, K as TestSpecification, L as Logger, M as TestModule, N as ModuleDiagnostic } from './chunks/reporters.d.BFLkQcL6.js';
|
|
2
|
+
export { B as BaseCoverageOptions, F as BenchmarkUserOptions, ag as BrowserBuiltinProvider, ah as BrowserCommand, ai as BrowserCommandContext, q as BrowserConfigOptions, aj as BrowserInstanceOption, ak as BrowserModuleMocker, al as BrowserOrchestrator, am as BrowserProvider, an as BrowserProviderInitializationOptions, ao as BrowserProviderModule, ap as BrowserProviderOptions, p as BrowserScript, aq as BrowserServerState, ar as BrowserServerStateSession, r as BuiltinEnvironment, as as CDPSession, u as CSSModuleScopeStrategy, m as CoverageIstanbulOptions, l as CoverageOptions, h as CoverageProvider, i as CoverageProviderModule, j as CoverageReporter, c as CoverageV8Options, n as CustomProviderOptions, D as DepsOptimizationOptions, a0 as HTMLOptions, I as InlineConfig, a2 as JUnitOptions, a1 as JsonOptions, O as OnServerRestartHandler, Q as OnTestsRerunHandler, at as ParentProjectBrowser, P as Pool, t as PoolOptions, Y as ProcessPool, au as ProjectBrowser, E as ProjectConfig, a as ReportContext, aA as ReportedHookContext, o as Reporter, ax as ResolveSnapshotPathHandler, ay as ResolveSnapshotPathHandlerContext, av as ResolvedBrowserOptions, R as ResolvedCoverageOptions, aw as ResolvedProjectConfig, $ as SerializedTestProject, a3 as TaskOptions, a4 as TestCase, a5 as TestCollection, a6 as TestDiagnostic, a7 as TestModuleState, a8 as TestResult, a9 as TestResultFailed, aa as TestResultPassed, ab as TestResultSkipped, aB as TestRunEndReason, az as TestRunResult, af as TestSequencerConstructor, ac as TestState, ad as TestSuite, ae as TestSuiteState, w as TransformModePatterns, x as TypecheckConfig, U as UserWorkspaceConfig, s as VitestEnvironment, X as VitestPackageInstaller, g as WatcherTriggerPattern, Z as WorkspaceSpec, _ as getFilePoolName } from './chunks/reporters.d.BFLkQcL6.js';
|
|
3
3
|
import * as vite from 'vite';
|
|
4
4
|
import { InlineConfig, UserConfig as UserConfig$1, Plugin, ResolvedConfig as ResolvedConfig$1, LogLevel, LoggerOptions, Logger as Logger$1 } from 'vite';
|
|
5
5
|
export { vite as Vite };
|
|
6
|
-
export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
6
|
+
export { esbuildVersion, isCSSRequest, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
7
7
|
import { IncomingMessage } from 'node:http';
|
|
8
|
-
import { R as RuntimeRPC } from './chunks/worker.d.
|
|
9
|
-
export { T as TestExecutionType } from './chunks/worker.d.
|
|
8
|
+
import { R as RuntimeRPC } from './chunks/worker.d.1GmBbd7G.js';
|
|
9
|
+
export { T as TestExecutionType } from './chunks/worker.d.1GmBbd7G.js';
|
|
10
10
|
import { Writable } from 'node:stream';
|
|
11
|
-
export { V as VitestPluginContext } from './chunks/vite.d.
|
|
12
|
-
export { W as WorkerContext } from './chunks/worker.d.
|
|
11
|
+
export { V as VitestPluginContext } from './chunks/vite.d.CMLlLIFP.js';
|
|
12
|
+
export { W as WorkerContext } from './chunks/worker.d.CKwWzBSj.js';
|
|
13
13
|
export { C as TypeCheckCollectLineNumbers, a as TypeCheckCollectLines, c as TypeCheckContext, T as TypeCheckErrorInfo, R as TypeCheckRawErrorsMap, b as TypeCheckRootAndTarget } from './chunks/global.d.MAmajcmJ.js';
|
|
14
14
|
import { Debugger } from 'debug';
|
|
15
15
|
export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
|
package/dist/node.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
import { resolveConfig as resolveConfig$1, mergeConfig } from 'vite';
|
|
3
|
-
export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
4
|
-
import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.
|
|
5
|
-
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.
|
|
6
|
-
export { p as parseCLI } from './chunks/cac.
|
|
7
|
-
import { r as resolveConfig$2 } from './chunks/coverage.
|
|
8
|
-
export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.
|
|
3
|
+
export { esbuildVersion, isCSSRequest, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
4
|
+
import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.BkDphVBG.js';
|
|
5
|
+
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.BkDphVBG.js';
|
|
6
|
+
export { p as parseCLI } from './chunks/cac.Cb-PYCCB.js';
|
|
7
|
+
import { r as resolveConfig$2 } from './chunks/coverage.DL5VHqXY.js';
|
|
8
|
+
export { b as BaseSequencer, c as createMethodsRPC, g as getFilePoolName, a as resolveApiServerConfig } from './chunks/coverage.DL5VHqXY.js';
|
|
9
9
|
import { slash, deepClone } from '@vitest/utils';
|
|
10
10
|
import { f as findUp } from './chunks/index.X0nbfr6-.js';
|
|
11
11
|
import { resolve } from 'pathe';
|
|
@@ -19,8 +19,8 @@ import 'node:path';
|
|
|
19
19
|
import '@vitest/snapshot/manager';
|
|
20
20
|
import 'vite-node/client';
|
|
21
21
|
import 'vite-node/server';
|
|
22
|
-
import './chunks/index.
|
|
23
|
-
import './chunks/index.
|
|
22
|
+
import './chunks/index.B521nVV-.js';
|
|
23
|
+
import './chunks/index.VByaPkjc.js';
|
|
24
24
|
import 'node:perf_hooks';
|
|
25
25
|
import '@vitest/utils/source-map';
|
|
26
26
|
import 'tinyrainbow';
|
|
@@ -53,7 +53,7 @@ import 'vite-node/utils';
|
|
|
53
53
|
import '@vitest/mocker/node';
|
|
54
54
|
import './chunks/defaults.B7q_naMc.js';
|
|
55
55
|
import 'magic-string';
|
|
56
|
-
import './chunks/index.
|
|
56
|
+
import './chunks/index.BCWujgDG.js';
|
|
57
57
|
import 'node:assert';
|
|
58
58
|
import '@vitest/utils/error';
|
|
59
59
|
import 'node:readline';
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aQ as BaseReporter, aC as BasicReporter, aR as BenchmarkBuiltinReporters, aD as BenchmarkReporter, aE as BenchmarkReportsMap, aS as BuiltinReporterOptions, aT as BuiltinReporters, aF as DefaultReporter, aG as DotReporter, aH as GithubActionsReporter, aI as HangingProcessReporter, aK as JUnitReporter, aU as JsonAssertionResult, aJ as JsonReporter, aV as JsonTestResult, aW as JsonTestResults, aA as ReportedHookContext, o as Reporter, aL as ReportersMap, aM as TapFlatReporter, aN as TapReporter, aB as TestRunEndReason, aO as VerboseBenchmarkReporter, aP as VerboseReporter } from './chunks/reporters.d.
|
|
1
|
+
export { aQ as BaseReporter, aC as BasicReporter, aR as BenchmarkBuiltinReporters, aD as BenchmarkReporter, aE as BenchmarkReportsMap, aS as BuiltinReporterOptions, aT as BuiltinReporters, aF as DefaultReporter, aG as DotReporter, aH as GithubActionsReporter, aI as HangingProcessReporter, aK as JUnitReporter, aU as JsonAssertionResult, aJ as JsonReporter, aV as JsonTestResult, aW as JsonTestResults, aA as ReportedHookContext, o as Reporter, aL as ReportersMap, aM as TapFlatReporter, aN as TapReporter, aB as TestRunEndReason, aO as VerboseBenchmarkReporter, aP as VerboseReporter } from './chunks/reporters.d.BFLkQcL6.js';
|
|
2
2
|
import '@vitest/runner';
|
|
3
3
|
import './chunks/environment.d.cL3nLXbE.js';
|
|
4
4
|
import 'vitest/optional-types.js';
|
|
@@ -8,7 +8,7 @@ import 'vite';
|
|
|
8
8
|
import 'node:console';
|
|
9
9
|
import '@vitest/mocker';
|
|
10
10
|
import '@vitest/utils/source-map';
|
|
11
|
-
import './chunks/worker.d.
|
|
11
|
+
import './chunks/worker.d.1GmBbd7G.js';
|
|
12
12
|
import 'vite-node';
|
|
13
13
|
import './chunks/config.d.D2ROskhv.js';
|
|
14
14
|
import '@vitest/pretty-format';
|
package/dist/reporters.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { B as BasicReporter, D as DefaultReporter, a as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, b as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, c as TapReporter, V as VerboseReporter } from './chunks/index.
|
|
2
|
-
export { B as BenchmarkReporter, a as BenchmarkReportsMap, V as VerboseBenchmarkReporter } from './chunks/index.
|
|
1
|
+
export { B as BasicReporter, D as DefaultReporter, a as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, b as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, c as TapReporter, V as VerboseReporter } from './chunks/index.VByaPkjc.js';
|
|
2
|
+
export { B as BenchmarkReporter, a as BenchmarkReportsMap, V as VerboseBenchmarkReporter } from './chunks/index.BCWujgDG.js';
|
|
3
3
|
import 'node:perf_hooks';
|
|
4
4
|
import '@vitest/runner/utils';
|
|
5
5
|
import '@vitest/utils';
|
package/dist/runners.js
CHANGED
|
@@ -6,7 +6,7 @@ import { setState, GLOBAL_EXPECT, getState } from '@vitest/expect';
|
|
|
6
6
|
import { getTests, getNames, getTestName } from '@vitest/runner/utils';
|
|
7
7
|
import { normalize } from 'pathe';
|
|
8
8
|
import { g as getSnapshotClient, i as inject, c as createExpect, v as vi } from './chunks/vi.bdSIJ99Y.js';
|
|
9
|
-
import { r as rpc } from './chunks/rpc.
|
|
9
|
+
import { r as rpc } from './chunks/rpc.-pEldfrD.js';
|
|
10
10
|
import 'chai';
|
|
11
11
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
12
12
|
import '@vitest/snapshot';
|
|
@@ -14,7 +14,7 @@ import '@vitest/utils/error';
|
|
|
14
14
|
import '@vitest/spy';
|
|
15
15
|
import '@vitest/utils/source-map';
|
|
16
16
|
import './chunks/date.Bq6ZW5rf.js';
|
|
17
|
-
import './chunks/index.
|
|
17
|
+
import './chunks/index.B521nVV-.js';
|
|
18
18
|
|
|
19
19
|
function createBenchmarkResult(name) {
|
|
20
20
|
return {
|
package/dist/worker.js
CHANGED
|
@@ -6,13 +6,13 @@ import { readFileSync } from 'node:fs';
|
|
|
6
6
|
import { resolve, normalize } from 'pathe';
|
|
7
7
|
import { e as environments } from './chunks/index.CmSc2RE5.js';
|
|
8
8
|
import { s as setupInspect } from './chunks/inspector.C914Efll.js';
|
|
9
|
-
import { c as createRuntimeRpc, a as rpcDone } from './chunks/rpc.
|
|
9
|
+
import { c as createRuntimeRpc, a as rpcDone } from './chunks/rpc.-pEldfrD.js';
|
|
10
10
|
import { i as isChildProcess, s as setProcessTitle } from './chunks/utils.XdZDrNZV.js';
|
|
11
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';
|
|
15
|
-
import './chunks/index.
|
|
15
|
+
import './chunks/index.B521nVV-.js';
|
|
16
16
|
|
|
17
17
|
function isBuiltinEnvironment(env) {
|
|
18
18
|
return env in environments;
|
package/dist/workers/forks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
2
|
+
import { r as runBaseTests } from '../chunks/base.DfmxU-tU.js';
|
|
3
3
|
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.CAioKnHs.js';
|
|
4
4
|
import 'vite-node/client';
|
|
5
5
|
import '../chunks/execute.B7h3T_Hc.js';
|
|
@@ -6,7 +6,7 @@ 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.
|
|
9
|
+
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.CwejwG0H.js';
|
|
10
10
|
import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/setup-common.Dd054P77.js';
|
|
11
11
|
import { V as VitestIndex } from '../chunks/index.CdQS2e2Q.js';
|
|
12
12
|
import { c as closeInspector } from '../chunks/inspector.C914Efll.js';
|
|
@@ -15,9 +15,9 @@ 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.-pEldfrD.js';
|
|
19
19
|
import '@vitest/utils';
|
|
20
|
-
import '../chunks/index.
|
|
20
|
+
import '../chunks/index.B521nVV-.js';
|
|
21
21
|
import '../chunks/coverage.DVF1vEu8.js';
|
|
22
22
|
import '@vitest/snapshot';
|
|
23
23
|
import '../chunks/vi.bdSIJ99Y.js';
|
package/dist/workers/threads.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
1
|
+
import { r as runBaseTests } from '../chunks/base.DfmxU-tU.js';
|
|
2
2
|
import { a as createThreadsRpcOptions } from '../chunks/utils.CAioKnHs.js';
|
|
3
3
|
import 'vite-node/client';
|
|
4
4
|
import '../chunks/execute.B7h3T_Hc.js';
|
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.1GmBbd7G.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.CKwWzBSj.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,6 +1,6 @@
|
|
|
1
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.
|
|
3
|
+
export { r as runBaseTests } from './chunks/base.DfmxU-tU.js';
|
|
4
4
|
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './chunks/utils.CAioKnHs.js';
|
|
5
5
|
export { r as runVmTests } from './chunks/vm.BThCzidc.js';
|
|
6
6
|
import '@vitest/utils';
|
|
@@ -14,8 +14,8 @@ import './chunks/index.CmSc2RE5.js';
|
|
|
14
14
|
import 'node:console';
|
|
15
15
|
import './chunks/inspector.C914Efll.js';
|
|
16
16
|
import 'node:module';
|
|
17
|
-
import './chunks/rpc.
|
|
18
|
-
import './chunks/index.
|
|
17
|
+
import './chunks/rpc.-pEldfrD.js';
|
|
18
|
+
import './chunks/index.B521nVV-.js';
|
|
19
19
|
import './chunks/execute.B7h3T_Hc.js';
|
|
20
20
|
import 'node:vm';
|
|
21
21
|
import '@vitest/utils/error';
|
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.4",
|
|
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.4",
|
|
123
|
+
"@vitest/ui": "3.2.4"
|
|
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.1.
|
|
160
|
+
"tinypool": "^1.1.1",
|
|
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
|
-
"@vitest/
|
|
170
|
-
"
|
|
171
|
-
"
|
|
164
|
+
"@vitest/expect": "3.2.4",
|
|
165
|
+
"@vitest/mocker": "3.2.4",
|
|
166
|
+
"@vitest/snapshot": "3.2.4",
|
|
167
|
+
"@vitest/runner": "3.2.4",
|
|
168
|
+
"@vitest/pretty-format": "^3.2.4",
|
|
169
|
+
"@vitest/spy": "3.2.4",
|
|
170
|
+
"vite-node": "3.2.4",
|
|
171
|
+
"@vitest/utils": "3.2.4"
|
|
172
172
|
},
|
|
173
173
|
"devDependencies": {
|
|
174
174
|
"@ampproject/remapping": "^2.3.0",
|
|
@@ -176,22 +176,22 @@
|
|
|
176
176
|
"@edge-runtime/vm": "^5.0.0",
|
|
177
177
|
"@sinonjs/fake-timers": "14.0.0",
|
|
178
178
|
"@types/debug": "^4.1.12",
|
|
179
|
-
"@types/estree": "^1.0.
|
|
179
|
+
"@types/estree": "^1.0.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
183
|
"@types/mime": "^4.0.0",
|
|
184
|
-
"@types/node": "^22.15.
|
|
184
|
+
"@types/node": "^22.15.32",
|
|
185
185
|
"@types/picomatch": "^4.0.0",
|
|
186
186
|
"@types/prompts": "^2.4.9",
|
|
187
187
|
"@types/sinonjs__fake-timers": "^8.1.5",
|
|
188
188
|
"acorn-walk": "^8.3.4",
|
|
189
|
-
"birpc": "2.
|
|
189
|
+
"birpc": "2.4.0",
|
|
190
190
|
"cac": "^6.7.14",
|
|
191
191
|
"chai-subset": "^1.6.0",
|
|
192
192
|
"find-up": "^6.3.0",
|
|
193
193
|
"flatted": "^3.3.3",
|
|
194
|
-
"happy-dom": "^17.
|
|
194
|
+
"happy-dom": "^17.6.3",
|
|
195
195
|
"jsdom": "^26.1.0",
|
|
196
196
|
"local-pkg": "^1.1.1",
|
|
197
197
|
"mime": "^4.0.7",
|