vitest 0.26.0 → 0.26.2

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 (41) hide show
  1. package/browser.d.ts +1 -0
  2. package/dist/browser.d.ts +5 -5
  3. package/dist/browser.js +16 -14
  4. package/dist/{chunk-api-setup.08f3b356.js → chunk-api-setup.46ee0021.js} +7 -5
  5. package/dist/{chunk-env-node.67948209.js → chunk-env-node.b3664da2.js} +1 -1
  6. package/dist/{chunk-install-pkg.579a5a27.js → chunk-install-pkg.31846bc1.js} +20 -20
  7. package/dist/chunk-integrations-globals.5af12e76.js +27 -0
  8. package/dist/{chunk-node-git.5a1b1656.js → chunk-node-git.43b341db.js} +10 -6
  9. package/dist/{chunk-runtime-chain.e655f6cc.js → chunk-runtime-chain.198631fd.js} +8 -7
  10. package/dist/{chunk-runtime-error.dfbbf9be.js → chunk-runtime-error.12631a44.js} +6 -4
  11. package/dist/{chunk-runtime-mocker.35fabb8b.js → chunk-runtime-mocker.03096876.js} +11 -4
  12. package/dist/{chunk-runtime-rpc.7959fc79.js → chunk-runtime-rpc.503623e9.js} +2 -2
  13. package/dist/{chunk-runtime-setup.4c1b529e.js → chunk-runtime-setup.f79addc3.js} +17 -16
  14. package/dist/{chunk-snapshot-manager.7d978f79.js → chunk-snapshot-manager.8c94a052.js} +74 -47
  15. package/dist/{chunk-typecheck-constants.3f865d14.js → chunk-typecheck-constants.e478eb98.js} +3 -3
  16. package/dist/{chunk-utils-env.03f840f2.js → chunk-utils-env.4afc6329.js} +8 -8
  17. package/dist/{chunk-utils-import.ca62c9d7.js → chunk-utils-import.dc87c88c.js} +41 -40
  18. package/dist/{chunk-utils-source-map.5bbb50cd.js → chunk-utils-source-map.95b8b3f0.js} +2 -2
  19. package/dist/{chunk-utils-timers.793fd179.js → chunk-utils-timers.54caa12a.js} +31 -15
  20. package/dist/cli-wrapper.js +10 -5
  21. package/dist/cli.js +31 -19
  22. package/dist/config.d.ts +3 -3
  23. package/dist/entry.js +16 -14
  24. package/dist/environments.d.ts +3 -3
  25. package/dist/environments.js +2 -2
  26. package/dist/{index-c3f83a58.d.ts → index-40ebba2b.d.ts} +1 -1
  27. package/dist/index.d.ts +6 -6
  28. package/dist/index.js +12 -10
  29. package/dist/loader.js +10 -6
  30. package/dist/node.d.ts +5 -4
  31. package/dist/node.js +26 -18
  32. package/dist/suite.js +10 -8
  33. package/dist/{types-56bcd6c3.d.ts → types-2a26f28c.d.ts} +28 -6
  34. package/dist/{vendor-index.96e022fd.js → vendor-index.2e96c50b.js} +6 -2
  35. package/dist/{vendor-index.e1d4cf84.js → vendor-index.62932580.js} +16 -16
  36. package/dist/{vendor-index.9c919048.js → vendor-index.808a85a6.js} +0 -0
  37. package/dist/{vendor-index.737c3cff.js → vendor-index.a323f2d0.js} +9 -8
  38. package/dist/worker.js +14 -9
  39. package/environments.d.ts +1 -0
  40. package/package.json +4 -4
  41. package/dist/chunk-integrations-globals.cab94a09.js +0 -25
@@ -1,42 +1,46 @@
1
- import { j as join, c as basename, d as dirname, r as relative, b as resolve, e as distDir, f as rootDir, p as picocolors, g as isAbsolute, i as isNode, h as configFiles, k as defaultPort, n as normalize, t as toNamespacedPath, E as EXIT_CODE_RESTART } from './chunk-utils-env.03f840f2.js';
1
+ import { j as join, c as basename, d as dirname, r as relative, b as resolve, e as distDir, f as rootDir, p as picocolors, g as isAbsolute, i as isNode, h as configFiles, k as defaultPort, n as normalize, t as toNamespacedPath, E as EXIT_CODE_RESTART } from './chunk-utils-env.4afc6329.js';
2
2
  import { p as pLimit, s as someTasksAreOnly, i as interpretTaskModes, g as getCoverageProvider, C as CoverageProviderMap } from './chunk-integrations-coverage.befed097.js';
3
- import { g as getEnvPackageName } from './chunk-env-node.67948209.js';
4
- import { T as TYPECHECK_SUITE, z as ensurePackageInstalled, A as AggregateErrorPonyfill, s as slash$1, l as relativePath, B as getTests, f as getFullName, v as hasFailed, C as hasFailedSnapshot, D as getTypecheckTests, E as getSuites, F as isTypecheckTest, k as notNullish, q as shuffle, t as toArray, n as noop$1, G as deepMerge, b as getCallLastIndex, H as removeUndefinedValues, I as isWindows, J as stdout } from './chunk-typecheck-constants.3f865d14.js';
3
+ import { g as getEnvPackageName } from './chunk-env-node.b3664da2.js';
4
+ import { T as TYPECHECK_SUITE, z as ensurePackageInstalled, A as AggregateErrorPonyfill, s as slash$1, l as relativePath, B as getTests, f as getFullName, v as hasFailed, C as hasFailedSnapshot, D as getTypecheckTests, E as getSuites, F as isTypecheckTest, k as notNullish, q as shuffle, t as toArray, n as noop$1, G as deepMerge, b as getCallLastIndex, H as removeUndefinedValues, I as isWindows, J as stdout } from './chunk-typecheck-constants.e478eb98.js';
5
5
  import { loadConfigFromFile, normalizePath, createServer, mergeConfig } from 'vite';
6
- import path$a from 'path';
7
- import url, { fileURLToPath } from 'url';
8
- import process$1 from 'process';
9
- import fs$8, { promises, existsSync, readFileSync } from 'fs';
10
- import require$$0, { cpus, hostname } from 'os';
6
+ import path$a from 'node:path';
7
+ import url, { fileURLToPath } from 'node:url';
8
+ import process$1 from 'node:process';
9
+ import fs$8, { promises, existsSync } from 'node:fs';
10
+ import g from 'path';
11
+ import require$$0 from 'os';
11
12
  import util$2 from 'util';
12
13
  import require$$0$1 from 'stream';
13
14
  import require$$2 from 'events';
15
+ import require$$0$2, { existsSync as existsSync$1, readFileSync } from 'fs';
14
16
  import { c as commonjsGlobal } from './vendor-_commonjsHelpers.addc3445.js';
15
17
  import { ViteNodeRunner } from 'vite-node/client';
16
18
  import { ViteNodeServer } from 'vite-node/server';
17
- import { writeFile, rm } from 'fs/promises';
18
- import { e as execa } from './vendor-index.737c3cff.js';
19
+ import { writeFile, rm } from 'node:fs/promises';
20
+ import { e as execa } from './vendor-index.a323f2d0.js';
19
21
  import { SourceMapConsumer } from 'source-map';
20
22
  import H from 'module';
21
23
  import { parse as parse$4 } from 'acorn';
22
24
  import { ancestor } from 'acorn-walk';
23
- import { MessageChannel } from 'worker_threads';
25
+ import { MessageChannel } from 'node:worker_threads';
26
+ import { cpus, hostname } from 'node:os';
24
27
  import { Tinypool } from 'tinypool';
