vitest 4.1.7 → 4.1.9
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/chunks/{base.RR7zL1h0.js → base.BE3cXZj3.js} +3 -3
- package/dist/chunks/{cac.BuBILSID.js → cac.D3xHeqeL.js} +3 -3
- package/dist/chunks/{cli-api.C6CiCDM3.js → cli-api.24X8XwN1.js} +24 -8
- package/dist/chunks/{init-forks.UV3ZQGQH.js → init-forks.B4VBaxRV.js} +1 -1
- package/dist/chunks/{init-threads.D3eCsY76.js → init-threads.C_ClEpAf.js} +1 -1
- package/dist/chunks/{init.D98-gwRW.js → init.d4hAcNdp.js} +1 -1
- package/dist/chunks/{nativeModuleMocker.BRN2oBJd.js → nativeModuleMocker.BLzfffNb.js} +1 -1
- package/dist/chunks/{plugin.d.C0upjs_f.d.ts → plugin.d.DwFIiJ7i.d.ts} +1 -1
- package/dist/chunks/{reporters.d.CtLUhkkA.d.ts → reporters.d.DtoKVV2s.d.ts} +1 -0
- package/dist/chunks/{startVitestModuleRunner.bRl2_oI_.js → startVitestModuleRunner.CCBQZ9DQ.js} +5 -2
- package/dist/chunks/{vm.DVLYObm9.js → vm.B2aHeaNw.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/config.d.ts +3 -3
- package/dist/coverage.d.ts +1 -1
- package/dist/node.d.ts +3 -3
- package/dist/node.js +3 -3
- package/dist/reporters.d.ts +1 -1
- package/dist/runtime.js +1 -1
- package/dist/worker.js +3 -3
- package/dist/workers/forks.js +4 -4
- package/dist/workers/threads.js +4 -4
- package/dist/workers/vmForks.js +4 -4
- package/dist/workers/vmThreads.js +4 -4
- package/package.json +14 -14
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { runInThisContext } from 'node:vm';
|
|
2
2
|
import * as spyModule from '@vitest/spy';
|
|
3
3
|
import { r as resolveTestRunner, a as resolveSnapshotEnvironment, d as detectAsyncLeaks, s as setupChaiConfig } from './index.DXx9Dtk7.js';
|
|
4
|
-
import { l as loadEnvironment, e as emitModuleRunner, a as listenForErrors } from './init.
|
|
4
|
+
import { l as loadEnvironment, e as emitModuleRunner, a as listenForErrors } from './init.d4hAcNdp.js';
|
|
5
5
|
import { N as NativeModuleRunner } from './nativeModuleRunner.BIakptoF.js';
|
|
6
6
|
import { T as Traces } from './traces.DT5aQ62U.js';
|
|
7
7
|
import { V as VitestEvaluatedModules } from './evaluatedModules.Dg1zASAC.js';
|
|
8
|
-
import { s as startVitestModuleRunner, c as createNodeImportMeta } from './startVitestModuleRunner.
|
|
8
|
+
import { s as startVitestModuleRunner, c as createNodeImportMeta } from './startVitestModuleRunner.CCBQZ9DQ.js';
|
|
9
9
|
import { performance as performance$1 } from 'node:perf_hooks';
|
|
10
10
|
import { startTests, collectTests } from '@vitest/runner';
|
|
11
11
|
import { s as setupCommonEnv, b as startCoverageInsideWorker, c as stopCoverageInsideWorker } from './setup-common.DYx3LtFI.js';
|
|
@@ -115,7 +115,7 @@ async function startModuleRunner(options) {
|
|
|
115
115
|
let mocker;
|
|
116
116
|
if (options.state.config.experimental.nodeLoader !== false) {
|
|
117
117
|
// this additionally imports acorn/magic-string
|
|
118
|
-
const { NativeModuleMocker } = await import('./nativeModuleMocker.
|
|
118
|
+
const { NativeModuleMocker } = await import('./nativeModuleMocker.BLzfffNb.js');
|
|
119
119
|
mocker = new NativeModuleMocker({
|
|
120
120
|
async resolveId(id, importer) {
|
|
121
121
|
// TODO: use import.meta.resolve instead
|
|
@@ -621,7 +621,7 @@ class CAC extends EventEmitter {
|
|
|
621
621
|
|
|
622
622
|
const cac = (name = "") => new CAC(name);
|
|
623
623
|
|
|
624
|
-
var version = "4.1.
|
|
624
|
+
var version = "4.1.9";
|
|
625
625
|
|
|
626
626
|
const apiConfig = (port) => ({
|
|
627
627
|
port: {
|
|
@@ -2336,7 +2336,7 @@ function normalizeCliOptions(cliFilters, argv) {
|
|
|
2336
2336
|
}
|
|
2337
2337
|
async function start(mode, cliFilters, options) {
|
|
2338
2338
|
try {
|
|
2339
|
-
const { startVitest } = await import('./cli-api.
|
|
2339
|
+
const { startVitest } = await import('./cli-api.24X8XwN1.js').then(function (n) { return n.q; });
|
|
2340
2340
|
const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
|
|
2341
2341
|
if (!ctx.shouldKeepServer()) await ctx.exit();
|
|
2342
2342
|
} catch (e) {
|
|
@@ -2358,7 +2358,7 @@ async function init(project) {
|
|
|
2358
2358
|
}
|
|
2359
2359
|
async function collect(mode, cliFilters, options) {
|
|
2360
2360
|
try {
|
|
2361
|
-
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.
|
|
2361
|
+
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.24X8XwN1.js').then(function (n) { return n.q; });
|
|
2362
2362
|
const ctx = await prepareVitest(mode, {
|
|
2363
2363
|
...normalizeCliOptions(cliFilters, options),
|
|
2364
2364
|
watch: false,
|
|
@@ -13,7 +13,7 @@ import nodeos__default, { tmpdir } from 'node:os';
|
|
|
13
13
|
import { generateHash as generateHash$1, createTaskName, validateTags, calculateSuiteHash, hasFailed, generateFileHash, limitConcurrency, createFileTask as createFileTask$1, createTagsFilter, someTasksAreOnly, interpretTaskModes, getTasks, isTestCase } from '@vitest/runner/utils';
|
|
14
14
|
import { SnapshotManager } from '@vitest/snapshot/manager';
|
|
15
15
|
import { serializeValue } from '@vitest/utils/serialize';
|
|
16
|
-
import { v as version$1 } from './cac.
|
|
16
|
+
import { v as version$1 } from './cac.D3xHeqeL.js';
|
|
17
17
|
import { rootDir, distDir } from '../path.js';
|
|
18
18
|
import { f as createIndexLocationsMap, g as TraceMap, o as originalPositionFor, h as ancestor, s as stringify, p as parse, i as printError, j as Typechecker, k as generateCodeFrame, l as escapeRegExp, m as createDefinesScript, a as BenchmarkReportsMap, R as ReportersMap, n as groupBy, q as BlobReporter, r as readBlobs, t as convertTasksToEvents, H as HangingProcessReporter, w as wildcardPatternToRegExp, u as stdout } from './index.UpGiHP7g.js';
|
|
19
19
|
import { N as NativeModuleRunner } from './nativeModuleRunner.BIakptoF.js';
|
|
@@ -457,17 +457,28 @@ class BrowserSessions {
|
|
|
457
457
|
this.sessions.delete(sessionId);
|
|
458
458
|
}
|
|
459
459
|
createSession(sessionId, project, pool, options) {
|
|
460
|
-
// this promise
|
|
460
|
+
// this promise waits until the orchestrator is ready to accept RPC calls
|
|
461
461
|
const defer = createDefer();
|
|
462
|
+
let isConnected = false;
|
|
463
|
+
let isReady = false;
|
|
462
464
|
const timeout = setTimeout(() => {
|
|
463
465
|
defer.reject(/* @__PURE__ */ new Error(`Failed to connect to the browser session "${sessionId}" [${project.name}] within the timeout.`));
|
|
464
466
|
}, project.vitest.config.browser.connectTimeout ?? 6e4).unref();
|
|
467
|
+
const resolveIfReady = () => {
|
|
468
|
+
if (!isConnected || !isReady) return;
|
|
469
|
+
defer.resolve();
|
|
470
|
+
clearTimeout(timeout);
|
|
471
|
+
};
|
|
465
472
|
this.sessions.set(sessionId, {
|
|
466
473
|
project,
|
|
467
474
|
otelCarrier: options?.otelCarrier,
|
|
468
475
|
connected: () => {
|
|
469
|
-
|
|
470
|
-
|
|
476
|
+
isConnected = true;
|
|
477
|
+
resolveIfReady();
|
|
478
|
+
},
|
|
479
|
+
ready: () => {
|
|
480
|
+
isReady = true;
|
|
481
|
+
resolveIfReady();
|
|
471
482
|
},
|
|
472
483
|
fail: (error) => {
|
|
473
484
|
defer.resolve();
|
|
@@ -3010,6 +3021,7 @@ class PoolRunner {
|
|
|
3010
3021
|
};
|
|
3011
3022
|
emitUnexpectedExit = () => {
|
|
3012
3023
|
const error = /* @__PURE__ */ new Error("Worker exited unexpectedly");
|
|
3024
|
+
this._state = RunnerState.STOPPED;
|
|
3013
3025
|
this._eventEmitter.emit("error", error);
|
|
3014
3026
|
};
|
|
3015
3027
|
waitForStart() {
|
|
@@ -3437,14 +3449,18 @@ class Pool {
|
|
|
3437
3449
|
if (task.memoryLimit && message.usedMemory) isMemoryLimitReached = message.usedMemory >= task.memoryLimit;
|
|
3438
3450
|
if (message.error) this.options.state.catchError(message.error, "Test Run Error");
|
|
3439
3451
|
runner.off("message", onFinished);
|
|
3452
|
+
runner.off("error", onTaskError);
|
|
3440
3453
|
resolver.resolve();
|
|
3441
3454
|
}
|
|
3442
3455
|
};
|
|
3456
|
+
function onTaskError(error) {
|
|
3457
|
+
runner.off("message", onFinished);
|
|
3458
|
+
runner.off("error", onTaskError);
|
|
3459
|
+
resolver.reject(new Error(`[vitest-pool]: Worker ${task.worker} emitted error.`, { cause: error }));
|
|
3460
|
+
}
|
|
3443
3461
|
runner.on("message", onFinished);
|
|
3462
|
+
runner.on("error", onTaskError);
|
|
3444
3463
|
if (!runner.isStarted) {
|
|
3445
|
-
runner.on("error", (error) => {
|
|
3446
|
-
resolver.reject(new Error(`[vitest-pool]: Worker ${task.worker} emitted error.`, { cause: error }));
|
|
3447
|
-
});
|
|
3448
3464
|
const id = setTimeout(() => resolver.reject(/* @__PURE__ */ new Error(`[vitest-pool]: Timeout starting ${task.worker} runner.`)), WORKER_START_TIMEOUT);
|
|
3449
3465
|
await runner.start({ workerId: task.context.workerId }).catch((error) => resolver.reject(new Error(`[vitest-pool]: Failed to start ${task.worker} worker for test files ${formatFiles(task)}.`, { cause: error }))).finally(() => clearTimeout(id));
|
|
3450
3466
|
}
|
|
@@ -3457,7 +3473,7 @@ class Pool {
|
|
|
3457
3473
|
await resolver.promise.catch((error) => span?.recordException(error)).finally(() => span?.end());
|
|
3458
3474
|
const index = this.activeTasks.indexOf(activeTask);
|
|
3459
3475
|
if (index !== -1) this.activeTasks.splice(index, 1);
|
|
3460
|
-
if (!task.isolate && !isMemoryLimitReached && this.queue[0]?.task.isolate === false && isEqualRunner(runner, this.queue[0].task)) {
|
|
3476
|
+
if (!task.isolate && !runner.isTerminated && !isMemoryLimitReached && this.queue[0]?.task.isolate === false && isEqualRunner(runner, this.queue[0].task)) {
|
|
3461
3477
|
this.sharedRunners.push(runner);
|
|
3462
3478
|
return this.schedule();
|
|
3463
3479
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isMainThread, parentPort } from 'node:worker_threads';
|
|
2
|
-
import { i as init } from './init.
|
|
2
|
+
import { i as init } from './init.d4hAcNdp.js';
|
|
3
3
|
|
|
4
4
|
if (isMainThread || !parentPort) throw new Error("Expected worker to be run in node:worker_threads");
|
|
5
5
|
function workerInit(options) {
|
|
@@ -3,7 +3,7 @@ import { isBuiltin } from 'node:module';
|
|
|
3
3
|
import { pathToFileURL } from 'node:url';
|
|
4
4
|
import { resolve } from 'pathe';
|
|
5
5
|
import { ModuleRunner, EvaluatedModules } from 'vite/module-runner';
|
|
6
|
-
import { b as VitestTransport } from './startVitestModuleRunner.
|
|
6
|
+
import { b as VitestTransport } from './startVitestModuleRunner.CCBQZ9DQ.js';
|
|
7
7
|
import { e as environments } from './index.DC7d2Pf8.js';
|
|
8
8
|
import { serializeValue } from '@vitest/utils/serialize';
|
|
9
9
|
import { serializeError } from '@vitest/utils/error';
|
|
@@ -5,7 +5,7 @@ import { cleanUrl, createDefer } from '@vitest/utils/helpers';
|
|
|
5
5
|
import { p as parse } from './acorn.B2iPLyUM.js';
|
|
6
6
|
import { isAbsolute } from 'pathe';
|
|
7
7
|
import { t as toBuiltin } from './modules.BJuCwlRJ.js';
|
|
8
|
-
import { B as BareModuleMocker, n as normalizeModuleId } from './startVitestModuleRunner.
|
|
8
|
+
import { B as BareModuleMocker, n as normalizeModuleId } from './startVitestModuleRunner.CCBQZ9DQ.js';
|
|
9
9
|
import 'node:fs';
|
|
10
10
|
import './utils.BX5Fg8C4.js';
|
|
11
11
|
import '@vitest/utils/timers';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { DevEnvironment } from 'vite';
|
|
2
|
-
import { V as Vitest, T as TestProject, a as TestProjectConfiguration } from './reporters.d.
|
|
2
|
+
import { V as Vitest, T as TestProject, a as TestProjectConfiguration } from './reporters.d.DtoKVV2s.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
5
|
* Generate a unique cache identifier.
|
package/dist/chunks/{startVitestModuleRunner.bRl2_oI_.js → startVitestModuleRunner.CCBQZ9DQ.js}
RENAMED
|
@@ -233,8 +233,11 @@ function fixLeadingSlashes(id) {
|
|
|
233
233
|
return id;
|
|
234
234
|
}
|
|
235
235
|
|
|
236
|
-
// copied from vite
|
|
236
|
+
// copied from vite
|
|
237
|
+
// https://github.com/vitejs/vite/blob/4417b4f305623b2850bd6ae6553834c017694672/packages/vite/src/shared/utils.ts
|
|
238
|
+
// https://github.com/vitejs/vite/blob/4417b4f305623b2850bd6ae6553834c017694672/packages/vite/src/node/utils.ts
|
|
237
239
|
const postfixRE = /[?#].*$/;
|
|
240
|
+
const trailingSeparatorRE = /[?&]$/;
|
|
238
241
|
function cleanUrl(url) {
|
|
239
242
|
return url.replace(postfixRE, "");
|
|
240
243
|
}
|
|
@@ -250,7 +253,7 @@ function injectQuery(url, queryToInject) {
|
|
|
250
253
|
return `${file}?${queryToInject}${postfix[0] === "?" ? `&${postfix.slice(1)}` : postfix}`;
|
|
251
254
|
}
|
|
252
255
|
function removeQuery(url, queryToRemove) {
|
|
253
|
-
return url.replace(new RegExp(`[?&]${queryToRemove}(
|
|
256
|
+
return url.replace(new RegExp(`([?&])${queryToRemove}(?:&|$)`), "$1").replace(trailingSeparatorRE, "");
|
|
254
257
|
}
|
|
255
258
|
|
|
256
259
|
const spyModulePath = resolve(distDir, "spy.js");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
2
2
|
import vm, { isContext, runInContext } from 'node:vm';
|
|
3
3
|
import { dirname, basename, extname, normalize, resolve } from 'pathe';
|
|
4
|
-
import { l as loadEnvironment, a as listenForErrors, e as emitModuleRunner } from './init.
|
|
4
|
+
import { l as loadEnvironment, a as listenForErrors, e as emitModuleRunner } from './init.d4hAcNdp.js';
|
|
5
5
|
import { distDir } from '../path.js';
|
|
6
6
|
import { createCustomConsole } from './console.3WNpx0tS.js';
|
|
7
7
|
import fs from 'node:fs';
|
|
@@ -11,7 +11,7 @@ import { findNearestPackageData } from '@vitest/utils/resolver';
|
|
|
11
11
|
import { dirname as dirname$1 } from 'node:path';
|
|
12
12
|
import { CSS_LANGS_RE, KNOWN_ASSET_RE } from '@vitest/utils/constants';
|
|
13
13
|
import { getDefaultRequestStubs } from '../module-evaluator.js';
|
|
14
|
-
import { s as startVitestModuleRunner, V as VITEST_VM_CONTEXT_SYMBOL, c as createNodeImportMeta } from './startVitestModuleRunner.
|
|
14
|
+
import { s as startVitestModuleRunner, V as VITEST_VM_CONTEXT_SYMBOL, c as createNodeImportMeta } from './startVitestModuleRunner.CCBQZ9DQ.js';
|
|
15
15
|
import { p as provideWorkerState } from './utils.BX5Fg8C4.js';
|
|
16
16
|
|
|
17
17
|
function interopCommonJsModule(interopDefault, mod) {
|
package/dist/cli.js
CHANGED
package/dist/config.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { HookHandler, UserConfig, ConfigEnv } from 'vite';
|
|
2
2
|
export { ConfigEnv, Plugin, UserConfig as ViteUserConfig, mergeConfig } from 'vite';
|
|
3
|
-
import { I as InlineConfig, C as CoverageOptions, F as FieldsWithDefaultValues, U as UserWorkspaceConfig, b as UserProjectConfigFn, c as UserProjectConfigExport } from './chunks/reporters.d.
|
|
4
|
-
export { a as TestProjectConfiguration, d as TestProjectInlineConfiguration, e as TestUserConfig, W as WatcherTriggerPattern } from './chunks/reporters.d.
|
|
5
|
-
import { V as VitestPluginContext } from './chunks/plugin.d.
|
|
3
|
+
import { I as InlineConfig, C as CoverageOptions, F as FieldsWithDefaultValues, U as UserWorkspaceConfig, b as UserProjectConfigFn, c as UserProjectConfigExport } from './chunks/reporters.d.DtoKVV2s.js';
|
|
4
|
+
export { a as TestProjectConfiguration, d as TestProjectInlineConfiguration, e as TestUserConfig, W as WatcherTriggerPattern } from './chunks/reporters.d.DtoKVV2s.js';
|
|
5
|
+
import { V as VitestPluginContext } from './chunks/plugin.d.DwFIiJ7i.js';
|
|
6
6
|
import { F as FakeTimerInstallOpts } from './chunks/config.d.A1h_Y6Jt.js';
|
|
7
7
|
export { TestTagDefinition } from '@vitest/runner';
|
|
8
8
|
import '@vitest/utils';
|
package/dist/coverage.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { V as Vitest, av as ResolvedCoverageOptions, a$ as CoverageMap, ao as ReportContext, T as TestProject } from './chunks/reporters.d.
|
|
1
|
+
import { V as Vitest, av as ResolvedCoverageOptions, a$ as CoverageMap, ao as ReportContext, T as TestProject } from './chunks/reporters.d.DtoKVV2s.js';
|
|
2
2
|
import { TransformResult } from 'vite';
|
|
3
3
|
import { a as AfterSuiteRunMeta } from './chunks/traces.d.D2T_R8rx.js';
|
|
4
4
|
import '@vitest/runner';
|
package/dist/node.d.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { InlineConfig, UserConfig as UserConfig$1, Plugin, ResolvedConfig as Res
|
|
|
3
3
|
export { vite as Vite };
|
|
4
4
|
export { esbuildVersion, isCSSRequest, isFileLoadingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
5
5
|
import { IncomingMessage } from 'node:http';
|
|
6
|
-
import { R as ResolvedConfig, e as UserConfig, f as VitestRunMode, g as VitestOptions, V as Vitest, A as ApiConfig, L as Logger, h as TestSpecification, T as TestProject, P as PoolWorker, i as PoolOptions, j as WorkerRequest, k as TestSequencer } from './chunks/reporters.d.
|
|
7
|
-
export { M as AgentReporter, B as BaseCoverageOptions, l as BaseReporter, m as BenchmarkBuiltinReporters, n as BenchmarkReporter, o as BenchmarkReportsMap, p as BenchmarkUserOptions, q as BrowserBuiltinProvider, r as BrowserCommand, s as BrowserCommandContext, t as BrowserConfigOptions, u as BrowserInstanceOption, v as BrowserModuleMocker, w as BrowserOrchestrator, x as BrowserProvider, y as BrowserProviderOption, z as BrowserScript, D as BrowserServerFactory, E as BrowserServerOptions, G as BrowserServerState, H as BrowserServerStateSession, J as BuiltinEnvironment, K as BuiltinReporterOptions, N as BuiltinReporters, O as CSSModuleScopeStrategy, Q as CoverageInstrumenter, S as CoverageIstanbulOptions, C as CoverageOptions, X as CoverageProvider, Y as CoverageProviderModule, Z as CoverageReporter, _ as CoverageV8Options, $ as CustomProviderOptions, a0 as DefaultReporter, a1 as DepsOptimizationOptions, a2 as DotReporter, a3 as EnvironmentOptions, a4 as GithubActionsReporter, a5 as HTMLOptions, a6 as HangingProcessReporter, I as InlineConfig, a7 as InstrumenterOptions, a8 as JUnitOptions, a9 as JUnitReporter, aa as JsonAssertionResult, ab as JsonOptions, ac as JsonReporter, ad as JsonTestResult, ae as JsonTestResults, M as MinimalReporter, af as ModuleDiagnostic, ag as OnServerRestartHandler, ah as OnTestsRerunHandler, ai as ParentProjectBrowser, aj as Pool, ak as PoolRunnerInitializer, al as PoolTask, am as ProjectBrowser, an as ProjectConfig, ao as ReportContext, ap as ReportedHookContext, aq as Reporter, ar as ReportersMap, as as ResolveSnapshotPathHandler, at as ResolveSnapshotPathHandlerContext, au as ResolvedBrowserOptions, av as ResolvedCoverageOptions, aw as ResolvedProjectConfig, ax as SerializedTestProject, ay as TapFlatReporter, az as TapReporter, aA as TaskOptions, aB as TestCase, aC as TestCollection, aD as TestDiagnostic, aE as TestModule, aF as TestModuleState, aG as TestResult, aH as TestResultFailed, aI as TestResultPassed, aJ as TestResultSkipped, aK as TestRunEndReason, aL as TestRunResult, aM as TestSequencerConstructor, aN as TestSpecificationOptions, aO as TestState, aP as TestSuite, aQ as TestSuiteState, aR as ToMatchScreenshotComparators, aS as ToMatchScreenshotOptions, aT as TypecheckConfig, U as UserWorkspaceConfig, aU as VerboseBenchmarkReporter, aV as VerboseReporter, aW as VitestEnvironment, aX as VitestPackageInstaller, W as WatcherTriggerPattern, aY as WorkerResponse, aZ as _BrowserNames, a_ as experimental_getRunnerTask } from './chunks/reporters.d.
|
|
8
|
-
export { C as CacheKeyIdGenerator, a as CacheKeyIdGeneratorContext, V as VitestPluginContext } from './chunks/plugin.d.
|
|
6
|
+
import { R as ResolvedConfig, e as UserConfig, f as VitestRunMode, g as VitestOptions, V as Vitest, A as ApiConfig, L as Logger, h as TestSpecification, T as TestProject, P as PoolWorker, i as PoolOptions, j as WorkerRequest, k as TestSequencer } from './chunks/reporters.d.DtoKVV2s.js';
|
|
7
|
+
export { M as AgentReporter, B as BaseCoverageOptions, l as BaseReporter, m as BenchmarkBuiltinReporters, n as BenchmarkReporter, o as BenchmarkReportsMap, p as BenchmarkUserOptions, q as BrowserBuiltinProvider, r as BrowserCommand, s as BrowserCommandContext, t as BrowserConfigOptions, u as BrowserInstanceOption, v as BrowserModuleMocker, w as BrowserOrchestrator, x as BrowserProvider, y as BrowserProviderOption, z as BrowserScript, D as BrowserServerFactory, E as BrowserServerOptions, G as BrowserServerState, H as BrowserServerStateSession, J as BuiltinEnvironment, K as BuiltinReporterOptions, N as BuiltinReporters, O as CSSModuleScopeStrategy, Q as CoverageInstrumenter, S as CoverageIstanbulOptions, C as CoverageOptions, X as CoverageProvider, Y as CoverageProviderModule, Z as CoverageReporter, _ as CoverageV8Options, $ as CustomProviderOptions, a0 as DefaultReporter, a1 as DepsOptimizationOptions, a2 as DotReporter, a3 as EnvironmentOptions, a4 as GithubActionsReporter, a5 as HTMLOptions, a6 as HangingProcessReporter, I as InlineConfig, a7 as InstrumenterOptions, a8 as JUnitOptions, a9 as JUnitReporter, aa as JsonAssertionResult, ab as JsonOptions, ac as JsonReporter, ad as JsonTestResult, ae as JsonTestResults, M as MinimalReporter, af as ModuleDiagnostic, ag as OnServerRestartHandler, ah as OnTestsRerunHandler, ai as ParentProjectBrowser, aj as Pool, ak as PoolRunnerInitializer, al as PoolTask, am as ProjectBrowser, an as ProjectConfig, ao as ReportContext, ap as ReportedHookContext, aq as Reporter, ar as ReportersMap, as as ResolveSnapshotPathHandler, at as ResolveSnapshotPathHandlerContext, au as ResolvedBrowserOptions, av as ResolvedCoverageOptions, aw as ResolvedProjectConfig, ax as SerializedTestProject, ay as TapFlatReporter, az as TapReporter, aA as TaskOptions, aB as TestCase, aC as TestCollection, aD as TestDiagnostic, aE as TestModule, aF as TestModuleState, aG as TestResult, aH as TestResultFailed, aI as TestResultPassed, aJ as TestResultSkipped, aK as TestRunEndReason, aL as TestRunResult, aM as TestSequencerConstructor, aN as TestSpecificationOptions, aO as TestState, aP as TestSuite, aQ as TestSuiteState, aR as ToMatchScreenshotComparators, aS as ToMatchScreenshotOptions, aT as TypecheckConfig, U as UserWorkspaceConfig, aU as VerboseBenchmarkReporter, aV as VerboseReporter, aW as VitestEnvironment, aX as VitestPackageInstaller, W as WatcherTriggerPattern, aY as WorkerResponse, aZ as _BrowserNames, a_ as experimental_getRunnerTask } from './chunks/reporters.d.DtoKVV2s.js';
|
|
8
|
+
export { C as CacheKeyIdGenerator, a as CacheKeyIdGeneratorContext, V as VitestPluginContext } from './chunks/plugin.d.DwFIiJ7i.js';
|
|
9
9
|
export { BaseCoverageProvider } from './coverage.js';
|
|
10
10
|
import { Awaitable } from '@vitest/utils';
|
|
11
11
|
export { SerializedError } from '@vitest/utils';
|
package/dist/node.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
2
|
import { resolveConfig as resolveConfig$1, mergeConfig } from 'vite';
|
|
3
3
|
export { esbuildVersion, isCSSRequest, isFileLoadingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
4
|
-
import { V as Vitest, a as VitestPlugin } from './chunks/cli-api.
|
|
5
|
-
export { F as ForksPoolWorker, G as GitNotFoundError, b as TestsNotFoundError, T as ThreadsPoolWorker, c as TypecheckPoolWorker, d as VitestPackageInstaller, e as VmForksPoolWorker, f as VmThreadsPoolWorker, g as createDebugger, h as createMethodsRPC, i as createViteLogger, j as createVitest, k as escapeTestName, l as experimental_getRunnerTask, m as getFilePoolName, n as isFileServingAllowed, o as isValidApiRequest, r as registerConsoleShortcuts, p as resolveFsAllow, s as startVitest } from './chunks/cli-api.
|
|
6
|
-
export { p as parseCLI } from './chunks/cac.
|
|
4
|
+
import { V as Vitest, a as VitestPlugin } from './chunks/cli-api.24X8XwN1.js';
|
|
5
|
+
export { F as ForksPoolWorker, G as GitNotFoundError, b as TestsNotFoundError, T as ThreadsPoolWorker, c as TypecheckPoolWorker, d as VitestPackageInstaller, e as VmForksPoolWorker, f as VmThreadsPoolWorker, g as createDebugger, h as createMethodsRPC, i as createViteLogger, j as createVitest, k as escapeTestName, l as experimental_getRunnerTask, m as getFilePoolName, n as isFileServingAllowed, o as isValidApiRequest, r as registerConsoleShortcuts, p as resolveFsAllow, s as startVitest } from './chunks/cli-api.24X8XwN1.js';
|
|
6
|
+
export { p as parseCLI } from './chunks/cac.D3xHeqeL.js';
|
|
7
7
|
import { r as resolveConfig$2 } from './chunks/coverage.DM_a_rWm.js';
|
|
8
8
|
export { B as BaseCoverageProvider, a as BaseSequencer, b as resolveApiServerConfig } from './chunks/coverage.DM_a_rWm.js';
|
|
9
9
|
import { slash, deepClone } from '@vitest/utils/helpers';
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { M as AgentReporter, l as BaseReporter, m as BenchmarkBuiltinReporters, n as BenchmarkReporter, o as BenchmarkReportsMap, K as BuiltinReporterOptions, N as BuiltinReporters, a0 as DefaultReporter, a2 as DotReporter, a4 as GithubActionsReporter, a6 as HangingProcessReporter, a9 as JUnitReporter, aa as JsonAssertionResult, ac as JsonReporter, ad as JsonTestResult, ae as JsonTestResults, M as MinimalReporter, ap as ReportedHookContext, aq as Reporter, ar as ReportersMap, ay as TapFlatReporter, az as TapReporter, aK as TestRunEndReason, aU as VerboseBenchmarkReporter, aV as VerboseReporter } from './chunks/reporters.d.
|
|
1
|
+
export { M as AgentReporter, l as BaseReporter, m as BenchmarkBuiltinReporters, n as BenchmarkReporter, o as BenchmarkReportsMap, K as BuiltinReporterOptions, N as BuiltinReporters, a0 as DefaultReporter, a2 as DotReporter, a4 as GithubActionsReporter, a6 as HangingProcessReporter, a9 as JUnitReporter, aa as JsonAssertionResult, ac as JsonReporter, ad as JsonTestResult, ae as JsonTestResults, M as MinimalReporter, ap as ReportedHookContext, aq as Reporter, ar as ReportersMap, ay as TapFlatReporter, az as TapReporter, aK as TestRunEndReason, aU as VerboseBenchmarkReporter, aV as VerboseReporter } from './chunks/reporters.d.DtoKVV2s.js';
|
|
2
2
|
import '@vitest/runner';
|
|
3
3
|
import '@vitest/utils';
|
|
4
4
|
import './chunks/traces.d.D2T_R8rx.js';
|
package/dist/runtime.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { VitestModuleEvaluator } from './module-evaluator.js';
|
|
2
|
-
import { V as VITEST_VM_CONTEXT_SYMBOL, s as startVitestModuleRunner, a as VitestModuleRunner } from './chunks/startVitestModuleRunner.
|
|
2
|
+
import { V as VITEST_VM_CONTEXT_SYMBOL, s as startVitestModuleRunner, a as VitestModuleRunner } from './chunks/startVitestModuleRunner.CCBQZ9DQ.js';
|
|
3
3
|
import { g as getWorkerState } from './chunks/utils.BX5Fg8C4.js';
|
|
4
4
|
export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.DC7d2Pf8.js';
|
|
5
5
|
export { VitestNodeSnapshotEnvironment as VitestSnapshotEnvironment } from './chunks/node.COQbm6gK.js';
|
package/dist/worker.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
export { r as runBaseTests, s as setupEnvironment } from './chunks/base.
|
|
2
|
-
export { i as init } from './chunks/init.
|
|
1
|
+
export { r as runBaseTests, s as setupEnvironment } from './chunks/base.BE3cXZj3.js';
|
|
2
|
+
export { i as init } from './chunks/init.d4hAcNdp.js';
|
|
3
3
|
import 'node:vm';
|
|
4
4
|
import '@vitest/spy';
|
|
5
5
|
import './chunks/index.DXx9Dtk7.js';
|
|
@@ -36,7 +36,7 @@ import 'node:util';
|
|
|
36
36
|
import 'vite/module-runner';
|
|
37
37
|
import './chunks/traces.DT5aQ62U.js';
|
|
38
38
|
import './chunks/evaluatedModules.Dg1zASAC.js';
|
|
39
|
-
import './chunks/startVitestModuleRunner.
|
|
39
|
+
import './chunks/startVitestModuleRunner.CCBQZ9DQ.js';
|
|
40
40
|
import './chunks/modules.BJuCwlRJ.js';
|
|
41
41
|
import './path.js';
|
|
42
42
|
import './module-evaluator.js';
|
package/dist/workers/forks.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as runBaseTests, s as setupBaseEnvironment } from '../chunks/base.
|
|
2
|
-
import { w as workerInit } from '../chunks/init-forks.
|
|
1
|
+
import { r as runBaseTests, s as setupBaseEnvironment } from '../chunks/base.BE3cXZj3.js';
|
|
2
|
+
import { w as workerInit } from '../chunks/init-forks.B4VBaxRV.js';
|
|
3
3
|
import 'node:vm';
|
|
4
4
|
import '@vitest/spy';
|
|
5
5
|
import '../chunks/index.DXx9Dtk7.js';
|
|
@@ -22,12 +22,12 @@ import 'pathe';
|
|
|
22
22
|
import '@vitest/utils/offset';
|
|
23
23
|
import '@vitest/utils/source-map';
|
|
24
24
|
import '../chunks/_commonjsHelpers.D26ty3Ew.js';
|
|
25
|
-
import '../chunks/init.
|
|
25
|
+
import '../chunks/init.d4hAcNdp.js';
|
|
26
26
|
import 'node:fs';
|
|
27
27
|
import 'node:module';
|
|
28
28
|
import 'node:url';
|
|
29
29
|
import 'vite/module-runner';
|
|
30
|
-
import '../chunks/startVitestModuleRunner.
|
|
30
|
+
import '../chunks/startVitestModuleRunner.CCBQZ9DQ.js';
|
|
31
31
|
import '../chunks/modules.BJuCwlRJ.js';
|
|
32
32
|
import '../path.js';
|
|
33
33
|
import 'node:path';
|
package/dist/workers/threads.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { s as setupBaseEnvironment, r as runBaseTests } from '../chunks/base.
|
|
2
|
-
import { w as workerInit } from '../chunks/init-threads.
|
|
1
|
+
import { s as setupBaseEnvironment, r as runBaseTests } from '../chunks/base.BE3cXZj3.js';
|
|
2
|
+
import { w as workerInit } from '../chunks/init-threads.C_ClEpAf.js';
|
|
3
3
|
import 'node:vm';
|
|
4
4
|
import '@vitest/spy';
|
|
5
5
|
import '../chunks/index.DXx9Dtk7.js';
|
|
@@ -22,12 +22,12 @@ import 'pathe';
|
|
|
22
22
|
import '@vitest/utils/offset';
|
|
23
23
|
import '@vitest/utils/source-map';
|
|
24
24
|
import '../chunks/_commonjsHelpers.D26ty3Ew.js';
|
|
25
|
-
import '../chunks/init.
|
|
25
|
+
import '../chunks/init.d4hAcNdp.js';
|
|
26
26
|
import 'node:fs';
|
|
27
27
|
import 'node:module';
|
|
28
28
|
import 'node:url';
|
|
29
29
|
import 'vite/module-runner';
|
|
30
|
-
import '../chunks/startVitestModuleRunner.
|
|
30
|
+
import '../chunks/startVitestModuleRunner.CCBQZ9DQ.js';
|
|
31
31
|
import '../chunks/modules.BJuCwlRJ.js';
|
|
32
32
|
import '../path.js';
|
|
33
33
|
import 'node:path';
|
package/dist/workers/vmForks.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { w as workerInit } from '../chunks/init-forks.
|
|
2
|
-
import { r as runVmTests, s as setupVmWorker } from '../chunks/vm.
|
|
3
|
-
import '../chunks/init.
|
|
1
|
+
import { w as workerInit } from '../chunks/init-forks.B4VBaxRV.js';
|
|
2
|
+
import { r as runVmTests, s as setupVmWorker } from '../chunks/vm.B2aHeaNw.js';
|
|
3
|
+
import '../chunks/init.d4hAcNdp.js';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'node:module';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'pathe';
|
|
8
8
|
import 'vite/module-runner';
|
|
9
|
-
import '../chunks/startVitestModuleRunner.
|
|
9
|
+
import '../chunks/startVitestModuleRunner.CCBQZ9DQ.js';
|
|
10
10
|
import '@vitest/utils/helpers';
|
|
11
11
|
import '../chunks/modules.BJuCwlRJ.js';
|
|
12
12
|
import '../chunks/utils.BX5Fg8C4.js';
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { w as workerInit } from '../chunks/init-threads.
|
|
2
|
-
import { s as setupVmWorker, r as runVmTests } from '../chunks/vm.
|
|
1
|
+
import { w as workerInit } from '../chunks/init-threads.C_ClEpAf.js';
|
|
2
|
+
import { s as setupVmWorker, r as runVmTests } from '../chunks/vm.B2aHeaNw.js';
|
|
3
3
|
import 'node:worker_threads';
|
|
4
|
-
import '../chunks/init.
|
|
4
|
+
import '../chunks/init.d4hAcNdp.js';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:module';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'pathe';
|
|
9
9
|
import 'vite/module-runner';
|
|
10
|
-
import '../chunks/startVitestModuleRunner.
|
|
10
|
+
import '../chunks/startVitestModuleRunner.CCBQZ9DQ.js';
|
|
11
11
|
import '@vitest/utils/helpers';
|
|
12
12
|
import '../chunks/modules.BJuCwlRJ.js';
|
|
13
13
|
import '../chunks/utils.BX5Fg8C4.js';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "4.1.
|
|
4
|
+
"version": "4.1.9",
|
|
5
5
|
"description": "Next generation testing framework powered by Vite",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -135,12 +135,12 @@
|
|
|
135
135
|
"happy-dom": "*",
|
|
136
136
|
"jsdom": "*",
|
|
137
137
|
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
138
|
-
"@vitest/browser-playwright": "4.1.
|
|
139
|
-
"@vitest/browser-preview": "4.1.
|
|
140
|
-
"@vitest/browser-webdriverio": "4.1.
|
|
141
|
-
"@vitest/coverage-istanbul": "4.1.
|
|
142
|
-
"@vitest/coverage-v8": "4.1.
|
|
143
|
-
"@vitest/ui": "4.1.
|
|
138
|
+
"@vitest/browser-playwright": "4.1.9",
|
|
139
|
+
"@vitest/browser-preview": "4.1.9",
|
|
140
|
+
"@vitest/browser-webdriverio": "4.1.9",
|
|
141
|
+
"@vitest/coverage-istanbul": "4.1.9",
|
|
142
|
+
"@vitest/coverage-v8": "4.1.9",
|
|
143
|
+
"@vitest/ui": "4.1.9"
|
|
144
144
|
},
|
|
145
145
|
"peerDependenciesMeta": {
|
|
146
146
|
"@edge-runtime/vm": {
|
|
@@ -194,13 +194,13 @@
|
|
|
194
194
|
"tinyrainbow": "^3.1.0",
|
|
195
195
|
"vite": "^6.0.0 || ^7.0.0 || ^8.0.0",
|
|
196
196
|
"why-is-node-running": "^2.3.0",
|
|
197
|
-
"@vitest/
|
|
198
|
-
"@vitest/expect": "4.1.
|
|
199
|
-
"@vitest/
|
|
200
|
-
"@vitest/
|
|
201
|
-
"@vitest/
|
|
202
|
-
"@vitest/snapshot": "4.1.
|
|
203
|
-
"@vitest/utils": "4.1.
|
|
197
|
+
"@vitest/mocker": "4.1.9",
|
|
198
|
+
"@vitest/expect": "4.1.9",
|
|
199
|
+
"@vitest/pretty-format": "4.1.9",
|
|
200
|
+
"@vitest/runner": "4.1.9",
|
|
201
|
+
"@vitest/spy": "4.1.9",
|
|
202
|
+
"@vitest/snapshot": "4.1.9",
|
|
203
|
+
"@vitest/utils": "4.1.9"
|
|
204
204
|
},
|
|
205
205
|
"devDependencies": {
|
|
206
206
|
"@antfu/install-pkg": "^1.1.0",
|