vitest 4.1.5 → 5.0.0-beta.2
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 +7 -0
- package/dist/browser.d.ts +9 -9
- package/dist/browser.js +4 -4
- package/dist/chunks/{base.RR7zL1h0.js → base.Opc_YHkk.js} +10 -11
- package/dist/chunks/browser.d.BUhkKcDl.d.ts +899 -0
- package/dist/chunks/{cac.DJJmV0dT.js → cac.8N4bOkkB.js} +23 -11
- package/dist/chunks/{cli-api.Cjt90eJu.js → cli-api.B0RFke2g.js} +5799 -353
- package/dist/chunks/{config.d.A1h_Y6Jt.d.ts → config.d.D91DHYaD.d.ts} +11 -3
- package/dist/chunks/{console.3WNpx0tS.js → console.B3IRP8fX.js} +3 -1
- package/dist/chunks/{constants.CPYnjOGj.js → constants.-juJ8b_4.js} +1 -1
- package/dist/chunks/{coverage.d.BZtK59WP.d.ts → coverage.d.g2xbl2sP.d.ts} +4 -0
- package/dist/chunks/{creator.DgVhQm5q.js → creator.BqL2U_x4.js} +1 -1
- package/dist/chunks/{defaults.9aQKnqFk.js → defaults.szbHWQun.js} +4 -2
- package/dist/chunks/environment.d-DOJxxZV9.d.DOJxxZV9.d.ts +17 -0
- package/dist/chunks/general.d.DFAHgpC2.d.ts +247 -0
- package/dist/chunks/{global.d.DVsSRdQ5.d.ts → global.d.DhbKSQoV.d.ts} +4 -5
- package/dist/chunks/{globals.Dj1TGiMC.js → globals.EHmmu0nC.js} +15 -14
- package/dist/chunks/{index.DXx9Dtk7.js → index.CViWo__T.js} +5 -5
- package/dist/chunks/{startVitestModuleRunner.bRl2_oI_.js → index.CbgUM9E5.js} +731 -5
- package/dist/chunks/{test.DNmyFkvJ.js → index.D_7-4CaB.js} +2659 -14
- package/dist/chunks/{init-forks.UV3ZQGQH.js → init-forks.DMge3WTt.js} +1 -1
- package/dist/chunks/{init-threads.D3eCsY76.js → init-threads.eIoyCTon.js} +1 -1
- package/dist/chunks/{init.D98-gwRW.js → init.BVd7SaCA.js} +3 -5
- package/dist/chunks/{nativeModuleMocker.BRN2oBJd.js → nativeModuleMocker.DKpFw0pk.js} +3 -2
- package/dist/chunks/{index.BCY_7LL2.js → nativeModuleRunner.BOeMnHl4.js} +43 -12
- package/dist/chunks/node.CwFbQqI1.js +47 -0
- package/dist/chunks/{reporters.d.CEnv6XRv.d.ts → plugin.d.cIKZEZ16.d.ts} +306 -19
- package/dist/chunks/plugins.DrsmdUE2.js +37 -0
- package/dist/chunks/{rpc.MzXet3jl.js → rpc.DFRWVnRh.js} +16 -1
- package/dist/chunks/{rpc.d.B_8sPU0w.d.ts → rpc.d.7JZuxZ8u.d.ts} +19 -3
- package/dist/chunks/{setup-common.DYx3LtFI.js → setup-common.Hpq30zVk.js} +7 -3
- package/dist/chunks/{utils.BS4fH3nR.js → utils.DKODp04v.js} +3 -4
- package/dist/chunks/{vm.DVLYObm9.js → vm.2okbRRME.js} +6 -6
- package/dist/chunks/{worker.d.ZpHpO4yb.d.ts → worker.d.Bu1kXGw4.d.ts} +3 -3
- package/dist/cli.js +2 -2
- package/dist/config.cjs +4 -2
- package/dist/config.d.ts +21 -18
- package/dist/config.js +2 -2
- package/dist/index.d.ts +84 -22
- package/dist/index.js +15 -13
- package/dist/module-evaluator.d.ts +5 -3
- package/dist/module-evaluator.js +1 -1
- package/dist/node.d.ts +114 -19
- package/dist/node.js +21 -26
- package/dist/runtime.d.ts +40 -4
- package/dist/runtime.js +5 -6
- package/dist/{chunks/traces.DT5aQ62U.js → traces.js} +1 -1
- package/dist/worker.d.ts +5 -5
- package/dist/worker.js +21 -23
- package/dist/workers/forks.js +21 -23
- package/dist/workers/runVmTests.js +17 -16
- package/dist/workers/threads.js +21 -23
- package/dist/workers/vmForks.js +7 -9
- package/dist/workers/vmThreads.js +7 -9
- package/package.json +21 -38
- package/dist/chunks/benchmark.CX_oY03V.js +0 -40
- package/dist/chunks/benchmark.d.DAaHLpsq.d.ts +0 -24
- package/dist/chunks/browser.d.BcoexmFG.d.ts +0 -62
- package/dist/chunks/coverage.DM_a_rWm.js +0 -1087
- package/dist/chunks/evaluatedModules.Dg1zASAC.js +0 -17
- package/dist/chunks/index.DC7d2Pf8.js +0 -729
- package/dist/chunks/index.DdgEv5B1.js +0 -42
- package/dist/chunks/index.UpGiHP7g.js +0 -4255
- package/dist/chunks/nativeModuleRunner.BIakptoF.js +0 -36
- package/dist/chunks/node.COQbm6gK.js +0 -14
- package/dist/chunks/plugin.d.BM2TCi12.d.ts +0 -38
- package/dist/chunks/suite.d.udJtyAgw.d.ts +0 -10
- package/dist/chunks/traces.d.D2T_R8rx.d.ts +0 -60
- package/dist/coverage.d.ts +0 -123
- package/dist/coverage.js +0 -27
- package/dist/environments.d.ts +0 -22
- package/dist/environments.js +0 -5
- package/dist/reporters.d.ts +0 -27
- package/dist/reporters.js +0 -26
- package/dist/runners.d.ts +0 -70
- package/dist/runners.js +0 -19
- package/dist/snapshot.d.ts +0 -9
- package/dist/snapshot.js +0 -6
- package/dist/suite.d.ts +0 -5
- package/dist/suite.js +0 -8
package/LICENSE.md
CHANGED
|
@@ -500,6 +500,13 @@ Repository: unjs/mlly
|
|
|
500
500
|
|
|
501
501
|
---------------------------------------
|
|
502
502
|
|
|
503
|
+
## natural-compare
|
|
504
|
+
License: MIT
|
|
505
|
+
By: Lauri Rooden
|
|
506
|
+
Repository: git://github.com/litejs/natural-compare-lite.git
|
|
507
|
+
|
|
508
|
+
---------------------------------------
|
|
509
|
+
|
|
503
510
|
## package-manager-detector
|
|
504
511
|
License: MIT
|
|
505
512
|
By: Anthony Fu
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { R as RuntimeCoverageModuleLoader } from './chunks/coverage.d.
|
|
1
|
+
import { c as SerializedCoverageConfig, a as SerializedConfig } from './chunks/config.d.D91DHYaD.js';
|
|
2
|
+
import { R as RuntimeCoverageModuleLoader } from './chunks/coverage.d.g2xbl2sP.js';
|
|
3
3
|
import { SerializedDiffOptions } from '@vitest/utils/diff';
|
|
4
|
-
export { O as OTELCarrier, T as Traces } from './chunks/traces.d.D2T_R8rx.js';
|
|
5
4
|
export { collectTests, startTests } from '@vitest/runner';
|
|
6
5
|
import * as _vitest_spy from '@vitest/spy';
|
|
7
6
|
export { _vitest_spy as SpyModule };
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
7
|
+
export { ParsedStack, StringifyOptions } from '@vitest/utils';
|
|
8
|
+
export { format, inspect, stringify } from '@vitest/utils/display';
|
|
10
9
|
export { processError } from '@vitest/utils/error';
|
|
11
10
|
export { getType } from '@vitest/utils/helpers';
|
|
12
11
|
export { DecodedMap, getOriginalPosition } from '@vitest/utils/source-map';
|
|
13
12
|
export { getSafeTimers, setSafeTimers } from '@vitest/utils/timers';
|
|
14
13
|
import '@vitest/pretty-format';
|
|
15
|
-
import '
|
|
14
|
+
import './chunks/general.d.DFAHgpC2.js';
|
|
15
|
+
import './chunks/environment.d-DOJxxZV9.d.DOJxxZV9.js';
|
|
16
16
|
|
|
17
|
-
declare function startCoverageInsideWorker(options: SerializedCoverageConfig
|
|
17
|
+
declare function startCoverageInsideWorker(options: SerializedCoverageConfig, loader: RuntimeCoverageModuleLoader, runtimeOptions: {
|
|
18
18
|
isolate: boolean;
|
|
19
19
|
}): Promise<unknown>;
|
|
20
|
-
declare function takeCoverageInsideWorker(options: SerializedCoverageConfig
|
|
21
|
-
declare function stopCoverageInsideWorker(options: SerializedCoverageConfig
|
|
20
|
+
declare function takeCoverageInsideWorker(options: SerializedCoverageConfig, loader: RuntimeCoverageModuleLoader): Promise<unknown>;
|
|
21
|
+
declare function stopCoverageInsideWorker(options: SerializedCoverageConfig, loader: RuntimeCoverageModuleLoader, runtimeOptions: {
|
|
22
22
|
isolate: boolean;
|
|
23
23
|
}): Promise<unknown>;
|
|
24
24
|
|
package/dist/browser.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv, b as startCoverageInsideWorker, c as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/setup-common.
|
|
2
|
-
export { T as Traces } from './chunks/traces.DT5aQ62U.js';
|
|
1
|
+
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv, b as startCoverageInsideWorker, c as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/setup-common.Hpq30zVk.js';
|
|
3
2
|
export { collectTests, startTests } from '@vitest/runner';
|
|
4
3
|
import * as spyModule from '@vitest/spy';
|
|
5
4
|
export { spyModule as SpyModule };
|
|
6
|
-
export {
|
|
5
|
+
export { format, inspect, stringify } from '@vitest/utils/display';
|
|
7
6
|
export { processError } from '@vitest/utils/error';
|
|
8
7
|
export { getType } from '@vitest/utils/helpers';
|
|
9
8
|
export { DecodedMap, getOriginalPosition } from '@vitest/utils/source-map';
|
|
10
9
|
export { getSafeTimers, setSafeTimers } from '@vitest/utils/timers';
|
|
11
10
|
import './chunks/coverage.CTzCuANN.js';
|
|
12
|
-
import '@vitest/snapshot';
|
|
13
11
|
import './chunks/utils.BX5Fg8C4.js';
|
|
12
|
+
import './chunks/plugins.DrsmdUE2.js';
|
|
13
|
+
import '@vitest/pretty-format';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* @internal
|
|
@@ -1,22 +1,21 @@
|
|
|
1
1
|
import { runInThisContext } from 'node:vm';
|
|
2
2
|
import * as spyModule from '@vitest/spy';
|
|
3
|
-
import { r as resolveTestRunner, a as resolveSnapshotEnvironment, d as detectAsyncLeaks, s as setupChaiConfig } from './index.
|
|
4
|
-
import { l as loadEnvironment, e as emitModuleRunner, a as listenForErrors } from './init.
|
|
5
|
-
import { N as NativeModuleRunner } from './nativeModuleRunner.
|
|
6
|
-
import {
|
|
7
|
-
import { V as VitestEvaluatedModules } from './
|
|
8
|
-
import { s as startVitestModuleRunner, c as createNodeImportMeta } from './
|
|
3
|
+
import { r as resolveTestRunner, a as resolveSnapshotEnvironment, d as detectAsyncLeaks, s as setupChaiConfig } from './index.CViWo__T.js';
|
|
4
|
+
import { l as loadEnvironment, e as emitModuleRunner, a as listenForErrors } from './init.BVd7SaCA.js';
|
|
5
|
+
import { N as NativeModuleRunner } from './nativeModuleRunner.BOeMnHl4.js';
|
|
6
|
+
import { Traces } from '../traces.js';
|
|
7
|
+
import { V as VitestEvaluatedModules } from './rpc.DFRWVnRh.js';
|
|
8
|
+
import { s as startVitestModuleRunner, c as createNodeImportMeta } from './index.CbgUM9E5.js';
|
|
9
9
|
import { performance as performance$1 } from 'node:perf_hooks';
|
|
10
10
|
import { startTests, collectTests } from '@vitest/runner';
|
|
11
|
-
import { s as setupCommonEnv, b as startCoverageInsideWorker, c as stopCoverageInsideWorker } from './setup-common.
|
|
12
|
-
import { g as globalExpect, v as vi } from './
|
|
11
|
+
import { s as setupCommonEnv, b as startCoverageInsideWorker, c as stopCoverageInsideWorker } from './setup-common.Hpq30zVk.js';
|
|
12
|
+
import { i as index, g as globalExpect, v as vi } from './index.D_7-4CaB.js';
|
|
13
13
|
import { c as closeInspector } from './inspector.CvyFGlXm.js';
|
|
14
14
|
import { createRequire } from 'node:module';
|
|
15
15
|
import timers from 'node:timers';
|
|
16
16
|
import timersPromises from 'node:timers/promises';
|
|
17
17
|
import util from 'node:util';
|
|
18
18
|
import { KNOWN_ASSET_TYPES } from '@vitest/utils/constants';
|
|
19
|
-
import { i as index } from './index.DdgEv5B1.js';
|
|
20
19
|
import { g as getWorkerState, r as resetModules, p as provideWorkerState, a as getSafeWorkerState } from './utils.BX5Fg8C4.js';
|
|
21
20
|
|
|
22
21
|
// this should only be used in Node
|
|
@@ -58,7 +57,7 @@ function resolveAsset(mod, url) {
|
|
|
58
57
|
mod.exports = url;
|
|
59
58
|
}
|
|
60
59
|
async function setupConsoleLogSpy() {
|
|
61
|
-
const { createCustomConsole } = await import('./console.
|
|
60
|
+
const { createCustomConsole } = await import('./console.B3IRP8fX.js');
|
|
62
61
|
globalThis.console = createCustomConsole();
|
|
63
62
|
}
|
|
64
63
|
|
|
@@ -115,7 +114,7 @@ async function startModuleRunner(options) {
|
|
|
115
114
|
let mocker;
|
|
116
115
|
if (options.state.config.experimental.nodeLoader !== false) {
|
|
117
116
|
// this additionally imports acorn/magic-string
|
|
118
|
-
const { NativeModuleMocker } = await import('./nativeModuleMocker.
|
|
117
|
+
const { NativeModuleMocker } = await import('./nativeModuleMocker.DKpFw0pk.js');
|
|
119
118
|
mocker = new NativeModuleMocker({
|
|
120
119
|
async resolveId(id, importer) {
|
|
121
120
|
// TODO: use import.meta.resolve instead
|