vitest 0.17.1 → 0.18.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 (23) hide show
  1. package/dist/{chunk-api-setup.c728e251.mjs → chunk-api-setup.63babd7c.mjs} +4 -4
  2. package/dist/{chunk-constants.27550afb.mjs → chunk-constants.8eb2ed35.mjs} +1 -1
  3. package/dist/{chunk-env-node.aa51c4cc.mjs → chunk-env-node.26c72624.mjs} +1 -1
  4. package/dist/{chunk-install-pkg.6f5930c3.mjs → chunk-install-pkg.2dcb2c04.mjs} +1 -1
  5. package/dist/{chunk-integrations-globals.3df36e26.mjs → chunk-integrations-globals.61e4d6ae.mjs} +7 -7
  6. package/dist/{chunk-runtime-chain.6d23d202.mjs → chunk-runtime-chain.eb764dff.mjs} +3 -3
  7. package/dist/{chunk-runtime-mocker.34b9d585.mjs → chunk-runtime-mocker.79ccc3de.mjs} +3 -3
  8. package/dist/{chunk-runtime-rpc.d986adb9.mjs → chunk-runtime-rpc.cc6a06a2.mjs} +1 -1
  9. package/dist/{chunk-utils-global.4828c2e2.mjs → chunk-utils-global.1b22c4fd.mjs} +5 -5
  10. package/dist/{chunk-utils-source-map.a9047343.mjs → chunk-utils-source-map.957e7756.mjs} +2 -2
  11. package/dist/{chunk-vite-node-externalize.0fc8ed68.mjs → chunk-vite-node-externalize.0791f2ed.mjs} +2629 -2536
  12. package/dist/{chunk-vite-node-utils.0f776286.mjs → chunk-vite-node-utils.af8ead96.mjs} +1 -1
  13. package/dist/cli.mjs +11 -11
  14. package/dist/entry.mjs +6 -6
  15. package/dist/index.d.ts +70 -31
  16. package/dist/index.mjs +4 -4
  17. package/dist/node.d.ts +72 -40
  18. package/dist/node.mjs +12 -12
  19. package/dist/{vendor-entry.1ad8a08d.mjs → vendor-entry.78de67ab.mjs} +6 -6
  20. package/dist/{vendor-index.a2a385d8.mjs → vendor-index.4bf9c627.mjs} +405 -405
  21. package/dist/{vendor-index.98e769c1.mjs → vendor-index.de788b6a.mjs} +7 -7
  22. package/dist/worker.mjs +5 -5
  23. package/package.json +3 -3
@@ -1,5 +1,5 @@
1
1
  import { promises } from 'fs';
2
- import { c as createBirpc } from './chunk-vite-node-utils.0f776286.mjs';
2
+ import { c as createBirpc } from './chunk-vite-node-utils.af8ead96.mjs';
3
3
  import require$$0$1 from 'stream';
4
4
  import require$$0 from 'zlib';
5
5
  import require$$3 from 'net';
@@ -9,11 +9,11 @@ import require$$2 from 'events';
9
9
  import require$$1 from 'https';
10
10
  import require$$2$1 from 'http';
11
11
  import url from 'url';
12
- import { A as API_PATH } from './chunk-constants.27550afb.mjs';
13
- import { j as interpretSourcePos, b as parseStacktrace } from './chunk-utils-source-map.a9047343.mjs';
12
+ import { A as API_PATH } from './chunk-constants.8eb2ed35.mjs';
13
+ import { j as interpretSourcePos, b as parseStacktrace } from './chunk-utils-source-map.957e7756.mjs';
14
14
  import 'module';
15
15
  import 'vm';
16
- import './chunk-utils-global.4828c2e2.mjs';
16
+ import './chunk-utils-global.1b22c4fd.mjs';
17
17
  import 'tty';
18
18
  import 'local-pkg';
19
19
  import 'path';
@@ -1,5 +1,5 @@
1
1
  import { fileURLToPath } from 'url';
