vitest 0.24.2 → 0.24.4

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 (28) hide show
  1. package/dist/browser.d.ts +3 -3
  2. package/dist/browser.js +3 -3
  3. package/dist/{chunk-api-setup.cdeaef6b.js → chunk-api-setup.5a197c69.js} +2 -2
  4. package/dist/{chunk-integrations-globals.10e6725a.js → chunk-integrations-globals.88fd2e64.js} +2 -2
  5. package/dist/{chunk-runtime-chain.072b5677.js → chunk-runtime-chain.a5cd236b.js} +36 -5
  6. package/dist/{chunk-runtime-error.b043a88d.js → chunk-runtime-error.9c28c08f.js} +7 -7
  7. package/dist/{chunk-runtime-hooks.6963ff8f.js → chunk-runtime-hooks.66004497.js} +1 -1
  8. package/dist/{chunk-runtime-mocker.3eb1fcc0.js → chunk-runtime-mocker.f994e23a.js} +2 -2
  9. package/dist/{chunk-vite-node-client.e22799cd.js → chunk-vite-node-client.9fbd5d5b.js} +10 -12
  10. package/dist/{chunk-vite-node-externalize.02d922bf.js → chunk-vite-node-externalize.e66d46f6.js} +24 -18
  11. package/dist/{chunk-vite-node-utils.835c8b2c.js → chunk-vite-node-utils.5096a80d.js} +11 -2
  12. package/dist/cli-wrapper.js +4 -0
  13. package/dist/cli.js +11 -5
  14. package/dist/config.cjs +3 -4
  15. package/dist/config.d.ts +1 -1
  16. package/dist/config.js +3 -4
  17. package/dist/entry.js +3 -3
  18. package/dist/environments.d.ts +1 -1
  19. package/dist/{global-732f9b14.d.ts → global-58e8e951.d.ts} +5 -0
  20. package/dist/{index-40e0cb97.d.ts → index-220c1d70.d.ts} +1 -1
  21. package/dist/index.d.ts +4 -4
  22. package/dist/index.js +2 -2
  23. package/dist/loader.js +2 -2
  24. package/dist/node.d.ts +2 -2
  25. package/dist/node.js +4 -4
  26. package/dist/suite.js +1 -1
  27. package/dist/worker.js +3 -3
  28. package/package.json +8 -7
package/dist/browser.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- export { E as EnhancedSpy, r as Mock, u as MockContext, q as MockInstance, v as Mocked, w as MockedClass, o as MockedFunction, p as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, h as beforeAll, k as beforeEach, n as createExpect, e as describe, m as expect, i as it, d as suite, t as test } from './index-40e0cb97.js';
2
- import { R as ResolvedConfig } from './global-732f9b14.js';
3
- export { L as AfterSuiteRunMeta, A as ApiConfig, Y as ArgumentsType, X as Arrayable, P as Awaitable, ae as BaseCoverageOptions, ak as BenchFunction, ai as Benchmark, al as BenchmarkAPI, aj as BenchmarkResult, ah as BenchmarkUserOptions, B as BuiltinEnvironment, C as CSSModuleScopeStrategy, a0 as Constructable, ag as CoverageC8Options, af as CoverageIstanbulOptions, ac as CoverageOptions, a9 as CoverageProvider, aa as CoverageProviderModule, ab as CoverageReporter, _ as DeepMerge, D as DoneCallback, a3 as Environment, E as EnvironmentOptions, a2 as EnvironmentReturn, a7 as ErrorWithDiff, a as File, n as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, Z as MergeInsertions, a1 as ModuleCache, M as ModuleGraphData, $ as MutableArray, Q as Nullable, a8 as OnServerRestartHandler, a6 as ParsedStack, a5 as Position, b as Reporter, K as ResolveIdFunction, R as ResolvedConfig, ad as ResolvedCoverageOptions, d as RunMode, r as RuntimeContext, u as SnapshotData, x as SnapshotMatchOptions, y as SnapshotResult, w as SnapshotStateOptions, G as SnapshotSummary, v as SnapshotUpdateState, S as Suite, m as SuiteAPI, p as SuiteCollector, q as SuiteFactory, o as SuiteHooks, i as Task, f as TaskBase, g as TaskResult, T as TaskResultPack, e as TaskState, h as Test, l as TestAPI, s as TestContext, j as TestFunction, k as TestOptions, z as UncheckedSnapshot, U as UserConfig, a4 as UserConsoleLog, t as Vitest, V as VitestEnvironment, c as VitestRunMode, W as WorkerContext, O as WorkerGlobalState, N as WorkerRPC } from './global-732f9b14.js';
1
+ export { E as EnhancedSpy, r as Mock, u as MockContext, q as MockInstance, v as Mocked, w as MockedClass, o as MockedFunction, p as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, h as beforeAll, k as beforeEach, n as createExpect, e as describe, m as expect, i as it, d as suite, t as test } from './index-220c1d70.js';
2
+ import { R as ResolvedConfig } from './global-58e8e951.js';
3
+ export { L as AfterSuiteRunMeta, A as ApiConfig, Y as ArgumentsType, X as Arrayable, P as Awaitable, ae as BaseCoverageOptions, ak as BenchFunction, ai as Benchmark, al as BenchmarkAPI, aj as BenchmarkResult, ah as BenchmarkUserOptions, B as BuiltinEnvironment, C as CSSModuleScopeStrategy, a0 as Constructable, ag as CoverageC8Options, af as CoverageIstanbulOptions, ac as CoverageOptions, a9 as CoverageProvider, aa as CoverageProviderModule, ab as CoverageReporter, _ as DeepMerge, D as DoneCallback, a3 as Environment, E as EnvironmentOptions, a2 as EnvironmentReturn, a7 as ErrorWithDiff, a as File, n as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, Z as MergeInsertions, a1 as ModuleCache, M as ModuleGraphData, $ as MutableArray, Q as Nullable, a8 as OnServerRestartHandler, a6 as ParsedStack, a5 as Position, b as Reporter, K as ResolveIdFunction, R as ResolvedConfig, ad as ResolvedCoverageOptions, d as RunMode, r as RuntimeContext, u as SnapshotData, x as SnapshotMatchOptions, y as SnapshotResult, w as SnapshotStateOptions, G as SnapshotSummary, v as SnapshotUpdateState, S as Suite, m as SuiteAPI, p as SuiteCollector, q as SuiteFactory, o as SuiteHooks, i as Task, f as TaskBase, g as TaskResult, T as TaskResultPack, e as TaskState, h as Test, l as TestAPI, s as TestContext, j as TestFunction, k as TestOptions, z as UncheckedSnapshot, U as UserConfig, a4 as UserConsoleLog, t as Vitest, V as VitestEnvironment, c as VitestRunMode, W as WorkerContext, O as WorkerGlobalState, N as WorkerRPC } from './global-58e8e951.js';
4
4
  import * as chai from 'chai';
