vitest 3.0.4 → 3.0.5
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/{cac.DYBkNWP6.js → cac.B_eDEFh6.js} +3 -3
- package/dist/chunks/{cli-api.Ci-9Ccnz.js → cli-api.az_rB_xZ.js} +29 -8
- package/dist/chunks/{reporters.0x019-V2.d.ts → reporters.6vxQttCV.d.ts} +3 -1
- package/dist/chunks/{resolveConfig.DkmB2h7h.js → resolveConfig.BT-MMQUD.js} +3 -2
- package/dist/chunks/{vite.DiG-KbRF.d.ts → vite.Cu7NWuBa.d.ts} +1 -1
- package/dist/cli.js +1 -1
- package/dist/config.d.ts +3 -3
- package/dist/coverage.d.ts +1 -1
- package/dist/coverage.js +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/node.d.ts +7 -4
- package/dist/node.js +6 -6
- package/dist/reporters.d.ts +1 -1
- package/package.json +11 -11
package/dist/browser.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as CoverageProvider, c as CoverageProviderModule } from './chunks/reporters.
|
|
1
|
+
import { b as CoverageProvider, c as CoverageProviderModule } from './chunks/reporters.6vxQttCV.js';
|
|
2
2
|
import { a as SerializedCoverageConfig, S as SerializedConfig } from './chunks/config.BRtC-JeT.js';
|
|
3
3
|
import * as spy$1 from '@vitest/spy';
|
|
4
4
|
import * as _vitest_utils_diff from '@vitest/utils/diff';
|
|
@@ -618,7 +618,7 @@ class CAC extends EventEmitter {
|
|
|
618
618
|
|
|
619
619
|
const cac = (name = "") => new CAC(name);
|
|
620
620
|
|
|
621
|
-
var version = "3.0.
|
|
621
|
+
var version = "3.0.5";
|
|
622
622
|
|
|
623
623
|
const apiConfig = (port) => ({
|
|
624
624
|
port: {
|
|
@@ -1567,7 +1567,7 @@ async function start(mode, cliFilters, options) {
|
|
|
1567
1567
|
} catch {
|
|
1568
1568
|
}
|
|
1569
1569
|
try {
|
|
1570
|
-
const { startVitest } = await import('./cli-api.
|
|
1570
|
+
const { startVitest } = await import('./cli-api.az_rB_xZ.js').then(function (n) { return n.f; });
|
|
1571
1571
|
const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(cliFilters, options));
|
|
1572
1572
|
if (!ctx.shouldKeepServer()) {
|
|
1573
1573
|
await ctx.exit();
|
|
@@ -1598,7 +1598,7 @@ async function collect(mode, cliFilters, options) {
|
|
|
1598
1598
|
} catch {
|
|
1599
1599
|
}
|
|
1600
1600
|
try {
|
|
1601
|
-
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.
|
|
1601
|
+
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.az_rB_xZ.js').then(function (n) { return n.f; });
|
|
1602
1602
|
const ctx = await prepareVitest(mode, {
|
|
1603
1603
|
...normalizeCliOptions(cliFilters, options),
|
|
1604
1604
|
watch: false,
|
|
@@ -11,7 +11,7 @@ import { generateFileHash, createFileTask, limitConcurrency, 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.
|
|
14
|
+
import { v as version$1 } from './cac.B_eDEFh6.js';
|
|
15
15
|
import { c as createBirpc } from './index.TH3f4LSA.js';
|
|
16
16
|
import { s as stringify, p as parse, g as printError, h as generateCodeFrame, R as ReportersMap, b as BenchmarkReportsMap, i as BlobReporter, r as readBlobs, H as HangingProcessReporter } from './index.vId0fl99.js';
|
|
17
17
|
import require$$0$2 from 'stream';
|
|
@@ -26,8 +26,9 @@ import require$$4 from 'tls';
|
|
|
26
26
|
import require$$7 from 'url';
|
|
27
27
|
import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './_commonjsHelpers.BFTU3MAI.js';
|
|
28
28
|
import { parseErrorStacktrace } from '@vitest/utils/source-map';
|
|
29
|
+
import crypto from 'node:crypto';
|
|
29
30
|
import { distDir, rootDir } from '../path.js';
|
|
30
|
-
import { R as RandomSequencer, i as isPackageExists, e as requireMicromatch, h as hash, V as VitestCache, f as configDefaults, g as getFilePoolName, j as isBrowserEnabled, m as mm, a as resolveConfig, k as groupBy, w as wildcardPatternToRegExp, l as createPool, b as resolveApiServerConfig, s as stdout } from './resolveConfig.
|
|
31
|
+
import { R as RandomSequencer, i as isPackageExists, e as requireMicromatch, h as hash, V as VitestCache, f as configDefaults, g as getFilePoolName, j as isBrowserEnabled, m as mm, a as resolveConfig, k as groupBy, w as wildcardPatternToRegExp, l as createPool, b as resolveApiServerConfig, s as stdout } from './resolveConfig.BT-MMQUD.js';
|
|
31
32
|
import { i as isTTY, b as isWindows, c as convertTasksToEvents } from './typechecker.CdcjdhoT.js';
|
|
32
33
|
import { Console } from 'node:console';
|
|
33
34
|
import c from 'tinyrainbow';
|
|
@@ -4884,6 +4885,21 @@ function stringifyReplace(key, value) {
|
|
|
4884
4885
|
}
|
|
4885
4886
|
}
|
|
4886
4887
|
|
|
4888
|
+
function isValidApiRequest(config, req) {
|
|
4889
|
+
const url = new URL(req.url ?? "", "http://localhost");
|
|
4890
|
+
try {
|
|
4891
|
+
const token = url.searchParams.get("token");
|
|
4892
|
+
if (token && crypto.timingSafeEqual(
|
|
4893
|
+
Buffer.from(token),
|
|
4894
|
+
Buffer.from(config.api.token)
|
|
4895
|
+
)) {
|
|
4896
|
+
return true;
|
|
4897
|
+
}
|
|
4898
|
+
} catch {
|
|
4899
|
+
}
|
|
4900
|
+
return false;
|
|
4901
|
+
}
|
|
4902
|
+
|
|
4887
4903
|
function setup(ctx, _server) {
|
|
4888
4904
|
const wss = new WebSocketServer({ noServer: true });
|
|
4889
4905
|
const clients = /* @__PURE__ */ new Map();
|
|
@@ -4896,6 +4912,10 @@ function setup(ctx, _server) {
|
|
|
4896
4912
|
if (pathname !== API_PATH) {
|
|
4897
4913
|
return;
|
|
4898
4914
|
}
|
|
4915
|
+
if (!isValidApiRequest(ctx.config, request)) {
|
|
4916
|
+
socket.destroy();
|
|
4917
|
+
return;
|
|
4918
|
+
}
|
|
4899
4919
|
wss.handleUpgrade(request, socket, head, (ws) => {
|
|
4900
4920
|
wss.emit("connection", ws, request);
|
|
4901
4921
|
setupClient(ws);
|
|
@@ -5167,7 +5187,9 @@ class Logger {
|
|
|
5167
5187
|
this._highlights.clear();
|
|
5168
5188
|
this.addCleanupListeners();
|
|
5169
5189
|
this.registerUnhandledRejection();
|
|
5170
|
-
this.outputStream.
|
|
5190
|
+
if (this.outputStream.isTTY) {
|
|
5191
|
+
this.outputStream.write(HIDE_CURSOR);
|
|
5192
|
+
}
|
|
5171
5193
|
}
|
|
5172
5194
|
_clearScreenPending;
|
|
5173
5195
|
_highlights = /* @__PURE__ */ new Map();
|
|
@@ -5381,7 +5403,9 @@ Vitest found ${errors.length} error${errors.length > 1 ? "s" : ""} not related t
|
|
|
5381
5403
|
addCleanupListeners() {
|
|
5382
5404
|
const cleanup = () => {
|
|
5383
5405
|
this.cleanupListeners.forEach((fn) => fn());
|
|
5384
|
-
this.outputStream.
|
|
5406
|
+
if (this.outputStream.isTTY) {
|
|
5407
|
+
this.outputStream.write(SHOW_CURSOR);
|
|
5408
|
+
}
|
|
5385
5409
|
};
|
|
5386
5410
|
const onExit = (signal, exitCode) => {
|
|
5387
5411
|
cleanup();
|
|
@@ -12468,7 +12492,6 @@ class Vitest {
|
|
|
12468
12492
|
};
|
|
12469
12493
|
}
|
|
12470
12494
|
async collect(filters) {
|
|
12471
|
-
this._onClose = [];
|
|
12472
12495
|
const files = await this.specifications.getRelevantTestSpecifications(filters);
|
|
12473
12496
|
if (!files.length) {
|
|
12474
12497
|
return { testModules: [], unhandledErrors: [] };
|
|
@@ -12495,7 +12518,6 @@ class Vitest {
|
|
|
12495
12518
|
* @param filters String filters to match the test files
|
|
12496
12519
|
*/
|
|
12497
12520
|
async start(filters) {
|
|
12498
|
-
this._onClose = [];
|
|
12499
12521
|
try {
|
|
12500
12522
|
await this.initCoverageProvider();
|
|
12501
12523
|
await this.coverageProvider?.clean(this.config.coverage.clean);
|
|
@@ -12536,7 +12558,6 @@ class Vitest {
|
|
|
12536
12558
|
* If the `--watch` flag is provided, Vitest will still run changed tests even if this method was not called.
|
|
12537
12559
|
*/
|
|
12538
12560
|
async init() {
|
|
12539
|
-
this._onClose = [];
|
|
12540
12561
|
try {
|
|
12541
12562
|
await this.initCoverageProvider();
|
|
12542
12563
|
await this.coverageProvider?.clean(this.config.coverage.clean);
|
|
@@ -13847,4 +13868,4 @@ var cliApi = /*#__PURE__*/Object.freeze({
|
|
|
13847
13868
|
startVitest: startVitest
|
|
13848
13869
|
});
|
|
13849
13870
|
|
|
13850
|
-
export { FilesNotFoundError as F, GitNotFoundError as G, TestModule as T, Vitest as V, VitestPlugin as a, VitestPackageInstaller as b, createVitest as c, registerConsoleShortcuts as d, createViteLogger as e, cliApi as f, resolveFsAllow as r, startVitest as s };
|
|
13871
|
+
export { FilesNotFoundError as F, GitNotFoundError as G, TestModule as T, Vitest as V, VitestPlugin as a, VitestPackageInstaller as b, createVitest as c, registerConsoleShortcuts as d, createViteLogger as e, cliApi as f, isValidApiRequest as i, resolveFsAllow as r, startVitest as s };
|
|
@@ -2195,7 +2195,9 @@ interface ResolvedConfig extends Omit<Required<UserConfig>, 'project' | 'config'
|
|
|
2195
2195
|
poolOptions?: ResolvedPoolOptions;
|
|
2196
2196
|
reporters: (InlineReporter | ReporterWithOptions)[];
|
|
2197
2197
|
defines: Record<string, any>;
|
|
2198
|
-
api
|
|
2198
|
+
api: ApiConfig & {
|
|
2199
|
+
token: string;
|
|
2200
|
+
};
|
|
2199
2201
|
cliExclude?: string[];
|
|
2200
2202
|
project: string[];
|
|
2201
2203
|
benchmark?: Required<Omit<BenchmarkUserOptions, 'outputFile' | 'compare' | 'outputJson'>> & Pick<BenchmarkUserOptions, 'outputFile' | 'compare' | 'outputJson'>;
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import crypto from 'node:crypto';
|
|
1
2
|
import { slash, createDefer, shuffle, toArray } from '@vitest/utils';
|
|
2
3
|
import fs, { statSync, realpathSync, promises as promises$1 } from 'node:fs';
|
|
3
4
|
import { mkdir, writeFile } from 'node:fs/promises';
|
|
@@ -15,7 +16,6 @@ import * as nodeos from 'node:os';
|
|
|
15
16
|
import nodeos__default from 'node:os';
|
|
16
17
|
import { w as wrapSerializableConfig, a as Typechecker, b as isWindows } from './typechecker.CdcjdhoT.js';
|
|
17
18
|
import { isCI, provider } from 'std-env';
|
|
18
|
-
import crypto from 'node:crypto';
|
|
19
19
|
import { isatty } from 'node:tty';
|
|
20
20
|
import { g as getDefaultExportFromCjs } from './_commonjsHelpers.BFTU3MAI.js';
|
|
21
21
|
import require$$0 from 'util';
|
|
@@ -8287,7 +8287,8 @@ ${JSON.stringify({ browser: { provider: "playwright", instances: [{ browser: "ch
|
|
|
8287
8287
|
resolved.diff = resolvePath(resolved.diff, resolved.root);
|
|
8288
8288
|
resolved.forceRerunTriggers.push(resolved.diff);
|
|
8289
8289
|
}
|
|
8290
|
-
|
|
8290
|
+
const api = resolveApiServerConfig(options, defaultPort);
|
|
8291
|
+
resolved.api = { ...api, token: crypto.randomUUID() };
|
|
8291
8292
|
if (options.related) {
|
|
8292
8293
|
resolved.related = toArray(options.related).map(
|
|
8293
8294
|
(file) => resolve(resolved.root, file)
|
package/dist/cli.js
CHANGED
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 { R as ResolvedCoverageOptions, d as CoverageV8Options, U as UserWorkspaceConfig, e as UserProjectConfigFn, f as UserProjectConfigExport, T as TestProjectConfiguration } from './chunks/reporters.
|
|
4
|
-
export { W as WorkspaceProjectConfiguration } from './chunks/reporters.
|
|
5
|
-
import './chunks/vite.
|
|
3
|
+
import { R as ResolvedCoverageOptions, d as CoverageV8Options, U as UserWorkspaceConfig, e as UserProjectConfigFn, f as UserProjectConfigExport, T as TestProjectConfiguration } from './chunks/reporters.6vxQttCV.js';
|
|
4
|
+
export { W as WorkspaceProjectConfiguration } from './chunks/reporters.6vxQttCV.js';
|
|
5
|
+
import './chunks/vite.Cu7NWuBa.js';
|
|
6
6
|
import '@vitest/runner';
|
|
7
7
|
import './chunks/environment.d8YfPkTm.js';
|
|
8
8
|
import '@vitest/utils';
|
package/dist/coverage.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as vite from 'vite';
|
|
2
|
-
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.
|
|
2
|
+
import { R as ResolvedCoverageOptions, V as Vitest, C as CoverageMap, a as ReportContext } from './chunks/reporters.6vxQttCV.js';
|
|
3
3
|
import { A as AfterSuiteRunMeta } from './chunks/environment.d8YfPkTm.js';
|
|
4
4
|
import '@vitest/runner';
|
|
5
5
|
import '@vitest/utils';
|
package/dist/coverage.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { existsSync, promises, readdirSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { c as coverageConfigDefaults, r as resolveCoverageReporters, m as mm } from './chunks/resolveConfig.
|
|
2
|
+
import { c as coverageConfigDefaults, r as resolveCoverageReporters, m as mm } from './chunks/resolveConfig.BT-MMQUD.js';
|
|
3
3
|
import { resolve, relative } from 'pathe';
|
|
4
4
|
import c from 'tinyrainbow';
|
|
5
|
+
import 'node:crypto';
|
|
5
6
|
import '@vitest/utils';
|
|
6
7
|
import 'node:fs/promises';
|
|
7
8
|
import 'node:module';
|
|
@@ -21,7 +22,6 @@ import 'tinyexec';
|
|
|
21
22
|
import '@vitest/runner/utils';
|
|
22
23
|
import 'vite';
|
|
23
24
|
import 'fs';
|
|
24
|
-
import 'node:crypto';
|
|
25
25
|
import 'node:tty';
|
|
26
26
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
27
27
|
import 'util';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import { TaskResultPack as TaskResultPack$1, TaskEventPack, File as File$1, 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, OnTestFailedHandler, OnTestFinishedHandler, RunMode, Custom as RunnerCustomCase, Task as RunnerTask, TaskBase as RunnerTaskBase, TaskResult as RunnerTaskResult, TaskResultPack as RunnerTaskResultPack, Test as RunnerTestCase, File as RunnerTestFile, Suite as RunnerTestSuite, SuiteAPI, SuiteCollector, SuiteFactory, TaskContext, TaskCustomOptions, TaskMeta, TaskState, TestAPI, TestContext, TestFunction, TestOptions, afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
|
3
|
-
import { S as SerializedTestSpecification, b as CoverageProvider$1, a as ReportContext$1, c as CoverageProviderModule$1, g as CoverageReporter$1, h as CoverageProviderName, i as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, j as CoverageIstanbulOptions$1, d as CoverageV8Options$1, k as CustomProviderOptions$1, l as Reporter$1, V as Vitest$1, m as BrowserScript$1, n as BrowserConfigOptions$1, o as BuiltinEnvironment$1, p as VitestEnvironment$1, P as Pool$1, q as PoolOptions$1, r as CSSModuleScopeStrategy$1, A as ApiConfig$1, s as VitestRunMode$1, D as DepsOptimizationOptions$1, t as TransformModePatterns$1, I as InlineConfig$1, u as TypecheckConfig$1, v as UserConfig$1, w as ResolvedConfig$1, x as ProjectConfig$1, U as UserWorkspaceConfig$1, y as BenchmarkUserOptions$1 } from './chunks/reporters.
|
|
3
|
+
import { S as SerializedTestSpecification, b as CoverageProvider$1, a as ReportContext$1, c as CoverageProviderModule$1, g as CoverageReporter$1, h as CoverageProviderName, i as CoverageOptions$1, R as ResolvedCoverageOptions$1, B as BaseCoverageOptions$1, j as CoverageIstanbulOptions$1, d as CoverageV8Options$1, k as CustomProviderOptions$1, l as Reporter$1, V as Vitest$1, m as BrowserScript$1, n as BrowserConfigOptions$1, o as BuiltinEnvironment$1, p as VitestEnvironment$1, P as Pool$1, q as PoolOptions$1, r as CSSModuleScopeStrategy$1, A as ApiConfig$1, s as VitestRunMode$1, D as DepsOptimizationOptions$1, t as TransformModePatterns$1, I as InlineConfig$1, u as TypecheckConfig$1, v as UserConfig$1, w as ResolvedConfig$1, x as ProjectConfig$1, U as UserWorkspaceConfig$1, y as BenchmarkUserOptions$1 } from './chunks/reporters.6vxQttCV.js';
|
|
4
4
|
import { W as WorkerContext$1 } from './chunks/worker.B1y96qmv.js';
|
|
5
5
|
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.CnI8_G5V.js';
|
|
6
6
|
import { M as ModuleGraphData, b as Awaitable$1, U as UserConsoleLog, 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.d8YfPkTm.js';
|
|
7
7
|
export { A as AfterSuiteRunMeta, g as ModuleCache } from './chunks/environment.d8YfPkTm.js';
|
|
8
8
|
import { a as BirpcReturn, b as WorkerRPC$1 } from './chunks/worker.CIpff8Eg.js';
|
|
9
9
|
export { C as ContextRPC, d as ContextTestEnvironment, e as ResolveIdFunction, c as RunnerRPC, R as RuntimeRPC, W as WorkerGlobalState } from './chunks/worker.CIpff8Eg.js';
|
|
10
|
-
import './chunks/vite.
|
|
10
|
+
import './chunks/vite.Cu7NWuBa.js';
|
|
11
11
|
import { S as SerializedConfig, F as FakeTimerInstallOpts, R as RuntimeOptions } from './chunks/config.BRtC-JeT.js';
|
|
12
12
|
export { b as RuntimeConfig, a as SerializedCoverageConfig } from './chunks/config.BRtC-JeT.js';
|
|
13
13
|
import { ExpectStatic } from '@vitest/expect';
|
package/dist/node.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { s as VitestRunMode, z as VitestOptions, V as Vitest, v as UserConfig$1, A as ApiConfig, E as TestProject,
|
|
2
|
-
export { B as BaseCoverageOptions, y as BenchmarkUserOptions, ad as BrowserBuiltinProvider, ae as BrowserCommand, af as BrowserCommandContext, n as BrowserConfigOptions, ag as BrowserInstanceOption, ah as BrowserOrchestrator, ai as BrowserProvider, aj as BrowserProviderInitializationOptions, ak as BrowserProviderModule, al as BrowserProviderOptions, m as BrowserScript, am as BrowserServerState, an as BrowserServerStateSession, o as BuiltinEnvironment, ao as CDPSession, r as CSSModuleScopeStrategy, j as CoverageIstanbulOptions, i as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule, g as CoverageReporter, d as CoverageV8Options, k as CustomProviderOptions, D as DepsOptimizationOptions, Z as HTMLOptions, I as InlineConfig, $ as JUnitOptions, _ as JsonOptions, O as OnServerRestartHandler, J as OnTestsRerunHandler, ap as ParentProjectBrowser, P as Pool, q as PoolOptions, N as ProcessPool, aq as ProjectBrowser, x as ProjectConfig, a as ReportContext, aw as ReportedHookContext, l as Reporter, at as ResolveSnapshotPathHandler, au as ResolveSnapshotPathHandlerContext, ar as ResolvedBrowserOptions, R as ResolvedCoverageOptions, as as ResolvedProjectConfig, Y as SerializedTestProject, a0 as TaskOptions, a1 as TestCase, a2 as TestCollection, a3 as TestDiagnostic, a4 as TestModuleState, a5 as TestResult, a6 as TestResultFailed, a7 as TestResultPassed, a8 as TestResultSkipped, ax as TestRunEndReason, av as TestRunResult, ac as TestSequencerConstructor, a9 as TestState, aa as TestSuite, ab as TestSuiteState, t as TransformModePatterns, u as TypecheckConfig, U as UserWorkspaceConfig, p as VitestEnvironment, K as VitestPackageInstaller, Q as WorkspaceSpec, X as getFilePoolName } from './chunks/reporters.
|
|
1
|
+
import { w as ResolvedConfig, s as VitestRunMode, z as VitestOptions, V as Vitest, v as UserConfig$1, A as ApiConfig, E as TestProject, F as TestSequencer, G as TestSpecification, L as Logger, H as TestModule, M as ModuleDiagnostic } from './chunks/reporters.6vxQttCV.js';
|
|
2
|
+
export { B as BaseCoverageOptions, y as BenchmarkUserOptions, ad as BrowserBuiltinProvider, ae as BrowserCommand, af as BrowserCommandContext, n as BrowserConfigOptions, ag as BrowserInstanceOption, ah as BrowserOrchestrator, ai as BrowserProvider, aj as BrowserProviderInitializationOptions, ak as BrowserProviderModule, al as BrowserProviderOptions, m as BrowserScript, am as BrowserServerState, an as BrowserServerStateSession, o as BuiltinEnvironment, ao as CDPSession, r as CSSModuleScopeStrategy, j as CoverageIstanbulOptions, i as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule, g as CoverageReporter, d as CoverageV8Options, k as CustomProviderOptions, D as DepsOptimizationOptions, Z as HTMLOptions, I as InlineConfig, $ as JUnitOptions, _ as JsonOptions, O as OnServerRestartHandler, J as OnTestsRerunHandler, ap as ParentProjectBrowser, P as Pool, q as PoolOptions, N as ProcessPool, aq as ProjectBrowser, x as ProjectConfig, a as ReportContext, aw as ReportedHookContext, l as Reporter, at as ResolveSnapshotPathHandler, au as ResolveSnapshotPathHandlerContext, ar as ResolvedBrowserOptions, R as ResolvedCoverageOptions, as as ResolvedProjectConfig, Y as SerializedTestProject, a0 as TaskOptions, a1 as TestCase, a2 as TestCollection, a3 as TestDiagnostic, a4 as TestModuleState, a5 as TestResult, a6 as TestResultFailed, a7 as TestResultPassed, a8 as TestResultSkipped, ax as TestRunEndReason, av as TestRunResult, ac as TestSequencerConstructor, a9 as TestState, aa as TestSuite, ab as TestSuiteState, t as TransformModePatterns, u as TypecheckConfig, U as UserWorkspaceConfig, p as VitestEnvironment, K as VitestPackageInstaller, Q as WorkspaceSpec, X as getFilePoolName } from './chunks/reporters.6vxQttCV.js';
|
|
3
3
|
import { UserConfig, Plugin, ResolvedConfig as ResolvedConfig$1, LogLevel, LoggerOptions, Logger as Logger$1, createServer as createServer$1 } from 'vite';
|
|
4
4
|
import * as vite from 'vite';
|
|
5
5
|
export { vite as Vite };
|
|
6
6
|
export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
7
|
+
import { IncomingMessage } from 'node:http';
|
|
7
8
|
import { R as RuntimeRPC } from './chunks/worker.CIpff8Eg.js';
|
|
8
9
|
import { Writable } from 'node:stream';
|
|
9
10
|
export { W as WorkerContext } from './chunks/worker.B1y96qmv.js';
|
|
@@ -13,7 +14,7 @@ export { Task as RunnerTask, TaskResult as RunnerTaskResult, TaskResultPack as R
|
|
|
13
14
|
export { f as EnvironmentOptions, H as HappyDOMOptions, J as JSDOMOptions } from './chunks/environment.d8YfPkTm.js';
|
|
14
15
|
export { SerializedError } from '@vitest/utils';
|
|
15
16
|
export { b as RuntimeConfig } from './chunks/config.BRtC-JeT.js';
|
|
16
|
-
import './chunks/vite.
|
|
17
|
+
import './chunks/vite.Cu7NWuBa.js';
|
|
17
18
|
export { generateFileHash } from '@vitest/runner/utils';
|
|
18
19
|
import '@vitest/utils/source-map';
|
|
19
20
|
import '@vitest/pretty-format';
|
|
@@ -29,6 +30,8 @@ import 'node:worker_threads';
|
|
|
29
30
|
import '@vitest/expect';
|
|
30
31
|
import '@vitest/snapshot/environment';
|
|
31
32
|
|
|
33
|
+
declare function isValidApiRequest(config: ResolvedConfig, req: IncomingMessage): boolean;
|
|
34
|
+
|
|
32
35
|
interface CliOptions extends UserConfig$1 {
|
|
33
36
|
/**
|
|
34
37
|
* Override the watch mode
|
|
@@ -125,4 +128,4 @@ declare const TestFile: typeof TestModule;
|
|
|
125
128
|
*/
|
|
126
129
|
type FileDiagnostic = ModuleDiagnostic;
|
|
127
130
|
|
|
128
|
-
export { ApiConfig, BaseSequencer, type CliParseOptions, type FileDiagnostic, GitNotFoundError, type GlobalSetupContext, ModuleDiagnostic, ResolvedConfig, TestFile, TestModule, TestProject, TestSequencer, TestSpecification, FilesNotFoundError as TestsNotFoundError, UserConfig$1 as UserConfig, Vitest, VitestOptions, VitestPlugin, VitestRunMode, TestProject as WorkspaceProject, createDebugger, createMethodsRPC, createServer, createViteLogger, createViteServer, createVitest, distDir, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest, version };
|
|
131
|
+
export { ApiConfig, BaseSequencer, type CliParseOptions, type FileDiagnostic, GitNotFoundError, type GlobalSetupContext, ModuleDiagnostic, ResolvedConfig, TestFile, TestModule, TestProject, TestSequencer, TestSpecification, FilesNotFoundError as TestsNotFoundError, UserConfig$1 as UserConfig, Vitest, VitestOptions, VitestPlugin, VitestRunMode, TestProject as WorkspaceProject, createDebugger, createMethodsRPC, createServer, createViteLogger, createViteServer, createVitest, distDir, isValidApiRequest, parseCLI, registerConsoleShortcuts, resolveApiServerConfig, resolveConfig, resolveFsAllow, rootDir, startVitest, version };
|
package/dist/node.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { resolveConfig as resolveConfig$1, mergeConfig, createServer as createServer$1 } from 'vite';
|
|
2
2
|
export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
3
|
-
import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.
|
|
4
|
-
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, e as createViteLogger, c as createVitest, d as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.
|
|
5
|
-
export { p as parseCLI } from './chunks/cac.
|
|
6
|
-
import { a as resolveConfig$2 } from './chunks/resolveConfig.
|
|
7
|
-
export { B as BaseSequencer, d as createMethodsRPC, g as getFilePoolName, b as resolveApiServerConfig } from './chunks/resolveConfig.
|
|
3
|
+
import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.az_rB_xZ.js';
|
|
4
|
+
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.az_rB_xZ.js';
|
|
5
|
+
export { p as parseCLI } from './chunks/cac.B_eDEFh6.js';
|
|
6
|
+
import { a as resolveConfig$2 } from './chunks/resolveConfig.BT-MMQUD.js';
|
|
7
|
+
export { B as BaseSequencer, d as createMethodsRPC, g as getFilePoolName, b as resolveApiServerConfig } from './chunks/resolveConfig.BT-MMQUD.js';
|
|
8
8
|
import { slash } from '@vitest/utils';
|
|
9
9
|
import { f as findUp } from './chunks/index.B57_6XMC.js';
|
|
10
10
|
import { resolve } from 'pathe';
|
|
@@ -46,6 +46,7 @@ import 'net';
|
|
|
46
46
|
import 'tls';
|
|
47
47
|
import 'url';
|
|
48
48
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
49
|
+
import 'node:crypto';
|
|
49
50
|
import 'os';
|
|
50
51
|
import 'path';
|
|
51
52
|
import 'vite-node/utils';
|
|
@@ -56,7 +57,6 @@ import '@vitest/utils/error';
|
|
|
56
57
|
import 'node:readline';
|
|
57
58
|
import 'node:process';
|
|
58
59
|
import 'node:v8';
|
|
59
|
-
import 'node:crypto';
|
|
60
60
|
import 'node:tty';
|
|
61
61
|
import 'util';
|
|
62
62
|
import 'node:events';
|
package/dist/reporters.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { aM as BaseReporter, ay as BasicReporter, aN as BenchmarkBuiltinReporters, az as BenchmarkReporter, aA as BenchmarkReportsMap, aO as BuiltinReporterOptions, aP as BuiltinReporters, aB as DefaultReporter, aC as DotReporter, aD as GithubActionsReporter, aE as HangingProcessReporter, aG as JUnitReporter, aQ as JsonAssertionResult, aF as JsonReporter, aR as JsonTestResult, aS as JsonTestResults, aw as ReportedHookContext, l as Reporter, aH as ReportersMap, aI as TapFlatReporter, aJ as TapReporter, ax as TestRunEndReason, aK as VerboseBenchmarkReporter, aL as VerboseReporter } from './chunks/reporters.
|
|
1
|
+
export { aM as BaseReporter, ay as BasicReporter, aN as BenchmarkBuiltinReporters, az as BenchmarkReporter, aA as BenchmarkReportsMap, aO as BuiltinReporterOptions, aP as BuiltinReporters, aB as DefaultReporter, aC as DotReporter, aD as GithubActionsReporter, aE as HangingProcessReporter, aG as JUnitReporter, aQ as JsonAssertionResult, aF as JsonReporter, aR as JsonTestResult, aS as JsonTestResults, aw as ReportedHookContext, l as Reporter, aH as ReportersMap, aI as TapFlatReporter, aJ as TapReporter, ax as TestRunEndReason, aK as VerboseBenchmarkReporter, aL as VerboseReporter } from './chunks/reporters.6vxQttCV.js';
|
|
2
2
|
import '@vitest/runner';
|
|
3
3
|
import './chunks/environment.d8YfPkTm.js';
|
|
4
4
|
import '@vitest/utils';
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "3.0.
|
|
4
|
+
"version": "3.0.5",
|
|
5
5
|
"description": "Next generation testing framework powered by Vite",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -123,8 +123,8 @@
|
|
|
123
123
|
"@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0",
|
|
124
124
|
"happy-dom": "*",
|
|
125
125
|
"jsdom": "*",
|
|
126
|
-
"@vitest/browser": "3.0.
|
|
127
|
-
"@vitest/ui": "3.0.
|
|
126
|
+
"@vitest/browser": "3.0.5",
|
|
127
|
+
"@vitest/ui": "3.0.5"
|
|
128
128
|
},
|
|
129
129
|
"peerDependenciesMeta": {
|
|
130
130
|
"@edge-runtime/vm": {
|
|
@@ -162,14 +162,14 @@
|
|
|
162
162
|
"tinyrainbow": "^2.0.0",
|
|
163
163
|
"vite": "^5.0.0 || ^6.0.0",
|
|
164
164
|
"why-is-node-running": "^2.3.0",
|
|
165
|
-
"@vitest/expect": "3.0.
|
|
166
|
-
"@vitest/
|
|
167
|
-
"@vitest/
|
|
168
|
-
"@vitest/
|
|
169
|
-
"@vitest/
|
|
170
|
-
"@vitest/
|
|
171
|
-
"@vitest/utils": "3.0.
|
|
172
|
-
"vite-node": "3.0.
|
|
165
|
+
"@vitest/expect": "3.0.5",
|
|
166
|
+
"@vitest/mocker": "3.0.5",
|
|
167
|
+
"@vitest/runner": "3.0.5",
|
|
168
|
+
"@vitest/snapshot": "3.0.5",
|
|
169
|
+
"@vitest/spy": "3.0.5",
|
|
170
|
+
"@vitest/pretty-format": "^3.0.5",
|
|
171
|
+
"@vitest/utils": "3.0.5",
|
|
172
|
+
"vite-node": "3.0.5"
|
|
173
173
|
},
|
|
174
174
|
"devDependencies": {
|
|
175
175
|
"@ampproject/remapping": "^2.3.0",
|