vitest 1.3.0 → 1.4.0
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 +1 -2
- package/dist/browser.d.ts +1 -1
- package/dist/browser.js +1 -1
- package/dist/chunks/{integrations-globals.FlQVNhQx.js → integrations-globals.trMeEBob.js} +3 -3
- package/dist/chunks/{runtime-console.Iloo9fIt.js → runtime-console.tUKE_2UJ.js} +4 -4
- package/dist/chunks/{runtime-runBaseTests.0UwIvo_U.js → runtime-runBaseTests.SKlFOhuq.js} +6 -6
- package/dist/cli.js +41 -1373
- package/dist/config.d.ts +1 -1
- package/dist/coverage.d.ts +6 -6
- package/dist/coverage.js +34 -3
- package/dist/environments.d.ts +1 -1
- package/dist/execute.d.ts +1 -1
- package/dist/execute.js +2 -2
- package/dist/index.d.ts +5 -3
- package/dist/index.js +4 -4
- package/dist/node.d.ts +11 -3
- package/dist/node.js +21 -13
- package/dist/{reporters-QGe8gs4b.d.ts → reporters-P7C2ytIv.d.ts} +230 -173
- package/dist/reporters.d.ts +1 -1
- package/dist/reporters.js +3 -3
- package/dist/runners.d.ts +2 -1
- package/dist/runners.js +8 -3
- package/dist/{suite-xGC-mxBC.d.ts → suite-a18diDsI.d.ts} +1 -1
- package/dist/suite.d.ts +2 -2
- package/dist/utils.d.ts +5 -0
- package/dist/utils.js +6 -0
- package/dist/vendor/{base.knFzp7G3.js → base.Xt0Omgh7.js} +9 -3
- package/dist/vendor/{base.RpormaJz.js → base.nhvUBzQY.js} +2 -2
- package/dist/vendor/{cli-api.RIYLcWhB.js → cac.RvTIWZBK.js} +6288 -106
- package/dist/vendor/{execute.aFSzc0Da.js → execute.2_yoIC01.js} +1 -1
- package/dist/vendor/{index.n-Ib4UWN.js → index.BeX1oZht.js} +1 -1
- package/dist/vendor/{index.CKbXK54q.js → index.LNWuEnUT.js} +1 -1
- package/dist/vendor/{index.QcWmThJv.js → index.e9RDLAeW.js} +43 -25
- package/dist/vendor/{setup-common.NSpEdAQm.js → setup-common.vyF1kALR.js} +1 -1
- package/dist/vendor/{utils.GbToHGHI.js → utils.w0xgzP1h.js} +15 -10
- package/dist/vendor/{vi.-Nr_x6dl.js → vi.JYQecGiw.js} +16 -1
- package/dist/vendor/{vm.UmCkcXp-.js → vm.cAHVDF92.js} +2 -2
- package/dist/worker.js +20 -5
- package/dist/workers/forks.js +5 -5
- package/dist/workers/runVmTests.js +5 -5
- package/dist/workers/threads.js +4 -4
- package/dist/workers/vmForks.js +6 -6
- package/dist/workers/vmThreads.js +5 -5
- package/dist/workers.d.ts +6 -3
- package/dist/workers.js +6 -6
- package/package.json +10 -10
- package/dist/chunks/api-setup.Xh60JpeM.js +0 -4771
package/LICENSE.md
CHANGED
|
@@ -3,8 +3,7 @@ Vitest is released under the MIT license:
|
|
|
3
3
|
|
|
4
4
|
MIT License
|
|
5
5
|
|
|
6
|
-
Copyright (c) 2021-Present
|
|
7
|
-
Copyright (c) 2021-Present Matias Capeletto <https://github.com/patak-dev>
|
|
6
|
+
Copyright (c) 2021-Present Vitest Team
|
|
8
7
|
|
|
9
8
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
10
9
|
of this software and associated documentation files (the "Software"), to deal
|
package/dist/browser.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { processError, startTests } from '@vitest/runner';
|
|
2
|
-
import { R as ResolvedConfig, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule } from './reporters-
|
|
2
|
+
import { R as ResolvedConfig, C as CoverageOptions, b as CoverageProvider, c as CoverageProviderModule } from './reporters-P7C2ytIv.js';
|
|
3
3
|
import { VitestExecutor } from './execute.js';
|
|
4
4
|
import 'vite';
|
|
5
5
|
import 'vite-node';
|
package/dist/browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { processError, startTests } from '@vitest/runner';
|
|
2
|
-
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './vendor/setup-common.
|
|
2
|
+
export { l as loadDiffConfig, a as loadSnapshotSerializers, s as setupCommonEnv } from './vendor/setup-common.vyF1kALR.js';
|
|
3
3
|
export { g as getCoverageProvider, a as startCoverageInsideWorker, s as stopCoverageInsideWorker, t as takeCoverageInsideWorker } from './vendor/coverage.E7sG1b3r.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import '@vitest/snapshot';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { g as globalApis } from '../vendor/constants.K-Wf1PUy.js';
|
|
2
|
-
import { V as VitestIndex } from '../vendor/index.
|
|
2
|
+
import { V as VitestIndex } from '../vendor/index.BeX1oZht.js';
|
|
3
3
|
import '@vitest/runner';
|
|
4
4
|
import '../vendor/benchmark.eeqk2rd8.js';
|
|
5
5
|
import '@vitest/runner/utils';
|
|
@@ -9,7 +9,7 @@ import 'pathe';
|
|
|
9
9
|
import 'std-env';
|
|
10
10
|
import '../vendor/global.CkGT_TMy.js';
|
|
11
11
|
import '../vendor/run-once.Olz_Zkd8.js';
|
|
12
|
-
import '../vendor/vi
|
|
12
|
+
import '../vendor/vi.JYQecGiw.js';
|
|
13
13
|
import 'chai';
|
|
14
14
|
import '../vendor/_commonjsHelpers.jjO7Zipk.js';
|
|
15
15
|
import '@vitest/expect';
|
|
@@ -17,7 +17,7 @@ import '@vitest/snapshot';
|
|
|
17
17
|
import '@vitest/utils/error';
|
|
18
18
|
import '../vendor/tasks.IknbGB2n.js';
|
|
19
19
|
import '@vitest/utils/source-map';
|
|
20
|
-
import '../vendor/base.
|
|
20
|
+
import '../vendor/base.Xt0Omgh7.js';
|
|
21
21
|
import '../vendor/date.Ns1pGd_X.js';
|
|
22
22
|
import '@vitest/spy';
|
|
23
23
|
|
|
@@ -72,8 +72,8 @@ function createCustomConsole(state) {
|
|
|
72
72
|
}
|
|
73
73
|
const stdout = new Writable({
|
|
74
74
|
write(data, encoding, callback) {
|
|
75
|
-
var _a;
|
|
76
|
-
const id = ((_a = state == null ? void 0 : state.current) == null ? void 0 : _a.id)
|
|
75
|
+
var _a, _b, _c;
|
|
76
|
+
const id = ((_a = state == null ? void 0 : state.current) == null ? void 0 : _a.id) || ((_c = (_b = state == null ? void 0 : state.current) == null ? void 0 : _b.file) == null ? void 0 : _c.id) || getTaskIdByStack(state.ctx.config.root);
|
|
77
77
|
let timer = timers.get(id);
|
|
78
78
|
if (timer) {
|
|
79
79
|
timer.stdoutTime = timer.stdoutTime || RealDate.now();
|
|
@@ -93,8 +93,8 @@ function createCustomConsole(state) {
|
|
|
93
93
|
});
|
|
94
94
|
const stderr = new Writable({
|
|
95
95
|
write(data, encoding, callback) {
|
|
96
|
-
var _a;
|
|
97
|
-
const id = ((_a = state == null ? void 0 : state.current) == null ? void 0 : _a.id)
|
|
96
|
+
var _a, _b, _c;
|
|
97
|
+
const id = ((_a = state == null ? void 0 : state.current) == null ? void 0 : _a.id) || ((_c = (_b = state == null ? void 0 : state.current) == null ? void 0 : _b.file) == null ? void 0 : _c.id) || getTaskIdByStack(state.ctx.config.root);
|
|
98
98
|
let timer = timers.get(id);
|
|
99
99
|
if (timer) {
|
|
100
100
|
timer.stderrTime = timer.stderrTime || RealDate.now();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import { performance } from 'node:perf_hooks';
|
|
2
2
|
import { startTests } from '@vitest/runner';
|
|
3
3
|
import '../vendor/index.ir9i0ywP.js';
|
|
4
|
-
import { a as globalExpect, r as resetModules, v as vi } from '../vendor/vi
|
|
4
|
+
import { a as globalExpect, r as resetModules, v as vi } from '../vendor/vi.JYQecGiw.js';
|
|
5
5
|
import { a as startCoverageInsideWorker, s as stopCoverageInsideWorker } from '../vendor/coverage.E7sG1b3r.js';
|
|
6
|
-
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.
|
|
6
|
+
import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.LNWuEnUT.js';
|
|
7
7
|
import { createRequire } from 'node:module';
|
|
8
8
|
import util from 'node:util';
|
|
9
9
|
import timers from 'node:timers';
|
|
10
10
|
import { isatty } from 'node:tty';
|
|
11
11
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
12
12
|
import { setupColors, createColors, getSafeTimers } from '@vitest/utils';
|
|
13
|
-
import { V as VitestIndex } from '../vendor/index.
|
|
14
|
-
import { s as setupCommonEnv } from '../vendor/setup-common.
|
|
13
|
+
import { V as VitestIndex } from '../vendor/index.BeX1oZht.js';
|
|
14
|
+
import { s as setupCommonEnv } from '../vendor/setup-common.vyF1kALR.js';
|
|
15
15
|
import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
|
|
16
16
|
import 'pathe';
|
|
17
17
|
import 'std-env';
|
|
@@ -23,7 +23,7 @@ import '@vitest/snapshot';
|
|
|
23
23
|
import '@vitest/utils/error';
|
|
24
24
|
import '../vendor/tasks.IknbGB2n.js';
|
|
25
25
|
import '@vitest/utils/source-map';
|
|
26
|
-
import '../vendor/base.
|
|
26
|
+
import '../vendor/base.Xt0Omgh7.js';
|
|
27
27
|
import '../vendor/date.Ns1pGd_X.js';
|
|
28
28
|
import '@vitest/spy';
|
|
29
29
|
import '@vitest/snapshot/environment';
|
|
@@ -69,7 +69,7 @@ async function setupGlobalEnv(config, { environment }) {
|
|
|
69
69
|
await setupConsoleLogSpy(state);
|
|
70
70
|
}
|
|
71
71
|
async function setupConsoleLogSpy(state) {
|
|
72
|
-
const { createCustomConsole } = await import('./runtime-console.
|
|
72
|
+
const { createCustomConsole } = await import('./runtime-console.tUKE_2UJ.js');
|
|
73
73
|
globalThis.console = createCustomConsole(state);
|
|
74
74
|
}
|
|
75
75
|
async function withEnv({ environment }, options, fn) {
|