vitest 0.20.2 → 0.21.1

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.
Files changed (35) hide show
  1. package/LICENSE.md +29 -0
  2. package/dist/browser.d.ts +9 -1887
  3. package/dist/browser.mjs +7 -7
  4. package/dist/{chunk-api-setup.7c4c8879.mjs → chunk-api-setup.7a6ba7fb.mjs} +5 -5
  5. package/dist/{chunk-constants.16825f0c.mjs → chunk-constants.26dc9f85.mjs} +1 -1
  6. package/dist/{chunk-defaults.1c51d585.mjs → chunk-defaults.02abff90.mjs} +2 -2
  7. package/dist/{chunk-integrations-globals.56a11010.mjs → chunk-integrations-globals.44a8f047.mjs} +6 -6
  8. package/dist/{chunk-mock-date.9160e13b.mjs → chunk-mock-date.bc81a3ac.mjs} +11 -8
  9. package/dist/{chunk-node-git.43dbdd42.mjs → chunk-node-git.c2be9c49.mjs} +1 -1
  10. package/dist/{chunk-runtime-chain.b6c2cdbc.mjs → chunk-runtime-chain.98d42d89.mjs} +30 -21
  11. package/dist/{chunk-runtime-error.0aa0dc06.mjs → chunk-runtime-error.87a2b5a2.mjs} +12 -11
  12. package/dist/{chunk-runtime-hooks.3ee34848.mjs → chunk-runtime-hooks.453f8858.mjs} +4 -4
  13. package/dist/{chunk-runtime-mocker.0a8f7c5e.mjs → chunk-runtime-mocker.23b62bfa.mjs} +34 -12
  14. package/dist/{chunk-runtime-rpc.dbf0b31d.mjs → chunk-runtime-rpc.b50ab560.mjs} +1 -1
  15. package/dist/{chunk-utils-source-map.8198ebd9.mjs → chunk-utils-source-map.94107ee8.mjs} +1 -1
  16. package/dist/{chunk-vite-node-client.a247c2c2.mjs → chunk-vite-node-client.fdd9592c.mjs} +7 -3
  17. package/dist/{chunk-vite-node-debug.c5887932.mjs → chunk-vite-node-debug.09afb76f.mjs} +1 -1
  18. package/dist/{chunk-vite-node-externalize.45323563.mjs → chunk-vite-node-externalize.27aee038.mjs} +34 -18
  19. package/dist/chunk-vite-node-utils.f34df9d3.mjs +6887 -0
  20. package/dist/cli.mjs +8 -8
  21. package/dist/config.d.ts +2 -67
  22. package/dist/entry.mjs +7 -7
  23. package/dist/global-60f880c6.d.ts +1779 -0
  24. package/dist/index-4a906fa4.d.ts +164 -0
  25. package/dist/index.d.ts +29 -1903
  26. package/dist/index.mjs +5 -5
  27. package/dist/loader.mjs +73 -17
  28. package/dist/mocker-5e2a8e41.d.ts +3 -0
  29. package/dist/node.d.ts +7 -1667
  30. package/dist/node.mjs +9 -9
  31. package/dist/suite.mjs +4 -4
  32. package/dist/{vendor-index.de788b6a.mjs → vendor-index.ae96af6e.mjs} +14 -14
  33. package/dist/worker.mjs +6 -6
  34. package/package.json +11 -11
  35. package/dist/chunk-vite-node-utils.9dfd1e3f.mjs +0 -1114
package/dist/node.mjs CHANGED
@@ -1,34 +1,34 @@
1
- export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.45323563.mjs';
2
- export { V as VitestRunner } from './chunk-runtime-mocker.0a8f7c5e.mjs';
3
- import './chunk-mock-date.9160e13b.mjs';
1
+ export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.27aee038.mjs';
2
+ export { V as VitestRunner } from './chunk-runtime-mocker.23b62bfa.mjs';
3
+ import './chunk-mock-date.bc81a3ac.mjs';
4
4
  import 'path';
5
5
  import 'tty';
6
6
  import 'local-pkg';
7
- import './chunk-defaults.1c51d585.mjs';
7
+ import './chunk-defaults.02abff90.mjs';
8
8
  import 'fs';
9
9
  import 'module';
10
10
  import 'url';
11
11
  import 'vite';
12
12
  import 'process';
13
- import './chunk-constants.16825f0c.mjs';
13
+ import './chunk-constants.26dc9f85.mjs';
14
14
  import 'os';
15
15
  import 'util';
16
16
  import 'stream';
17
17
  import 'events';
18
18
  import './vendor-_commonjsHelpers.4da45ef5.mjs';
19
- import './chunk-vite-node-client.a247c2c2.mjs';
19
+ import './chunk-vite-node-client.fdd9592c.mjs';
20
20
  import 'vm';
