vitest 0.32.4 → 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.
Files changed (49) hide show
  1. package/LICENSE.md +0 -83
  2. package/dist/browser.d.ts +3 -2
  3. package/dist/browser.js +4 -8
  4. package/dist/child.js +43 -29
  5. package/dist/{chunk-api-setup.8f785c4a.js → chunk-api-setup.644415c3.js} +13 -7
  6. package/dist/{chunk-install-pkg.3fc886f2.js → chunk-install-pkg.dd70081b.js} +14 -13
  7. package/dist/{chunk-integrations-globals.0093e2ed.js → chunk-integrations-globals.877c84db.js} +7 -6
  8. package/dist/chunk-runtime-console.ea222ffb.js +108 -0
  9. package/dist/cli.js +15 -16
  10. package/dist/config.cjs +6 -5
  11. package/dist/config.d.ts +15 -19
  12. package/dist/config.js +6 -5
  13. package/dist/coverage.d.ts +3 -2
  14. package/dist/entry-vm.js +60 -0
  15. package/dist/entry.js +34 -213
  16. package/dist/environments.d.ts +3 -2
  17. package/dist/environments.js +4 -2
  18. package/dist/execute.js +15 -0
  19. package/dist/index.d.ts +12 -7
  20. package/dist/index.js +8 -7
  21. package/dist/loader.js +6 -4
  22. package/dist/node.d.ts +6 -53
  23. package/dist/node.js +17 -20
  24. package/dist/runners.d.ts +3 -2
  25. package/dist/runners.js +6 -5
  26. package/dist/{types-198fd1d9.d.ts → types-3c7dbfa5.d.ts} +139 -121
  27. package/dist/vendor-base.9c08bbd0.js +96 -0
  28. package/dist/{vendor-coverage.2e41927a.js → vendor-coverage.78040316.js} +1 -2
  29. package/dist/vendor-date.6e993429.js +50 -0
  30. package/dist/{vendor-environments.75f2b63d.js → vendor-environments.443ecd82.js} +202 -3
  31. package/dist/vendor-execute.9ab1c1a7.js +978 -0
  32. package/dist/{vendor-global.6795f91f.js → vendor-global.97e4527c.js} +2 -1
  33. package/dist/{vendor-index.23ac4e13.js → vendor-index.087d1af7.js} +2 -20
  34. package/dist/vendor-index.9378c9a4.js +89 -0
  35. package/dist/vendor-index.b271ebe4.js +92 -0
  36. package/dist/{vendor-index.2af39fbb.js → vendor-index.eff408fd.js} +2 -3
  37. package/dist/{vendor-cli-api.cb31e1db.js → vendor-node.00226ab1.js} +1671 -1882
  38. package/dist/{vendor-rpc.ad5b08c7.js → vendor-rpc.cbd8e972.js} +7 -4
  39. package/dist/{vendor-run-once.1fa85ba7.js → vendor-run-once.3e5ef7d7.js} +1 -2
  40. package/dist/vendor-source-map.e6c1997b.js +747 -0
  41. package/dist/{vendor-vi.dd6706cb.js → vendor-vi.271667ef.js} +26 -59
  42. package/dist/vm.js +114 -0
  43. package/dist/worker.js +39 -27
  44. package/execute.d.ts +1 -0
  45. package/package.json +14 -11
  46. package/suppress-warnings.cjs +2 -0
  47. package/dist/vendor-execute.3576af13.js +0 -421
  48. package/dist/vendor-index.cc463d9e.js +0 -189
  49. 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.6795f91f.js';
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 rpc() {
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 };
@@ -1,5 +1,4 @@
1
- import './vendor-index.23ac4e13.js';
2
- import { g as getWorkerState } from './vendor-global.6795f91f.js';
1
+ import { g as getWorkerState } from './vendor-global.97e4527c.js';
3
2
 
4
3
  const filesCount = /* @__PURE__ */ new Map();
5
4
  const cache = /* @__PURE__ */ new Map();