vitest 0.24.3 → 0.24.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.
Files changed (35) hide show
  1. package/dist/browser.d.ts +3 -3
  2. package/dist/browser.js +8 -7
  3. package/dist/{chunk-api-setup.cdeaef6b.js → chunk-api-setup.629f8133.js} +4 -4
  4. package/dist/{chunk-integrations-globals.10e6725a.js → chunk-integrations-globals.32ef80c3.js} +6 -6
  5. package/dist/{chunk-mock-date.9fe2b438.js → chunk-mock-date.030959d3.js} +1 -1
  6. package/dist/{chunk-runtime-chain.072b5677.js → chunk-runtime-chain.37ec5d73.js} +40 -9
  7. package/dist/chunk-runtime-error.17751c39.js +135 -0
  8. package/dist/{chunk-runtime-hooks.6963ff8f.js → chunk-runtime-hooks.d748b085.js} +4 -4
  9. package/dist/{chunk-runtime-mocker.3eb1fcc0.js → chunk-runtime-mocker.41b92ec9.js} +3 -3
  10. package/dist/chunk-runtime-rpc.b418c0ab.js +30 -0
  11. package/dist/{chunk-runtime-error.b043a88d.js → chunk-runtime-setup.ab6b6274.js} +11 -142
  12. package/dist/chunk-utils-source-map.663e2952.js +3429 -0
  13. package/dist/{chunk-utils-source-map.d9d36eb0.js → chunk-utils-timers.8fca243e.js} +19 -3439
  14. package/dist/{chunk-vite-node-client.e22799cd.js → chunk-vite-node-client.3868b3ba.js} +10 -12
  15. package/dist/{chunk-vite-node-externalize.efa824b9.js → chunk-vite-node-externalize.d9033432.js} +28 -24
  16. package/dist/{chunk-vite-node-utils.835c8b2c.js → chunk-vite-node-utils.2144000e.js} +14 -11
  17. package/dist/cli-wrapper.js +4 -0
  18. package/dist/cli.js +14 -8
  19. package/dist/config.cjs +3 -4
  20. package/dist/config.d.ts +1 -1
  21. package/dist/config.js +3 -4
  22. package/dist/entry.js +8 -7
  23. package/dist/environments.d.ts +1 -1
  24. package/dist/{global-732f9b14.d.ts → global-58e8e951.d.ts} +5 -0
  25. package/dist/{index-40e0cb97.d.ts → index-220c1d70.d.ts} +1 -1
  26. package/dist/index.d.ts +4 -4
  27. package/dist/index.js +6 -6
  28. package/dist/loader.js +3 -3
  29. package/dist/node.d.ts +2 -2
  30. package/dist/node.js +7 -7
  31. package/dist/suite.js +5 -5
  32. package/dist/worker.js +9 -7
  33. package/package.json +8 -7
  34. package/dist/chunk-runtime-rpc.e583f5e7.js +0 -16
  35. package/dist/chunk-utils-timers.ab764c0c.js +0 -27
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitest",
3
3
  "type": "module",
4
- "version": "0.24.3",
4
+ "version": "0.24.5",
5
5
  "description": "A blazing fast unit test framework powered by Vite",
6
6
  "author": "Anthony Fu <anthonyfu117@hotmail.com>",
7
7
  "license": "MIT",
@@ -9,7 +9,8 @@
9
9
  "homepage": "https://github.com/vitest-dev/vitest#readme",
10
10
  "repository": {
11
11
  "type": "git",
12
- "url": "git+https://github.com/vitest-dev/vitest.git"
12
+ "url": "git+https://github.com/vitest-dev/vitest.git",
13
+ "directory": "packages/vitest"
13
14
  },
14
15
  "bugs": {
15
16
  "url": "https://github.com/vitest-dev/vitest/issues"
@@ -106,14 +107,14 @@
106
107
  "debug": "^4.3.4",
107
108
  "local-pkg": "^0.4.2",
108
109
  "strip-literal": "^0.4.2",
109
- "tinybench": "^2.3.0",
110
+ "tinybench": "^2.3.1",
110
111
  "tinypool": "^0.3.0",
111
112
  "tinyspy": "^1.0.2",
112
113
  "vite": "^3.0.0"
113
114
  },
114
115
  "devDependencies": {
115
116
  "@antfu/install-pkg": "^0.1.1",
116
- "@edge-runtime/vm": "1.1.0-beta.31",
117
+ "@edge-runtime/vm": "1.1.0",
117
118
  "@sinonjs/fake-timers": "^9.1.2",
118
119
  "@types/diff": "^5.0.2",
119
120
  "@types/jsdom": "^20.0.0",
@@ -121,7 +122,7 @@
121
122
  "@types/natural-compare": "^1.4.1",
122
123
  "@types/prompts": "^2.4.1",
123
124
  "@types/sinonjs__fake-timers": "^8.1.2",
124
- "@vitest/ui": "0.24.3",
125
+ "@vitest/ui": "0.24.5",
125
126
  "birpc": "^0.2.3",
126
127
  "cac": "^6.7.14",
127
128
  "chai-subset": "^1.6.0",
@@ -149,8 +150,8 @@
149
150
  "source-map-js": "^1.0.2",
150
151
  "strip-ansi": "^7.0.1",
151
152
  "typescript": "^4.8.4",
152
- "vite-node": "0.24.3",
153
- "ws": "^8.9.0"
153
+ "vite-node": "0.24.5",
154
+ "ws": "^8.10.0"
154
155
  },
155
156
  "scripts": {
156
157
  "build": "rimraf dist && rollup -c",
@@ -1,16 +0,0 @@
1
- import { g as getWorkerState } from './chunk-mock-date.9fe2b438.js';
2
- import { w as withSafeTimers } from './chunk-utils-timers.ab764c0c.js';
3
-
4
- const rpc = () => {
5
- const { rpc: rpc2 } = getWorkerState();
6
- return new Proxy(rpc2, {
7
- get(target, p, handler) {
8
- const sendCall = Reflect.get(target, p, handler);
9
- const safeSendCall = (...args) => withSafeTimers(() => sendCall(...args));
10
- safeSendCall.asEvent = sendCall.asEvent;
11
- return safeSendCall;
12
- }
13
- });
14
- };
15
-
16
- export { rpc as r };
@@ -1,27 +0,0 @@
1
- const {
2
- setTimeout: safeSetTimeout,
3
- setInterval: safeSetInterval,
4
- clearInterval: safeClearInterval,
5
- clearTimeout: safeClearTimeout
6
- } = globalThis;
7
- function withSafeTimers(fn) {
8
- const currentSetTimeout = globalThis.setTimeout;
9
- const currentSetInterval = globalThis.setInterval;
10
- const currentClearInterval = globalThis.clearInterval;
11
- const currentClearTimeout = globalThis.clearTimeout;
12
- try {
13
- globalThis.setTimeout = safeSetTimeout;
14
- globalThis.setInterval = safeSetInterval;
15
- globalThis.clearInterval = safeClearInterval;
16
- globalThis.clearTimeout = safeClearTimeout;
17
- const result = fn();
18
- return result;
19
- } finally {
20
- globalThis.setTimeout = currentSetTimeout;
21
- globalThis.setInterval = currentSetInterval;
22
- globalThis.clearInterval = currentClearInterval;
23
- globalThis.clearTimeout = currentClearTimeout;
24
- }
25
- }
26
-
27
- export { safeClearTimeout as a, safeSetInterval as b, safeClearInterval as c, safeSetTimeout as s, withSafeTimers as w };