21
- import './chunk-vite-node-utils.9dfd1e3f.mjs';
21
+ import './chunk-vite-node-utils.f34df9d3.mjs';
22
22
  import 'assert';
23
23
  import 'debug';
24
24
  import 'worker_threads';
25
25
  import 'tinypool';
26
26
  import 'perf_hooks';
27
- import './chunk-utils-source-map.8198ebd9.mjs';
27
+ import './chunk-utils-source-map.94107ee8.mjs';
28
28
  import './chunk-utils-timers.b48455ed.mjs';
29
29
  import 'crypto';
30
30
  import './vendor-index.61438b77.mjs';
31
31
  import './chunk-magic-string.efe26975.mjs';
32
32
  import 'readline';
33
- import './vendor-index.de788b6a.mjs';
33
+ import './vendor-index.ae96af6e.mjs';
34
34
  import './chunk-utils-global.fa20c2f6.mjs';
package/dist/suite.mjs CHANGED
@@ -1,15 +1,15 @@
1
1
  import 'util';
2
- import './chunk-mock-date.9160e13b.mjs';
3
- export { e as clearCollectorContext, o as createSuiteHooks, f as defaultSuite, d as describe, g as getCurrentSuite, i as it, s as suite, t as test } from './chunk-runtime-chain.b6c2cdbc.mjs';
2
+ import './chunk-mock-date.bc81a3ac.mjs';
3
+ export { e as clearCollectorContext, o as createSuiteHooks, f as defaultSuite, d as describe, g as getCurrentSuite, i as it, s as suite, t as test } from './chunk-runtime-chain.98d42d89.mjs';
4
4
  import './chunk-utils-global.fa20c2f6.mjs';
5
5
  import 'path';
6
6
  import 'tty';
7
7
  import 'local-pkg';
8
8
  import 'chai';
9
9
  import './vendor-_commonjsHelpers.4da45ef5.mjs';
10
- import './chunk-runtime-rpc.dbf0b31d.mjs';
10
+ import './chunk-runtime-rpc.b50ab560.mjs';
11
11
  import './chunk-utils-timers.b48455ed.mjs';
12
12
  import 'fs';
13
- import './chunk-utils-source-map.8198ebd9.mjs';
13
+ import './chunk-utils-source-map.94107ee8.mjs';
14
14
  import './spy.mjs';
15
15
  import 'tinyspy';
@@ -2798,12 +2798,12 @@ function requireAutocompleteMultiselect$1 () {
2798
2798
  }
2799
2799
 
2800
2800
  return `
2801
- Instructions:
2802
- ${figures.arrowUp}/${figures.arrowDown}: Highlight option
2803
- ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
2804
- [a,b,c]/delete: Filter choices
2805
- enter/return: Complete answer
2806
- `;
2801
+ Instructions:
2802
+ ${figures.arrowUp}/${figures.arrowDown}: Highlight option
2803
+ ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
2804
+ [a,b,c]/delete: Filter choices
2805
+ enter/return: Complete answer
2806
+ `;
2807
2807
  }
2808
2808
 
2809
2809
  return '';
@@ -2811,7 +2811,7 @@ function requireAutocompleteMultiselect$1 () {
2811
2811
 
2812
2812
  renderCurrentInput() {
2813
2813
  return `
2814
- Filtered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\n`;
2814
+ Filtered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\n`;
2815
2815
  }
2816
2816
 
2817
2817
  renderOption(cursor, v, i) {
@@ -5761,19 +5761,19 @@ function requireAutocompleteMultiselect () {
5761
5761
  return this.instructions;
5762
5762
  }
5763
5763
  return `
5764
- Instructions:
5765
- ${figures.arrowUp}/${figures.arrowDown}: Highlight option
5766
- ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
5767
- [a,b,c]/delete: Filter choices
5768
- enter/return: Complete answer
5769
- `;
5764
+ Instructions:
5765
+ ${figures.arrowUp}/${figures.arrowDown}: Highlight option
5766
+ ${figures.arrowLeft}/${figures.arrowRight}/[space]: Toggle selection
5767
+ [a,b,c]/delete: Filter choices
5768
+ enter/return: Complete answer
5769
+ `;
5770
5770
  }
5771
5771
  return '';
5772
5772
  }
5773
5773
 
5774
5774
  renderCurrentInput() {
5775
5775
  return `
5776
- Filtered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\n`;
5776
+ Filtered results for: ${this.inputValue ? this.inputValue : color.gray('Enter something to filter')}\n`;
5777
5777
  }
5778
5778
 
