vitest 0.18.1 → 0.19.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 (32) hide show
  1. package/LICENSE.md +5 -5
  2. package/dist/browser.d.ts +1850 -0
  3. package/dist/browser.mjs +20 -0
  4. package/dist/{chunk-api-setup.9d3f7670.mjs → chunk-api-setup.0cf2c96a.mjs} +23 -6
  5. package/dist/{chunk-constants.d4406290.mjs → chunk-constants.38b43a44.mjs} +3 -3
  6. package/dist/{chunk-env-node.bbba78e5.mjs → chunk-defaults.408a0cfe.mjs} +456 -455
  7. package/dist/{chunk-install-pkg.2dcb2c04.mjs → chunk-install-pkg.6c6dc0c2.mjs} +11 -10
  8. package/dist/{chunk-integrations-globals.00b6e1ad.mjs → chunk-integrations-globals.803277be.mjs} +6 -5
  9. package/dist/chunk-node-git.9058b82a.mjs +1139 -0
  10. package/dist/chunk-runtime-chain.1e1aabb3.mjs +2025 -0
  11. package/dist/chunk-runtime-error.d82dd2cf.mjs +644 -0
  12. package/dist/{chunk-runtime-chain.b60d57da.mjs → chunk-runtime-hooks.db398170.mjs} +10 -2013
  13. package/dist/{chunk-runtime-mocker.1d853e3a.mjs → chunk-runtime-mocker.dfdfd57b.mjs} +3 -3
  14. package/dist/{chunk-runtime-rpc.9d1f4c48.mjs → chunk-runtime-rpc.45d8ee19.mjs} +1 -1
  15. package/dist/{chunk-utils-global.0a7416cf.mjs → chunk-utils-global.2aa95025.mjs} +11 -6
  16. package/dist/{chunk-utils-source-map.c03f8bc4.mjs → chunk-utils-source-map.8b066ce2.mjs} +2 -2
  17. package/dist/{chunk-vite-node-externalize.6956d2d9.mjs → chunk-vite-node-externalize.a2813ad7.mjs} +103 -1173
  18. package/dist/{chunk-vite-node-utils.8077cd3c.mjs → chunk-vite-node-utils.ad73f2ab.mjs} +13 -2
  19. package/dist/cli.mjs +8 -10
  20. package/dist/config.cjs +3 -1
  21. package/dist/config.d.ts +1 -0
  22. package/dist/config.mjs +3 -1
  23. package/dist/entry.mjs +14 -597
  24. package/dist/index.d.ts +39 -4
  25. package/dist/index.mjs +8 -5
  26. package/dist/node.d.ts +28 -2
  27. package/dist/node.mjs +10 -12
  28. package/dist/suite.mjs +13 -0
  29. package/dist/vendor-index.61438b77.mjs +335 -0
  30. package/dist/{vendor-index.4bf9c627.mjs → vendor-index.62ce5c33.mjs} +11 -343
  31. package/dist/worker.mjs +5 -5
  32. package/package.json +11 -3
@@ -0,0 +1,20 @@
1
+ export { c as createExpect, d as describe, b as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.1e1aabb3.mjs';
2
+ export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach } from './chunk-runtime-hooks.db398170.mjs';
3
+ export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-error.d82dd2cf.mjs';
4
+ import * as chai from 'chai';
5
+ export { chai };
6
+ export { assert, should } from 'chai';
7
+ import 'util';
8
+ import './chunk-utils-global.2aa95025.mjs';
9
+ import 'path';
10
+ import 'tty';
11
+ import 'local-pkg';
12
+ import './vendor-_commonjsHelpers.4da45ef5.mjs';
13
+ import './chunk-runtime-rpc.45d8ee19.mjs';
14
+ import 'fs';
15
+ import './chunk-utils-source-map.8b066ce2.mjs';
16
+ import './spy.mjs';
17
+ import 'tinyspy';
18
+ import './chunk-defaults.408a0cfe.mjs';
19
+ import 'module';
20
+ import 'url';
@@ -1,5 +1,5 @@
1
1
  import { promises } from 'fs';
2
- import { c as createBirpc } from './chunk-vite-node-utils.8077cd3c.mjs';
2
+ import { c as createBirpc } from './chunk-vite-node-utils.ad73f2ab.mjs';
3
3
  import require$$0$1 from 'stream';
4
4
  import require$$0 from 'zlib';
5
5
  import require$$3 from 'net';
@@ -8,12 +8,12 @@ import require$$5 from 'crypto';
8
8
  import require$$2 from 'events';
9
9
  import require$$1 from 'https';
10
10
  import require$$2$1 from 'http';
11
- import url from 'url';
12
- import { A as API_PATH } from './chunk-constants.d4406290.mjs';
13
- import { j as interpretSourcePos, b as parseStacktrace } from './chunk-utils-source-map.c03f8bc4.mjs';
11
+ import _url from 'url';
12
+ import { A as API_PATH } from './chunk-constants.38b43a44.mjs';
13
+ import { j as interpretSourcePos, p as parseStacktrace } from './chunk-utils-source-map.8b066ce2.mjs';
14
14
  import 'module';
15
15
  import 'vm';
16
- import './chunk-utils-global.0a7416cf.mjs';
16
+ import './chunk-utils-global.2aa95025.mjs';
17
17
  import 'path';
18
18
  import 'tty';
19
19
  import 'local-pkg';
@@ -2513,7 +2513,7 @@ const http$1 = require$$2$1;
2513
2513
  const net = require$$3;
2514
2514
  const tls = require$$4;
2515
2515
  const { randomBytes, createHash: createHash$1 } = require$$5;
2516
- const { URL: URL$1 } = url;
2516
+ const { URL: URL$1 } = _url;
2517
2517
 
2518
2518
  const PerMessageDeflate$1 = permessageDeflate;
2519
2519
  const Receiver = receiver;
@@ -4417,9 +4417,26 @@ function setup(ctx) {
4417
4417
  });
4418
4418
  function setupClient(ws) {
4419
4419
  const rpc = createBirpc({
4420
+ async onWatcherStart() {
4421
+ await ctx.report("onWatcherStart");
4422
+ },
4423
+ async onFinished() {
4424
+ await ctx.report("onFinished");
4425
+ },
4426
+ async onCollected(files) {
4427
+ ctx.state.collectFiles(files);
4428
+ await ctx.report("onCollected", files);
4429
+ },
4430
+ async onTaskUpdate(packs) {
4431
+ ctx.state.updateTasks(packs);
4432
+ await ctx.report("onTaskUpdate", packs);
4433
+ },
4420
4434
  getFiles() {
4421
4435
  return ctx.state.getFiles();
4422
4436
  },
4437
+ getPaths() {
4438
+ return ctx.state.getPaths();
4439
+ },
4423
4440
  readFile(id) {
4424
4441
  return promises.readFile(id, "utf-8");
4425
4442
  },
@@ -1,7 +1,7 @@
1
- import { fileURLToPath } from 'url';
2
- import { q as resolve } from './chunk-utils-global.0a7416cf.mjs';
1
+ import _url from 'url';
2
+ import { C as resolve } from './chunk-utils-global.2aa95025.mjs';
3
3
 
4
- const distDir = resolve(fileURLToPath(import.meta.url), "../../dist");
4
+ const distDir = resolve(_url.fileURLToPath(import.meta.url), "../../dist");
5
5
  const defaultPort = 51204;
6
6
  const API_PATH = "/__vitest_api__";
7
7
  const configFiles = [