vitest 0.33.0 → 0.34.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 +0 -83
- package/dist/browser.d.ts +3 -2
- package/dist/browser.js +4 -8
- package/dist/child.js +43 -29
- package/dist/{chunk-api-setup.8f785c4a.js → chunk-api-setup.644415c3.js} +13 -7
- package/dist/{chunk-install-pkg.23da664c.js → chunk-install-pkg.dd70081b.js} +14 -13
- package/dist/{chunk-integrations-globals.0093e2ed.js → chunk-integrations-globals.877c84db.js} +7 -6
- package/dist/chunk-runtime-console.ea222ffb.js +108 -0
- package/dist/cli.js +14 -15
- package/dist/config.cjs +4 -3
- package/dist/config.d.ts +15 -19
- package/dist/config.js +4 -3
- package/dist/coverage.d.ts +3 -2
- package/dist/entry-vm.js +60 -0
- package/dist/entry.js +34 -213
- package/dist/environments.d.ts +3 -2
- package/dist/environments.js +4 -2
- package/dist/execute.js +15 -0
- package/dist/index.d.ts +12 -7
- package/dist/index.js +8 -7
- package/dist/loader.js +6 -4
- package/dist/node.d.ts +6 -53
- package/dist/node.js +16 -19
- package/dist/runners.d.ts +3 -2
- package/dist/runners.js +6 -5
- package/dist/{types-198fd1d9.d.ts → types-3c7dbfa5.d.ts} +139 -121
- package/dist/vendor-base.9c08bbd0.js +96 -0
- package/dist/{vendor-coverage.2e41927a.js → vendor-coverage.78040316.js} +1 -2
- package/dist/vendor-date.6e993429.js +50 -0
- package/dist/{vendor-environments.392ddf08.js → vendor-environments.443ecd82.js} +199 -3
- package/dist/vendor-execute.9ab1c1a7.js +978 -0
- package/dist/{vendor-global.6795f91f.js → vendor-global.97e4527c.js} +2 -1
- package/dist/{vendor-index.23ac4e13.js → vendor-index.087d1af7.js} +2 -20
- package/dist/vendor-index.9378c9a4.js +89 -0
- package/dist/vendor-index.b271ebe4.js +92 -0
- package/dist/{vendor-index.2af39fbb.js → vendor-index.eff408fd.js} +2 -3
- package/dist/{vendor-cli-api.bf4b62a8.js → vendor-node.00226ab1.js} +538 -836
- package/dist/{vendor-rpc.ad5b08c7.js → vendor-rpc.cbd8e972.js} +7 -4
- package/dist/{vendor-run-once.1fa85ba7.js → vendor-run-once.3e5ef7d7.js} +1 -2
- package/dist/vendor-source-map.e6c1997b.js +747 -0
- package/dist/{vendor-vi.dd6706cb.js → vendor-vi.271667ef.js} +26 -59
- package/dist/vm.js +114 -0
- package/dist/worker.js +39 -27
- package/execute.d.ts +1 -0
- package/package.json +12 -9
- package/suppress-warnings.cjs +2 -0
- package/dist/vendor-execute.3576af13.js +0 -421
- package/dist/vendor-index.cc463d9e.js +0 -189
- package/dist/vendor-tasks.f9d75aed.js +0 -14
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getSafeTimers } from '@vitest/utils';
|
|
2
|
-
import { g as getWorkerState } from './vendor-global.
|
|
2
|
+
import { g as getWorkerState } from './vendor-global.97e4527c.js';
|
|
3
3
|
|
|
4
4
|
const { get } = Reflect;
|
|
5
5
|
function withSafeTimers(fn) {
|
|
@@ -38,8 +38,7 @@ async function rpcDone() {
|
|
|
38
38
|
const awaitable = Array.from(promises);
|
|
39
39
|
return Promise.all(awaitable);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const { rpc: rpc2 } = getWorkerState();
|
|
41
|
+
function createSafeRpc(rpc2) {
|
|
43
42
|
return new Proxy(rpc2, {
|
|
44
43
|
get(target, p, handler) {
|
|
45
44
|
const sendCall = get(target, p, handler);
|
|
@@ -57,5 +56,9 @@ function rpc() {
|
|
|
57
56
|
}
|
|
58
57
|
});
|
|
59
58
|
}
|
|
59
|
+
function rpc() {
|
|
60
|
+
const { rpc: rpc2 } = getWorkerState();
|
|
61
|
+
return rpc2;
|
|
62
|
+
}
|
|
60
63
|
|
|
61
|
-
export { rpc as a, rpcDone as r };
|
|
64
|
+
export { rpc as a, createSafeRpc as c, rpcDone as r };
|