5779
5779
  renderOption(cursor, v, i) {
package/dist/worker.mjs CHANGED
@@ -1,9 +1,9 @@
1
- import { y as resolve } from './chunk-mock-date.9160e13b.mjs';
2
- import { c as createBirpc, M as ModuleCacheMap } from './chunk-vite-node-client.a247c2c2.mjs';
1
+ import { y as resolve } from './chunk-mock-date.bc81a3ac.mjs';
2
+ import { c as createBirpc, M as ModuleCacheMap } from './chunk-vite-node-client.fdd9592c.mjs';
3
3
  import { workerId } from 'tinypool';
4
- import { d as distDir } from './chunk-constants.16825f0c.mjs';
5
- import { e as executeInViteNode } from './chunk-runtime-mocker.0a8f7c5e.mjs';
6
- import { r as rpc } from './chunk-runtime-rpc.dbf0b31d.mjs';
4
+ import { d as distDir } from './chunk-constants.26dc9f85.mjs';
5
+ import { e as executeInViteNode } from './chunk-runtime-mocker.23b62bfa.mjs';
6
+ import { r as rpc } from './chunk-runtime-rpc.b50ab560.mjs';
7
7
  import { g as getWorkerState } from './chunk-utils-global.fa20c2f6.mjs';
8
8
  import 'path';
9
9
  import 'tty';
@@ -11,7 +11,7 @@ import 'local-pkg';
11
11
  import 'module';
12
12
  import 'url';
13
13
  import 'vm';
14
- import './chunk-vite-node-utils.9dfd1e3f.mjs';
14
+ import './chunk-vite-node-utils.f34df9d3.mjs';
15
15
  import 'fs';
16
16
  import 'assert';
17
17
  import 'util';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vitest",
3
- "version": "0.20.2",
3
+ "version": "0.21.1",
4
4
  "description": "A blazing fast unit test framework powered by Vite",
5
5
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
6
6
  "license": "MIT",
@@ -90,7 +90,7 @@
90
90
  }
91
91
  },
92
92
  "dependencies": {
93
- "@types/chai": "^4.3.1",
93
+ "@types/chai": "^4.3.3",
94
94
  "@types/chai-subset": "^1.3.3",
95
95
  "@types/node": "*",
96
96
  "chai": "^4.3.6",
@@ -102,17 +102,17 @@
102
102
  },
103
103
  "devDependencies": {
104
104
  "@antfu/install-pkg": "^0.1.0",
105
- "@edge-runtime/vm": "1.1.0-beta.11",
105
+ "@edge-runtime/vm": "1.1.0-beta.26",
106
106
  "@sinonjs/fake-timers": "^9.1.2",
107
107
  "@types/diff": "^5.0.2",
108
- "@types/jsdom": "^16.2.14",
108
+ "@types/jsdom": "^20.0.0",
109
109
  "@types/micromatch": "^4.0.2",
110
110
  "@types/natural-compare": "^1.4.1",
111
111
  "@types/prompts": "^2.4.0",
112
112
  "@types/sinonjs__fake-timers": "^8.1.2",
113
- "@vitest/ui": "0.20.2",
113
+ "@vitest/ui": "0.21.1",
114
114
  "birpc": "^0.2.3",
115
- "c8": "^7.11.3",
115
+ "c8": "^7.12.0",
116
116
  "cac": "^6.7.12",
117
117
  "chai-subset": "^1.6.0",
118
118
  "cli-truncate": "^3.1.0",
@@ -121,12 +121,12 @@
121
121
  "fast-glob": "^3.2.11",
122
122
  "find-up": "^6.3.0",
123
123
  "flatted": "^3.2.6",
124
- "happy-dom": "^6.0.3",
125
- "jsdom": "^19.0.0",
124
+ "happy-dom": "^6.0.4",
125
+ "jsdom": "^20.0.0",
126
126
  "log-update": "^5.0.1",
127
127
  "magic-string": "^0.26.2",
128
128
  "micromatch": "^4.0.5",
129
- "mlly": "^0.5.4",
129
+ "mlly": "^0.5.7",
130
130
  "natural-compare": "^1.4.0",
131
131
  "p-limit": "^4.0.0",
132
132
  "pathe": "^0.2.0",
@@ -134,11 +134,11 @@
134
134
  "pkg-types": "^0.3.3",
135
135
  "pretty-format": "^27.5.1",
136
136
  "prompts": "^2.4.2",
137
- "rollup": "^2.77.0",
137
+ "rollup": "^2.77.2",
138
138
  "source-map-js": "^1.0.2",
139
139
  "strip-ansi": "^7.0.1",
140
140
  "typescript": "^4.7.4",
141
- "vite-node": "0.20.2",
141
+ "vite-node": "0.21.1",
142
142
  "ws": "^8.8.1"
143
143
  },
144
144
  "scripts": {