vitest 4.0.15 → 4.0.17
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 +3 -2
- package/dist/browser.js +2 -1
- package/dist/chunks/{base.CTp-EStD.js → base.XJJQZiKB.js} +4 -3
- package/dist/chunks/{browser.d.DBzUq_Na.d.ts → browser.d.ChKACdzH.d.ts} +3 -1
- package/dist/chunks/{cac.BNNpZQl7.js → cac.jRCLJDDc.js} +6 -6
- package/dist/chunks/{cli-api.C7sYjHmQ.js → cli-api.Cx2DW4Bc.js} +176 -89
- package/dist/chunks/{config.d.CzIjkicf.d.ts → config.d.Cy95HiCx.d.ts} +5 -0
- package/dist/chunks/{coverage.CtyeYmKM.js → coverage.AVPTjMgw.js} +6 -1
- package/dist/chunks/{index.bFLgAE-Z.js → index.6Qv1eEA6.js} +2 -2
- package/dist/chunks/{index.Drsj_6e7.js → index.C5r1PdPD.js} +1 -1
- package/dist/chunks/index.Chj8NDwU.js +206 -0
- package/dist/chunks/{index.BspFP3mn.js → index.CyBMJtT7.js} +1 -1
- package/dist/chunks/{index.456_DGfR.js → index.M8mOzt4Y.js} +26 -2
- package/dist/chunks/{init-forks.CKEYp90N.js → init-forks.BC6ZwHQN.js} +1 -1
- package/dist/chunks/{init-threads.D8Ok07M7.js → init-threads.CxSxLC0N.js} +1 -1
- package/dist/chunks/{init.B04saIIg.js → init.C9kljSTm.js} +5 -7
- package/dist/chunks/{modules.DJPjQW6m.js → modules.BJuCwlRJ.js} +4 -3
- package/dist/chunks/{plugin.d.CY7CUjf-.d.ts → plugin.d.CtqpEehP.d.ts} +1 -1
- package/dist/chunks/{reporters.d.OXEK7y4s.d.ts → reporters.d.CWXNI2jG.d.ts} +6 -5
- package/dist/chunks/{rpc.BytlcPfC.js → rpc.BoxB0q7B.js} +1 -1
- package/dist/chunks/{startModuleRunner.Iz2V0ESw.js → startModuleRunner.DEj0jb3e.js} +2 -2
- package/dist/chunks/{test.BT8LKgU9.js → test.B8ej_ZHS.js} +1 -1
- package/dist/chunks/{traces.U4xDYhzZ.js → traces.CCmnQaNT.js} +46 -1
- package/dist/chunks/{vm.BwmD1Rql.js → vm.CMjifoPa.js} +2 -2
- package/dist/chunks/worker.d.Dyxm8DEL.d.ts +255 -0
- package/dist/cli.js +2 -2
- package/dist/config.d.ts +6 -6
- package/dist/coverage.d.ts +5 -5
- package/dist/coverage.js +1 -1
- package/dist/environments.js +1 -1
- package/dist/index.d.ts +7 -7
- package/dist/module-evaluator.js +3 -11
- package/dist/module-runner.js +3 -3
- package/dist/node.d.ts +20 -11
- package/dist/node.js +11 -11
- package/dist/reporters.d.ts +4 -4
- package/dist/reporters.js +2 -2
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +3 -3
- package/dist/worker.d.ts +5 -3
- package/dist/worker.js +10 -10
- package/dist/workers/forks.js +11 -11
- package/dist/workers/runVmTests.js +4 -4
- package/dist/workers/threads.js +11 -11
- package/dist/workers/vmForks.js +9 -9
- package/dist/workers/vmThreads.js +9 -9
- package/package.json +13 -13
- package/dist/chunks/index.0kCJoeWi.js +0 -220
- package/dist/chunks/worker.d.B4A26qg6.d.ts +0 -238
package/dist/browser.d.ts
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import { a as SerializedCoverageConfig, S as SerializedConfig } from './chunks/config.d.
|
|
1
|
+
import { a as SerializedCoverageConfig, S as SerializedConfig } from './chunks/config.d.Cy95HiCx.js';
|
|
2
2
|
import { R as RuntimeCoverageModuleLoader } from './chunks/coverage.d.BZtK59WP.js';
|
|
3
3
|
import { SerializedDiffOptions } from '@vitest/utils/diff';
|
|
4
|
+
export { O as OTELCarrier, T as Traces } from './chunks/traces.d.402V_yFI.js';
|
|
4
5
|
export { collectTests, startTests } from '@vitest/runner';
|
|
5
6
|
import * as _vitest_spy from '@vitest/spy';
|
|
6
7
|
export { _vitest_spy as SpyModule };
|
|
7
8
|
export { LoupeOptions, ParsedStack, StringifyOptions } from '@vitest/utils';
|
|
8
|
-
export { format, inspect, stringify } from '@vitest/utils/display';
|
|
9
|
+
export { browserFormat, format, inspect, stringify } from '@vitest/utils/display';
|
|
9
10
|
export { processError } from '@vitest/utils/error';
|
|
10
11
|
export { getType } from '@vitest/utils/helpers';
|
|
11
12
|
export { DecodedMap, getOriginalPosition } from '@vitest/utils/source-map';
|
package/dist/browser.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { l as loadDiffConfig, b as loadSnapshotSerializers, c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/setup-common.Cm-kSBVi.js';
|
|
2
|
+
export { T as Traces } from './chunks/traces.CCmnQaNT.js';
|
|
2
3
|
export { collectTests, startTests } from '@vitest/runner';
|
|
3
4
|
import * as spyModule from '@vitest/spy';
|
|
4
5
|
export { spyModule as SpyModule };
|
|
5
|
-
export { format, inspect, stringify } from '@vitest/utils/display';
|
|
6
|
+
export { browserFormat, format, inspect, stringify } from '@vitest/utils/display';
|
|
6
7
|
export { processError } from '@vitest/utils/error';
|
|
7
8
|
export { getType } from '@vitest/utils/helpers';
|
|
8
9
|
export { DecodedMap, getOriginalPosition } from '@vitest/utils/source-map';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { runInThisContext } from 'node:vm';
|
|
2
2
|
import * as spyModule from '@vitest/spy';
|
|
3
|
-
import { r as resolveTestRunner, a as resolveSnapshotEnvironment, s as setupChaiConfig } from './index.
|
|
4
|
-
import { l as loadEnvironment } from './init.
|
|
3
|
+
import { r as resolveTestRunner, a as resolveSnapshotEnvironment, s as setupChaiConfig } from './index.6Qv1eEA6.js';
|
|
4
|
+
import { l as loadEnvironment } from './init.C9kljSTm.js';
|
|
5
5
|
import { V as VitestEvaluatedModules } from './evaluatedModules.Dg1zASAC.js';
|
|
6
|
-
import { s as startVitestModuleRunner, c as createNodeImportMeta } from './startModuleRunner.
|
|
6
|
+
import { s as startVitestModuleRunner, c as createNodeImportMeta } from './startModuleRunner.DEj0jb3e.js';
|
|
7
7
|
import { performance as performance$1 } from 'node:perf_hooks';
|
|
8
8
|
import { startTests, collectTests } from '@vitest/runner';
|
|
9
9
|
import { c as setupCommonEnv, s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './setup-common.Cm-kSBVi.js';
|
|
@@ -104,6 +104,7 @@ function startModuleRunner(options) {
|
|
|
104
104
|
}
|
|
105
105
|
let _currentEnvironment;
|
|
106
106
|
let _environmentTime;
|
|
107
|
+
/** @experimental */
|
|
107
108
|
async function setupEnvironment(context) {
|
|
108
109
|
const startTime = performance.now();
|
|
109
110
|
const { environment: { name: environmentName, options: environmentOptions }, rpc, config } = context;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FileSpecification } from '@vitest/runner';
|
|
2
|
-
import {
|
|
2
|
+
import { O as OTELCarrier } from './traces.d.402V_yFI.js';
|
|
3
|
+
import { T as TestExecutionMethod } from './worker.d.Dyxm8DEL.js';
|
|
3
4
|
|
|
4
5
|
type SerializedTestSpecification = [project: {
|
|
5
6
|
name: string | undefined;
|
|
@@ -52,6 +53,7 @@ interface BrowserTesterOptions {
|
|
|
52
53
|
method: TestExecutionMethod;
|
|
53
54
|
files: FileSpecification[];
|
|
54
55
|
providedContext: string;
|
|
56
|
+
otelCarrier?: OTELCarrier;
|
|
55
57
|
}
|
|
56
58
|
|
|
57
59
|
export type { BrowserTesterOptions as B, ModuleDefinitionDurationsDiagnostic as M, SerializedTestSpecification as S, UntrackedModuleDefinitionDiagnostic as U, ModuleDefinitionDiagnostic as a, ModuleDefinitionLocation as b, SourceModuleDiagnostic as c, SourceModuleLocations as d };
|
|
@@ -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.D_Q9UYh-.js';
|
|
6
|
-
import { R as ReportersMap } from './index.
|
|
6
|
+
import { R as ReportersMap } from './index.M8mOzt4Y.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 = "4.0.
|
|
622
|
+
var version = "4.0.17";
|
|
623
623
|
|
|
624
624
|
const apiConfig = (port) => ({
|
|
625
625
|
port: {
|
|
@@ -1356,11 +1356,11 @@ function normalizeCliOptions(cliFilters, argv) {
|
|
|
1356
1356
|
}
|
|
1357
1357
|
async function start(mode, cliFilters, options) {
|
|
1358
1358
|
try {
|
|
1359
|
-
const { startVitest } = await import('./cli-api.
|
|
1359
|
+
const { startVitest } = await import('./cli-api.Cx2DW4Bc.js').then(function (n) { return n.q; });
|
|
1360
1360
|
const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
|
|
1361
1361
|
if (!ctx.shouldKeepServer()) await ctx.exit();
|
|
1362
1362
|
} catch (e) {
|
|
1363
|
-
const { errorBanner } = await import('./index.
|
|
1363
|
+
const { errorBanner } = await import('./index.M8mOzt4Y.js').then(function (n) { return n.A; });
|
|
1364
1364
|
console.error(`\n${errorBanner("Startup Error")}`);
|
|
1365
1365
|
console.error(e);
|
|
1366
1366
|
console.error("\n\n");
|
|
@@ -1378,7 +1378,7 @@ async function init(project) {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
async function collect(mode, cliFilters, options) {
|
|
1380
1380
|
try {
|
|
1381
|
-
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.
|
|
1381
|
+
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.Cx2DW4Bc.js').then(function (n) { return n.q; });
|
|
1382
1382
|
const ctx = await prepareVitest(mode, {
|
|
1383
1383
|
...normalizeCliOptions(cliFilters, options),
|
|
1384
1384
|
watch: false,
|
|
@@ -1397,7 +1397,7 @@ async function collect(mode, cliFilters, options) {
|
|
|
1397
1397
|
} else outputFileList(await ctx.getRelevantTestSpecifications(cliFilters.map(normalize)), options);
|
|
1398
1398
|
await ctx.close();
|
|
1399
1399
|
} catch (e) {
|
|
1400
|
-
const { errorBanner } = await import('./index.
|
|
1400
|
+
const { errorBanner } = await import('./index.M8mOzt4Y.js').then(function (n) { return n.A; });
|
|
1401
1401
|
console.error(`\n${errorBanner("Collect Error")}`);
|
|
1402
1402
|
console.error(e);
|
|
1403
1403
|
console.error("\n\n");
|