25
28
  import { c as createBirpc } from './vendor-index.783e7f3e.js';
26
29
  import { performance } from 'perf_hooks';
27
- import { c as stripAnsi, d as safeSetInterval, e as safeClearInterval, g as cliTruncate, s as safeSetTimeout, h as stringWidth, i as ansiStyles, j as sliceAnsi, a as stringify$5, u as unifiedDiff, b as safeClearTimeout } from './chunk-utils-timers.793fd179.js';
28
- import { p as parseStacktrace, a as posToNumber, l as lineSplitRE } from './chunk-utils-source-map.5bbb50cd.js';
30
+ import { c as stripAnsi, d as safeSetInterval, e as safeClearInterval, g as cliTruncate, s as safeSetTimeout, h as stringWidth, i as ansiStyles, j as sliceAnsi, a as stringify$5, u as unifiedDiff, b as safeClearTimeout } from './chunk-utils-timers.54caa12a.js';
31
+ import { p as parseStacktrace, a as posToNumber, l as lineSplitRE } from './chunk-utils-source-map.95b8b3f0.js';
29
32
  import { resolveModule } from 'local-pkg';
30
33
  import { createHash } from 'crypto';
31
34
  import { slash as slash$2 } from 'vite-node/utils';
32
- import { o as onetime } from './vendor-index.9c919048.js';
33
- import { s as signalExit } from './vendor-index.e1d4cf84.js';
35
+ import { o as onetime } from './vendor-index.808a85a6.js';
36
+ import { s as signalExit } from './vendor-index.62932580.js';
37
+ import { createHash as createHash$1 } from 'node:crypto';
34
38
  import MagicString from './chunk-magic-string.3a794426.js';
35
39
  import { stripLiteral } from 'strip-literal';
36
- import require$$0$2 from 'readline';
40
+ import require$$0$3 from 'readline';
37
41
  import { p as prompts } from './vendor-index.9f20a9be.js';
38
42
 
39
- var version$1 = "0.26.0";
43
+ var version$1 = "0.26.2";
40
44
 