2
- import { q as resolve } from './chunk-utils-global.4828c2e2.mjs';
2
+ import { q as resolve } from './chunk-utils-global.1b22c4fd.mjs';
3
3
 
4
4
  const distDir = resolve(fileURLToPath(import.meta.url), "../../dist");
5
5
  const defaultPort = 51204;
@@ -2,7 +2,7 @@ import { importModule } from 'local-pkg';
2
2
  import { existsSync, promises } from 'fs';
3
3
  import { createRequire } from 'module';
4
4
  import { pathToFileURL } from 'url';
5
- import { F as toArray, q as resolve } from './chunk-utils-global.4828c2e2.mjs';
5
+ import { F as toArray, q as resolve } from './chunk-utils-global.1b22c4fd.mjs';
6
6
 
7
7
  var node = {
8
8
  name: "node",
@@ -2,7 +2,7 @@ import path$2 from 'path';
2
2
  import fs$2 from 'fs';
3
3
  import require$$0 from 'util';
4
4
  import childProcess$1 from 'child_process';
5
- import { p as pathKey, s as signalExit, m as mergeStream$1, g as getStream$1, c as crossSpawn$1, o as onetime$1 } from './vendor-index.a2a385d8.mjs';
5
+ import { p as pathKey, s as signalExit, m as mergeStream$1, g as getStream$1, c as crossSpawn$1, o as onetime$1 } from './vendor-index.4bf9c627.mjs';
6
6
  import require$$0$1 from 'os';
7
7
  import './vendor-_commonjsHelpers.4da45ef5.mjs';
8
8
  import 'assert';
@@ -1,18 +1,18 @@
1
- import { g as globalApis } from './chunk-constants.27550afb.mjs';
2
- import { i as index } from './vendor-entry.1ad8a08d.mjs';
1
+ import { g as globalApis } from './chunk-constants.8eb2ed35.mjs';
2
+ import { i as index } from './vendor-entry.78de67ab.mjs';
3
3
  import 'url';
4
- import './chunk-utils-global.4828c2e2.mjs';
4
+ import './chunk-utils-global.1b22c4fd.mjs';
5
5
  import 'tty';
6
6
  import 'local-pkg';
7
7
  import 'path';
8
8
  import 'fs';
9
- import './chunk-env-node.aa51c4cc.mjs';
9
+ import './chunk-env-node.26c72624.mjs';
10
10
  import 'module';
11
- import './chunk-runtime-chain.6d23d202.mjs';
11
+ import './chunk-runtime-chain.eb764dff.mjs';
12
12
  import 'chai';
13
13
  import './vendor-_commonjsHelpers.4da45ef5.mjs';
14
- import './chunk-runtime-rpc.d986adb9.mjs';
15
- import './chunk-utils-source-map.a9047343.mjs';
14
+ import './chunk-runtime-rpc.cc6a06a2.mjs';
15
+ import './chunk-utils-source-map.957e7756.mjs';
16
16
  import './chunk-integrations-spy.674b628e.mjs';
17
17
  import 'tinyspy';
18
18
  import 'util';
@@ -1,9 +1,9 @@
1
1
  import chai$1, { expect, AssertionError, util } from 'chai';
2
2
  import { c as commonjsGlobal } from './vendor-_commonjsHelpers.4da45ef5.mjs';
3
- import { r as rpc } from './chunk-runtime-rpc.d986adb9.mjs';
4
- import { i as isObject, j as join, d as dirname, g as getCallLastIndex, s as slash, a as getWorkerState, b as getNames, c as assertTypes, p as picocolors, e as getFullName, f as safeSetTimeout, h as safeClearTimeout, n as noop, R as RealDate, r as resetDate, m as mockDate, k as resetModules } from './chunk-utils-global.4828c2e2.mjs';
3
+ import { r as rpc } from './chunk-runtime-rpc.cc6a06a2.mjs';
4
+ import { i as isObject, j as join, d as dirname, g as getCallLastIndex, s as slash, a as getWorkerState, b as getNames, c as assertTypes, p as picocolors, e as getFullName, f as safeSetTimeout, h as safeClearTimeout, n as noop, R as RealDate, r as resetDate, m as mockDate, k as resetModules } from './chunk-utils-global.1b22c4fd.mjs';
5
5
  import fs, { promises } from 'fs';
6
- import { p as plugins_1, f as format_1, g as getOriginalPos, a as posToNumber, n as numberToPos, l as lineSplitRE, b as parseStacktrace, u as unifiedDiff, s as stringify, m as matcherUtils } from './chunk-utils-source-map.a9047343.mjs';
6
+ import { p as plugins_1, f as format_1, g as getOriginalPos, a as posToNumber, n as numberToPos, l as lineSplitRE, b as parseStacktrace, u as unifiedDiff, s as stringify, m as matcherUtils } from './chunk-utils-source-map.957e7756.mjs';
7
7
  import { i as isMockFunction, s as spyOn, f as fn, a as spies } from './chunk-integrations-spy.674b628e.mjs';
8
8
  import require$$0, { format } from 'util';
9
9
 
@@ -1,8 +1,8 @@
1
- import { n as normalizeRequestId, i as isNodeBuiltin, b as toFilePath, V as ViteNodeRunner } from './chunk-vite-node-utils.0f776286.mjs';
1
+ import { n as normalizeRequestId, i as isNodeBuiltin, b as toFilePath, V as ViteNodeRunner } from './chunk-vite-node-utils.af8ead96.mjs';
2
2
  import { normalizePath } from 'vite';
3
- import { a as getWorkerState, M as isWindows, N as mergeSlashes, d as dirname, j as join, o as basename, q as resolve, O as getType, P as getAllProperties, s as slash } from './chunk-utils-global.4828c2e2.mjs';
3
+ import { a as getWorkerState, M as isWindows, N as mergeSlashes, d as dirname, j as join, o as basename, q as resolve, O as getType, P as getAllProperties, s as slash } from './chunk-utils-global.1b22c4fd.mjs';
4
4
  import { existsSync, readdirSync } from 'fs';
5
- import { d as distDir } from './chunk-constants.27550afb.mjs';
5
+ import { d as distDir } from './chunk-constants.8eb2ed35.mjs';
6
6
 
7
7
  const _VitestMocker = class {
8
8
  constructor(options, moduleCache, request) {
@@ -1,4 +1,4 @@
1
- import { a as getWorkerState, w as withSafeTimers } from './chunk-utils-global.4828c2e2.mjs';
1
+ import { a as getWorkerState, w as withSafeTimers } from './chunk-utils-global.1b22c4fd.mjs';
2
2
 
3
3
  const rpc = () => {
4
4
  const { rpc: rpc2 } = getWorkerState();
@@ -304,9 +304,9 @@ function isFinalObj(obj) {
304
304
  }
305
305
  function collectOwnProperties(obj, collector) {
306
306
  const props = Object.getOwnPropertyNames(obj);
307
- const symbs = Object.getOwnPropertySymbols(obj);
307
+ const symbols = Object.getOwnPropertySymbols(obj);
308
308
  props.forEach((prop) => collector.add(prop));
309
- symbs.forEach((symb) => collector.add(symb));
309
+ symbols.forEach((symbol) => collector.add(symbol));
310
310
  }
311
311
  function getAllProperties(obj) {
312
312
  const allProps = /* @__PURE__ */ new Set();
@@ -523,14 +523,14 @@ async function ensurePackageInstalled(dependency, promptInstall = !process.env.C
523
523
  `));
524
524
  if (!promptInstall)
525
525
  return false;
526
- const prompts = await import('./vendor-index.98e769c1.mjs').then(function (n) { return n.i; });
526
+ const prompts = await import('./vendor-index.de788b6a.mjs').then(function (n) { return n.i; });
527
527
  const { install } = await prompts.prompt({
528
528
  type: "confirm",
529
529
  name: "install",
530
530
  message: picocolors.exports.reset(`Do you want to install ${picocolors.exports.green(dependency)}?`)
531
531
  });
532
532
  if (install) {
533
- await (await import('./chunk-install-pkg.6f5930c3.mjs')).installPackage(dependency, { dev: true });
533
+ await (await import('./chunk-install-pkg.2dcb2c04.mjs')).installPackage(dependency, { dev: true });
534
534
  process.stderr.write(picocolors.exports.yellow(`
535
535
  Package ${dependency} installed, re-run the command to start.
536
536
  `));
@@ -574,4 +574,4 @@ class AggregateErrorPonyfill extends Error {
574
574
  }
575
575
  }
576
576
 
577
- export { AggregateErrorPonyfill as A, getSuites as B, safeSetInterval as C, safeClearInterval as D, shuffle as E, toArray as F, normalize as G, deepMerge as H, toNamespacedPath as I, ensurePackageInstalled as J, stdout as K, extname as L, isWindows as M, mergeSlashes as N, getType as O, getAllProperties as P, deepClone as Q, RealDate as R, partitionSuiteChildren as S, hasTests as T, getWorkerState as a, getNames as b, assertTypes as c, dirname as d, getFullName as e, safeSetTimeout as f, getCallLastIndex as g, safeClearTimeout as h, isObject as i, join as j, resetModules as k, notNullish as l, mockDate as m, noop as n, basename as o, picocolors as p, resolve as q, resetDate as r, slash as s, isAbsolute as t, relative as u, isNode as v, withSafeTimers as w, getTests as x, hasFailed as y, hasFailedSnapshot as z };
577
+ export { AggregateErrorPonyfill as A, safeSetInterval as B, safeClearInterval as C, getSuites as D, shuffle as E, toArray as F, normalize as G, deepMerge as H, toNamespacedPath as I, ensurePackageInstalled as J, stdout as K, extname as L, isWindows as M, mergeSlashes as N, getType as O, getAllProperties as P, deepClone as Q, RealDate as R, partitionSuiteChildren as S, hasTests as T, getWorkerState as a, getNames as b, assertTypes as c, dirname as d, getFullName as e, safeSetTimeout as f, getCallLastIndex as g, safeClearTimeout as h, isObject as i, join as j, resetModules as k, notNullish as l, mockDate as m, noop as n, basename as o, picocolors as p, resolve as q, resetDate as r, slash as s, isAbsolute as t, relative as u, isNode as v, withSafeTimers as w, getTests as x, hasFailed as y, hasFailedSnapshot as z };
@@ -1,4 +1,4 @@
1
- import { s as slash, l as notNullish, p as picocolors } from './chunk-utils-global.4828c2e2.mjs';
1
+ import { s as slash, l as notNullish, p as picocolors } from './chunk-utils-global.1b22c4fd.mjs';
2
2
 
3
3
  var build = {};
4
4
 
@@ -7435,4 +7435,4 @@ var matcherUtils = /*#__PURE__*/Object.freeze({
7435
7435
  diff: diff
7436
7436
  });
7437
7437
 
7438
- export { posToNumber as a, parseStacktrace as b, stripAnsi as c, stringWidth as d, ansiStyles as e, format_1 as f, getOriginalPos as g, sliceAnsi as h, cliTruncate as i, interpretSourcePos as j, lineSplitRE as l, matcherUtils as m, numberToPos as n, plugins_1 as p, stringify as s, unifiedDiff as u };
7438
+ export { posToNumber as a, parseStacktrace as b, stripAnsi as c, cliTruncate as d, stringWidth as e, format_1 as f, getOriginalPos as g, ansiStyles as h, sliceAnsi as i, interpretSourcePos as j, lineSplitRE as l, matcherUtils as m, numberToPos as n, plugins_1 as p, stringify as s, unifiedDiff as u };