vitest 5.0.0-beta.1 → 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 +7 -7
- package/dist/browser.js +3 -3
- package/dist/chunks/{base.CgusHodA.js → base.Opc_YHkk.js} +10 -11
- package/dist/chunks/browser.d.BUhkKcDl.d.ts +899 -0
- package/dist/chunks/{cac.DSVGM2li.js → cac.8N4bOkkB.js} +11 -10
- package/dist/chunks/{cli-api.MLtHkHGf.js → cli-api.B0RFke2g.js} +5752 -354
- package/dist/chunks/{config.d.BgVe1oN5.d.ts → config.d.D91DHYaD.d.ts} +5 -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.pr789SUS.js → defaults.szbHWQun.js} +3 -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.BYX6Co2c.js → globals.EHmmu0nC.js} +15 -14
- package/dist/chunks/{index.BSgubW8K.js → index.CViWo__T.js} +5 -5
- package/dist/chunks/{startVitestModuleRunner.vRT958-n.js → index.CbgUM9E5.js} +729 -3
- package/dist/chunks/{test.C8WyxAQk.js → index.D_7-4CaB.js} +2658 -14
- package/dist/chunks/{init-forks.DuteEWBS.js → init-forks.DMge3WTt.js} +1 -1
- package/dist/chunks/{init-threads.BSdvBCTO.js → init-threads.eIoyCTon.js} +1 -1
- package/dist/chunks/{init.Dc7N0jh0.js → init.BVd7SaCA.js} +3 -5
- package/dist/chunks/{nativeModuleMocker.BKN7j4tC.js → nativeModuleMocker.DKpFw0pk.js} +3 -2
- package/dist/chunks/{index.CesbTg1C.js → nativeModuleRunner.BOeMnHl4.js} +34 -3
- package/dist/chunks/node.CwFbQqI1.js +47 -0
- package/dist/chunks/{reporters.d.GtfMm3Oa.d.ts → plugin.d.cIKZEZ16.d.ts} +177 -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.CYy2gJEr.js → setup-common.Hpq30zVk.js} +7 -3
- package/dist/chunks/{utils.DzYdXqCH.js → utils.DKODp04v.js} +1 -1
- package/dist/chunks/{vm.CPtbsAeh.js → vm.2okbRRME.js} +3 -3
- package/dist/chunks/{worker.d.irleQtmS.d.ts → worker.d.Bu1kXGw4.d.ts} +3 -3
- package/dist/cli.js +2 -2
- package/dist/config.cjs +3 -2
- package/dist/config.d.ts +20 -19
- 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 +113 -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.Bn-qMB1Y.d.ts +0 -62
- package/dist/chunks/coverage.nIKqs-BM.js +0 -1109
- package/dist/chunks/evaluatedModules.Dg1zASAC.js +0 -17
- package/dist/chunks/index.BcGySndd.js +0 -42
- package/dist/chunks/index.DC7d2Pf8.js +0 -729
- package/dist/chunks/index.yJ2D83a4.js +0 -4256
- package/dist/chunks/nativeModuleRunner.WlMdOB52.js +0 -36
- package/dist/chunks/node.COQbm6gK.js +0 -14
- package/dist/chunks/plugin.d.BkNgFMgP.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 -124
- package/dist/coverage.js +0 -28
- package/dist/environments.d.ts +0 -22
- package/dist/environments.js +0 -5
- package/dist/reporters.d.ts +0 -28
- 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,7 +1,6 @@
|
|
|
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 };
|
|
@@ -12,13 +11,14 @@ 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,5 +1,4 @@
|
|
|
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 };
|
|
@@ -9,8 +8,9 @@ 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.BcGySndd.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
|