41
45
  class EndError extends Error {
42
46
  constructor(value) {
@@ -242,7 +246,7 @@ var path$9 = {};
242
246
 
243
247
  Object.defineProperty(path$9, "__esModule", { value: true });
244
248
  path$9.removeLeadingDotSegment = path$9.escape = path$9.makeAbsolute = path$9.unixify = void 0;
245
- const path$8 = path$a;
249
+ const path$8 = g;
246
250
  const LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2; // ./ or .\\
247
251
  const UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\())/g;
248
252
  /**
@@ -448,7 +452,7 @@ var isGlob$1 = function isGlob(str, options) {
448
452
  };
449
453
 
450
454
  var isGlob = isGlob$1;
451
- var pathPosixDirname = path$a.posix.dirname;
455
+ var pathPosixDirname = g.posix.dirname;
452
456
  var isWin32 = require$$0.platform() === 'win32';
453
457
 
454
458
  var slash = '/';
@@ -1912,7 +1916,7 @@ var picomatch$2 = {exports: {}};
1912
1916
 
1913
1917
  var utils$f = {};
1914
1918
 
1915
- const path$7 = path$a;
1919
+ const path$7 = g;
1916
1920
  const WIN_SLASH = '\\\\/';
1917
1921
  const WIN_NO_SLASH = `[^${WIN_SLASH}]`;
1918
1922
 
@@ -2092,7 +2096,7 @@ var constants$3 = {
2092
2096
 
2093
2097
  (function (exports) {
2094
2098
 
2095
- const path = path$a;
2099
+ const path = g;
2096
2100
  const win32 = process.platform === 'win32';
2097
2101
  const {
2098
2102
  REGEX_BACKSLASH,
@@ -3636,7 +3640,7 @@ parse$1.fastpaths = (input, options) => {
3636
3640
 
3637
3641
  var parse_1 = parse$1;
3638
3642
 
3639
- const path$6 = path$a;
3643
+ const path$6 = g;
3640
3644
  const scan = scan_1;
3641
3645
  const parse = parse_1;
3642
3646
  const utils$c = utils$f;
@@ -4450,7 +4454,7 @@ var micromatch_1 = micromatch$1;
4450
4454
 
4451
4455
  Object.defineProperty(pattern$1, "__esModule", { value: true });
4452
4456
  pattern$1.matchAny = pattern$1.convertPatternsToRe = pattern$1.makeRe = pattern$1.getPatternParts = pattern$1.expandBraceExpansion = pattern$1.expandPatternsWithBraceExpansion = pattern$1.isAffectDepthOfReadingPattern = pattern$1.endsWithSlashGlobStar = pattern$1.hasGlobStar = pattern$1.getBaseDirectory = pattern$1.isPatternRelatedToParentDirectory = pattern$1.getPatternsOutsideCurrentDirectory = pattern$1.getPatternsInsideCurrentDirectory = pattern$1.getPositivePatterns = pattern$1.getNegativePatterns = pattern$1.isPositivePattern = pattern$1.isNegativePattern = pattern$1.convertToNegativePattern = pattern$1.convertToPositivePattern = pattern$1.isDynamicPattern = pattern$1.isStaticPattern = void 0;
4453
- const path$5 = path$a;
4457
+ const path$5 = g;
4454
4458
  const globParent = globParent$1;
4455
4459
  const micromatch = micromatch_1;
4456
4460
  const GLOBSTAR = '**';
@@ -4999,7 +5003,7 @@ var fs$5 = {};
4999
5003
  (function (exports) {
5000
5004
  Object.defineProperty(exports, "__esModule", { value: true });
5001
5005
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
5002
- const fs = fs$8;
5006
+ const fs = require$$0$2;
5003
5007
  exports.FILE_SYSTEM_ADAPTER = {
5004
5008
  lstat: fs.lstat,
5005
5009
  stat: fs.stat,
@@ -5350,7 +5354,7 @@ var fs$1 = {};
5350
5354
  (function (exports) {
5351
5355
  Object.defineProperty(exports, "__esModule", { value: true });
5352
5356
  exports.createFileSystemAdapter = exports.FILE_SYSTEM_ADAPTER = void 0;
5353
- const fs = fs$8;
5357
+ const fs = require$$0$2;
5354
5358
  exports.FILE_SYSTEM_ADAPTER = {
5355
5359
  lstat: fs.lstat,
5356
5360
  stat: fs.stat,
@@ -5369,7 +5373,7 @@ var fs$1 = {};
5369
5373
  } (fs$1));
5370
5374
 
5371
5375
  Object.defineProperty(settings$2, "__esModule", { value: true });
5372
- const path$3 = path$a;
5376
+ const path$3 = g;
5373
5377
  const fsStat$3 = out$1;
5374
5378
  const fs = fs$1;
5375
5379
  class Settings$1 {
@@ -6023,7 +6027,7 @@ sync$3.default = SyncProvider;
6023
6027
  var settings$1 = {};
6024
6028
 
6025
6029
  Object.defineProperty(settings$1, "__esModule", { value: true });
6026
- const path$2 = path$a;
6030
+ const path$2 = g;
6027
6031
  const fsScandir = out$2;
6028
6032
  class Settings {
6029
6033
  constructor(_options = {}) {
@@ -6085,7 +6089,7 @@ function getSettings(settingsOrOptions = {}) {
6085
6089
  var reader = {};
6086
6090
 
6087
6091
  Object.defineProperty(reader, "__esModule", { value: true });
6088
- const path$1 = path$a;
6092
+ const path$1 = g;
6089
6093
  const fsStat$2 = out$1;
6090
6094
  const utils$6 = utils$k;
6091
6095
  class Reader {
@@ -6479,7 +6483,7 @@ class EntryTransformer {
6479
6483
  entry.default = EntryTransformer;
6480
6484
 
6481
6485
  Object.defineProperty(provider, "__esModule", { value: true });
6482
- const path = path$a;
6486
+ const path = g;
6483
6487
  const deep_1 = deep;
6484
6488
  const entry_1 = entry$1;
6485
6489
  const error_1 = error;
@@ -6657,7 +6661,7 @@ var settings = {};
6657
6661
  (function (exports) {
6658
6662
  Object.defineProperty(exports, "__esModule", { value: true });
6659
6663
  exports.DEFAULT_FILE_SYSTEM_ADAPTER = void 0;
6660
- const fs = fs$8;
6664
+ const fs = require$$0$2;
6661
6665
  const os = require$$0;
6662
6666
  /**
6663
6667
  * The `os.cpus` method can return zero. We expect the number of cores to be greater than zero.
@@ -6849,9 +6853,9 @@ function addSnapshotResult(summary, result) {
6849
6853
  summary.total += result.added + result.matched + result.unmatched + result.updated;
6850
6854
  }
6851
6855
 
6852
- function T(r){const t=/^\\\\\?\\/.test(r),n=/[^\u0000-\u0080]+/.test(r);return t||n?r:r.replace(/\\/g,"/")}function B(r,t){for(;;){const n=path$a.join(r,t);if(fs$8.existsSync(n))return T(n);const e=path$a.dirname(r);if(e===r)return;r=e;}}function G(r,t){t===void 0&&(t=!1);var n=r.length,e=0,i="",a=0,o=16,u=0,f=0,d=0,C=0,c=0;function y(s,m){for(var v=0,b=0;v<s||!m;){var h=r.charCodeAt(e);if(h>=48&&h<=57)b=b*16+h-48;else if(h>=65&&h<=70)b=b*16+h-65+10;else if(h>=97&&h<=102)b=b*16+h-97+10;else break;e++,v++;}return v<s&&(b=-1),b}function V(s){e=s,i="",a=0,o=16,c=0;}function $(){var s=e;if(r.charCodeAt(e)===48)e++;else for(e++;e<r.length&&j(r.charCodeAt(e));)e++;if(e<r.length&&r.charCodeAt(e)===46)if(e++,e<r.length&&j(r.charCodeAt(e)))for(e++;e<r.length&&j(r.charCodeAt(e));)e++;else return c=3,r.substring(s,e);var m=e;if(e<r.length&&(r.charCodeAt(e)===69||r.charCodeAt(e)===101))if(e++,(e<r.length&&r.charCodeAt(e)===43||r.charCodeAt(e)===45)&&e++,e<r.length&&j(r.charCodeAt(e))){for(e++;e<r.length&&j(r.charCodeAt(e));)e++;m=e;}else c=3;return r.substring(s,m)}function _(){for(var s="",m=e;;){if(e>=n){s+=r.substring(m,e),c=2;break}var v=r.charCodeAt(e);if(v===34){s+=r.substring(m,e),e++;break}if(v===92){if(s+=r.substring(m,e),e++,e>=n){c=2;break}var b=r.charCodeAt(e++);switch(b){case 34:s+='"';break;case 92:s+="\\";break;case 47:s+="/";break;case 98:s+="\b";break;case 102:s+="\f";break;case 110:s+=`
6856
+ function T(r){const t=/^\\\\\?\\/.test(r),n=/[^\u0000-\u0080]+/.test(r);return t||n?r:r.replace(/\\/g,"/")}function B(r,t){for(;;){const n=g.join(r,t);if(require$$0$2.existsSync(n))return T(n);const e=g.dirname(r);if(e===r)return;r=e;}}function G(r,t){t===void 0&&(t=!1);var n=r.length,e=0,i="",a=0,o=16,u=0,f=0,d=0,C=0,c=0;function y(s,m){for(var v=0,b=0;v<s||!m;){var h=r.charCodeAt(e);if(h>=48&&h<=57)b=b*16+h-48;else if(h>=65&&h<=70)b=b*16+h-65+10;else if(h>=97&&h<=102)b=b*16+h-97+10;else break;e++,v++;}return v<s&&(b=-1),b}function V(s){e=s,i="",a=0,o=16,c=0;}function $(){var s=e;if(r.charCodeAt(e)===48)e++;else for(e++;e<r.length&&j(r.charCodeAt(e));)e++;if(e<r.length&&r.charCodeAt(e)===46)if(e++,e<r.length&&j(r.charCodeAt(e)))for(e++;e<r.length&&j(r.charCodeAt(e));)e++;else return c=3,r.substring(s,e);var m=e;if(e<r.length&&(r.charCodeAt(e)===69||r.charCodeAt(e)===101))if(e++,(e<r.length&&r.charCodeAt(e)===43||r.charCodeAt(e)===45)&&e++,e<r.length&&j(r.charCodeAt(e))){for(e++;e<r.length&&j(r.charCodeAt(e));)e++;m=e;}else c=3;return r.substring(s,m)}function _(){for(var s="",m=e;;){if(e>=n){s+=r.substring(m,e),c=2;break}var v=r.charCodeAt(e);if(v===34){s+=r.substring(m,e),e++;break}if(v===92){if(s+=r.substring(m,e),e++,e>=n){c=2;break}var b=r.charCodeAt(e++);switch(b){case 34:s+='"';break;case 92:s+="\\";break;case 47:s+="/";break;case 98:s+="\b";break;case 102:s+="\f";break;case 110:s+=`
6853
6857
  `;break;case 114:s+="\r";break;case 116:s+=" ";break;case 117:var h=y(4,!0);h>=0?s+=String.fromCharCode(h):c=4;break;default:c=5;}m=e;continue}if(v>=0&&v<=31)if(P(v)){s+=r.substring(m,e),c=2;break}else c=6;e++;}return s}function S(){if(i="",c=0,a=e,f=u,C=d,e>=n)return a=n,o=17;var s=r.charCodeAt(e);if(U(s)){do e++,i+=String.fromCharCode(s),s=r.charCodeAt(e);while(U(s));return o=15}if(P(s))return e++,i+=String.fromCharCode(s),s===13&&r.charCodeAt(e)===10&&(e++,i+=`
6854
- `),u++,d=e,o=14;switch(s){case 123:return e++,o=1;case 125:return e++,o=2;case 91:return e++,o=3;case 93:return e++,o=4;case 58:return e++,o=6;case 44:return e++,o=5;case 34:return e++,i=_(),o=10;case 47:var m=e-1;if(r.charCodeAt(e+1)===47){for(e+=2;e<n&&!P(r.charCodeAt(e));)e++;return i=r.substring(m,e),o=12}if(r.charCodeAt(e+1)===42){e+=2;for(var v=n-1,b=!1;e<v;){var h=r.charCodeAt(e);if(h===42&&r.charCodeAt(e+1)===47){e+=2,b=!0;break}e++,P(h)&&(h===13&&r.charCodeAt(e)===10&&e++,u++,d=e);}return b||(e++,c=1),i=r.substring(m,e),o=13}return i+=String.fromCharCode(s),e++,o=16;case 45:if(i+=String.fromCharCode(s),e++,e===n||!j(r.charCodeAt(e)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=$(),o=11;default:for(;e<n&&k(s);)e++,s=r.charCodeAt(e);if(a!==e){switch(i=r.substring(a,e),i){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return i+=String.fromCharCode(s),e++,o=16}}function k(s){if(U(s)||P(s))return !1;switch(s){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return !1}return !0}function l(){var s;do s=S();while(s>=12&&s<=15);return s}return {setPosition:V,getPosition:function(){return e},scan:t?l:S,getToken:function(){return o},getTokenValue:function(){return i},getTokenOffset:function(){return a},getTokenLength:function(){return e-a},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return a-C},getTokenError:function(){return c}}}function U(r){return r===32||r===9||r===11||r===12||r===160||r===5760||r>=8192&&r<=8203||r===8239||r===8287||r===12288||r===65279}function P(r){return r===10||r===13||r===8232||r===8233}function j(r){return r>=48&&r<=57}var N;(function(r){r.DEFAULT={allowTrailingComma:!1};})(N||(N={}));function K(r,t,n){t===void 0&&(t=[]),n===void 0&&(n=N.DEFAULT);var e=null,i=[],a=[];function o(f){Array.isArray(i)?i.push(f):e!==null&&(i[e]=f);}var u={onObjectBegin:function(){var f={};o(f),a.push(i),i=f,e=null;},onObjectProperty:function(f){e=f;},onObjectEnd:function(){i=a.pop();},onArrayBegin:function(){var f=[];o(f),a.push(i),i=f,e=null;},onArrayEnd:function(){i=a.pop();},onLiteralValue:o,onError:function(f,d,C){t.push({error:f,offset:d,length:C});}};return Q(r,u,n),i[0]}function Q(r,t,n){n===void 0&&(n=N.DEFAULT);var e=G(r,!1);function i(p){return p?function(){return p(e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter())}:function(){return !0}}function a(p){return p?function(w){return p(w,e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter())}:function(){return !0}}var o=i(t.onObjectBegin),u=a(t.onObjectProperty),f=i(t.onObjectEnd),d=i(t.onArrayBegin),C=i(t.onArrayEnd),c=a(t.onLiteralValue),y=a(t.onSeparator),V=i(t.onComment),$=a(t.onError),_=n&&n.disallowComments,S=n&&n.allowTrailingComma;function k(){for(;;){var p=e.scan();switch(e.getTokenError()){case 4:l(14);break;case 5:l(15);break;case 3:l(13);break;case 1:_||l(11);break;case 2:l(12);break;case 6:l(16);break}switch(p){case 12:case 13:_?l(10):V();break;case 16:l(1);break;case 15:case 14:break;default:return p}}}function l(p,w,L){if(w===void 0&&(w=[]),L===void 0&&(L=[]),$(p),w.length+L.length>0)for(var D=e.getToken();D!==17;){if(w.indexOf(D)!==-1){k();break}else if(L.indexOf(D)!==-1)break;D=k();}}function s(p){var w=e.getTokenValue();return p?c(w):u(w),k(),!0}function m(){switch(e.getToken()){case 11:var p=e.getTokenValue(),w=Number(p);isNaN(w)&&(l(2),w=0),c(w);break;case 7:c(null);break;case 8:c(!0);break;case 9:c(!1);break;default:return !1}return k(),!0}function v(){return e.getToken()!==10?(l(3,[],[2,5]),!1):(s(!1),e.getToken()===6?(y(":"),k(),F()||l(4,[],[2,5])):l(5,[],[2,5]),!0)}function b(){o(),k();for(var p=!1;e.getToken()!==2&&e.getToken()!==17;){if(e.getToken()===5){if(p||l(4,[],[]),y(","),k(),e.getToken()===2&&S)break}else p&&l(6,[],[]);v()||l(4,[],[2,5]),p=!0;}return f(),e.getToken()!==2?l(7,[2],[]):k(),!0}function h(){d(),k();for(var p=!1;e.getToken()!==4&&e.getToken()!==17;){if(e.getToken()===5){if(p||l(4,[],[]),y(","),k(),e.getToken()===4&&S)break}else p&&l(6,[],[]);F()||l(4,[],[4,5]),p=!0;}return C(),e.getToken()!==4?l(8,[4],[]):k(),!0}function F(){switch(e.getToken()){case 3:return h();case 1:return b();case 10:return s(!0);default:return m()}}return k(),e.getToken()===17?n.allowEmptyContent?!0:(l(4,[],[]),!1):F()?(e.getToken()!==17&&l(9,[],[]),!0):(l(4,[],[]),!1)}var X=K;const W=/^\.{1,2}(\/.*)?$/,J=r=>T(W.test(r)?r:`./${r}`),{existsSync:E}=fs$8,Y=r=>{try{return JSON.parse(r)}catch{}},Z=()=>{const{findPnpApi:r}=H;return r&&r(process.cwd())};function I(r){const t=Y(fs$8.readFileSync(r,"utf8"));return path$a.join(r,"..",t&&"tsconfig"in t?t.tsconfig:"tsconfig.json")}function x(r,t){let n=r;if(n===".."&&(n+="/tsconfig.json"),n.startsWith(".")){let a=path$a.resolve(t,n);if(E(a)&&fs$8.statSync(a).isFile()||!a.endsWith(".json")&&(a+=".json",E(a)))return a;throw new Error(`File '${r}' not found.`)}const e=Z();if(e){const{resolveRequest:a}=e,[o,u]=r.split("/"),f=o.startsWith("@")?`${o}/${u}`:o;try{if(f===r){const d=a(path$a.join(f,"package.json"),t);if(d){const C=I(d);if(E(C))return C}}else try{return a(r,t,{extensions:[".json"]})}catch{return a(path$a.join(r,"tsconfig.json"),t)}}catch{}}let i=B(t,path$a.join("node_modules",n));if(i){if(fs$8.statSync(i).isDirectory()){const a=path$a.join(i,"package.json");if(E(a)?i=I(a):i=path$a.join(i,"tsconfig.json"),E(i))return i}else if(i.endsWith(".json"))return i}if(!n.endsWith(".json")&&(n+=".json",i=B(t,path$a.join("node_modules",n)),i))return i;throw new Error(`File '${r}' not found.`)}var ee=Object.defineProperty,re=Object.defineProperties,ne=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,q=(r,t,n)=>t in r?ee(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,A=(r,t)=>{for(var n in t||(t={}))te.call(t,n)&&q(r,n,t[n]);if(R)for(var n of R(t))ae.call(t,n)&&q(r,n,t[n]);return r},oe=(r,t)=>re(r,ne(t));function M(r){var t;let n;try{n=fs$8.realpathSync(r);}catch{throw new Error(`Cannot resolve tsconfig at path: ${r}`)}const e=path$a.dirname(n),i=fs$8.readFileSync(n,"utf8").trim();let a={};if(i&&(a=X(i),!a||typeof a!="object"))throw new SyntaxError(`Failed to parse tsconfig at: ${r}`);if(a.extends){const o=x(a.extends,e),u=M(o);if(delete u.references,(t=u.compilerOptions)!=null&&t.baseUrl){const{compilerOptions:d}=u;d.baseUrl=path$a.relative(e,path$a.join(path$a.dirname(o),d.baseUrl))||"./";}u.files&&(u.files=u.files.map(d=>path$a.relative(e,path$a.join(path$a.dirname(o),d)))),u.include&&(u.include=u.include.map(d=>path$a.relative(e,path$a.join(path$a.dirname(o),d)))),delete a.extends;const f=oe(A(A({},u),a),{compilerOptions:A(A({},u.compilerOptions),a.compilerOptions)});u.watchOptions&&(f.watchOptions=A(A({},u.watchOptions),a.watchOptions)),a=f;}if(a.compilerOptions){const{compilerOptions:o}=a;o.baseUrl&&(o.baseUrl=J(o.baseUrl)),o.outDir&&(Array.isArray(a.exclude)||(a.exclude=[]),a.exclude.push(o.outDir),o.outDir=J(o.outDir));}if(a.files&&(a.files=a.files.map(J)),a.include&&(a.include=a.include.map(T)),a.watchOptions){const{watchOptions:o}=a;o.excludeDirectories&&(o.excludeDirectories=o.excludeDirectories.map(u=>T(path$a.resolve(e,u))));}return a}function ie(r=process.cwd(),t="tsconfig.json"){const n=B(r,t);if(!n)return null;const e=M(n);return {path:n,config:e}}
6858
+ `),u++,d=e,o=14;switch(s){case 123:return e++,o=1;case 125:return e++,o=2;case 91:return e++,o=3;case 93:return e++,o=4;case 58:return e++,o=6;case 44:return e++,o=5;case 34:return e++,i=_(),o=10;case 47:var m=e-1;if(r.charCodeAt(e+1)===47){for(e+=2;e<n&&!P(r.charCodeAt(e));)e++;return i=r.substring(m,e),o=12}if(r.charCodeAt(e+1)===42){e+=2;for(var v=n-1,b=!1;e<v;){var h=r.charCodeAt(e);if(h===42&&r.charCodeAt(e+1)===47){e+=2,b=!0;break}e++,P(h)&&(h===13&&r.charCodeAt(e)===10&&e++,u++,d=e);}return b||(e++,c=1),i=r.substring(m,e),o=13}return i+=String.fromCharCode(s),e++,o=16;case 45:if(i+=String.fromCharCode(s),e++,e===n||!j(r.charCodeAt(e)))return o=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return i+=$(),o=11;default:for(;e<n&&k(s);)e++,s=r.charCodeAt(e);if(a!==e){switch(i=r.substring(a,e),i){case"true":return o=8;case"false":return o=9;case"null":return o=7}return o=16}return i+=String.fromCharCode(s),e++,o=16}}function k(s){if(U(s)||P(s))return !1;switch(s){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return !1}return !0}function l(){var s;do s=S();while(s>=12&&s<=15);return s}return {setPosition:V,getPosition:function(){return e},scan:t?l:S,getToken:function(){return o},getTokenValue:function(){return i},getTokenOffset:function(){return a},getTokenLength:function(){return e-a},getTokenStartLine:function(){return f},getTokenStartCharacter:function(){return a-C},getTokenError:function(){return c}}}function U(r){return r===32||r===9||r===11||r===12||r===160||r===5760||r>=8192&&r<=8203||r===8239||r===8287||r===12288||r===65279}function P(r){return r===10||r===13||r===8232||r===8233}function j(r){return r>=48&&r<=57}var N;(function(r){r.DEFAULT={allowTrailingComma:!1};})(N||(N={}));function K(r,t,n){t===void 0&&(t=[]),n===void 0&&(n=N.DEFAULT);var e=null,i=[],a=[];function o(f){Array.isArray(i)?i.push(f):e!==null&&(i[e]=f);}var u={onObjectBegin:function(){var f={};o(f),a.push(i),i=f,e=null;},onObjectProperty:function(f){e=f;},onObjectEnd:function(){i=a.pop();},onArrayBegin:function(){var f=[];o(f),a.push(i),i=f,e=null;},onArrayEnd:function(){i=a.pop();},onLiteralValue:o,onError:function(f,d,C){t.push({error:f,offset:d,length:C});}};return Q(r,u,n),i[0]}function Q(r,t,n){n===void 0&&(n=N.DEFAULT);var e=G(r,!1);function i(p){return p?function(){return p(e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter())}:function(){return !0}}function a(p){return p?function(w){return p(w,e.getTokenOffset(),e.getTokenLength(),e.getTokenStartLine(),e.getTokenStartCharacter())}:function(){return !0}}var o=i(t.onObjectBegin),u=a(t.onObjectProperty),f=i(t.onObjectEnd),d=i(t.onArrayBegin),C=i(t.onArrayEnd),c=a(t.onLiteralValue),y=a(t.onSeparator),V=i(t.onComment),$=a(t.onError),_=n&&n.disallowComments,S=n&&n.allowTrailingComma;function k(){for(;;){var p=e.scan();switch(e.getTokenError()){case 4:l(14);break;case 5:l(15);break;case 3:l(13);break;case 1:_||l(11);break;case 2:l(12);break;case 6:l(16);break}switch(p){case 12:case 13:_?l(10):V();break;case 16:l(1);break;case 15:case 14:break;default:return p}}}function l(p,w,L){if(w===void 0&&(w=[]),L===void 0&&(L=[]),$(p),w.length+L.length>0)for(var D=e.getToken();D!==17;){if(w.indexOf(D)!==-1){k();break}else if(L.indexOf(D)!==-1)break;D=k();}}function s(p){var w=e.getTokenValue();return p?c(w):u(w),k(),!0}function m(){switch(e.getToken()){case 11:var p=e.getTokenValue(),w=Number(p);isNaN(w)&&(l(2),w=0),c(w);break;case 7:c(null);break;case 8:c(!0);break;case 9:c(!1);break;default:return !1}return k(),!0}function v(){return e.getToken()!==10?(l(3,[],[2,5]),!1):(s(!1),e.getToken()===6?(y(":"),k(),F()||l(4,[],[2,5])):l(5,[],[2,5]),!0)}function b(){o(),k();for(var p=!1;e.getToken()!==2&&e.getToken()!==17;){if(e.getToken()===5){if(p||l(4,[],[]),y(","),k(),e.getToken()===2&&S)break}else p&&l(6,[],[]);v()||l(4,[],[2,5]),p=!0;}return f(),e.getToken()!==2?l(7,[2],[]):k(),!0}function h(){d(),k();for(var p=!1;e.getToken()!==4&&e.getToken()!==17;){if(e.getToken()===5){if(p||l(4,[],[]),y(","),k(),e.getToken()===4&&S)break}else p&&l(6,[],[]);F()||l(4,[],[4,5]),p=!0;}return C(),e.getToken()!==4?l(8,[4],[]):k(),!0}function F(){switch(e.getToken()){case 3:return h();case 1:return b();case 10:return s(!0);default:return m()}}return k(),e.getToken()===17?n.allowEmptyContent?!0:(l(4,[],[]),!1):F()?(e.getToken()!==17&&l(9,[],[]),!0):(l(4,[],[]),!1)}var X=K;const W=/^\.{1,2}(\/.*)?$/,J=r=>T(W.test(r)?r:`./${r}`),{existsSync:E}=require$$0$2,Y=r=>{try{return JSON.parse(r)}catch{}},Z=()=>{const{findPnpApi:r}=H;return r&&r(process.cwd())};function I(r){const t=Y(require$$0$2.readFileSync(r,"utf8"));return g.join(r,"..",t&&"tsconfig"in t?t.tsconfig:"tsconfig.json")}function x(r,t){let n=r;if(n===".."&&(n+="/tsconfig.json"),n.startsWith(".")){let a=g.resolve(t,n);if(E(a)&&require$$0$2.statSync(a).isFile()||!a.endsWith(".json")&&(a+=".json",E(a)))return a;throw new Error(`File '${r}' not found.`)}const e=Z();if(e){const{resolveRequest:a}=e,[o,u]=r.split("/"),f=o.startsWith("@")?`${o}/${u}`:o;try{if(f===r){const d=a(g.join(f,"package.json"),t);if(d){const C=I(d);if(E(C))return C}}else try{return a(r,t,{extensions:[".json"]})}catch{return a(g.join(r,"tsconfig.json"),t)}}catch{}}let i=B(t,g.join("node_modules",n));if(i){if(require$$0$2.statSync(i).isDirectory()){const a=g.join(i,"package.json");if(E(a)?i=I(a):i=g.join(i,"tsconfig.json"),E(i))return i}else if(i.endsWith(".json"))return i}if(!n.endsWith(".json")&&(n+=".json",i=B(t,g.join("node_modules",n)),i))return i;throw new Error(`File '${r}' not found.`)}var ee=Object.defineProperty,re=Object.defineProperties,ne=Object.getOwnPropertyDescriptors,R=Object.getOwnPropertySymbols,te=Object.prototype.hasOwnProperty,ae=Object.prototype.propertyIsEnumerable,q=(r,t,n)=>t in r?ee(r,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):r[t]=n,A=(r,t)=>{for(var n in t||(t={}))te.call(t,n)&&q(r,n,t[n]);if(R)for(var n of R(t))ae.call(t,n)&&q(r,n,t[n]);return r},oe=(r,t)=>re(r,ne(t));function M(r){var t;let n;try{n=require$$0$2.realpathSync(r);}catch{throw new Error(`Cannot resolve tsconfig at path: ${r}`)}const e=g.dirname(n),i=require$$0$2.readFileSync(n,"utf8").trim();let a={};if(i&&(a=X(i),!a||typeof a!="object"))throw new SyntaxError(`Failed to parse tsconfig at: ${r}`);if(a.extends){const o=x(a.extends,e),u=M(o);if(delete u.references,(t=u.compilerOptions)!=null&&t.baseUrl){const{compilerOptions:d}=u;d.baseUrl=g.relative(e,g.join(g.dirname(o),d.baseUrl))||"./";}u.files&&(u.files=u.files.map(d=>g.relative(e,g.join(g.dirname(o),d)))),u.include&&(u.include=u.include.map(d=>g.relative(e,g.join(g.dirname(o),d)))),delete a.extends;const f=oe(A(A({},u),a),{compilerOptions:A(A({},u.compilerOptions),a.compilerOptions)});u.watchOptions&&(f.watchOptions=A(A({},u.watchOptions),a.watchOptions)),a=f;}if(a.compilerOptions){const{compilerOptions:o}=a;o.baseUrl&&(o.baseUrl=J(o.baseUrl)),o.outDir&&(Array.isArray(a.exclude)||(a.exclude=[]),a.exclude.push(o.outDir),o.outDir=J(o.outDir));}if(a.files&&(a.files=a.files.map(J)),a.include&&(a.include=a.include.map(T)),a.watchOptions){const{watchOptions:o}=a;o.excludeDirectories&&(o.excludeDirectories=o.excludeDirectories.map(u=>T(g.resolve(e,u))));}return a}function ie(r=process.cwd(),t="tsconfig.json"){const n=B(r,t);if(!n)return null;const e=M(n);return {path:n,config:e}}
6855
6859
 
6856
6860
  const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
6857
6861
  const newLineRegExp = /\r?\n/;
@@ -6897,7 +6901,7 @@ async function getTsconfigPath(root, config) {
6897
6901
  throw new Error("no tsconfig.json found");
6898
6902
  try {
6899
6903
  const tmpTsConfig = { ...tsconfig.config };
6900
- tmpTsConfig.compilerOptions ?? (tmpTsConfig.compilerOptions = {});
6904
+ tmpTsConfig.compilerOptions = tmpTsConfig.compilerOptions || {};
6901
6905
  tmpTsConfig.compilerOptions.emitDeclarationOnly = false;
6902
6906
  tmpTsConfig.compilerOptions.incremental = true;
6903
6907
  tmpTsConfig.compilerOptions.tsBuildInfoFile = path$a.join(
@@ -7561,6 +7565,19 @@ function elegantSpinner() {
7561
7565
  function formatTimeString(date) {
7562
7566
  return date.toTimeString().split(" ")[0];
7563
7567
  }
7568
+ function formatProjectName(name, suffix = " ") {
7569
+ if (!name)
7570
+ return "";
7571
+ const index = name.split("").reduce((acc, v, idx) => acc + v.charCodeAt(0) + idx, 0);
7572
+ const colors = [
7573
+ picocolors.exports.blue,
7574
+ picocolors.exports.yellow,
7575
+ picocolors.exports.cyan,
7576
+ picocolors.exports.green,
7577
+ picocolors.exports.magenta
7578
+ ];
7579
+ return colors[index % colors.length](`|${name}|`) + suffix;
7580
+ }
7564
7581
 
7565
7582
  var _a;
7566
7583
  const BADGE_PADDING = " ";
@@ -7831,7 +7848,7 @@ ${picocolors.exports.cyan(picocolors.exports.inverse(picocolors.exports.bold(" B
7831
7848
  }
7832
7849
  }
7833
7850
  async printTaskErrors(tasks, errorDivider) {
7834
- var _a2;
7851
+ var _a2, _b;
7835
7852
  const errorsQueue = [];
7836
7853
  for (const task of tasks) {
7837
7854
  const error = (_a2 = task.result) == null ? void 0 : _a2.error;
@@ -7847,10 +7864,11 @@ ${picocolors.exports.cyan(picocolors.exports.inverse(picocolors.exports.bold(" B
7847
7864
  for (const [error, tasks2] of errorsQueue) {
7848
7865
  for (const task of tasks2) {
7849
7866
  const filepath = (task == null ? void 0 : task.filepath) || "";
7867
+ const projectName = (task == null ? void 0 : task.projectName) || ((_b = task.file) == null ? void 0 : _b.projectName);
7850
7868
  let name = getFullName(task);
7851
7869
  if (filepath)
7852
7870
  name = `${name} ${picocolors.exports.dim(`[ ${this.relative(filepath)} ]`)}`;
7853
- this.ctx.logger.error(`${picocolors.exports.red(picocolors.exports.bold(picocolors.exports.inverse(" FAIL ")))} ${name}`);
7871
+ this.ctx.logger.error(`${picocolors.exports.red(picocolors.exports.bold(picocolors.exports.inverse(" FAIL ")))} ${formatProjectName(projectName)}${name}`);
7854
7872
  }
7855
7873
  await this.ctx.logger.printError(error);
7856
7874
  errorDivider();
@@ -7928,7 +7946,9 @@ function renderTree$1(tasks, options, level = 0) {
7928
7946
  let output = [];
7929
7947
  for (const task of tasks) {
7930
7948
  let suffix = "";
7931
- const prefix = ` ${getStateSymbol(task)} `;
7949
+ let prefix = ` ${getStateSymbol(task)} `;
7950
+ if (level === 0 && task.type === "suite" && task.projectName)
7951
+ prefix += formatProjectName(task.projectName);
7932
7952
  if (task.type === "test" && ((_a = task.result) == null ? void 0 : _a.retryCount) && task.result.retryCount > 1)
7933
7953
  suffix += picocolors.exports.yellow(` (retry x${task.result.retryCount})`);
7934
7954
  if (task.type === "suite" && !isTypecheckTest(task)) {
@@ -9921,7 +9941,7 @@ createLogUpdate(process$1.stdout);
9921
9941
 
9922
9942
  createLogUpdate(process$1.stderr);
9923
9943
 
9924
- var version = "0.26.0";
9944
+ var version = "0.26.2";
9925
9945
 
9926
9946
  function fileFromParsedStack(stack) {
9927
9947
  var _a, _b;
@@ -9947,7 +9967,7 @@ async function printError(error, ctx, options = {}) {
9947
9967
  }
9948
9968
  const stacks = parseStacktrace(e, fullStack);
9949
9969
  const nearest = error instanceof TypeCheckError ? error.stacks[0] : stacks.find(
9950
- (stack) => ctx.server.moduleGraph.getModuleById(stack.file) && existsSync(stack.file)
9970
+ (stack) => ctx.server.moduleGraph.getModuleById(stack.file) && existsSync$1(stack.file)
9951
9971
  );
9952
9972
  const errorProperties = getErrorProperties(e);
9953
9973
  if (type)
@@ -9959,7 +9979,7 @@ async function printError(error, ctx, options = {}) {
9959
9979
  printStack(ctx, stacks, nearest, errorProperties, (s, pos) => {
9960
9980
  if (showCodeFrame && s === nearest && nearest) {
9961
9981
  const file = fileFromParsedStack(nearest);
9962
- if (nearest.file === file || existsSync(file)) {
9982
+ if (nearest.file === file || existsSync$1(file)) {
9963
9983
  const sourceCode = readFileSync(file, "utf-8");
9964
9984
  ctx.logger.error(picocolors.exports.yellow(generateCodeFrame(sourceCode, 4, pos)));
9965
9985
  }
@@ -9974,7 +9994,8 @@ async function printError(error, ctx, options = {}) {
9974
9994
  if (e.showDiff || e.showDiff === void 0 && e.actual && e.expected) {
9975
9995
  displayDiff(stringify$5(e.actual), stringify$5(e.expected), ctx.logger.console, {
9976
9996
  outputTruncateLength: ctx.config.outputTruncateLength,
9977
- outputDiffLines: ctx.config.outputDiffLines
9997
+ outputDiffLines: ctx.config.outputDiffLines,
9998
+ outputDiffMaxLines: ctx.config.outputDiffMaxLines
9978
9999
  });
9979
10000
  }
9980
10001
  }
@@ -10035,8 +10056,14 @@ As a temporary workaround you can try to inline the package by updating your con
10035
10056
  `)
10036
10057
  ));
10037
10058
  }
10038
- function displayDiff(actual, expected, console, options) {
10039
- console.error(picocolors.exports.gray(unifiedDiff(actual, expected, options)) + "\n");
10059
+ function displayDiff(actual, expected, console, options = {}) {
10060
+ const diff = unifiedDiff(actual, expected, options);
10061
+ const dim = options.noColor ? (s) => s : picocolors.exports.dim;
10062
+ const black = options.noColor ? (s) => s : picocolors.exports.black;
10063
+ if (diff)
10064
+ console.error(diff + "\n");
10065
+ else if (actual && expected && actual !== '"undefined"' && expected !== '"undefined"')
10066
+ console.error(dim("Could not display diff. It's possible objects are too large to compare.\nTry increasing ") + black("--outputDiffMaxSize") + dim(" option.\n"));
10040
10067
  }
10041
10068
  function printErrorMessage(error, logger) {
10042
10069
  const errorName = error.name || error.nameStr || "Unknown Error";
@@ -10415,7 +10442,7 @@ class Vitest {
10415
10442
  }
10416
10443
  async filterTestsBySource(tests) {
10417
10444
  if (this.config.changed && !this.config.related) {
10418
- const { VitestGit } = await import('./chunk-node-git.5a1b1656.js');
10445
+ const { VitestGit } = await import('./chunk-node-git.43b341db.js');
10419
10446
  const vitestGit = new VitestGit(this.config.root);
10420
10447
  const related2 = await vitestGit.findChangedFiles({
10421
10448
  changedSince: this.config.changed
@@ -10695,7 +10722,7 @@ class Vitest {
10695
10722
  }
10696
10723
 
10697
10724
  function generateCssFilenameHash(filepath) {
10698
- return createHash("md5").update(filepath).digest("hex").slice(0, 6);
10725
+ return createHash$1("md5").update(filepath).digest("hex").slice(0, 6);
10699
10726
  }
10700
10727
  function generateScopedClassName(strategy, name, filename) {
10701
10728
  if (strategy === "scoped")
@@ -11106,7 +11133,7 @@ async function VitestPlugin(options = {}, ctx = new Vitest("test")) {
11106
11133
  try {
11107
11134
  await ctx.setServer(options, server);
11108
11135
  if (options.api && options.watch)
11109
- (await import('./chunk-api-setup.08f3b356.js')).setup(ctx);
11136
+ (await import('./chunk-api-setup.46ee0021.js')).setup(ctx);
11110
11137
  } catch (err) {
11111
11138
  ctx.logger.printError(err, true);
11112
11139
  process.exit(1);
@@ -11220,8 +11247,8 @@ function registerConsoleShortcuts(ctx) {
11220
11247
  let rl;
11221
11248
  function on() {
11222
11249
  off();
11223
- rl = require$$0$2.createInterface({ input: process.stdin, escapeCodeTimeout: 50 });
11224
- require$$0$2.emitKeypressEvents(process.stdin, rl);
11250
+ rl = require$$0$3.createInterface({ input: process.stdin, escapeCodeTimeout: 50 });
11251
+ require$$0$3.emitKeypressEvents(process.stdin, rl);
11225
11252
  if (process.stdin.isTTY)
11226
11253
  process.stdin.setRawMode(true);
11227
11254
  process.stdin.on("keypress", keypressHandler);
@@ -1,5 +1,5 @@
1
- import { relative } from 'path';
2
- import { i as isNode, a as isBrowser, r as relative$1, p as picocolors, E as EXIT_CODE_RESTART } from './chunk-utils-env.03f840f2.js';
1
+ import { relative } from 'node:path';
2
+ import { i as isNode, a as isBrowser, r as relative$1, p as picocolors, E as EXIT_CODE_RESTART } from './chunk-utils-env.4afc6329.js';
3
3
  import { isPackageExists } from 'local-pkg';
4
4
 
5
5
  const TYPECHECK_SUITE = Symbol("vitest:typecheck-suite");
@@ -290,7 +290,7 @@ async function ensurePackageInstalled(dependency, root) {
290
290
  message: picocolors.exports.reset(`Do you want to install ${picocolors.exports.green(dependency)}?`)
291
291
  });
292
292
  if (install) {
293
- await (await import('./chunk-install-pkg.579a5a27.js')).installPackage(dependency, { dev: true });
293
+ await (await import('./chunk-install-pkg.31846bc1.js')).installPackage(dependency, { dev: true });
294
294
  process.stderr.write(picocolors.exports.yellow(`
295
295
  Package ${dependency} installed, re-run the command to start.
296
296
  `));
@@ -1,6 +1,6 @@
1
1
  import require$$0 from 'tty';
2
- import url from 'url';
3
- import path from 'path';
2
+ import url from 'node:url';
3
+ import g from 'path';
4
4
 
5
5
  var picocolors = {exports: {}};
6
6
 
@@ -206,22 +206,22 @@ const toNamespacedPath = function(p) {
206
206
  return normalizeWindowsPath(p);
207
207
  };
208
208
  const extname = function(p) {
209
- return path.posix.extname(normalizeWindowsPath(p));
209
+ return g.posix.extname(normalizeWindowsPath(p));
210
210
  };
211
211
  const relative = function(from, to) {
212
- return path.posix.relative(normalizeWindowsPath(from), normalizeWindowsPath(to));
212
+ return g.posix.relative(normalizeWindowsPath(from), normalizeWindowsPath(to));
213
213
  };
214
214
  const dirname = function(p) {
215
- return path.posix.dirname(normalizeWindowsPath(p));
215
+ return g.posix.dirname(normalizeWindowsPath(p));
216
216
  };
217
217
  const format = function(p) {
218
- return normalizeWindowsPath(path.posix.format(p));
218
+ return normalizeWindowsPath(g.posix.format(p));
219
219
  };
220
220
  const basename = function(p, ext) {
221
- return path.posix.basename(normalizeWindowsPath(p), ext);
221
+ return g.posix.basename(normalizeWindowsPath(p), ext);
222
222
  };
223
223
  const parse = function(p) {
224
- return path.posix.parse(normalizeWindowsPath(p));
224
+ return g.posix.parse(normalizeWindowsPath(p));
225
225
  };
226
226
 
227
227
  const _path = /*#__PURE__*/Object.freeze({
@@ -1,10 +1,10 @@
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.e655f6cc.js';
2
- import { g as getWorkerState, R as RealDate, r as resetDate, m as mockDate, a as resetModules } from './chunk-typecheck-constants.3f865d14.js';
3
- import { p as parseStacktrace } from './chunk-utils-source-map.5bbb50cd.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.198631fd.js';
2
+ import { g as getWorkerState, R as RealDate, r as resetDate, m as mockDate, a as resetModules } from './chunk-typecheck-constants.e478eb98.js';
3
+ import { p as parseStacktrace } from './chunk-utils-source-map.95b8b3f0.js';
4
4
  import { c as commonjsGlobal } from './vendor-_commonjsHelpers.addc3445.js';
5
5
  import util from 'util';
6
6
  import { spyOn, fn, isMockFunction, spies } from './spy.js';
7
- import { s as safeSetTimeout } from './chunk-utils-timers.793fd179.js';
7
+ import { s as safeSetTimeout } from './chunk-utils-timers.54caa12a.js';
8
8
  import * as chai from 'chai';
9
9
  import { assert, should } from 'chai';
10
10
 
@@ -1298,7 +1298,6 @@ function withGlobal(_global) {
1298
1298
  * @param {number} minute
1299
1299
  * @param {number} second
1300
1300
  * @param {number} ms
1301
- *
1302
1301
  * @returns {Date}
1303
1302
  */
1304
1303
  function ClockDate(year, month, date, hour, minute, second, ms) {
@@ -1524,7 +1523,6 @@ function withGlobal(_global) {
1524
1523
  * @param {Clock} clock
1525
1524
  * @param {number} from
1526
1525
  * @param {number} to
1527
- *
1528
1526
  * @returns {Timer}
1529
1527
  */
1530
1528
  function firstTimerInRange(clock, from, to) {
@@ -1955,6 +1953,12 @@ function withGlobal(_global) {
1955
1953
  return [secsSinceStart, remainderInNanos];
1956
1954
  }
1957
1955
 
1956
+ function fakePerformanceNow() {
1957
+ const hrt = hrtime();
1958
+ const millis = hrt[0] * 1000 + hrt[1] / 1e6;
1959
+ return millis;
1960
+ }
1961
+
1958
1962
  if (hrtimeBigintPresent) {
1959
1963
  hrtime.bigint = function () {
1960
1964
  const parts = hrtime();
@@ -1997,19 +2001,18 @@ function withGlobal(_global) {
1997
2001
  });
1998
2002
  };
1999
2003
  if (typeof _global.Promise !== "undefined" && utilPromisify) {
2000
- clock.setTimeout[
2001
- utilPromisify.custom
2002
- ] = function promisifiedSetTimeout(timeout, arg) {
2003
- return new _global.Promise(function setTimeoutExecutor(
2004
- resolve
2005
- ) {
2006
- addTimer(clock, {
2007
- func: resolve,
2008
- args: [arg],
2009
- delay: timeout,
2004
+ clock.setTimeout[utilPromisify.custom] =
2005
+ function promisifiedSetTimeout(timeout, arg) {
2006
+ return new _global.Promise(function setTimeoutExecutor(
2007
+ resolve
2008
+ ) {
2009
+ addTimer(clock, {
2010
+ func: resolve,
2011
+ args: [arg],
2012
+ delay: timeout,
2013
+ });
2010
2014
  });
2011
- });
2012
- };
2015
+ };
2013
2016
  }
2014
2017
 
2015
2018
  clock.clearTimeout = function clearTimeout(timerId) {
@@ -2053,19 +2056,18 @@ function withGlobal(_global) {
2053
2056
  };
2054
2057
 
2055
2058
  if (typeof _global.Promise !== "undefined" && utilPromisify) {
2056
- clock.setImmediate[
2057
- utilPromisify.custom
2058
- ] = function promisifiedSetImmediate(arg) {
2059
- return new _global.Promise(function setImmediateExecutor(
2060
- resolve
2061
- ) {
2062
- addTimer(clock, {
2063
- func: resolve,
2064
- args: [arg],
2065
- immediate: true,
2066
- });
2067
- });
2068
- };
2059
+ clock.setImmediate[utilPromisify.custom] =
2060
+ function promisifiedSetImmediate(arg) {
2061
+ return new _global.Promise(
2062
+ function setImmediateExecutor(resolve) {
2063
+ addTimer(clock, {
2064
+ func: resolve,
2065
+ args: [arg],
2066
+ immediate: true,
2067
+ });
2068
+ }
2069
+ );
2070
+ };
2069
2071
  }
2070
2072
 
2071
2073
  clock.clearImmediate = function clearImmediate(timerId) {
@@ -2084,7 +2086,9 @@ function withGlobal(_global) {
2084
2086
  const result = addTimer(clock, {
2085
2087
  func: func,
2086
2088
  delay: getTimeToNextFrame(),
2087
- args: [clock.now + getTimeToNextFrame()],
2089
+ get args() {
2090
+ return [fakePerformanceNow()];
2091
+ },
2088
2092
  animation: true,
2089
2093
  });
2090
2094
 
@@ -2371,8 +2375,9 @@ function withGlobal(_global) {
2371
2375
  return;
2372
2376
  }
2373
2377
 
2374
- numTimers = Object.keys(clock.timers)
2375
- .length;
2378
+ numTimers = Object.keys(
2379
+ clock.timers
2380
+ ).length;
2376
2381
  if (numTimers === 0) {
2377
2382
  resetIsNearInfiniteLimit();
2378
2383
  resolve(clock.now);
@@ -2420,7 +2425,7 @@ function withGlobal(_global) {
2420
2425
  resolve(clock.now);
2421
2426
  }
2422
2427
 
2423
- resolve(clock.tickAsync(timer.callAt));
2428
+ resolve(clock.tickAsync(timer.callAt - clock.now));
2424
2429
  } catch (e) {
2425
2430
  reject(e);
2426
2431
  }
@@ -2460,11 +2465,7 @@ function withGlobal(_global) {
2460
2465
 
2461
2466
  if (performancePresent) {
2462
2467
  clock.performance = Object.create(null);
2463
- clock.performance.now = function FakeTimersNow() {
2464
- const hrt = hrtime();
2465
- const millis = hrt[0] * 1000 + hrt[1] / 1e6;
2466
- return millis;
2467
- };
2468
+ clock.performance.now = fakePerformanceNow;
2468
2469
  }
2469
2470
 
2470
2471
  if (hrtimePresent) {
@@ -1,5 +1,5 @@
1
- import { b as resolve } from './chunk-utils-env.03f840f2.js';
2
- import { k as notNullish } from './chunk-typecheck-constants.3f865d14.js';
1
+ import { b as resolve } from './chunk-utils-env.4afc6329.js';
2
+ import { k as notNullish } from './chunk-typecheck-constants.e478eb98.js';
3
3
 
4
4
  const lineSplitRE = /\r?\n/;
5
5
  const stackIgnorePatterns = [