5
5
  export { chai };
6
6
  export { assert, should } from 'chai';
package/dist/browser.js CHANGED
@@ -1,6 +1,6 @@
1
- export { c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.072b5677.js';
2
- export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach } from './chunk-runtime-hooks.6963ff8f.js';
3
- export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-error.b043a88d.js';
1
+ export { c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.a5cd236b.js';
2
+ export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach } from './chunk-runtime-hooks.66004497.js';
3
+ export { a as setupGlobalEnv, s as startTests } from './chunk-runtime-error.9c28c08f.js';
4
4
  import * as chai from 'chai';
5
5
  export { chai };
6
6
  export { assert, should } from 'chai';
@@ -1,5 +1,5 @@
1
1
  import { promises } from 'fs';
2
- import { c as createBirpc } from './chunk-vite-node-client.e22799cd.js';
2
+ import { c as createBirpc } from './chunk-vite-node-client.9fbd5d5b.js';
3
3
  import require$$0$1 from 'stream';
4
4
  import require$$0 from 'zlib';
5
5
  import require$$3 from 'net';
@@ -13,7 +13,7 @@ import { A as API_PATH } from './chunk-utils-env.b1281522.js';
13
13
  import { i as interpretSourcePos, p as parseStacktrace } from './chunk-utils-source-map.d9d36eb0.js';
14
14
  import 'module';
15
15
  import 'vm';
16
- import './chunk-vite-node-utils.835c8b2c.js';
16
+ import './chunk-vite-node-utils.5096a80d.js';
17
17
  import 'path';
18
18
  import 'assert';
19
19
  import 'util';
@@ -1,9 +1,9 @@
1
1
  import { m as globalApis } from './chunk-utils-env.b1281522.js';
2
- import { i as index } from './chunk-runtime-hooks.6963ff8f.js';
2
+ import { i as index } from './chunk-runtime-hooks.66004497.js';
3
3
  import 'tty';
4
4
  import 'url';
5
5
  import 'path';
6
- import './chunk-runtime-chain.072b5677.js';
6
+ import './chunk-runtime-chain.a5cd236b.js';
7
7
  import 'util';
8
8
  import './chunk-mock-date.9fe2b438.js';
9
9
  import 'local-pkg';
@@ -1447,6 +1447,27 @@ ${spy.mock.calls.map((callArg, i) => {
1447
1447
  }).join("\n")}`);
1448
1448
  msg += picocolors.exports.gray(`
1449
1449
 
1450
+ Number of calls: ${picocolors.exports.bold(spy.mock.calls.length)}
1451
+ `);
1452
+ return msg;
1453
+ };
1454
+ const formatReturns = (spy, msg, actualReturn) => {
1455
+ msg += picocolors.exports.gray(`
1456
+
1457
+ Received:
1458
+ ${spy.mock.results.map((callReturn, i) => {
1459
+ let methodCall = picocolors.exports.bold(` ${ordinalOf(i + 1)} ${spy.getMockName()} call return:
1460
+
1461
+ `);
1462
+ if (actualReturn)
1463
+ methodCall += unifiedDiff(stringify(callReturn.value), stringify(actualReturn), { showLegend: false });
1464
+ else
1465
+ methodCall += stringify(callReturn).split("\n").map((line) => ` ${line}`).join("\n");
1466
+ methodCall += "\n";
1467
+ return methodCall;
1468
+ }).join("\n")}`);
1469
+ msg += picocolors.exports.gray(`
1470
+
1450
1471
  Number of calls: ${picocolors.exports.bold(spy.mock.calls.length)}
1451
1472
  `);
1452
1473
  return msg;
@@ -1628,12 +1649,22 @@ Number of calls: ${picocolors.exports.bold(spy.mock.calls.length)}
1628
1649
  const spy = getSpy(this);
1629
1650
  const spyName = spy.getMockName();
1630
1651
  const pass = spy.mock.results.some(({ type, value: result }) => type === "return" && equals(value, result));
1631
- this.assert(
1632
- pass,
1633
- `expected "${spyName}" to be successfully called with #{exp}`,
1634
- `expected "${spyName}" to not be successfully called with #{exp}`,
1635
- value
1652
+ const isNot = utils.flag(this, "negate");
1653
+ let msg = utils.getMessage(
1654
+ this,
1655
+ [
1656
+ pass,
1657
+ `expected "${spyName}" to return with: #{exp} at least once`,
1658
+ `expected "${spyName}" to not return with: #{exp}`,
1659
+ value
1660
+ ]
1636
1661
  );
1662
+ if (pass && isNot || !pass && !isNot) {
1663
+ msg = formatReturns(spy, msg, value);
1664
+ const err = new Error(msg);
1665
+ err.name = "AssertionError";
1666
+ throw err;
1667
+ }
1637
1668
  });
