vitest 2.1.0 → 2.1.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/dist/browser.d.ts +5 -5
- package/dist/browser.js +1 -1
- package/dist/chunks/{base.BlXpj3e_.js → base.DwXGwWst.js} +1 -10
- package/dist/chunks/{base.CsQmmYBA.js → base.tiemDJX6.js} +1 -1
- package/dist/chunks/{benchmark.puBFxyfE.d.ts → benchmark.JVlTzojj.d.ts} +2 -0
- package/dist/chunks/{cac.Ce8UWvQp.js → cac.B9PaPYY1.js} +7 -7
- package/dist/chunks/cli-api.CHxC4-U8.js +11754 -0
- package/dist/chunks/{config.CHuotKvS.d.ts → config.Crbj2GAb.d.ts} +3 -0
- package/dist/chunks/{creator.zfBZSJzo.js → creator.Cf-MKt9i.js} +7 -10
- package/dist/chunks/{environment.C5eAp3K6.d.ts → environment.CzISCQ7o.d.ts} +1 -0
- package/dist/chunks/{globals.C03P0O1a.js → globals.HsM2o-0O.js} +3 -3
- package/dist/chunks/{index.Bn75ITYg.js → index.BpojBOif.js} +34 -25
- package/dist/chunks/{index.DkN6V87F.js → index.Ckn0Cw1h.js} +2 -1
- package/dist/chunks/{index.zPibhCkV.js → index.FcPVJkIQ.js} +633 -582
- package/dist/chunks/index.mAqbj9F9.js +140 -0
- package/dist/chunks/{reporters.WnPwkmgA.d.ts → reporters.DAfKSDh5.d.ts} +17 -12
- package/dist/chunks/{resolveConfig.-K5hHm0S.js → resolveConfig.D1DENLPF.js} +3490 -3338
- package/dist/chunks/{runBaseTests.9YDrdSI4.js → runBaseTests.D-Gcin7G.js} +5 -5
- package/dist/chunks/{setup-common.DV1PI68g.js → setup-common.DF96bIYE.js} +1 -1
- package/dist/chunks/{suite.CcK46U-P.d.ts → suite.BMWOKiTe.d.ts} +1 -1
- package/dist/chunks/{utils.Dbnmsfq1.js → utils.CY6Spixo.js} +26 -47
- package/dist/chunks/vi.DUs2eKik.js +3943 -0
- package/dist/chunks/{vite.D2yAwzwa.d.ts → vite.8fk186v-.d.ts} +1 -1
- package/dist/chunks/{worker.CmPmTxgH.d.ts → worker.Chrs-_NL.d.ts} +2 -2
- package/dist/chunks/{worker.Bws9Zuxu.d.ts → worker.Qtv8v5nL.d.ts} +1 -1
- package/dist/cli.js +2 -2
- package/dist/config.cjs +2 -1
- package/dist/config.d.ts +5 -5
- package/dist/config.js +2 -1
- package/dist/coverage.d.ts +4 -4
- package/dist/coverage.js +2 -2
- package/dist/environments.d.ts +2 -2
- package/dist/execute.d.ts +3 -3
- package/dist/index.d.ts +14 -14
- package/dist/index.js +5 -5
- package/dist/node.d.ts +8 -8
- package/dist/node.js +9 -9
- package/dist/reporters.d.ts +4 -4
- package/dist/reporters.js +4 -3
- package/dist/runners.d.ts +1 -1
- package/dist/runners.js +8 -2
- package/dist/suite.d.ts +2 -2
- package/dist/worker.js +11 -3
- package/dist/workers/forks.js +1 -1
- package/dist/workers/runVmTests.js +8 -5
- package/dist/workers/threads.js +1 -1
- package/dist/workers.d.ts +4 -4
- package/dist/workers.js +2 -2
- package/package.json +11 -12
- package/dist/chunks/cli-api.KmLFBnKP.js +0 -11397
- package/dist/chunks/index.iyKRMe3s.js +0 -131
- package/dist/chunks/vi.D6IHiKAI.js +0 -3746
package/dist/browser.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
export { collectTests, processError, startTests } from '@vitest/runner';
|
|
2
2
|
import { DiffOptions } from '@vitest/expect';
|
|
3
3
|
import { VitestExecutor } from './execute.js';
|
|
4
|
-
import { S as SerializedConfig, a as SerializedCoverageConfig } from './chunks/config.
|
|
5
|
-
import { C as CoverageProvider, a as CoverageProviderModule } from './chunks/reporters.
|
|
4
|
+
import { S as SerializedConfig, a as SerializedCoverageConfig } from './chunks/config.Crbj2GAb.js';
|
|
5
|
+
import { C as CoverageProvider, a as CoverageProviderModule } from './chunks/reporters.DAfKSDh5.js';
|
|
6
6
|
import * as spy$1 from '@vitest/spy';
|
|
7
7
|
import 'node:vm';
|
|
8
8
|
import 'vite-node/client';
|
|
9
9
|
import 'vite-node';
|
|
10
|
-
import './chunks/worker.
|
|
10
|
+
import './chunks/worker.Chrs-_NL.js';
|
|
11
11
|
import '@vitest/snapshot';
|
|
12
|
-
import './chunks/environment.
|
|
12
|
+
import './chunks/environment.CzISCQ7o.js';
|
|
13
13
|
import '@vitest/mocker';
|
|
14
14
|
import './chunks/mocker.cRtM890J.js';
|
|
15
15
|
import '@vitest/pretty-format';
|
|
@@ -22,7 +22,7 @@ import '@vitest/utils';
|
|
|
22
22
|
import '@vitest/utils/source-map';
|
|
23
23
|
import 'node:fs';
|
|
24
24
|
import 'chai';
|
|
25
|
-
import './chunks/benchmark.
|
|
25
|
+
import './chunks/benchmark.JVlTzojj.js';
|
|
26
26
|
import '@vitest/runner/utils';
|
|
27
27
|
import 'tinybench';
|
|
28
28
|
|
package/dist/browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { collectTests, processError, startTests } from '@vitest/runner';
|
|
2
|
-
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './chunks/setup-common.
|
|
2
|
+
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './chunks/setup-common.DF96bIYE.js';
|
|
3
3
|
export { g as getCoverageProvider, a as startCoverageInsideWorker, s as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './chunks/coverage.zlNdAMHK.js';
|
|
4
4
|
export { s as SpyModule } from './chunks/spy.Cf_4R5Oe.js';
|
|
5
5
|
import '@vitest/utils';
|
|
@@ -85,14 +85,5 @@ function wildcardPatternToRegExp(pattern) {
|
|
|
85
85
|
"i"
|
|
86
86
|
);
|
|
87
87
|
}
|
|
88
|
-
const urlAlphabet = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
|
|
89
|
-
function nanoid(size = 21) {
|
|
90
|
-
let id = "";
|
|
91
|
-
let i = size;
|
|
92
|
-
while (i--) {
|
|
93
|
-
id += urlAlphabet[Math.random() * 64 | 0];
|
|
94
|
-
}
|
|
95
|
-
return id;
|
|
96
|
-
}
|
|
97
88
|
|
|
98
|
-
export { AggregateErrorPonyfill as A, slash as a, isPrimitive as b,
|
|
89
|
+
export { AggregateErrorPonyfill as A, slash as a, isPrimitive as b, stdout as c, deepMerge as d, groupBy as g, isChildProcess as i, noop as n, setProcessTitle as s, toArray as t, wildcardPatternToRegExp as w };
|
|
@@ -24,7 +24,7 @@ async function runBaseTests(method, state) {
|
|
|
24
24
|
ctx.files.forEach((i) => state.moduleCache.delete(i));
|
|
25
25
|
const [executor, { run }] = await Promise.all([
|
|
26
26
|
startViteNode({ state, requestStubs: getDefaultRequestStubs() }),
|
|
27
|
-
import('./runBaseTests.
|
|
27
|
+
import('./runBaseTests.D-Gcin7G.js')
|
|
28
28
|
]);
|
|
29
29
|
await run(
|
|
30
30
|
method,
|
|
@@ -11,6 +11,8 @@ interface Benchmark extends Custom {
|
|
|
11
11
|
interface BenchmarkResult extends TaskResult {
|
|
12
12
|
name: string;
|
|
13
13
|
rank: number;
|
|
14
|
+
sampleCount: number;
|
|
15
|
+
median: number;
|
|
14
16
|
}
|
|
15
17
|
type BenchFunction = (this: Bench) => Promise<void> | void;
|
|
16
18
|
type ChainableBenchmarkAPI = ChainableFunction<'skip' | 'only' | 'todo', (name: string | Function, fn?: BenchFunction, options?: Options) => void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { normalize } from 'pathe';
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import c from 'tinyrainbow';
|
|
4
|
-
import { t as toArray } from './base.
|
|
4
|
+
import { t as toArray } from './base.DwXGwWst.js';
|
|
5
5
|
import { d as defaultPort, a as defaultBrowserPort } from './constants.fzPh7AOq.js';
|
|
6
6
|
|
|
7
7
|
function toArr(any) {
|
|
@@ -618,7 +618,7 @@ class CAC extends EventEmitter {
|
|
|
618
618
|
|
|
619
619
|
const cac = (name = "") => new CAC(name);
|
|
620
620
|
|
|
621
|
-
var version = "2.1.
|
|
621
|
+
var version = "2.1.2";
|
|
622
622
|
|
|
623
623
|
const apiConfig = (port) => ({
|
|
624
624
|
port: {
|
|
@@ -1501,13 +1501,13 @@ async function start(mode, cliFilters, options) {
|
|
|
1501
1501
|
} catch {
|
|
1502
1502
|
}
|
|
1503
1503
|
try {
|
|
1504
|
-
const { startVitest } = await import('./cli-api.
|
|
1504
|
+
const { startVitest } = await import('./cli-api.CHxC4-U8.js').then(function (n) { return n.d; });
|
|
1505
1505
|
const ctx = await startVitest(mode, cliFilters.map(normalize), normalizeCliOptions(options));
|
|
1506
1506
|
if (!ctx?.shouldKeepServer()) {
|
|
1507
1507
|
await ctx?.exit();
|
|
1508
1508
|
}
|
|
1509
1509
|
} catch (e) {
|
|
1510
|
-
const { divider } = await import('./utils.
|
|
1510
|
+
const { divider } = await import('./utils.CY6Spixo.js').then(function (n) { return n.u; });
|
|
1511
1511
|
console.error(`
|
|
1512
1512
|
${c.red(divider(c.bold(c.inverse(" Startup Error "))))}`);
|
|
1513
1513
|
console.error(e);
|
|
@@ -1523,7 +1523,7 @@ async function init(project) {
|
|
|
1523
1523
|
console.error(new Error('Only the "browser" project is supported. Use "vitest init browser" to create a new project.'));
|
|
1524
1524
|
process.exit(1);
|
|
1525
1525
|
}
|
|
1526
|
-
const { create } = await import('./creator.
|
|
1526
|
+
const { create } = await import('./creator.Cf-MKt9i.js');
|
|
1527
1527
|
await create();
|
|
1528
1528
|
}
|
|
1529
1529
|
async function collect(mode, cliFilters, options) {
|
|
@@ -1532,7 +1532,7 @@ async function collect(mode, cliFilters, options) {
|
|
|
1532
1532
|
} catch {
|
|
1533
1533
|
}
|
|
1534
1534
|
try {
|
|
1535
|
-
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.
|
|
1535
|
+
const { prepareVitest, processCollected, outputFileList } = await import('./cli-api.CHxC4-U8.js').then(function (n) { return n.d; });
|
|
1536
1536
|
const ctx = await prepareVitest(mode, {
|
|
1537
1537
|
...normalizeCliOptions(options),
|
|
1538
1538
|
watch: false,
|
|
@@ -1554,7 +1554,7 @@ async function collect(mode, cliFilters, options) {
|
|
|
1554
1554
|
}
|
|
1555
1555
|
await ctx.close();
|
|
1556
1556
|
} catch (e) {
|
|
1557
|
-
const { divider } = await import('./utils.
|
|
1557
|
+
const { divider } = await import('./utils.CY6Spixo.js').then(function (n) { return n.u; });
|
|
1558
1558
|
console.error(`
|
|
1559
1559
|
${c.red(divider(c.bold(c.inverse(" Collect Error "))))}`);
|
|
1560
1560
|
console.error(e);
|