vitest 5.0.2 → 5.0.3
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 +28 -0
- package/browser/context.d.ts +7 -1
- package/browser/context.js +5 -5
- package/dist/browser.d.ts +4 -4
- package/dist/browser.js +10 -10
- package/dist/chunks/{base.5tQXSzMP.js → base.DhkQeZwd.js} +14 -14
- package/dist/chunks/{browser.d.g5Thl309.d.ts → browser.d.3cffPS1V.d.ts} +3 -3
- package/dist/chunks/{cac.BLbEtnDd.js → cac.DfDGTQ9W.js} +9 -9
- package/dist/chunks/{cli-api.DL4Bd7Vh.js → cli-api.C4x4GGip.js} +5 -5
- package/dist/chunks/{config.d.CU_b-wJj.d.ts → config.d.BxjInJat.d.ts} +13 -15
- package/dist/chunks/{console.B09ye7y0.js → console.RBA5x-0t.js} +3 -2
- package/dist/chunks/{coverage.AipniaqB.js → coverage.S6Dao4g-.js} +1 -1
- package/dist/chunks/{coverage.CX7NN5s7.js → coverage._yXj5zeb.js} +1 -1
- package/dist/chunks/{creator.2VTnpYzN.js → creator.203NYCo3.js} +12 -12
- package/dist/chunks/{display.pkpxlVcY.js → display.CXBnkt9a.js} +1 -1
- package/dist/chunks/{doctor.BCXa6-1R.js → doctor.CpHPRoza.js} +2 -2
- package/dist/chunks/{environment.d.C6xYahWA.d.ts → environment.d.DAj1Vt__.d.ts} +1 -1
- package/dist/chunks/{globals.Brdv9iOs.js → globals.9QtHn8Sr.js} +9 -9
- package/dist/chunks/{index.DGdajAO2.js → index.C4tKZ0yW.js} +14 -11
- package/dist/chunks/{index.C-uw7tH9.js → index.DpLw24bj.js} +168 -78
- package/dist/chunks/{index.M2dsQ_UQ.js → index.cx-_w29y.js} +551 -179
- package/dist/chunks/{index.BgwtGYxD.js → index.ggMXe2IF.js} +5 -5
- package/dist/chunks/{index.hTNFpC24.js → index.k8L_ZRzq.js} +20 -5
- package/dist/chunks/{init-forks.CdGu3HUy.js → init-forks.hzLs7kMZ.js} +1 -1
- package/dist/chunks/{init-threads.2f_lsHNK.js → init-threads.COb0VD5D.js} +1 -1
- package/dist/chunks/{init.IsjtLXKe.js → init.D0qF-GGk.js} +4 -5
- package/dist/chunks/{native.CF4uT5hY.js → native.CBlba4VV.js} +2 -2
- package/dist/chunks/{nativeModuleMocker.DwRB4F9R.js → nativeModuleMocker.CXSh3m91.js} +2 -2
- package/dist/chunks/{nativeModuleRunner.J0QLzNtK.js → nativeModuleRunner.jwZPY3dg.js} +1 -1
- package/dist/chunks/{node.CfQ_OGWr.js → node.BzimPqT5.js} +1 -1
- package/dist/chunks/{pathe.M-eThtNZ.DwEga6ro.js → pathe.M-eThtNZ.CknpM8Or.js} +1 -1
- package/dist/chunks/{plugin.d.My_z-jmU.d.ts → plugin.d.BsjqSb4-.d.ts} +26 -20
- package/dist/chunks/{plugins.Cigb0uSy.js → plugins.D2ut1V9b.js} +1 -1
- package/dist/chunks/{resolver.NpfwMKt9.js → resolver.fbW9AUvG.js} +1 -1
- package/dist/chunks/{rpc.CJVl3hZH.js → rpc.BTmCtPly.js} +3 -2
- package/dist/chunks/{rpc.d.DA9Utv4e.d.ts → rpc.d.BPFHl-HE.d.ts} +1 -1
- package/dist/chunks/{run.C5UmxDPh.js → run.BTlFXlnv.js} +29 -19
- package/dist/chunks/{setup-common.Ct8rQvjH.js → setup-common.BglbuAHD.js} +3 -3
- package/dist/chunks/{source-map.BH0bbrs9.js → source-map.DUxvo12T.js} +4 -8
- package/dist/chunks/{source-map.d.YqWNcp4e.d.ts → source-map.d.BLHtC2OB.d.ts} +1 -1
- package/dist/chunks/{spy.KLHgXex_.js → spy.DgMTfhrK.js} +18 -16
- package/dist/chunks/{task-utils.d.BZm4GSQD.d.ts → task-utils.d.C-IeGxLU.d.ts} +1 -1
- package/dist/chunks/{utils.CJ0JImL8.js → utils.RcGwuOc_.js} +2 -2
- package/dist/chunks/{vm.KI2AYADz.js → vm.vTyZj_02.js} +8 -8
- package/dist/chunks/{worker.d.MLmnzOJE.d.ts → worker.d.Bt2A2mmi.d.ts} +3 -3
- package/dist/cli.js +2 -2
- package/dist/config.d.ts +9 -9
- package/dist/index.d.ts +10 -10
- package/dist/index.js +9 -9
- package/dist/module-evaluator.d.ts +3 -2
- package/dist/module-evaluator.js +8 -5
- package/dist/node.d.ts +9 -9
- package/dist/node.js +14 -14
- package/dist/runtime.d.ts +6 -6
- package/dist/runtime.js +4 -4
- package/dist/spy.js +1 -1
- package/dist/task-utils.js +2 -1
- package/dist/worker.d.ts +4 -4
- package/dist/worker.js +17 -17
- package/dist/workers/forks.js +18 -18
- package/dist/workers/runVmTests.js +14 -14
- package/dist/workers/threads.js +18 -18
- package/dist/workers/vmForks.js +12 -12
- package/dist/workers/vmThreads.js +12 -12
- package/globals.d.ts +19 -19
- package/index.cjs +3 -3
- package/optional-runtime-types.d.ts +1 -1
- package/optional-types.d.ts +1 -1
- package/package.json +20 -15
- package/suppress-warnings.cjs +1 -1
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.hzLs7kMZ.js';
|
|
2
|
+
import { r as runVmTests, s as setupVmWorker } from '../chunks/vm.vTyZj_02.js';
|
|
3
|
+
import '../chunks/init.D0qF-GGk.js';
|
|
4
4
|
import 'node:fs';
|
|
5
5
|
import 'node:module';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'vite/module-runner';
|
|
8
|
-
import '../chunks/index.
|
|
9
|
-
import '../chunks/pathe.M-eThtNZ.
|
|
8
|
+
import '../chunks/index.k8L_ZRzq.js';
|
|
9
|
+
import '../chunks/pathe.M-eThtNZ.CknpM8Or.js';
|
|
10
10
|
import '../chunks/modules.BJuCwlRJ.js';
|
|
11
11
|
import '../chunks/utils.DYj33du9.js';
|
|
12
12
|
import '../path.js';
|
|
@@ -17,19 +17,19 @@ import '../traces.js';
|
|
|
17
17
|
import '@vitest/mocker';
|
|
18
18
|
import '@vitest/mocker/redirect';
|
|
19
19
|
import 'node:console';
|
|
20
|
-
import '../chunks/source-map.
|
|
21
|
-
import '../chunks/index.
|
|
20
|
+
import '../chunks/source-map.DUxvo12T.js';
|
|
21
|
+
import '../chunks/index.cx-_w29y.js';
|
|
22
22
|
import '../chunks/tinyrainbow.Ht9iggcq.js';
|
|
23
|
-
import '../chunks/rpc.
|
|
23
|
+
import '../chunks/rpc.BTmCtPly.js';
|
|
24
24
|
import '../chunks/index.DmDMHCg8.js';
|
|
25
25
|
import '../chunks/inspector.CvyFGlXm.js';
|
|
26
26
|
import 'node:v8';
|
|
27
|
-
import '../chunks/console.
|
|
27
|
+
import '../chunks/console.RBA5x-0t.js';
|
|
28
28
|
import 'node:stream';
|
|
29
|
-
import '../chunks/resolver.
|
|
29
|
+
import '../chunks/resolver.fbW9AUvG.js';
|
|
30
30
|
import 'es-module-lexer';
|
|
31
|
-
import '../chunks/setup-common.
|
|
32
|
-
import '../chunks/plugins.
|
|
31
|
+
import '../chunks/setup-common.BglbuAHD.js';
|
|
32
|
+
import '../chunks/plugins.D2ut1V9b.js';
|
|
33
33
|
|
|
34
34
|
workerInit({
|
|
35
35
|
runTests: runVmTests,
|
|
@@ -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.COb0VD5D.js';
|
|
2
|
+
import { s as setupVmWorker, r as runVmTests } from '../chunks/vm.vTyZj_02.js';
|
|
3
3
|
import 'node:worker_threads';
|
|
4
|
-
import '../chunks/init.
|
|
4
|
+
import '../chunks/init.D0qF-GGk.js';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:module';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'vite/module-runner';
|
|
9
|
-
import '../chunks/index.
|
|
10
|
-
import '../chunks/pathe.M-eThtNZ.
|
|
9
|
+
import '../chunks/index.k8L_ZRzq.js';
|
|
10
|
+
import '../chunks/pathe.M-eThtNZ.CknpM8Or.js';
|
|
11
11
|
import '../chunks/modules.BJuCwlRJ.js';
|
|
12
12
|
import '../chunks/utils.DYj33du9.js';
|
|
13
13
|
import '../path.js';
|
|
@@ -18,19 +18,19 @@ import '../traces.js';
|
|
|
18
18
|
import '@vitest/mocker';
|
|
19
19
|
import '@vitest/mocker/redirect';
|
|
20
20
|
import 'node:console';
|
|
21
|
-
import '../chunks/source-map.
|
|
22
|
-
import '../chunks/index.
|
|
21
|
+
import '../chunks/source-map.DUxvo12T.js';
|
|
22
|
+
import '../chunks/index.cx-_w29y.js';
|
|
23
23
|
import '../chunks/tinyrainbow.Ht9iggcq.js';
|
|
24
|
-
import '../chunks/rpc.
|
|
24
|
+
import '../chunks/rpc.BTmCtPly.js';
|
|
25
25
|
import '../chunks/index.DmDMHCg8.js';
|
|
26
26
|
import '../chunks/inspector.CvyFGlXm.js';
|
|
27
27
|
import 'node:v8';
|
|
28
|
-
import '../chunks/console.
|
|
28
|
+
import '../chunks/console.RBA5x-0t.js';
|
|
29
29
|
import 'node:stream';
|
|
30
|
-
import '../chunks/resolver.
|
|
30
|
+
import '../chunks/resolver.fbW9AUvG.js';
|
|
31
31
|
import 'es-module-lexer';
|
|
32
|
-
import '../chunks/setup-common.
|
|
33
|
-
import '../chunks/plugins.
|
|
32
|
+
import '../chunks/setup-common.BglbuAHD.js';
|
|
33
|
+
import '../chunks/plugins.D2ut1V9b.js';
|
|
34
34
|
|
|
35
35
|
workerInit({
|
|
36
36
|
runTests: runVmTests,
|
package/globals.d.ts
CHANGED
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
declare global {
|
|
2
|
-
let suite: typeof import('vitest')['suite']
|
|
3
|
-
let test: typeof import('vitest')['test']
|
|
4
|
-
let chai: typeof import(
|
|
5
|
-
let describe: typeof import('vitest')['describe']
|
|
6
|
-
let it: typeof import('vitest')['it']
|
|
7
|
-
let expectTypeOf: typeof import('vitest')['expectTypeOf']
|
|
8
|
-
let assertType: typeof import('vitest')['assertType']
|
|
9
|
-
let expect: typeof import('vitest')['expect']
|
|
10
|
-
let assert: typeof import('vitest')['assert']
|
|
11
|
-
let vitest: typeof import('vitest')['vitest']
|
|
12
|
-
let vi: typeof import('vitest')['vitest']
|
|
13
|
-
let beforeAll: typeof import('vitest')['beforeAll']
|
|
14
|
-
let afterAll: typeof import('vitest')['afterAll']
|
|
15
|
-
let beforeEach: typeof import('vitest')['beforeEach']
|
|
16
|
-
let afterEach: typeof import('vitest')['afterEach']
|
|
17
|
-
let aroundEach: typeof import('vitest')['aroundEach']
|
|
18
|
-
let aroundAll: typeof import('vitest')['aroundAll']
|
|
19
|
-
let onTestFailed: typeof import('vitest')['onTestFailed']
|
|
20
|
-
let onTestFinished: typeof import('vitest')['onTestFinished']
|
|
2
|
+
let suite: (typeof import('vitest'))['suite']
|
|
3
|
+
let test: (typeof import('vitest'))['test']
|
|
4
|
+
let chai: (typeof import('vitest'))['chai']
|
|
5
|
+
let describe: (typeof import('vitest'))['describe']
|
|
6
|
+
let it: (typeof import('vitest'))['it']
|
|
7
|
+
let expectTypeOf: (typeof import('vitest'))['expectTypeOf']
|
|
8
|
+
let assertType: (typeof import('vitest'))['assertType']
|
|
9
|
+
let expect: (typeof import('vitest'))['expect']
|
|
10
|
+
let assert: (typeof import('vitest'))['assert']
|
|
11
|
+
let vitest: (typeof import('vitest'))['vitest']
|
|
12
|
+
let vi: (typeof import('vitest'))['vitest']
|
|
13
|
+
let beforeAll: (typeof import('vitest'))['beforeAll']
|
|
14
|
+
let afterAll: (typeof import('vitest'))['afterAll']
|
|
15
|
+
let beforeEach: (typeof import('vitest'))['beforeEach']
|
|
16
|
+
let afterEach: (typeof import('vitest'))['afterEach']
|
|
17
|
+
let aroundEach: (typeof import('vitest'))['aroundEach']
|
|
18
|
+
let aroundAll: (typeof import('vitest'))['aroundAll']
|
|
19
|
+
let onTestFailed: (typeof import('vitest'))['onTestFailed']
|
|
20
|
+
let onTestFinished: (typeof import('vitest'))['onTestFinished']
|
|
21
21
|
}
|
|
22
22
|
export {}
|
package/index.cjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
throw new Error(
|
|
2
|
-
'Vitest cannot be imported in a CommonJS module using require(). Please use "import" instead.'
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
'Vitest cannot be imported in a CommonJS module using require(). Please use "import" instead.' +
|
|
3
|
+
'\n\nIf you are using "import" in your source code, then it\'s possible it was bundled into require() automatically by your bundler. ' +
|
|
4
|
+
'In that case, do not bundle CommonJS output since it will never work with Vitest, or use dynamic import() which is available in all CommonJS modules.',
|
|
5
5
|
)
|
package/optional-types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vitest",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "5.0.
|
|
4
|
+
"version": "5.0.3",
|
|
5
5
|
"description": "Next generation testing framework powered by Vite",
|
|
6
6
|
"author": "Anthony Fu <anthonyfu117@hotmail.com>",
|
|
7
7
|
"license": "MIT",
|
|
@@ -32,6 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"exports": {
|
|
34
34
|
".": {
|
|
35
|
+
"__vitest_source__": "./src/public/index.ts",
|
|
35
36
|
"import": {
|
|
36
37
|
"types": "./dist/index.d.ts",
|
|
37
38
|
"default": "./dist/index.js"
|
|
@@ -65,6 +66,7 @@
|
|
|
65
66
|
"types": "./import-meta.d.ts"
|
|
66
67
|
},
|
|
67
68
|
"./node": {
|
|
69
|
+
"__vitest_source__": "./src/public/node.ts",
|
|
68
70
|
"types": "./dist/node.d.ts",
|
|
69
71
|
"default": "./dist/node.js"
|
|
70
72
|
},
|
|
@@ -78,15 +80,18 @@
|
|
|
78
80
|
"default": "./dist/traces.js"
|
|
79
81
|
},
|
|
80
82
|
"./config": {
|
|
83
|
+
"__vitest_source__": "./src/public/config.ts",
|
|
81
84
|
"types": "./config.d.ts",
|
|
82
85
|
"require": "./dist/config.cjs",
|
|
83
86
|
"default": "./dist/config.js"
|
|
84
87
|
},
|
|
85
88
|
"./runtime": {
|
|
89
|
+
"__vitest_source__": "./src/public/runtime.ts",
|
|
86
90
|
"types": "./dist/runtime.d.ts",
|
|
87
91
|
"default": "./dist/runtime.js"
|
|
88
92
|
},
|
|
89
93
|
"./worker": {
|
|
94
|
+
"__vitest_source__": "./src/public/worker.ts",
|
|
90
95
|
"types": "./worker.d.ts",
|
|
91
96
|
"default": "./dist/worker.js"
|
|
92
97
|
}
|
|
@@ -113,12 +118,12 @@
|
|
|
113
118
|
"@edge-runtime/vm": "*",
|
|
114
119
|
"@opentelemetry/api": "^1.9.0",
|
|
115
120
|
"@types/node": "^22.0.0 || >=24.0.0",
|
|
116
|
-
"@vitest/browser-playwright": "5.0.
|
|
117
|
-
"@vitest/browser-preview": "5.0.
|
|
121
|
+
"@vitest/browser-playwright": "5.0.3",
|
|
122
|
+
"@vitest/browser-preview": "5.0.3",
|
|
118
123
|
"@vitest/browser-webdriverio": "^5.0.0-beta.5 || >=5.0.0",
|
|
119
|
-
"@vitest/coverage-istanbul": "5.0.
|
|
120
|
-
"@vitest/coverage-v8": "5.0.
|
|
121
|
-
"@vitest/ui": "5.0.
|
|
124
|
+
"@vitest/coverage-istanbul": "5.0.3",
|
|
125
|
+
"@vitest/coverage-v8": "5.0.3",
|
|
126
|
+
"@vitest/ui": "5.0.3",
|
|
122
127
|
"happy-dom": "*",
|
|
123
128
|
"jsdom": "*",
|
|
124
129
|
"vite": "^6.4.0 || ^7.0.0 || ^8.0.0"
|
|
@@ -163,7 +168,7 @@
|
|
|
163
168
|
},
|
|
164
169
|
"dependencies": {
|
|
165
170
|
"@types/chai": "^5.2.2",
|
|
166
|
-
"@vitest/mocker": "5.0.
|
|
171
|
+
"@vitest/mocker": "5.0.3",
|
|
167
172
|
"chai": "^6.2.2",
|
|
168
173
|
"es-module-lexer": "^2.3.2",
|
|
169
174
|
"expect-type": "^1.4.0",
|
|
@@ -174,7 +179,7 @@
|
|
|
174
179
|
"tinybench": "^6.1.4",
|
|
175
180
|
"tinyexec": "^1.3.0",
|
|
176
181
|
"tinyglobby": "^0.2.17",
|
|
177
|
-
"why-is-node-running": "
|
|
182
|
+
"why-is-node-running": "3.2.1"
|
|
178
183
|
},
|
|
179
184
|
"devDependencies": {
|
|
180
185
|
"@antfu/install-pkg": "^2.0.1",
|
|
@@ -183,24 +188,24 @@
|
|
|
183
188
|
"@jridgewell/trace-mapping": "0.3.31",
|
|
184
189
|
"@opentelemetry/api": "^1.9.1",
|
|
185
190
|
"@sinonjs/fake-timers": "15.4.0",
|
|
186
|
-
"@types/jsdom": "^
|
|
191
|
+
"@types/jsdom": "^30.0.0",
|
|
187
192
|
"@types/node": "^24.13.3",
|
|
188
193
|
"@types/picomatch": "^4.0.3",
|
|
189
194
|
"@types/prompts": "^2.4.9",
|
|
190
|
-
"@vitest/expect": "5.0.
|
|
195
|
+
"@vitest/expect": "5.0.3",
|
|
191
196
|
"@vitest/istanbul-lib-coverage": "^1.0.0",
|
|
192
197
|
"@vitest/istanbul-lib-report": "^1.0.0",
|
|
193
|
-
"@vitest/pretty-format": "5.0.
|
|
194
|
-
"@vitest/snapshot": "5.0.
|
|
195
|
-
"@vitest/spy": "5.0.
|
|
196
|
-
"@vitest/utils": "5.0.
|
|
198
|
+
"@vitest/pretty-format": "5.0.3",
|
|
199
|
+
"@vitest/snapshot": "5.0.3",
|
|
200
|
+
"@vitest/spy": "5.0.3",
|
|
201
|
+
"@vitest/utils": "5.0.3",
|
|
197
202
|
"acorn": "8.11.3",
|
|
198
203
|
"acorn-walk": "^8.3.5",
|
|
199
204
|
"birpc": "^4.2.0",
|
|
200
205
|
"cac": "^6.7.14",
|
|
201
206
|
"flatted": "^3.4.4",
|
|
202
207
|
"happy-dom": "^20.12.0",
|
|
203
|
-
"jsdom": "^
|
|
208
|
+
"jsdom": "^30.1.1",
|
|
204
209
|
"local-pkg": "^1.2.1",
|
|
205
210
|
"mime": "^4.1.0",
|
|
206
211
|
"pathe": "^2.0.3",
|