1638
1669
  def(["toHaveLastReturnedWith", "lastReturnedWith"], function(value) {
1639
1670
  const spy = getSpy(this);
@@ -1,8 +1,8 @@
1
1
  import { performance } from 'perf_hooks';
2
2
  import { t as takeCoverageInsideWorker, p as pLimit } from './chunk-integrations-coverage.cca09977.js';
3
- import { r as resetRunOnceCounter, i as index, v as vi } from './chunk-runtime-hooks.6963ff8f.js';
3
+ import { r as resetRunOnceCounter, i as index, v as vi } from './chunk-runtime-hooks.66004497.js';
4
4
  import { k as deepClone, l as getType, g as getWorkerState, R as RealDate, t as toArray, o as relativePath, h as isRunningInBenchmark, p as partitionSuiteChildren, q as shuffle, u as hasTests, v as hasFailed, w as createDefer, d as assertTypes, e as getFullName } from './chunk-mock-date.9fe2b438.js';
5
- import { f as clearCollectorContext, h as defaultSuite, j as setHooks, k as getHooks, l as collectorContext, m as getFn, n as setState, G as GLOBAL_EXPECT, o as getState } from './chunk-runtime-chain.072b5677.js';
5
+ import { f as clearCollectorContext, h as defaultSuite, j as setHooks, k as getHooks, l as collectorContext, m as getFn, n as setState, G as GLOBAL_EXPECT, o as getState } from './chunk-runtime-chain.a5cd236b.js';
6
6
  import { r as rpc } from './chunk-runtime-rpc.e583f5e7.js';
7
7
  import util$1 from 'util';
8
8
  import { util } from 'chai';
@@ -155,7 +155,7 @@ async function setupGlobalEnv(config) {
155
155
  if (isNode)
156
156
  await setupConsoleLogSpy();
157
157
  if (config.globals)
158
- (await import('./chunk-integrations-globals.10e6725a.js')).registerApiGlobally();
158
+ (await import('./chunk-integrations-globals.88fd2e64.js')).registerApiGlobally();
159
159
  }
160
160
  function setupDefines(defines) {
161
161
  for (const key in defines)
@@ -499,7 +499,7 @@ const callCleanupHooks = async (cleanups) => {
499
499
  async function runTest(test) {
500
500
  var _a, _b;
501
501
  if (test.mode !== "run") {
502
- const { getSnapshotClient } = await import('./chunk-runtime-chain.072b5677.js').then(function (n) { return n.q; });
502
+ const { getSnapshotClient } = await import('./chunk-runtime-chain.a5cd236b.js').then(function (n) { return n.q; });
503
503
  getSnapshotClient().skipTestSnapshots(test);
504
504
  return;
505
505
  }
@@ -515,7 +515,7 @@ async function runTest(test) {
515
515
  updateTask(test);
516
516
  clearModuleMocks();
517
517
  if (isNode) {
518
- const { getSnapshotClient } = await import('./chunk-runtime-chain.072b5677.js').then(function (n) { return n.q; });
518
+ const { getSnapshotClient } = await import('./chunk-runtime-chain.a5cd236b.js').then(function (n) { return n.q; });
519
519
  await getSnapshotClient().setTest(test);
520
520
  }
521
521
  const workerState = getWorkerState();
@@ -575,7 +575,7 @@ async function runTest(test) {
575
575
  if (isBrowser && test.result.error)
576
576
  console.error(test.result.error.message, test.result.error.stackStr);
577
577
  if (isNode) {
578
- const { getSnapshotClient } = await import('./chunk-runtime-chain.072b5677.js').then(function (n) { return n.q; });
578
+ const { getSnapshotClient } = await import('./chunk-runtime-chain.a5cd236b.js').then(function (n) { return n.q; });
579
579
  getSnapshotClient().clearTest();
580
580
  }
581
581
  test.result.duration = now() - start;
@@ -780,7 +780,7 @@ async function startTestsBrowser(paths, config) {
780
780
  async function startTestsNode(paths, config) {
781
781
  const files = await collectTests(paths, config);
782
782
  rpc().onCollected(files);
783
- const { getSnapshotClient } = await import('./chunk-runtime-chain.072b5677.js').then(function (n) { return n.q; });
783
+ const { getSnapshotClient } = await import('./chunk-runtime-chain.a5cd236b.js').then(function (n) { return n.q; });
784
784
  getSnapshotClient().clear();
785
785
  await runFiles(files, config);
786
786
  const coverage = await takeCoverageInsideWorker(config.coverage);
@@ -1,4 +1,4 @@
1
- import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, s as suite, t as test, d as describe, i as it, b as bench, c as createExpect, e as globalExpect } from './chunk-runtime-chain.072b5677.js';
1
+ import { g as getCurrentSuite, w as withTimeout, a as getDefaultHookTimeout, s as suite, t as test, d as describe, i as it, b as bench, c as createExpect, e as globalExpect } from './chunk-runtime-chain.a5cd236b.js';
2
2
  import { g as getWorkerState, R as RealDate, r as resetDate, m as mockDate, a as resetModules } from './chunk-mock-date.9fe2b438.js';
3
3
  import { p as parseStacktrace } from './chunk-utils-source-map.d9d36eb0.js';
4
4
  import { c as commonjsGlobal } from './vendor-_commonjsHelpers.addc3445.js';
@@ -1,8 +1,8 @@
1
- import { V as ViteNodeRunner } from './chunk-vite-node-client.e22799cd.js';
1
+ import { V as ViteNodeRunner } from './chunk-vite-node-client.9fbd5d5b.js';
2
2
  import { normalizePath } from 'vite';
3
3
  import { g as getWorkerState, E as mergeSlashes, s as slash, l as getType, F as getAllMockableProperties } from './chunk-mock-date.9fe2b438.js';
4
4
  import { existsSync, readdirSync } from 'fs';
5
- import { n as normalizeRequestId, p as pathFromRoot, i as isNodeBuiltin, b as toFilePath } from './chunk-vite-node-utils.835c8b2c.js';
5
+ import { n as normalizeRequestId, p as pathFromRoot, i as isNodeBuiltin, b as toFilePath } from './chunk-vite-node-utils.5096a80d.js';
6
6
  import { d as dirname, j as join, c as basename, l as extname, b as resolve, e as distDir } from './chunk-utils-env.b1281522.js';
7
7
 
8
8
  class RefTracker {
@@ -2,7 +2,7 @@ import { createRequire } from 'module';
2
2
  import { pathToFileURL, fileURLToPath } from 'url';
3
3
  import vm from 'vm';
4
4
  import { b as resolve, d as dirname, g as isAbsolute, l as extname } from './chunk-utils-env.b1281522.js';
5
- import { s as slash, n as normalizeRequestId, b as toFilePath, i as isNodeBuiltin, c as isPrimitive, d as normalizeModuleId, m as mergeSlashes } from './chunk-vite-node-utils.835c8b2c.js';
5
+ import { s as slash, n as normalizeRequestId, b as toFilePath, i as isNodeBuiltin, c as isPrimitive, d as normalizeModuleId, m as mergeSlashes } from './chunk-vite-node-utils.5096a80d.js';
6
6
  import createDebug from 'debug';
7
7
 
8
8
  const debugExecute = createDebug("vite-node:client:execute");
@@ -190,18 +190,16 @@ ${getStack()}`), 2e3);
190
190
  return Reflect.get(exports, p, receiver);
191
191
  },
192
192
  set(_, p, value) {
193
- if (p !== "default") {
194
- if (!Reflect.has(exports, "default"))
195
- exports.default = {};
196
- if (exports.default === null || typeof exports.default !== "object") {
197
- defineExport(exports, p, () => void 0);
198
- return true;
199
- }
200
- exports.default[p] = value;
201
- defineExport(exports, p, () => value);
193
+ if (!Reflect.has(exports, "default"))
194
+ exports.default = {};
195
+ if (exports.default === null || typeof exports.default !== "object") {
196
+ defineExport(exports, p, () => void 0);
202
197
  return true;
203
198
  }
204
- return Reflect.set(exports, p, value);
199
+ exports.default[p] = value;
200
+ if (p !== "default")
201
+ defineExport(exports, p, () => value);
202
+ return true;
205
203
  }
206
204
  });
207
205
  Object.assign(mod, { code: transformed, exports });
@@ -209,7 +207,7 @@ ${getStack()}`), 2e3);
209
207
  const moduleProxy = {
210
208
  set exports(value) {
211
209
  exportAll(cjsExports, value);
212
- cjsExports.default = value;
210
+ exports.default = value;
213
211
  },
214
212
  get exports() {
215
213
  return cjsExports;
@@ -12,10 +12,10 @@ import util$2 from 'util';
12
12
  import require$$0$1 from 'stream';
13
13
  import require$$2 from 'events';
14
14
  import { c as commonjsGlobal } from './vendor-_commonjsHelpers.addc3445.js';
15
- import { c as createBirpc, V as ViteNodeRunner } from './chunk-vite-node-client.e22799cd.js';
15
+ import { c as createBirpc, V as ViteNodeRunner } from './chunk-vite-node-client.9fbd5d5b.js';
16
16
  import { performance } from 'perf_hooks';
17
17
  import createDebug from 'debug';
18
- import { i as isNodeBuiltin, a as isValidNodeImport, s as slash$1, t as toArray, b as toFilePath, w as withInlineSourcemap } from './chunk-vite-node-utils.835c8b2c.js';
18
+ import { i as isNodeBuiltin, a as isValidNodeImport, s as slash$1, t as toArray, b as toFilePath, w as withInlineSourcemap } from './chunk-vite-node-utils.5096a80d.js';
19
19
  import { MessageChannel } from 'worker_threads';
20
20
  import { Tinypool } from 'tinypool';
21
21
  import { c as stripAnsi, d as cliTruncate, p as parseStacktrace, i as interpretSourcePos, e as stringWidth, h as ansiStyles, j as sliceAnsi, s as stringify$5, u as unifiedDiff, b as posToNumber, l as lineSplitRE } from './chunk-utils-source-map.d9d36eb0.js';
@@ -29,7 +29,7 @@ import { stripLiteral } from 'strip-literal';
29
29
  import require$$0$2 from 'readline';
30
30
  import { p as prompts } from './vendor-index.9f20a9be.js';
31
31
 
32
- var version$1 = "0.24.2";
32
+ var version$1 = "0.24.4";
33
33
 
34
34
  class EndError extends Error {
35
35
  constructor(value) {
@@ -7582,9 +7582,9 @@ ${BADGE}${TRIGGER} ${picocolors.exports.blue(`x${rerun}`)}
7582
7582
  var _a2, _b;
7583
7583
  if (this.ctx.config.silent)
7584
7584
  return false;
7585
- const shouldIgnore = (_b = (_a2 = this.ctx.config).onConsoleLog) == null ? void 0 : _b.call(_a2, log.content, log.type);
7586
- if (shouldIgnore === false)
7587
- return shouldIgnore;
7585
+ const shouldLog = (_b = (_a2 = this.ctx.config).onConsoleLog) == null ? void 0 : _b.call(_a2, log.content, log.type);
7586
+ if (shouldLog === false)
7587
+ return shouldLog;
7588
7588
  return true;
7589
7589
  }
7590
7590
  onServerRestart(reason) {
@@ -8521,7 +8521,7 @@ const ReportersMap = {
8521
8521
  async function loadCustomReporterModule(path, runner) {
8522
8522
  let customReporterModule;
8523
8523
  try {
8524
- customReporterModule = await runner.executeId(path);
8524
+ customReporterModule = await runner.executeFile(path);
8525
8525
  } catch (customReporterModuleError) {
8526
8526
  throw new Error(`Failed to load custom Reporter from ${path}`, { cause: customReporterModuleError });
8527
8527
  }
@@ -8660,7 +8660,7 @@ class StateManager {
8660
8660
  }
8661
8661
 
8662
8662
  const defaultInclude = ["**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"];
8663
- const defaultExclude = ["**/node_modules/**", "**/dist/**", "**/cypress/**", "**/.{idea,git,cache,output,temp}/**"];
8663
+ const defaultExclude = ["**/node_modules/**", "**/dist/**", "**/cypress/**", "**/.{idea,git,cache,output,temp}/**", "**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress}.config.*"];
8664
8664
  const benchmarkConfigDefaults = {
8665
8665
  include: ["**/*.{bench,benchmark}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"],
8666
8666
  exclude: defaultExclude,
@@ -8678,7 +8678,7 @@ const defaultCoverageExcludes = [
8678
8678
  "**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}",
8679
8679
  "**/*{.,-}spec.{js,cjs,mjs,ts,tsx,jsx}",
8680
8680
  "**/__tests__/**",
8681
- "**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress}.config.{js,cjs,mjs,ts}",
8681
+ "**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress}.config.*",
8682
8682
  "**/.{eslint,mocha,prettier}rc.{js,cjs,yml}"
8683
8683
  ];
8684
8684
  const coverageConfigDefaults = {
@@ -8724,8 +8724,7 @@ const config = {
8724
8724
  watchExclude: ["**/node_modules/**", "**/dist/**"],
8725
8725
  forceRerunTriggers: [
8726
8726
  "**/package.json/**",
8727
- "**/vitest.config.*/**",
8728
- "**/vite.config.*/**"
8727
+ "**/{vitest,vite}.config.*/**"
8729
8728
  ],
8730
8729
  update: false,
8731
8730
  reporters: [],
@@ -9533,7 +9532,7 @@ createLogUpdate(process$1.stdout);
9533
9532
 
9534
9533
  createLogUpdate(process$1.stderr);
9535
9534
 
9536
- var version = "0.24.2";
9535
+ var version = "0.24.4";
9537
9536
 
9538
9537
  function fileFromParsedStack(stack) {
9539
9538
  var _a, _b;
@@ -9746,11 +9745,11 @@ class Logger {
9746
9745
  this._clearScreen();
9747
9746
  }
9748
9747
  _clearScreen() {
9749
- if (!this._clearScreenPending)
9748
+ if (this._clearScreenPending == null)
9750
9749
  return;
9751
9750
  const log = this._clearScreenPending;
9752
9751
  this._clearScreenPending = void 0;
9753
- this.console.log(`\x1B[1;1H\x1B[J${log}`);
9752
+ this.console.log(`\x1Bc${log}`);
9754
9753
  }
9755
9754
  printError(err, fullStack = false, type) {
9756
9755
  return printError(err, this.ctx, {
@@ -9779,7 +9778,7 @@ No ${config.mode} files found, exiting with code 1`));
9779
9778
  }
9780
9779
  printBanner() {
9781
9780
  var _a, _b, _c;
9782
- this.log();
9781
+ this.clearScreen("", true);
9783
9782
  const versionTest = this.ctx.config.watch ? picocolors.exports.blue(`v${version}`) : picocolors.exports.cyan(`v${version}`);
9784
9783
  const mode = this.ctx.config.watch ? picocolors.exports.blue(" DEV ") : picocolors.exports.cyan(" RUN ");
9785
9784
  this.log(`${picocolors.exports.inverse(picocolors.exports.bold(mode))} ${versionTest} ${picocolors.exports.gray(this.ctx.config.root)}`);
@@ -9902,6 +9901,10 @@ class Vitest {
9902
9901
  sequence: {
9903
9902
  ...this.config.sequence,
9904
9903
  sequencer: void 0
9904
+ },
9905
+ benchmark: {
9906
+ ...this.config.benchmark,
9907
+ reporters: []
9905
9908
  }
9906
9909
  },
9907
9910
  this.configOverride || {}
@@ -10569,7 +10572,9 @@ async function VitestPlugin(options = {}, ctx = new Vitest("test")) {
10569
10572
  const config = {
10570
10573
  resolve: {
10571
10574
  mainFields: [],
10572
- alias: preOptions.alias
10575
+ alias: preOptions.alias,
10576
+ conditions: ["node"],
10577
+ browserField: false
10573
10578
  },
10574
10579
  server: {
10575
10580
  ...preOptions.api,
@@ -10626,7 +10631,7 @@ async function VitestPlugin(options = {}, ctx = new Vitest("test")) {
10626
10631
  try {
10627
10632
  await ctx.setServer(options, server);
10628
10633
  if (options.api && options.watch)
10629
- (await import('./chunk-api-setup.cdeaef6b.js')).setup(ctx);
10634
+ (await import('./chunk-api-setup.5a197c69.js')).setup(ctx);
10630
10635
  } catch (err) {
10631
10636
  ctx.logger.printError(err, true);
10632
10637
  process.exit(1);
@@ -10707,12 +10712,13 @@ function registerConsoleShortcuts(ctx) {
10707
10712
  await _keypressHandler(str, key);
10708
10713
  }
10709
10714
  async function inputNamePattern() {
10715
+ var _a;
10710
10716
  off();
10711
10717
  const { filter = "" } = await prompts([{
10712
10718
  name: "filter",
10713
10719
  type: "text",
10714
10720
  message: "Input test name pattern (RegExp)",
10715
- initial: String(ctx.config.testNamePattern || "")
10721
+ initial: ((_a = ctx.config.testNamePattern) == null ? void 0 : _a.source) || ""
10716
10722
  }]);
10717
10723
  await ctx.changeNamePattern(filter, void 0, "change pattern");
10718
10724
  on();
@@ -1,7 +1,7 @@
1
1
  import { pathToFileURL, fileURLToPath as fileURLToPath$1, URL as URL$1 } from 'url';
2
+ import fs, { promises, statSync, existsSync, realpathSync, Stats } from 'fs';
2
3
  import { b as resolve$1, r as relative } from './chunk-utils-env.b1281522.js';
3
4
  import { builtinModules } from 'module';
4
- import fs, { promises, statSync, existsSync, realpathSync, Stats } from 'fs';
5
5
  import path from 'path';
6
6
  import assert from 'assert';
7
7
  import { format, inspect } from 'util';
@@ -6914,7 +6914,16 @@ function pathFromRoot(root, filename) {
6914
6914
  return relativePath;
6915
6915
  }
6916
6916
  function toFilePath(id, root) {
6917
- let absolute = id.startsWith("/@fs/") ? id.slice(4) : id.startsWith(root) ? id : id.startsWith("/") ? resolve$1(root, id.slice(1)) : id;
6917
+ let absolute = (() => {
6918
+ if (id.startsWith("/@fs/"))
6919
+ return id.slice(4);
6920
+ if (!id.startsWith(root) && id.startsWith("/")) {
6921
+ const resolved = resolve$1(root, id.slice(1));
6922
+ if (existsSync(resolved.replace(/\?.*$/, "")))
6923
+ return resolved;
6924
+ }
6925
+ return id;
6926
+ })();
6918
6927
  if (absolute.startsWith("//"))
6919
6928
  absolute = absolute.slice(1);
6920
6929
  return isWindows && absolute.startsWith("/") ? slash(fileURLToPath$1(pathToFileURL(absolute.slice(1)).href)) : absolute;
@@ -56,6 +56,10 @@ async function main() {
56
56
  }
57
57
  }
58
58
  }
59
+ if (retries <= 0) {
60
+ await import('./cli.js');
61
+ return;
62
+ }
59
63
  const nodeArgs = [];
60
64
  const vitestArgs = [];
61
65
  for (let i = 0; i < args.length; i++) {
package/dist/cli.js CHANGED
@@ -1,6 +1,6 @@
1
+ import { p as picocolors, n as normalize } from './chunk-utils-env.b1281522.js';
1
2
  import { EventEmitter } from 'events';
2
- import { p as picocolors } from './chunk-utils-env.b1281522.js';
3
- import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.02d922bf.js';
3
+ import { v as version, s as startVitest, d as divider } from './chunk-vite-node-externalize.e66d46f6.js';
4
4
  import 'tty';
5
5
  import 'url';
6
6
  import 'path';
@@ -16,10 +16,10 @@ import 'os';
16
16
  import 'util';
17
17
  import 'stream';
18
18
  import './vendor-_commonjsHelpers.addc3445.js';
19
- import './chunk-vite-node-client.e22799cd.js';
19
+ import './chunk-vite-node-client.9fbd5d5b.js';
20
20
  import 'module';
21
21
  import 'vm';
22
- import './chunk-vite-node-utils.835c8b2c.js';
22
+ import './chunk-vite-node-utils.5096a80d.js';
23
23
  import 'assert';
24
24
  import 'debug';
25
25
  import 'perf_hooks';
@@ -674,9 +674,15 @@ async function benchmark(cliFilters, options) {
674
674
  console.warn(picocolors.exports.yellow("Benchmarking is an experimental feature.\nBreaking changes might not follow semver, please pin Vitest's version when using it."));
675
675
  await start("benchmark", cliFilters, options);
676
676
  }
677
+ function normalizeOptions(argv) {
678
+ argv.root = argv.root && normalize(argv.root);
679
+ argv.config = argv.config && normalize(argv.config);
680
+ argv.dir = argv.dir && normalize(argv.dir);
681
+ return argv;
682
+ }
677
683
  async function start(mode, cliFilters, options) {
678
684
  try {
679
- if (await startVitest(mode, cliFilters, options) === false)
685
+ if (await startVitest(mode, cliFilters.map(normalize), normalizeOptions(options)) === false)
680
686
  process.exit();
681
687
  } catch (e) {
682
688
  process.exitCode = 1;
package/dist/config.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  const defaultInclude = ["**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"];
6
- const defaultExclude = ["**/node_modules/**", "**/dist/**", "**/cypress/**", "**/.{idea,git,cache,output,temp}/**"];
6
+ const defaultExclude = ["**/node_modules/**", "**/dist/**", "**/cypress/**", "**/.{idea,git,cache,output,temp}/**", "**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress}.config.*"];
7
7
  const defaultCoverageExcludes = [
8
8
  "coverage/**",
9
9
  "dist/**",
@@ -15,7 +15,7 @@ const defaultCoverageExcludes = [
15
15
  "**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}",
16
16
  "**/*{.,-}spec.{js,cjs,mjs,ts,tsx,jsx}",
17
17
  "**/__tests__/**",
18
- "**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress}.config.{js,cjs,mjs,ts}",
18
+ "**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress}.config.*",
19
19
  "**/.{eslint,mocha,prettier}rc.{js,cjs,yml}"
20
20
  ];
21
21
  const coverageConfigDefaults = {
@@ -61,8 +61,7 @@ const config = {
61
61
  watchExclude: ["**/node_modules/**", "**/dist/**"],
62
62
  forceRerunTriggers: [
63
63
  "**/package.json/**",
64
- "**/vitest.config.*/**",
65
- "**/vite.config.*/**"
64
+ "**/{vitest,vite}.config.*/**"
66
65
  ],
67
66
  update: false,
68
67
  reporters: [],
package/dist/config.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { UserConfig as UserConfig$2, ConfigEnv } from 'vite';
2
2
  export { ConfigEnv } from 'vite';
3
- import { U as UserConfig$1, ad as ResolvedCoverageOptions, F as FakeTimerInstallOpts } from './global-732f9b14.js';
3
+ import { U as UserConfig$1, ad as ResolvedCoverageOptions, F as FakeTimerInstallOpts } from './global-58e8e951.js';
4
4
  import 'tinybench';
5
5
  import 'fs';
6
6
  import 'worker_threads';
package/dist/config.js CHANGED
@@ -1,5 +1,5 @@
1
1
  const defaultInclude = ["**/*.{test,spec}.{js,mjs,cjs,ts,mts,cts,jsx,tsx}"];
2
- const defaultExclude = ["**/node_modules/**", "**/dist/**", "**/cypress/**", "**/.{idea,git,cache,output,temp}/**"];
2
+ const defaultExclude = ["**/node_modules/**", "**/dist/**", "**/cypress/**", "**/.{idea,git,cache,output,temp}/**", "**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress}.config.*"];
3
3
  const defaultCoverageExcludes = [
4
4
  "coverage/**",
5
5
  "dist/**",
@@ -11,7 +11,7 @@ const defaultCoverageExcludes = [
11
11
  "**/*{.,-}test.{js,cjs,mjs,ts,tsx,jsx}",
12
12
  "**/*{.,-}spec.{js,cjs,mjs,ts,tsx,jsx}",
13
13
  "**/__tests__/**",
14
- "**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress}.config.{js,cjs,mjs,ts}",
14
+ "**/{karma,rollup,webpack,vite,vitest,jest,ava,babel,nyc,cypress}.config.*",
15
15
  "**/.{eslint,mocha,prettier}rc.{js,cjs,yml}"
16
16
  ];
17
17
  const coverageConfigDefaults = {
@@ -57,8 +57,7 @@ const config = {
57
57
  watchExclude: ["**/node_modules/**", "**/dist/**"],
58
58
  forceRerunTriggers: [
59
59
  "**/package.json/**",
60
- "**/vitest.config.*/**",
61
- "**/vite.config.*/**"
60
+ "**/{vitest,vite}.config.*/**"
62
61
  ],
63
62
  update: false,
64
63
  reporters: [],
package/dist/entry.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { promises } from 'fs';
2
2
  import { g as getWorkerState, a as resetModules } from './chunk-mock-date.9fe2b438.js';
3
3
  import { a as envs } from './chunk-env-node.700b7e95.js';
4
- import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-error.b043a88d.js';
4
+ import { a as setupGlobalEnv, s as startTests, w as withEnv } from './chunk-runtime-error.9c28c08f.js';
5
5
  import 'path';
6
6
  import './chunk-utils-env.b1281522.js';
7
7
  import 'tty';
@@ -10,8 +10,8 @@ import 'local-pkg';
10
10
  import 'console';
11
11
  import 'perf_hooks';
12
12
  import './chunk-integrations-coverage.cca09977.js';
13
- import './chunk-runtime-hooks.6963ff8f.js';
14
- import './chunk-runtime-chain.072b5677.js';
13
+ import './chunk-runtime-hooks.66004497.js';
14
+ import './chunk-runtime-chain.a5cd236b.js';
15
15
  import 'util';
16
16
  import 'chai';
17
17
  import './vendor-_commonjsHelpers.addc3445.js';
@@ -1,4 +1,4 @@
1
- import { a3 as Environment } from './global-732f9b14.js';
1
+ import { a3 as Environment } from './global-58e8e951.js';
2
2
  import 'vite';
3
3
  import 'tinybench';
4
4
  import 'fs';
@@ -205,6 +205,11 @@ interface CustomEventMap {
205
205
  'vite:beforePrune': PrunePayload
206
206
  'vite:beforeFullReload': FullReloadPayload
207
207
  'vite:error': ErrorPayload
208
+ 'vite:invalidate': InvalidatePayload
209
+ }
210
+
211
+ interface InvalidatePayload {
212
+ path: string
208
213
  }
209
214
 
210
215
  type InferCustomEventPayload<T extends string> =
@@ -1,5 +1,5 @@
1
1
  import { SpyImpl } from 'tinyspy';
2
- import { m as SuiteAPI, l as TestAPI, al as BenchmarkAPI, o as SuiteHooks, H as HookListener, s as TestContext, S as Suite, n as HookCleanupCallback, h as Test } from './global-732f9b14.js';
2
+ import { m as SuiteAPI, l as TestAPI, al as BenchmarkAPI, o as SuiteHooks, H as HookListener, s as TestContext, S as Suite, n as HookCleanupCallback, h as Test } from './global-58e8e951.js';
3
3
 
4
4
  interface MockResultReturn<T> {
5
5
  type: 'return';
package/dist/index.d.ts CHANGED
@@ -1,7 +1,7 @@
1
- import { s as spyOn, f as fn, M as MaybeMockedDeep, a as MaybeMocked, b as MaybePartiallyMocked, c as MaybePartiallyMockedDeep, E as EnhancedSpy } from './index-40e0cb97.js';
2
- export { E as EnhancedSpy, r as Mock, u as MockContext, q as MockInstance, v as Mocked, w as MockedClass, o as MockedFunction, p as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, h as beforeAll, k as beforeEach, g as bench, n as createExpect, e as describe, m as expect, i as it, d as suite, t as test } from './index-40e0cb97.js';
3
- import { D as DoneCallback, F as FakeTimerInstallOpts, a as File, T as TaskResultPack, R as ResolvedConfig, M as ModuleGraphData, b as Reporter } from './global-732f9b14.js';
4
- export { L as AfterSuiteRunMeta, A as ApiConfig, Y as ArgumentsType, X as Arrayable, P as Awaitable, ae as BaseCoverageOptions, ak as BenchFunction, ai as Benchmark, al as BenchmarkAPI, aj as BenchmarkResult, ah as BenchmarkUserOptions, B as BuiltinEnvironment, C as CSSModuleScopeStrategy, a0 as Constructable, ag as CoverageC8Options, af as CoverageIstanbulOptions, ac as CoverageOptions, a9 as CoverageProvider, aa as CoverageProviderModule, ab as CoverageReporter, _ as DeepMerge, D as DoneCallback, a3 as Environment, E as EnvironmentOptions, a2 as EnvironmentReturn, a7 as ErrorWithDiff, a as File, n as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, Z as MergeInsertions, a1 as ModuleCache, M as ModuleGraphData, $ as MutableArray, Q as Nullable, a8 as OnServerRestartHandler, a6 as ParsedStack, a5 as Position, b as Reporter, K as ResolveIdFunction, R as ResolvedConfig, ad as ResolvedCoverageOptions, d as RunMode, r as RuntimeContext, u as SnapshotData, x as SnapshotMatchOptions, y as SnapshotResult, w as SnapshotStateOptions, G as SnapshotSummary, v as SnapshotUpdateState, S as Suite, m as SuiteAPI, p as SuiteCollector, q as SuiteFactory, o as SuiteHooks, i as Task, f as TaskBase, g as TaskResult, T as TaskResultPack, e as TaskState, h as Test, l as TestAPI, s as TestContext, j as TestFunction, k as TestOptions, z as UncheckedSnapshot, U as UserConfig, a4 as UserConsoleLog, t as Vitest, V as VitestEnvironment, c as VitestRunMode, W as WorkerContext, O as WorkerGlobalState, N as WorkerRPC } from './global-732f9b14.js';
1
+ import { s as spyOn, f as fn, M as MaybeMockedDeep, a as MaybeMocked, b as MaybePartiallyMocked, c as MaybePartiallyMockedDeep, E as EnhancedSpy } from './index-220c1d70.js';
2
+ export { E as EnhancedSpy, r as Mock, u as MockContext, q as MockInstance, v as Mocked, w as MockedClass, o as MockedFunction, p as MockedObject, S as SpyInstance, j as afterAll, l as afterEach, h as beforeAll, k as beforeEach, g as bench, n as createExpect, e as describe, m as expect, i as it, d as suite, t as test } from './index-220c1d70.js';
3
+ import { D as DoneCallback, F as FakeTimerInstallOpts, a as File, T as TaskResultPack, R as ResolvedConfig, M as ModuleGraphData, b as Reporter } from './global-58e8e951.js';
4
+ export { L as AfterSuiteRunMeta, A as ApiConfig, Y as ArgumentsType, X as Arrayable, P as Awaitable, ae as BaseCoverageOptions, ak as BenchFunction, ai as Benchmark, al as BenchmarkAPI, aj as BenchmarkResult, ah as BenchmarkUserOptions, B as BuiltinEnvironment, C as CSSModuleScopeStrategy, a0 as Constructable, ag as CoverageC8Options, af as CoverageIstanbulOptions, ac as CoverageOptions, a9 as CoverageProvider, aa as CoverageProviderModule, ab as CoverageReporter, _ as DeepMerge, D as DoneCallback, a3 as Environment, E as EnvironmentOptions, a2 as EnvironmentReturn, a7 as ErrorWithDiff, a as File, n as HookCleanupCallback, H as HookListener, I as InlineConfig, J as JSDOMOptions, Z as MergeInsertions, a1 as ModuleCache, M as ModuleGraphData, $ as MutableArray, Q as Nullable, a8 as OnServerRestartHandler, a6 as ParsedStack, a5 as Position, b as Reporter, K as ResolveIdFunction, R as ResolvedConfig, ad as ResolvedCoverageOptions, d as RunMode, r as RuntimeContext, u as SnapshotData, x as SnapshotMatchOptions, y as SnapshotResult, w as SnapshotStateOptions, G as SnapshotSummary, v as SnapshotUpdateState, S as Suite, m as SuiteAPI, p as SuiteCollector, q as SuiteFactory, o as SuiteHooks, i as Task, f as TaskBase, g as TaskResult, T as TaskResultPack, e as TaskState, h as Test, l as TestAPI, s as TestContext, j as TestFunction, k as TestOptions, z as UncheckedSnapshot, U as UserConfig, a4 as UserConsoleLog, t as Vitest, V as VitestEnvironment, c as VitestRunMode, W as WorkerContext, O as WorkerGlobalState, N as WorkerRPC } from './global-58e8e951.js';
5
5
  import { TransformResult } from 'vite';
6
6
  import * as chai from 'chai';
7
7
  export { chai };
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export { b as bench, c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.072b5677.js';
2
- export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, h as getRunningMode, f as isFirstRun, j as isWatchMode, e as runOnce, v as vi, g as vitest, w as withCallback } from './chunk-runtime-hooks.6963ff8f.js';
1
+ export { b as bench, c as createExpect, d as describe, e as expect, i as it, s as suite, t as test } from './chunk-runtime-chain.a5cd236b.js';
2
+ export { a as afterAll, d as afterEach, b as beforeAll, c as beforeEach, h as getRunningMode, f as isFirstRun, j as isWatchMode, e as runOnce, v as vi, g as vitest, w as withCallback } from './chunk-runtime-hooks.66004497.js';
3
3
  import * as chai from 'chai';
4
4
  export { chai };
5
5
  export { assert, should } from 'chai';
package/dist/loader.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { pathToFileURL } from 'url';
2
2
  import { readFile } from 'fs/promises';
3
- import { i as isNodeBuiltin, d as normalizeModuleId, h as hasCJSSyntax } from './chunk-vite-node-utils.835c8b2c.js';
3
+ import { i as isNodeBuiltin, d as normalizeModuleId, h as hasCJSSyntax } from './chunk-vite-node-utils.5096a80d.js';
4
4
  import { g as getWorkerState } from './chunk-mock-date.9fe2b438.js';
5
+ import 'fs';
5
6
  import './chunk-utils-env.b1281522.js';
6
7
  import 'tty';
7
8
  import 'path';
8
9
  import 'module';
9
- import 'fs';
10
10
  import 'assert';
11
11
  import 'util';
12
12
  import 'local-pkg';
package/dist/node.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { c as VitestRunMode, U as UserConfig, t as Vitest, am as ModuleCacheMap, an as ViteNodeRunnerOptions, ao as MockMap, ap as ViteNodeRunner, aq as TestSequencer } from './global-732f9b14.js';
2
- export { aq as TestSequencer, as as TestSequencerConstructor, t as Vitest, ar as startVitest } from './global-732f9b14.js';
1
+ import { c as VitestRunMode, U as UserConfig, t as Vitest, am as ModuleCacheMap, an as ViteNodeRunnerOptions, ao as MockMap, ap as ViteNodeRunner, aq as TestSequencer } from './global-58e8e951.js';
2
+ export { aq as TestSequencer, as as TestSequencerConstructor, t as Vitest, ar as startVitest } from './global-58e8e951.js';
3
3
  import { UserConfig as UserConfig$1, Plugin } from 'vite';
4
4
  import 'tinybench';
5
5
  import 'fs';
package/dist/node.js CHANGED
@@ -1,5 +1,5 @@
1
- export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.02d922bf.js';
2
- export { V as VitestRunner } from './chunk-runtime-mocker.3eb1fcc0.js';
1
+ export { B as BaseSequencer, V as VitestPlugin, c as createVitest, s as startVitest } from './chunk-vite-node-externalize.e66d46f6.js';
2
+ export { V as VitestRunner } from './chunk-runtime-mocker.f994e23a.js';
3
3
  import './chunk-utils-env.b1281522.js';
4
4
  import 'tty';
5
5
  import 'url';
@@ -17,10 +17,10 @@ import 'util';
17
17
  import 'stream';
18
18
  import 'events';
19
19
  import './vendor-_commonjsHelpers.addc3445.js';
20
- import './chunk-vite-node-client.e22799cd.js';
20
+ import './chunk-vite-node-client.9fbd5d5b.js';
21
21
  import 'module';
22
22
  import 'vm';
23
- import './chunk-vite-node-utils.835c8b2c.js';
23
+ import './chunk-vite-node-utils.5096a80d.js';
24
24
  import 'assert';
25
25
  import 'debug';
26
26
  import 'perf_hooks';
package/dist/suite.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import 'util';
2
2
  import './chunk-mock-date.9fe2b438.js';
3
- export { b as bench, f as clearCollectorContext, p as createSuiteHooks, h as defaultSuite, d as describe, g as getCurrentSuite, i as it, s as suite, t as test } from './chunk-runtime-chain.072b5677.js';
3
+ export { b as bench, f as clearCollectorContext, p as createSuiteHooks, h as defaultSuite, d as describe, g as getCurrentSuite, i as it, s as suite, t as test } from './chunk-runtime-chain.a5cd236b.js';
4
4
  import 'path';
5
5
  import './chunk-utils-env.b1281522.js';
6
6
  import 'tty';
package/dist/worker.js CHANGED
@@ -1,15 +1,15 @@
1
1
  import { b as resolve, e as distDir } from './chunk-utils-env.b1281522.js';
2
- import { c as createBirpc, M as ModuleCacheMap } from './chunk-vite-node-client.e22799cd.js';
2
+ import { c as createBirpc, M as ModuleCacheMap } from './chunk-vite-node-client.9fbd5d5b.js';
3
3
  import { workerId } from 'tinypool';
4
4
  import { g as getWorkerState } from './chunk-mock-date.9fe2b438.js';
5
- import { e as executeInViteNode } from './chunk-runtime-mocker.3eb1fcc0.js';
5
+ import { e as executeInViteNode } from './chunk-runtime-mocker.f994e23a.js';
6
6
  import { r as rpc } from './chunk-runtime-rpc.e583f5e7.js';
7
7
  import 'tty';
8
8
  import 'url';
9
9
  import 'path';
10
10
  import 'module';
11
11
  import 'vm';
12
- import './chunk-vite-node-utils.835c8b2c.js';
12
+ import './chunk-vite-node-utils.5096a80d.js';
13
13
  import 'fs';
14
14
  import 'assert';
15
15
  import 'util';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vitest",
3
3
  "type": "module",
4
- "version": "0.24.2",
4
+ "version": "0.24.4",
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.2",
125
+ "@vitest/ui": "0.24.4",
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.2",
153
- "ws": "^8.9.0"
153
+ "vite-node": "0.24.4",
154
+ "ws": "^8.10.0"
154
155
  },
155
156
  "scripts": {
156
157
  "build": "rimraf dist && rollup -c",