vitest 2.0.5 → 2.1.0-beta.1

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 (54) hide show
  1. package/dist/browser.d.ts +3 -3
  2. package/dist/browser.js +1 -1
  3. package/dist/chunks/RandomSequencer.B4M2ux5b.js +952 -0
  4. package/dist/chunks/{base.DSsbfkDg.js → base.BH-FAiX7.js} +1 -1
  5. package/dist/chunks/{base.CC5R_kgU.js → base.BYvKfYzm.js} +2 -2
  6. package/dist/chunks/{benchmark.DDmpNjj-.js → benchmark.C8CRJYG4.js} +1 -1
  7. package/dist/chunks/{cac.DGgmCKmU.js → cac.CaYKA7Wt.js} +9 -8
  8. package/dist/chunks/{cli-api.OKfd3qJ0.js → cli-api.B8LE391_.js} +221 -4329
  9. package/dist/chunks/{config.DCnyCTbs.d.ts → config.CHuotKvS.d.ts} +3 -0
  10. package/dist/chunks/{console.Bgn7_A1x.js → console.DI3gHgtH.js} +1 -1
  11. package/dist/chunks/{creator.a3OfuIEW.js → creator.GreKbaUc.js} +2 -3
  12. package/dist/chunks/{env.BU041cs9.js → env.CmHVDJnw.js} +1 -1
  13. package/dist/chunks/{execute.Cjlr2CRw.js → execute.DT9BA6zp.js} +7 -7
  14. package/dist/chunks/{globals.BliuJFNR.js → globals.DRPLtPOv.js} +6 -6
  15. package/dist/chunks/{index.BfeNhc0N.js → index.CNZXZ9PJ.js} +2 -2
  16. package/dist/chunks/{index.DYufA6CZ.js → index.CxRxs566.js} +1 -1
  17. package/dist/chunks/{index.R1VjssW9.js → index.CxWPpGJz.js} +2 -2
  18. package/dist/chunks/{index.JbiJutJ_.js → index.YuPJueCg.js} +25 -965
  19. package/dist/chunks/{node.DS3zEPa7.js → node.Bx4JZjMG.js} +1 -1
  20. package/dist/chunks/{reporters.C_zwCd4j.d.ts → reporters.DRZ7ndzr.d.ts} +14 -1
  21. package/dist/chunks/resolveConfig.CGobt8AB.js +8120 -0
  22. package/dist/chunks/{runBaseTests.CyvqmuC9.js → runBaseTests.BAhL8UH_.js} +9 -9
  23. package/dist/chunks/{setup-common.CNzatKMx.js → setup-common.KBrCO5LJ.js} +1 -1
  24. package/dist/chunks/{utils.DpP_sDwr.js → utils.DO38lwfj.js} +1 -1
  25. package/dist/chunks/{vi.fiQ7lMRF.js → vi.B6QZ938s.js} +2 -2
  26. package/dist/chunks/{vm.DcSuuaHr.js → vm.kl9T_5ai.js} +3 -3
  27. package/dist/chunks/{worker.C5iHKIaJ.d.ts → worker.BANO5ak1.d.ts} +1 -1
  28. package/dist/chunks/{worker.DKkAC4Qw.d.ts → worker.Cx2xE71X.d.ts} +1 -1
  29. package/dist/cli.js +2 -2
  30. package/dist/config.d.ts +2 -2
  31. package/dist/coverage.d.ts +2 -2
  32. package/dist/coverage.js +34 -14
  33. package/dist/execute.d.ts +2 -2
  34. package/dist/execute.js +2 -2
  35. package/dist/index.d.ts +6 -6
  36. package/dist/index.js +7 -7
  37. package/dist/node.d.ts +5 -5
  38. package/dist/node.js +19 -18
  39. package/dist/reporters.d.ts +2 -2
  40. package/dist/reporters.js +10 -9
  41. package/dist/runners.d.ts +9 -2
  42. package/dist/runners.js +5 -5
  43. package/dist/snapshot.js +2 -2
  44. package/dist/suite.js +3 -3
  45. package/dist/worker.js +1 -1
  46. package/dist/workers/forks.js +3 -3
  47. package/dist/workers/runVmTests.js +8 -8
  48. package/dist/workers/threads.js +3 -3
  49. package/dist/workers/vmForks.js +5 -5
  50. package/dist/workers/vmThreads.js +5 -5
  51. package/dist/workers.d.ts +4 -4
  52. package/dist/workers.js +6 -6
  53. package/package.json +14 -15
  54. package/dist/chunks/index.BMmMjLIQ.js +0 -3975
@@ -2,33 +2,27 @@ import { g as getTestName, h as hasFailedSnapshot, a as getFullName } from './ta
2
2
  import fs, { existsSync, promises, readFileSync } from 'node:fs';
3
3
  import c from 'tinyrainbow';
4
4
  import * as pathe from 'pathe';
5
- import { basename, dirname, resolve, join, relative, extname, normalize } from 'pathe';
6
- import { notNullish, highlight, shuffle, inspect, positionToOffset, lineSplitRE } from '@vitest/utils';
7
- import { i as isNode, a as isDeno } from './env.BU041cs9.js';
8
- import { g as getStateSymbol, f as formatProjectName, t as taskFail, F as F_RIGHT, a as F_POINTER, r as renderSnapshotSummary, b as getStateString, c as formatTimeString, d as countTestErrors, e as divider, s as stripAnsi, h as getCols, i as getHookStateSymbol } from './utils.DpP_sDwr.js';
9
- import { generateHash, calculateSuiteHash, someTasksAreOnly, interpretTaskModes, getTasks, getTests, hasFailed, getSuites } from '@vitest/runner/utils';
5
+ import { relative, resolve, dirname, extname, normalize } from 'pathe';
6
+ import { notNullish, highlight, inspect, positionToOffset, lineSplitRE } from '@vitest/utils';
7
+ import { a as isNode, b as isDeno } from './env.CmHVDJnw.js';
8
+ import { g as getStateSymbol, f as formatProjectName, t as taskFail, F as F_RIGHT, a as F_POINTER, r as renderSnapshotSummary, b as getStateString, c as formatTimeString, d as countTestErrors, e as divider, s as stripAnsi, h as getCols, i as getHookStateSymbol } from './utils.DO38lwfj.js';
9
+ import { getTests, hasFailed, getSuites, getTasks } from '@vitest/runner/utils';
10
10
  import { performance } from 'node:perf_hooks';
11
- import { TraceMap, generatedPositionFor, parseStacktrace, parseErrorStacktrace } from '@vitest/utils/source-map';
12
- import { r as relativePath } from './index.DYufA6CZ.js';
13
- import { t as toArray, b as isPrimitive } from './base.DSsbfkDg.js';
11
+ import { parseStacktrace, parseErrorStacktrace } from '@vitest/utils/source-map';
12
+ import { r as relativePath } from './index.CxRxs566.js';
13
+ import { t as toArray, c as isPrimitive } from './base.BH-FAiX7.js';
14
14
  import { isCI } from 'std-env';
15
- import nodeos__default, { hostname } from 'node:os';
15
+ import { g as getOutputFile, R as RandomSequencer, a as TypeCheckError } from './RandomSequencer.B4M2ux5b.js';
16
+ import { hostname } from 'node:os';
16
17
  import { Writable } from 'node:stream';
17
- import { writeFile, rm, mkdir, readdir, readFile } from 'node:fs/promises';
18
- import { execa } from 'execa';
19
- import url from 'node:url';
20
- import p$1 from 'path';
21
- import require$$0 from 'fs';
22
- import ke from 'module';
23
- import { parseAstAsync } from 'vite';
24
18
  import { Console } from 'node:console';
25
19
  import process$2 from 'node:process';
26
20
  import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './_commonjsHelpers.BFTU3MAI.js';
27
- import require$$0$2 from 'assert';
28
- import require$$0$1 from 'events';
29
- import { createHash } from 'node:crypto';
30
- import { slash, cleanUrl } from 'vite-node/utils';
21
+ import require$$0$1 from 'assert';
22
+ import require$$0 from 'events';
31
23
  import { createRequire } from 'node:module';
24
+ import { mkdir, writeFile, readdir, readFile } from 'node:fs/promises';
25
+ import { cleanUrl } from 'vite-node/utils';
32
26
 
33
27
  /// <reference types="../types/index.d.ts" />
34
28
 
@@ -40,7 +34,7 @@ const {keys} = Object;
40
34
  const Primitive = String; // it could be Number
41
35
  const primitive = 'string'; // it could be 'number'
42
36
 
43
- const ignore$1 = {};
37
+ const ignore = {};
44
38
  const object = 'object';
45
39
 
46
40
  const noop = (_, value) => value;
@@ -62,13 +56,13 @@ const revive = (input, parsed, output, $) => {
62
56
  const tmp = input[value];
63
57
  if (typeof tmp === object && !parsed.has(tmp)) {
64
58
  parsed.add(tmp);
65
- output[k] = ignore$1;
59
+ output[k] = ignore;
66
60
  lazy.push({k, a: [input, parsed, tmp, $]});
67
61
  }
68
62
  else
69
63
  output[k] = $.call(output, k, tmp);
70
64
  }
71
- else if (output[k] !== ignore$1)
65
+ else if (output[k] !== ignore)
72
66
  output[k] = $.call(output, k, value);
73
67
  }
74
68
  for (let {length} = lazy, i = 0; i < length; i++) {
@@ -137,885 +131,6 @@ const stringify = (value, replacer, space) => {
137
131
  }
138
132
  };
139
133
 
140
- const REGEXP_WRAP_PREFIX = "$$vitest:";
141
- function getOutputFile(config, reporter) {
142
- if (!config?.outputFile) {
143
- return;
144
- }
145
- if (typeof config.outputFile === "string") {
146
- return config.outputFile;
147
- }
148
- return config.outputFile[reporter];
149
- }
150
- function wrapSerializableConfig(config) {
151
- let testNamePattern = config.testNamePattern;
152
- let defines = config.defines;
153
- if (testNamePattern && typeof testNamePattern !== "string") {
154
- testNamePattern = `${REGEXP_WRAP_PREFIX}${testNamePattern.toString()}`;
155
- }
156
- if (defines) {
157
- defines = { keys: Object.keys(defines), original: defines };
158
- }
159
- return {
160
- ...config,
161
- testNamePattern,
162
- defines
163
- };
164
- }
165
-
166
- const A=r=>r!==null&&typeof r=="object",a=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),_="ERR_INVALID_PACKAGE_CONFIG",E$1="ERR_INVALID_PACKAGE_TARGET",I="ERR_PACKAGE_PATH_NOT_EXPORTED",R$1=/^\d+$/,O=/^(\.{1,2}|node_modules)$/i,w=/\/|\\/;var h$1=(r=>(r.Export="exports",r.Import="imports",r))(h$1||{});const f=(r,t,e,o,c)=>{if(t==null)return [];if(typeof t=="string"){const[n,...i]=t.split(w);if(n===".."||i.some(l=>O.test(l)))throw a(E$1,`Invalid "${r}" target "${t}" defined in the package config`);return [c?t.replace(/\*/g,c):t]}if(Array.isArray(t))return t.flatMap(n=>f(r,n,e,o,c));if(A(t)){for(const n of Object.keys(t)){if(R$1.test(n))throw a(_,"Cannot contain numeric property keys");if(n==="default"||o.includes(n))return f(r,t[n],e,o,c)}return []}throw a(E$1,`Invalid "${r}" target "${t}"`)},s="*",m=(r,t)=>{const e=r.indexOf(s),o=t.indexOf(s);return e===o?t.length>r.length:o>e};function d(r,t){if(!t.includes(s)&&r.hasOwnProperty(t))return [t];let e,o;for(const c of Object.keys(r))if(c.includes(s)){const[n,i,l]=c.split(s);if(l===void 0&&t.startsWith(n)&&t.endsWith(i)){const g=t.slice(n.length,-i.length||void 0);g&&(!e||m(e,c))&&(e=c,o=g);}}return [e,o]}const p=r=>Object.keys(r).reduce((t,e)=>{const o=e===""||e[0]!==".";if(t===void 0||t===o)return o;throw a(_,'"exports" cannot contain some keys starting with "." and some not')},void 0),u$1=/^\w+:/,v=(r,t,e)=>{if(!r)throw new Error('"exports" is required');t=t===""?".":`./${t}`,(typeof r=="string"||Array.isArray(r)||A(r)&&p(r))&&(r={".":r});const[o,c]=d(r,t),n=f(h$1.Export,r[o],t,e,c);if(n.length===0)throw a(I,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const i of n)if(!i.startsWith("./")&&!u$1.test(i))throw a(E$1,`Invalid "exports" target "${i}" defined in the package config`);return n};
167
-
168
- var ae=Object.defineProperty;var u=(e,t)=>ae(e,"name",{value:t,configurable:!0});function E(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}u(E,"slash");const h=u(e=>{const t=require$$0[e];return (i,...n)=>{const l=`${e}:${n.join(":")}`;let o=i==null?void 0:i.get(l);return o===void 0&&(o=Reflect.apply(t,require$$0,n),i==null||i.set(l,o)),o}},"cacheFs"),L=h("existsSync"),we=h("readFileSync"),P=h("statSync"),K=u((e,t,i)=>{for(;;){const n=p$1.posix.join(e,t);if(L(i,n))return n;const l=p$1.dirname(e);if(l===e)return;e=l;}},"findUp"),J=/^\.{1,2}(\/.*)?$/,M=u(e=>{const t=E(e);return J.test(t)?t:`./${t}`},"normalizePath");function Te(e,t=!1){const i=e.length;let n=0,l="",o=0,s=16,c=0,f=0,w=0,A=0,k=0;function O(r,g){let m=0,_=0;for(;m<r||!g;){let j=e.charCodeAt(n);if(j>=48&&j<=57)_=_*16+j-48;else if(j>=65&&j<=70)_=_*16+j-65+10;else if(j>=97&&j<=102)_=_*16+j-97+10;else break;n++,m++;}return m<r&&(_=-1),_}u(O,"scanHexDigits");function T(r){n=r,l="",o=0,s=16,k=0;}u(T,"setPosition");function v(){let r=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&F(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&F(e.charCodeAt(n)))for(n++;n<e.length&&F(e.charCodeAt(n));)n++;else return k=3,e.substring(r,n);let g=n;if(n<e.length&&(e.charCodeAt(n)===69||e.charCodeAt(n)===101))if(n++,(n<e.length&&e.charCodeAt(n)===43||e.charCodeAt(n)===45)&&n++,n<e.length&&F(e.charCodeAt(n))){for(n++;n<e.length&&F(e.charCodeAt(n));)n++;g=n;}else k=3;return e.substring(r,g)}u(v,"scanNumber");function b(){let r="",g=n;for(;;){if(n>=i){r+=e.substring(g,n),k=2;break}const m=e.charCodeAt(n);if(m===34){r+=e.substring(g,n),n++;break}if(m===92){if(r+=e.substring(g,n),n++,n>=i){k=2;break}switch(e.charCodeAt(n++)){case 34:r+='"';break;case 92:r+="\\";break;case 47:r+="/";break;case 98:r+="\b";break;case 102:r+="\f";break;case 110:r+=`
169
- `;break;case 114:r+="\r";break;case 116:r+=" ";break;case 117:const j=O(4,!0);j>=0?r+=String.fromCharCode(j):k=4;break;default:k=5;}g=n;continue}if(m>=0&&m<=31)if(x(m)){r+=e.substring(g,n),k=2;break}else k=6;n++;}return r}u(b,"scanString");function B(){if(l="",k=0,o=n,f=c,A=w,n>=i)return o=i,s=17;let r=e.charCodeAt(n);if(R(r)){do n++,l+=String.fromCharCode(r),r=e.charCodeAt(n);while(R(r));return s=15}if(x(r))return n++,l+=String.fromCharCode(r),r===13&&e.charCodeAt(n)===10&&(n++,l+=`
170
- `),c++,w=n,s=14;switch(r){case 123:return n++,s=1;case 125:return n++,s=2;case 91:return n++,s=3;case 93:return n++,s=4;case 58:return n++,s=6;case 44:return n++,s=5;case 34:return n++,l=b(),s=10;case 47:const g=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<i&&!x(e.charCodeAt(n));)n++;return l=e.substring(g,n),s=12}if(e.charCodeAt(n+1)===42){n+=2;const m=i-1;let _=!1;for(;n<m;){const j=e.charCodeAt(n);if(j===42&&e.charCodeAt(n+1)===47){n+=2,_=!0;break}n++,x(j)&&(j===13&&e.charCodeAt(n)===10&&n++,c++,w=n);}return _||(n++,k=1),l=e.substring(g,n),s=13}return l+=String.fromCharCode(r),n++,s=16;case 45:if(l+=String.fromCharCode(r),n++,n===i||!F(e.charCodeAt(n)))return s=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return l+=v(),s=11;default:for(;n<i&&U(r);)n++,r=e.charCodeAt(n);if(o!==n){switch(l=e.substring(o,n),l){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return l+=String.fromCharCode(r),n++,s=16}}u(B,"scanNext");function U(r){if(R(r)||x(r))return !1;switch(r){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return !1}return !0}u(U,"isUnknownContentCharacter");function y(){let r;do r=B();while(r>=12&&r<=15);return r}return u(y,"scanNextNonTrivia"),{setPosition:T,getPosition:()=>n,scan:t?y:B,getToken:()=>s,getTokenValue:()=>l,getTokenOffset:()=>o,getTokenLength:()=>n-o,getTokenStartLine:()=>f,getTokenStartCharacter:()=>o-A,getTokenError:()=>k}}u(Te,"createScanner");function R(e){return e===32||e===9}u(R,"isWhiteSpace");function x(e){return e===10||e===13}u(x,"isLineBreak");function F(e){return e>=48&&e<=57}u(F,"isDigit");var C;((function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab";}))(C||(C={})),new Array(20).fill(0).map((e,t)=>" ".repeat(t));const N=200;new Array(N).fill(0).map((e,t)=>`
171
- `+" ".repeat(t)),new Array(N).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(N).fill(0).map((e,t)=>`\r
172
- `+" ".repeat(t)),new Array(N).fill(0).map((e,t)=>`
173
- `+" ".repeat(t)),new Array(N).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(N).fill(0).map((e,t)=>`\r
174
- `+" ".repeat(t));var D;(function(e){e.DEFAULT={allowTrailingComma:!1};})(D||(D={}));function ve(e,t=[],i=D.DEFAULT){let n=null,l=[];const o=[];function s(f){Array.isArray(l)?l.push(f):n!==null&&(l[n]=f);}return u(s,"onValue"),Ae(e,{onObjectBegin:()=>{const f={};s(f),o.push(l),l=f,n=null;},onObjectProperty:f=>{n=f;},onObjectEnd:()=>{l=o.pop();},onArrayBegin:()=>{const f=[];s(f),o.push(l),l=f,n=null;},onArrayEnd:()=>{l=o.pop();},onLiteralValue:s,onError:(f,w,A)=>{t.push({error:f,offset:w,length:A});}},i),l[0]}u(ve,"parse$1");function Ae(e,t,i=D.DEFAULT){const n=Te(e,!1),l=[];function o(a){return a?()=>a(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}u(o,"toNoArgVisit");function s(a){return a?()=>a(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>l.slice()):()=>!0}u(s,"toNoArgVisitWithPath");function c(a){return a?$=>a($,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}u(c,"toOneArgVisit");function f(a){return a?$=>a($,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>l.slice()):()=>!0}u(f,"toOneArgVisitWithPath");const w=s(t.onObjectBegin),A=f(t.onObjectProperty),k=o(t.onObjectEnd),O=s(t.onArrayBegin),T=o(t.onArrayEnd),v=f(t.onLiteralValue),b=c(t.onSeparator),B=o(t.onComment),U=c(t.onError),y=i&&i.disallowComments,r=i&&i.allowTrailingComma;function g(){for(;;){const a=n.scan();switch(n.getTokenError()){case 4:m(14);break;case 5:m(15);break;case 3:m(13);break;case 1:y||m(11);break;case 2:m(12);break;case 6:m(16);break}switch(a){case 12:case 13:y?m(10):B();break;case 16:m(1);break;case 15:case 14:break;default:return a}}}u(g,"scanNext");function m(a,$=[],q=[]){if(U(a),$.length+q.length>0){let I=n.getToken();for(;I!==17;){if($.indexOf(I)!==-1){g();break}else if(q.indexOf(I)!==-1)break;I=g();}}}u(m,"handleError");function _(a){const $=n.getTokenValue();return a?v($):(A($),l.push($)),g(),!0}u(_,"parseString");function j(){switch(n.getToken()){case 11:const a=n.getTokenValue();let $=Number(a);isNaN($)&&(m(2),$=0),v($);break;case 7:v(null);break;case 8:v(!0);break;case 9:v(!1);break;default:return !1}return g(),!0}u(j,"parseLiteral");function pe(){return n.getToken()!==10?(m(3,[],[2,5]),!1):(_(!1),n.getToken()===6?(b(":"),g(),d()||m(4,[],[2,5])):m(5,[],[2,5]),l.pop(),!0)}u(pe,"parseProperty");function me(){w(),g();let a=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(a||m(4,[],[]),b(","),g(),n.getToken()===2&&r)break}else a&&m(6,[],[]);pe()||m(4,[],[2,5]),a=!0;}return k(),n.getToken()!==2?m(7,[2],[]):g(),!0}u(me,"parseObject");function ge(){O(),g();let a=!0,$=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if($||m(4,[],[]),b(","),g(),n.getToken()===4&&r)break}else $&&m(6,[],[]);a?(l.push(0),a=!1):l[l.length-1]++,d()||m(4,[],[4,5]),$=!0;}return T(),a||l.pop(),n.getToken()!==4?m(8,[4],[]):g(),!0}u(ge,"parseArray");function d(){switch(n.getToken()){case 3:return ge();case 1:return me();case 10:return _(!0);default:return j()}}return u(d,"parseValue"),g(),n.getToken()===17?i.allowEmptyContent?!0:(m(4,[],[]),!1):d()?(n.getToken()!==17&&m(9,[],[]),!0):(m(4,[],[]),!1)}u(Ae,"visit");var ee;(function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter";})(ee||(ee={}));var ne;(function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF";})(ne||(ne={}));const Oe=ve;var te;(function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter";})(te||(te={}));const ie=u((e,t)=>Oe(we(t,e,"utf8")),"readJsonc"),G=Symbol("implicitBaseUrl"),je=u(()=>{const{findPnpApi:e}=ke;return e&&e(process.cwd())},"getPnpApi"),z=u((e,t,i,n)=>{const l=`resolveFromPackageJsonPath:${e}:${t}:${i}`;if(n!=null&&n.has(l))return n.get(l);const o=ie(e,n);if(!o)return;let s=t||"tsconfig.json";if(!i&&o.exports)try{const[c]=v(o.exports,t,["require","types"]);s=c;}catch{return !1}else !t&&o.tsconfig&&(s=o.tsconfig);return s=p$1.join(e,"..",s),n==null||n.set(l,s),s},"resolveFromPackageJsonPath"),Q="package.json",H="tsconfig.json",$e=u((e,t,i)=>{let n=e;if(e===".."&&(n=p$1.join(n,H)),e[0]==="."&&(n=p$1.resolve(t,n)),p$1.isAbsolute(n)){if(L(i,n)){if(P(i,n).isFile())return n}else if(!n.endsWith(".json")){const T=`${n}.json`;if(L(i,T))return T}return}const[l,...o]=e.split("/"),s=l[0]==="@"?`${l}/${o.shift()}`:l,c=o.join("/"),f=je();if(f){const{resolveRequest:T}=f;try{if(s===e){const v=T(p$1.join(s,Q),t);if(v){const b=z(v,c,!1,i);if(b&&L(i,b))return b}}else {let v;try{v=T(e,t,{extensions:[".json"]});}catch{v=T(p$1.join(e,H),t);}if(v)return v}}catch{}}const w=K(p$1.resolve(t),p$1.join("node_modules",s),i);if(!w||!P(i,w).isDirectory())return;const A=p$1.join(w,Q);if(L(i,A)){const T=z(A,c,!1,i);if(T===!1)return;if(T&&L(i,T)&&P(i,T).isFile())return T}const k=p$1.join(w,c),O=k.endsWith(".json");if(!O){const T=`${k}.json`;if(L(i,T))return T}if(L(i,k)){if(P(i,k).isDirectory()){const T=p$1.join(k,Q);if(L(i,T)){const b=z(T,"",!0,i);if(b&&L(i,b))return b}const v=p$1.join(k,H);if(L(i,v))return v}else if(O)return k}},"resolveExtendsPath"),Be=u((e,t,i,n)=>{const l=$e(e,t,n);if(!l)throw new Error(`File '${e}' not found.`);if(i.has(l))throw new Error(`Circularity detected while resolving configuration: ${l}`);i.add(l);const o=p$1.dirname(l),s=le(l,n,i);delete s.references;const{compilerOptions:c}=s;if(c){const f=["baseUrl","outDir"];for(const w of f){const A=c[w];A&&(c[w]=E(p$1.relative(t,p$1.join(o,A)))||"./");}}return s.files&&(s.files=s.files.map(f=>E(p$1.relative(t,p$1.join(o,f))))),s.include&&(s.include=s.include.map(f=>E(p$1.relative(t,p$1.join(o,f))))),s.exclude&&(s.exclude=s.exclude.map(f=>E(p$1.relative(t,p$1.join(o,f))))),s},"resolveExtends"),le=u((e,t,i=new Set)=>{let n;try{n=ie(e,t)||{};}catch{throw new Error(`Cannot resolve tsconfig at path: ${e}`)}if(typeof n!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);const l=p$1.dirname(e);if(n.compilerOptions){const{compilerOptions:o}=n;o.paths&&!o.baseUrl&&(o[G]=l);}if(n.extends){const o=Array.isArray(n.extends)?n.extends:[n.extends];delete n.extends;for(const s of o.reverse()){const c=Be(s,l,new Set(i),t),f={...c,...n,compilerOptions:{...c.compilerOptions,...n.compilerOptions}};c.watchOptions&&(f.watchOptions={...c.watchOptions,...n.watchOptions}),n=f;}}if(n.compilerOptions){const{compilerOptions:o}=n,s=["baseUrl","rootDir"];for(const f of s){const w=o[f];if(w){const A=p$1.resolve(l,w),k=M(p$1.relative(l,A));o[f]=k;}}const{outDir:c}=o;c&&(Array.isArray(n.exclude)||(n.exclude=[]),n.exclude.includes(c)||n.exclude.push(c),o.outDir=M(c));}else n.compilerOptions={};if(n.files&&(n.files=n.files.map(M)),n.include&&(n.include=n.include.map(E)),n.watchOptions){const{watchOptions:o}=n;o.excludeDirectories&&(o.excludeDirectories=o.excludeDirectories.map(s=>E(p$1.resolve(l,s))));}return n},"_parseTsconfig"),se=u((e,t=new Map)=>le(p$1.resolve(e),t),"parseTsconfig"),_e=u((e=process.cwd(),t="tsconfig.json",i=new Map)=>{const n=K(E(e),t,i);if(!n)return null;const l=se(n,i);return {path:n,config:l}},"getTsconfig"),Ee=/\*/g,oe=u((e,t)=>{const i=e.match(Ee);if(i&&i.length>1)throw new Error(t)},"assertStarCount"),Le=u(e=>{if(e.includes("*")){const[t,i]=e.split("*");return {prefix:t,suffix:i}}return e},"parsePattern"),Ue=u(({prefix:e,suffix:t},i)=>i.startsWith(e)&&i.endsWith(t),"isPatternMatch"),ye=u((e,t,i)=>Object.entries(e).map(([n,l])=>(oe(n,`Pattern '${n}' can have at most one '*' character.`),{pattern:Le(n),substitutions:l.map(o=>{if(oe(o,`Substitution '${o}' in pattern '${n}' can have at most one '*' character.`),!t&&!J.test(o))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return p$1.resolve(i,o)})})),"parsePaths");u(e=>{const{compilerOptions:t}=e.config;if(!t)return null;const{baseUrl:i,paths:n}=t;if(!i&&!n)return null;const l=G in t&&t[G],o=p$1.resolve(p$1.dirname(e.path),i||l||"."),s=n?ye(n,i,o):[];return c=>{if(J.test(c))return [];const f=[];for(const O of s){if(O.pattern===c)return O.substitutions.map(E);typeof O.pattern!="string"&&f.push(O);}let w,A=-1;for(const O of f)Ue(O.pattern,c)&&O.pattern.prefix.length>A&&(A=O.pattern.prefix.length,w=O);if(!w)return i?[E(p$1.join(o,c))]:[];const k=c.slice(w.pattern.prefix.length,c.length-w.pattern.suffix.length);return w.substitutions.map(O=>E(O.replace("*",k)))}},"createPathsMatcher");const re=u(e=>{let t="";for(let i=0;i<e.length;i+=1){const n=e[i],l=n.toUpperCase();t+=n===l?n.toLowerCase():l;}return t},"s"),Ne=65,xe=97,Ie=u(()=>Math.floor(Math.random()*26),"m"),Pe=u(e=>Array.from({length:e},()=>String.fromCodePoint(Ie()+(Math.random()>.5?Ne:xe))).join(""),"S"),De=u((e=require$$0)=>{const t=process.execPath;if(e.existsSync(t))return !e.existsSync(re(t));const i=`/${Pe(10)}`;e.writeFileSync(i,"");const n=!e.existsSync(re(i));return e.unlinkSync(i),n},"l"),{join:V}=p$1.posix,X={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Ve=u(e=>{const t=[...X.ts],i=[...X.cts],n=[...X.mts];return e!=null&&e.allowJs&&(t.push(".js",".jsx"),i.push(".cjs"),n.push(".mjs")),[...t,...i,...n]},"getSupportedExtensions"),Se=u(e=>{const t=[];if(!e)return t;const{outDir:i,declarationDir:n}=e;return i&&t.push(i),n&&t.push(n),t},"getDefaultExcludeSpec"),ue=u(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,"\\$&"),"escapeForRegexp"),de=["node_modules","bower_components","jspm_packages"],Y=`(?!(${de.join("|")})(/|$))`,We=/(?:^|\/)[^.*?]+$/,fe="**/*",S="[^/]",Z="[^./]",ce=process.platform==="win32";u(({config:e,path:t},i=De())=>{if("extends"in e)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!p$1.isAbsolute(t))throw new Error("The tsconfig path must be absolute");ce&&(t=E(t));const n=p$1.dirname(t),{files:l,include:o,exclude:s,compilerOptions:c}=e,f=l==null?void 0:l.map(b=>V(n,b)),w=Ve(c),A=i?"":"i",O=(s||Se(c)).map(b=>{const B=V(n,b),U=ue(B).replaceAll("\\*\\*/","(.+/)?").replaceAll("\\*",`${S}*`).replaceAll("\\?",S);return new RegExp(`^${U}($|/)`,A)}),T=l||o?o:[fe],v=T?T.map(b=>{let B=V(n,b);We.test(B)&&(B=V(B,fe));const U=ue(B).replaceAll("/\\*\\*",`(/${Y}${Z}${S}*)*?`).replaceAll(/(\/)?\\\*/g,(y,r)=>{const g=`(${Z}|(\\.(?!min\\.js$))?)*`;return r?`/${Y}${Z}${g}`:g}).replaceAll(/(\/)?\\\?/g,(y,r)=>{const g=S;return r?`/${Y}${g}`:g});return new RegExp(`^${U}$`,A)}):void 0;return b=>{if(!p$1.isAbsolute(b))throw new Error("filePath must be absolute");if(ce&&(b=E(b)),f!=null&&f.includes(b))return e;if(!(!w.some(B=>b.endsWith(B))||O.some(B=>B.test(b)))&&v&&v.some(B=>B.test(b)))return e}},"createFilesMatcher");
175
-
176
- const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
177
- const newLineRegExp = /\r?\n/;
178
- const errCodeRegExp = /error TS(?<errCode>\d+)/;
179
- async function makeTscErrorInfo(errInfo) {
180
- const [errFilePathPos = "", ...errMsgRawArr] = errInfo.split(":");
181
- if (!errFilePathPos || errMsgRawArr.length === 0 || errMsgRawArr.join("").length === 0) {
182
- return ["unknown filepath", null];
183
- }
184
- const errMsgRaw = errMsgRawArr.join("").trim();
185
- const [errFilePath, errPos] = errFilePathPos.slice(0, -1).split("(");
186
- if (!errFilePath || !errPos) {
187
- return ["unknown filepath", null];
188
- }
189
- const [errLine, errCol] = errPos.split(",");
190
- if (!errLine || !errCol) {
191
- return [errFilePath, null];
192
- }
193
- const execArr = errCodeRegExp.exec(errMsgRaw);
194
- if (!execArr) {
195
- return [errFilePath, null];
196
- }
197
- const errCodeStr = execArr.groups?.errCode ?? "";
198
- if (!errCodeStr) {
199
- return [errFilePath, null];
200
- }
201
- const line = Number(errLine);
202
- const col = Number(errCol);
203
- const errCode = Number(errCodeStr);
204
- return [
205
- errFilePath,
206
- {
207
- filePath: errFilePath,
208
- errCode,
209
- line,
210
- column: col,
211
- errMsg: errMsgRaw.slice(`error TS${errCode} `.length)
212
- }
213
- ];
214
- }
215
- async function getTsconfig(root, config) {
216
- const configName = config.tsconfig ? basename(config.tsconfig) : void 0;
217
- const configSearchPath = config.tsconfig ? dirname(resolve(root, config.tsconfig)) : root;
218
- const tsconfig = _e(configSearchPath, configName);
219
- if (!tsconfig) {
220
- throw new Error("no tsconfig.json found");
221
- }
222
- const tempConfigPath = join(
223
- dirname(tsconfig.path),
224
- "tsconfig.vitest-temp.json"
225
- );
226
- try {
227
- const tmpTsConfig = { ...tsconfig.config };
228
- tmpTsConfig.compilerOptions = tmpTsConfig.compilerOptions || {};
229
- tmpTsConfig.compilerOptions.emitDeclarationOnly = false;
230
- tmpTsConfig.compilerOptions.incremental = true;
231
- tmpTsConfig.compilerOptions.tsBuildInfoFile = join(
232
- process.versions.pnp ? join(nodeos__default.tmpdir(), "vitest") : __dirname,
233
- "tsconfig.tmp.tsbuildinfo"
234
- );
235
- const tsconfigFinalContent = JSON.stringify(tmpTsConfig, null, 2);
236
- await writeFile(tempConfigPath, tsconfigFinalContent);
237
- return { path: tempConfigPath, config: tmpTsConfig };
238
- } catch (err) {
239
- throw new Error("failed to write tsconfig.temp.json", { cause: err });
240
- }
241
- }
242
- async function getRawErrsMapFromTsCompile(tscErrorStdout) {
243
- const rawErrsMap = /* @__PURE__ */ new Map();
244
- const infos = await Promise.all(
245
- tscErrorStdout.split(newLineRegExp).reduce((prev, next) => {
246
- if (!next) {
247
- return prev;
248
- } else if (!next.startsWith(" ")) {
249
- prev.push(next);
250
- } else {
251
- prev[prev.length - 1] += `
252
- ${next}`;
253
- }
254
- return prev;
255
- }, []).map((errInfoLine) => makeTscErrorInfo(errInfoLine))
256
- );
257
- infos.forEach(([errFilePath, errInfo]) => {
258
- if (!errInfo) {
259
- return;
260
- }
261
- if (!rawErrsMap.has(errFilePath)) {
262
- rawErrsMap.set(errFilePath, [errInfo]);
263
- } else {
264
- rawErrsMap.get(errFilePath)?.push(errInfo);
265
- }
266
- });
267
- return rawErrsMap;
268
- }
269
-
270
- function createIndexMap(source) {
271
- const map = /* @__PURE__ */ new Map();
272
- let index = 0;
273
- let line = 1;
274
- let column = 1;
275
- for (const char of source) {
276
- map.set(`${line}:${column}`, index++);
277
- if (char === "\n" || char === "\r\n") {
278
- line++;
279
- column = 0;
280
- } else {
281
- column++;
282
- }
283
- }
284
- return map;
285
- }
286
-
287
- // AST walker module for ESTree compatible trees
288
-
289
-
290
- // An ancestor walk keeps an array of ancestor nodes (including the
291
- // current node) and passes them to the callback as third parameter
292
- // (and also as state parameter when no other state is present).
293
- function ancestor(node, visitors, baseVisitor, state, override) {
294
- var ancestors = [];
295
- if (!baseVisitor) { baseVisitor = base
296
- ; }(function c(node, st, override) {
297
- var type = override || node.type;
298
- var isNew = node !== ancestors[ancestors.length - 1];
299
- if (isNew) { ancestors.push(node); }
300
- baseVisitor[type](node, st, c);
301
- if (visitors[type]) { visitors[type](node, st || ancestors, ancestors); }
302
- if (isNew) { ancestors.pop(); }
303
- })(node, state, override);
304
- }
305
-
306
- function makeTest(test) {
307
- if (typeof test === "string")
308
- { return function (type) { return type === test; } }
309
- else if (!test)
310
- { return function () { return true; } }
311
- else
312
- { return test }
313
- }
314
-
315
- var Found = function Found(node, state) { this.node = node; this.state = state; };
316
-
317
- // Find the innermost node of a given type that contains the given
318
- // position. Interface similar to findNodeAt.
319
- function findNodeAround(node, pos, test, baseVisitor, state) {
320
- test = makeTest(test);
321
- if (!baseVisitor) { baseVisitor = base; }
322
- try {
323
- (function c(node, st, override) {
324
- var type = override || node.type;
325
- if (node.start > pos || node.end < pos) { return }
326
- baseVisitor[type](node, st, c);
327
- if (test(type, node)) { throw new Found(node, st) }
328
- })(node, state);
329
- } catch (e) {
330
- if (e instanceof Found) { return e }
331
- throw e
332
- }
333
- }
334
-
335
- function skipThrough(node, st, c) { c(node, st); }
336
- function ignore(_node, _st, _c) {}
337
-
338
- // Node walkers.
339
-
340
- var base = {};
341
-
342
- base.Program = base.BlockStatement = base.StaticBlock = function (node, st, c) {
343
- for (var i = 0, list = node.body; i < list.length; i += 1)
344
- {
345
- var stmt = list[i];
346
-
347
- c(stmt, st, "Statement");
348
- }
349
- };
350
- base.Statement = skipThrough;
351
- base.EmptyStatement = ignore;
352
- base.ExpressionStatement = base.ParenthesizedExpression = base.ChainExpression =
353
- function (node, st, c) { return c(node.expression, st, "Expression"); };
354
- base.IfStatement = function (node, st, c) {
355
- c(node.test, st, "Expression");
356
- c(node.consequent, st, "Statement");
357
- if (node.alternate) { c(node.alternate, st, "Statement"); }
358
- };
359
- base.LabeledStatement = function (node, st, c) { return c(node.body, st, "Statement"); };
360
- base.BreakStatement = base.ContinueStatement = ignore;
361
- base.WithStatement = function (node, st, c) {
362
- c(node.object, st, "Expression");
363
- c(node.body, st, "Statement");
364
- };
365
- base.SwitchStatement = function (node, st, c) {
366
- c(node.discriminant, st, "Expression");
367
- for (var i$1 = 0, list$1 = node.cases; i$1 < list$1.length; i$1 += 1) {
368
- var cs = list$1[i$1];
369
-
370
- if (cs.test) { c(cs.test, st, "Expression"); }
371
- for (var i = 0, list = cs.consequent; i < list.length; i += 1)
372
- {
373
- var cons = list[i];
374
-
375
- c(cons, st, "Statement");
376
- }
377
- }
378
- };
379
- base.SwitchCase = function (node, st, c) {
380
- if (node.test) { c(node.test, st, "Expression"); }
381
- for (var i = 0, list = node.consequent; i < list.length; i += 1)
382
- {
383
- var cons = list[i];
384
-
385
- c(cons, st, "Statement");
386
- }
387
- };
388
- base.ReturnStatement = base.YieldExpression = base.AwaitExpression = function (node, st, c) {
389
- if (node.argument) { c(node.argument, st, "Expression"); }
390
- };
391
- base.ThrowStatement = base.SpreadElement =
392
- function (node, st, c) { return c(node.argument, st, "Expression"); };
393
- base.TryStatement = function (node, st, c) {
394
- c(node.block, st, "Statement");
395
- if (node.handler) { c(node.handler, st); }
396
- if (node.finalizer) { c(node.finalizer, st, "Statement"); }
397
- };
398
- base.CatchClause = function (node, st, c) {
399
- if (node.param) { c(node.param, st, "Pattern"); }
400
- c(node.body, st, "Statement");
401
- };
402
- base.WhileStatement = base.DoWhileStatement = function (node, st, c) {
403
- c(node.test, st, "Expression");
404
- c(node.body, st, "Statement");
405
- };
406
- base.ForStatement = function (node, st, c) {
407
- if (node.init) { c(node.init, st, "ForInit"); }
408
- if (node.test) { c(node.test, st, "Expression"); }
409
- if (node.update) { c(node.update, st, "Expression"); }
410
- c(node.body, st, "Statement");
411
- };
412
- base.ForInStatement = base.ForOfStatement = function (node, st, c) {
413
- c(node.left, st, "ForInit");
414
- c(node.right, st, "Expression");
415
- c(node.body, st, "Statement");
416
- };
417
- base.ForInit = function (node, st, c) {
418
- if (node.type === "VariableDeclaration") { c(node, st); }
419
- else { c(node, st, "Expression"); }
420
- };
421
- base.DebuggerStatement = ignore;
422
-
423
- base.FunctionDeclaration = function (node, st, c) { return c(node, st, "Function"); };
424
- base.VariableDeclaration = function (node, st, c) {
425
- for (var i = 0, list = node.declarations; i < list.length; i += 1)
426
- {
427
- var decl = list[i];
428
-
429
- c(decl, st);
430
- }
431
- };
432
- base.VariableDeclarator = function (node, st, c) {
433
- c(node.id, st, "Pattern");
434
- if (node.init) { c(node.init, st, "Expression"); }
435
- };
436
-
437
- base.Function = function (node, st, c) {
438
- if (node.id) { c(node.id, st, "Pattern"); }
439
- for (var i = 0, list = node.params; i < list.length; i += 1)
440
- {
441
- var param = list[i];
442
-
443
- c(param, st, "Pattern");
444
- }
445
- c(node.body, st, node.expression ? "Expression" : "Statement");
446
- };
447
-
448
- base.Pattern = function (node, st, c) {
449
- if (node.type === "Identifier")
450
- { c(node, st, "VariablePattern"); }
451
- else if (node.type === "MemberExpression")
452
- { c(node, st, "MemberPattern"); }
453
- else
454
- { c(node, st); }
455
- };
456
- base.VariablePattern = ignore;
457
- base.MemberPattern = skipThrough;
458
- base.RestElement = function (node, st, c) { return c(node.argument, st, "Pattern"); };
459
- base.ArrayPattern = function (node, st, c) {
460
- for (var i = 0, list = node.elements; i < list.length; i += 1) {
461
- var elt = list[i];
462
-
463
- if (elt) { c(elt, st, "Pattern"); }
464
- }
465
- };
466
- base.ObjectPattern = function (node, st, c) {
467
- for (var i = 0, list = node.properties; i < list.length; i += 1) {
468
- var prop = list[i];
469
-
470
- if (prop.type === "Property") {
471
- if (prop.computed) { c(prop.key, st, "Expression"); }
472
- c(prop.value, st, "Pattern");
473
- } else if (prop.type === "RestElement") {
474
- c(prop.argument, st, "Pattern");
475
- }
476
- }
477
- };
478
-
479
- base.Expression = skipThrough;
480
- base.ThisExpression = base.Super = base.MetaProperty = ignore;
481
- base.ArrayExpression = function (node, st, c) {
482
- for (var i = 0, list = node.elements; i < list.length; i += 1) {
483
- var elt = list[i];
484
-
485
- if (elt) { c(elt, st, "Expression"); }
486
- }
487
- };
488
- base.ObjectExpression = function (node, st, c) {
489
- for (var i = 0, list = node.properties; i < list.length; i += 1)
490
- {
491
- var prop = list[i];
492
-
493
- c(prop, st);
494
- }
495
- };
496
- base.FunctionExpression = base.ArrowFunctionExpression = base.FunctionDeclaration;
497
- base.SequenceExpression = function (node, st, c) {
498
- for (var i = 0, list = node.expressions; i < list.length; i += 1)
499
- {
500
- var expr = list[i];
501
-
502
- c(expr, st, "Expression");
503
- }
504
- };
505
- base.TemplateLiteral = function (node, st, c) {
506
- for (var i = 0, list = node.quasis; i < list.length; i += 1)
507
- {
508
- var quasi = list[i];
509
-
510
- c(quasi, st);
511
- }
512
-
513
- for (var i$1 = 0, list$1 = node.expressions; i$1 < list$1.length; i$1 += 1)
514
- {
515
- var expr = list$1[i$1];
516
-
517
- c(expr, st, "Expression");
518
- }
519
- };
520
- base.TemplateElement = ignore;
521
- base.UnaryExpression = base.UpdateExpression = function (node, st, c) {
522
- c(node.argument, st, "Expression");
523
- };
524
- base.BinaryExpression = base.LogicalExpression = function (node, st, c) {
525
- c(node.left, st, "Expression");
526
- c(node.right, st, "Expression");
527
- };
528
- base.AssignmentExpression = base.AssignmentPattern = function (node, st, c) {
529
- c(node.left, st, "Pattern");
530
- c(node.right, st, "Expression");
531
- };
532
- base.ConditionalExpression = function (node, st, c) {
533
- c(node.test, st, "Expression");
534
- c(node.consequent, st, "Expression");
535
- c(node.alternate, st, "Expression");
536
- };
537
- base.NewExpression = base.CallExpression = function (node, st, c) {
538
- c(node.callee, st, "Expression");
539
- if (node.arguments)
540
- { for (var i = 0, list = node.arguments; i < list.length; i += 1)
541
- {
542
- var arg = list[i];
543
-
544
- c(arg, st, "Expression");
545
- } }
546
- };
547
- base.MemberExpression = function (node, st, c) {
548
- c(node.object, st, "Expression");
549
- if (node.computed) { c(node.property, st, "Expression"); }
550
- };
551
- base.ExportNamedDeclaration = base.ExportDefaultDeclaration = function (node, st, c) {
552
- if (node.declaration)
553
- { c(node.declaration, st, node.type === "ExportNamedDeclaration" || node.declaration.id ? "Statement" : "Expression"); }
554
- if (node.source) { c(node.source, st, "Expression"); }
555
- };
556
- base.ExportAllDeclaration = function (node, st, c) {
557
- if (node.exported)
558
- { c(node.exported, st); }
559
- c(node.source, st, "Expression");
560
- };
561
- base.ImportDeclaration = function (node, st, c) {
562
- for (var i = 0, list = node.specifiers; i < list.length; i += 1)
563
- {
564
- var spec = list[i];
565
-
566
- c(spec, st);
567
- }
568
- c(node.source, st, "Expression");
569
- };
570
- base.ImportExpression = function (node, st, c) {
571
- c(node.source, st, "Expression");
572
- };
573
- base.ImportSpecifier = base.ImportDefaultSpecifier = base.ImportNamespaceSpecifier = base.Identifier = base.PrivateIdentifier = base.Literal = ignore;
574
-
575
- base.TaggedTemplateExpression = function (node, st, c) {
576
- c(node.tag, st, "Expression");
577
- c(node.quasi, st, "Expression");
578
- };
579
- base.ClassDeclaration = base.ClassExpression = function (node, st, c) { return c(node, st, "Class"); };
580
- base.Class = function (node, st, c) {
581
- if (node.id) { c(node.id, st, "Pattern"); }
582
- if (node.superClass) { c(node.superClass, st, "Expression"); }
583
- c(node.body, st);
584
- };
585
- base.ClassBody = function (node, st, c) {
586
- for (var i = 0, list = node.body; i < list.length; i += 1)
587
- {
588
- var elt = list[i];
589
-
590
- c(elt, st);
591
- }
592
- };
593
- base.MethodDefinition = base.PropertyDefinition = base.Property = function (node, st, c) {
594
- if (node.computed) { c(node.key, st, "Expression"); }
595
- if (node.value) { c(node.value, st, "Expression"); }
596
- };
597
-
598
- async function collectTests(ctx, filepath) {
599
- const request = await ctx.vitenode.transformRequest(filepath, filepath);
600
- if (!request) {
601
- return null;
602
- }
603
- const ast = await parseAstAsync(request.code);
604
- const testFilepath = relative(ctx.config.root, filepath);
605
- const file = {
606
- filepath,
607
- type: "suite",
608
- id: generateHash(`${testFilepath}${ctx.config.name || ""}`),
609
- name: testFilepath,
610
- mode: "run",
611
- tasks: [],
612
- start: ast.start,
613
- end: ast.end,
614
- projectName: ctx.getName(),
615
- meta: { typecheck: true },
616
- file: null
617
- };
618
- file.file = file;
619
- const definitions = [];
620
- const getName = (callee) => {
621
- if (!callee) {
622
- return null;
623
- }
624
- if (callee.type === "Identifier") {
625
- return callee.name;
626
- }
627
- if (callee.type === "MemberExpression") {
628
- if (callee.object?.name?.startsWith("__vite_ssr_")) {
629
- return getName(callee.property);
630
- }
631
- return getName(callee.object?.property);
632
- }
633
- return null;
634
- };
635
- ancestor(ast, {
636
- CallExpression(node) {
637
- const { callee } = node;
638
- const name = getName(callee);
639
- if (!name) {
640
- return;
641
- }
642
- if (!["it", "test", "describe", "suite"].includes(name)) {
643
- return;
644
- }
645
- const {
646
- arguments: [{ value: message }]
647
- } = node;
648
- const property = callee?.property?.name;
649
- let mode = !property || property === name ? "run" : property;
650
- if (!["run", "skip", "todo", "only", "skipIf", "runIf"].includes(mode)) {
651
- throw new Error(
652
- `${name}.${mode} syntax is not supported when testing types`
653
- );
654
- }
655
- if (mode === "skipIf" || mode === "runIf") {
656
- mode = "skip";
657
- }
658
- definitions.push({
659
- start: node.start,
660
- end: node.end,
661
- name: message,
662
- type: name === "it" || name === "test" ? "test" : "suite",
663
- mode
664
- });
665
- }
666
- });
667
- let lastSuite = file;
668
- const updateLatestSuite = (index) => {
669
- while (lastSuite.suite && lastSuite.end < index) {
670
- lastSuite = lastSuite.suite;
671
- }
672
- return lastSuite;
673
- };
674
- definitions.sort((a, b) => a.start - b.start).forEach((definition) => {
675
- const latestSuite = updateLatestSuite(definition.start);
676
- let mode = definition.mode;
677
- if (latestSuite.mode !== "run") {
678
- mode = latestSuite.mode;
679
- }
680
- if (definition.type === "suite") {
681
- const task2 = {
682
- type: definition.type,
683
- id: "",
684
- suite: latestSuite,
685
- file,
686
- tasks: [],
687
- mode,
688
- name: definition.name,
689
- end: definition.end,
690
- start: definition.start,
691
- meta: {
692
- typecheck: true
693
- }
694
- };
695
- definition.task = task2;
696
- latestSuite.tasks.push(task2);
697
- lastSuite = task2;
698
- return;
699
- }
700
- const task = {
701
- type: definition.type,
702
- id: "",
703
- suite: latestSuite,
704
- file,
705
- mode,
706
- context: {},
707
- // not used in typecheck
708
- name: definition.name,
709
- end: definition.end,
710
- start: definition.start,
711
- meta: {
712
- typecheck: true
713
- }
714
- };
715
- definition.task = task;
716
- latestSuite.tasks.push(task);
717
- });
718
- calculateSuiteHash(file);
719
- const hasOnly = someTasksAreOnly(file);
720
- interpretTaskModes(
721
- file,
722
- ctx.config.testNamePattern,
723
- hasOnly,
724
- false,
725
- ctx.config.allowOnly
726
- );
727
- return {
728
- file,
729
- parsed: request.code,
730
- filepath,
731
- map: request.map,
732
- definitions
733
- };
734
- }
735
-
736
- class TypeCheckError extends Error {
737
- constructor(message, stacks) {
738
- super(message);
739
- this.message = message;
740
- this.stacks = stacks;
741
- }
742
- name = "TypeCheckError";
743
- }
744
- class Typechecker {
745
- constructor(ctx) {
746
- this.ctx = ctx;
747
- }
748
- _onParseStart;
749
- _onParseEnd;
750
- _onWatcherRerun;
751
- _result = {
752
- files: [],
753
- sourceErrors: [],
754
- time: 0
755
- };
756
- _startTime = 0;
757
- _output = "";
758
- _tests = {};
759
- tempConfigPath;
760
- allowJs;
761
- process;
762
- files = [];
763
- setFiles(files) {
764
- this.files = files;
765
- }
766
- onParseStart(fn) {
767
- this._onParseStart = fn;
768
- }
769
- onParseEnd(fn) {
770
- this._onParseEnd = fn;
771
- }
772
- onWatcherRerun(fn) {
773
- this._onWatcherRerun = fn;
774
- }
775
- async collectFileTests(filepath) {
776
- return collectTests(this.ctx, filepath);
777
- }
778
- getFiles() {
779
- return this.files.filter((filename) => {
780
- const extension = extname(filename);
781
- return extension !== ".js" || this.allowJs;
782
- });
783
- }
784
- async collectTests() {
785
- const tests = (await Promise.all(
786
- this.getFiles().map((filepath) => this.collectFileTests(filepath))
787
- )).reduce((acc, data) => {
788
- if (!data) {
789
- return acc;
790
- }
791
- acc[data.filepath] = data;
792
- return acc;
793
- }, {});
794
- this._tests = tests;
795
- return tests;
796
- }
797
- markPassed(file) {
798
- if (!file.result?.state) {
799
- file.result = {
800
- state: "pass"
801
- };
802
- }
803
- const markTasks = (tasks) => {
804
- for (const task of tasks) {
805
- if ("tasks" in task) {
806
- markTasks(task.tasks);
807
- }
808
- if (!task.result?.state && task.mode === "run") {
809
- task.result = {
810
- state: "pass"
811
- };
812
- }
813
- }
814
- };
815
- markTasks(file.tasks);
816
- }
817
- async prepareResults(output) {
818
- const typeErrors = await this.parseTscLikeOutput(output);
819
- const testFiles = new Set(this.getFiles());
820
- if (!this._tests) {
821
- this._tests = await this.collectTests();
822
- }
823
- const sourceErrors = [];
824
- const files = [];
825
- testFiles.forEach((path) => {
826
- const { file, definitions, map, parsed } = this._tests[path];
827
- const errors = typeErrors.get(path);
828
- files.push(file);
829
- if (!errors) {
830
- this.markPassed(file);
831
- return;
832
- }
833
- const sortedDefinitions = [
834
- ...definitions.sort((a, b) => b.start - a.start)
835
- ];
836
- const traceMap = map && new TraceMap(map);
837
- const indexMap = createIndexMap(parsed);
838
- const markState = (task, state) => {
839
- task.result = {
840
- state: task.mode === "run" || task.mode === "only" ? state : task.mode
841
- };
842
- if (task.suite) {
843
- markState(task.suite, state);
844
- } else if (task.file && task !== task.file) {
845
- markState(task.file, state);
846
- }
847
- };
848
- errors.forEach(({ error, originalError }) => {
849
- const processedPos = traceMap ? generatedPositionFor(traceMap, {
850
- line: originalError.line,
851
- column: originalError.column,
852
- source: basename(path)
853
- }) : originalError;
854
- const line = processedPos.line ?? originalError.line;
855
- const column = processedPos.column ?? originalError.column;
856
- const index = indexMap.get(`${line}:${column}`);
857
- const definition = index != null && sortedDefinitions.find(
858
- (def) => def.start <= index && def.end >= index
859
- );
860
- const suite = definition ? definition.task : file;
861
- const state = suite.mode === "run" || suite.mode === "only" ? "fail" : suite.mode;
862
- const errors2 = suite.result?.errors || [];
863
- suite.result = {
864
- state,
865
- errors: errors2
866
- };
867
- errors2.push(error);
868
- if (state === "fail") {
869
- if (suite.suite) {
870
- markState(suite.suite, "fail");
871
- } else if (suite.file && suite !== suite.file) {
872
- markState(suite.file, "fail");
873
- }
874
- }
875
- });
876
- this.markPassed(file);
877
- });
878
- typeErrors.forEach((errors, path) => {
879
- if (!testFiles.has(path)) {
880
- sourceErrors.push(...errors.map(({ error }) => error));
881
- }
882
- });
883
- return {
884
- files,
885
- sourceErrors,
886
- time: performance.now() - this._startTime
887
- };
888
- }
889
- async parseTscLikeOutput(output) {
890
- const errorsMap = await getRawErrsMapFromTsCompile(output);
891
- const typesErrors = /* @__PURE__ */ new Map();
892
- errorsMap.forEach((errors, path) => {
893
- const filepath = resolve(this.ctx.config.root, path);
894
- const suiteErrors = errors.map((info) => {
895
- const limit = Error.stackTraceLimit;
896
- Error.stackTraceLimit = 0;
897
- const errMsg = info.errMsg.replace(
898
- /\r?\n\s*(Type .* has no call signatures)/g,
899
- " $1"
900
- );
901
- const error = new TypeCheckError(errMsg, [
902
- {
903
- file: filepath,
904
- line: info.line,
905
- column: info.column,
906
- method: ""
907
- }
908
- ]);
909
- Error.stackTraceLimit = limit;
910
- return {
911
- originalError: info,
912
- error: {
913
- name: error.name,
914
- nameStr: String(error.name),
915
- message: errMsg,
916
- stacks: error.stacks,
917
- stack: "",
918
- stackStr: ""
919
- }
920
- };
921
- });
922
- typesErrors.set(filepath, suiteErrors);
923
- });
924
- return typesErrors;
925
- }
926
- async clear() {
927
- if (this.tempConfigPath) {
928
- await rm(this.tempConfigPath, { force: true });
929
- }
930
- }
931
- async stop() {
932
- await this.clear();
933
- this.process?.kill();
934
- this.process = void 0;
935
- }
936
- async ensurePackageInstalled(ctx, checker) {
937
- if (checker !== "tsc" && checker !== "vue-tsc") {
938
- return;
939
- }
940
- const packageName = checker === "tsc" ? "typescript" : "vue-tsc";
941
- await ctx.packageInstaller.ensureInstalled(packageName, ctx.config.root);
942
- }
943
- async prepare() {
944
- const { root, typecheck } = this.ctx.config;
945
- const { config, path } = await getTsconfig(root, typecheck);
946
- this.tempConfigPath = path;
947
- this.allowJs = typecheck.allowJs || config.allowJs || false;
948
- }
949
- getExitCode() {
950
- return this.process?.exitCode != null && this.process.exitCode;
951
- }
952
- getOutput() {
953
- return this._output;
954
- }
955
- async start() {
956
- if (this.process) {
957
- return;
958
- }
959
- if (!this.tempConfigPath) {
960
- throw new Error("tsconfig was not initialized");
961
- }
962
- const { root, watch, typecheck } = this.ctx.config;
963
- const args = ["--noEmit", "--pretty", "false", "-p", this.tempConfigPath];
964
- if (watch) {
965
- args.push("--watch");
966
- }
967
- if (typecheck.allowJs) {
968
- args.push("--allowJs", "--checkJs");
969
- }
970
- this._output = "";
971
- this._startTime = performance.now();
972
- const child = execa(typecheck.checker, args, {
973
- cwd: root,
974
- stdout: "pipe",
975
- reject: false
976
- });
977
- this.process = child;
978
- await this._onParseStart?.();
979
- let rerunTriggered = false;
980
- child.stdout?.on("data", (chunk) => {
981
- this._output += chunk;
982
- if (!watch) {
983
- return;
984
- }
985
- if (this._output.includes("File change detected") && !rerunTriggered) {
986
- this._onWatcherRerun?.();
987
- this._startTime = performance.now();
988
- this._result.sourceErrors = [];
989
- this._result.files = [];
990
- this._tests = null;
991
- rerunTriggered = true;
992
- }
993
- if (/Found \w+ errors*. Watching for/.test(this._output)) {
994
- rerunTriggered = false;
995
- this.prepareResults(this._output).then((result) => {
996
- this._result = result;
997
- this._onParseEnd?.(result);
998
- });
999
- this._output = "";
1000
- }
1001
- });
1002
- if (!watch) {
1003
- await child;
1004
- this._result = await this.prepareResults(this._output);
1005
- await this._onParseEnd?.(this._result);
1006
- }
1007
- }
1008
- getResult() {
1009
- return this._result;
1010
- }
1011
- getTestFiles() {
1012
- return Object.values(this._tests || {}).map((i) => i.file);
1013
- }
1014
- getTestPacks() {
1015
- return Object.values(this._tests || {}).map(({ file }) => getTasks(file)).flat().map((i) => [i.id, i.result, { typecheck: true }]);
1016
- }
1017
- }
1018
-
1019
134
  const BADGE_PADDING = " ";
1020
135
  const HELP_HINT = `${c.dim("press ")}${c.bold("h")}${c.dim(" to show help")}`;
1021
136
  const HELP_UPDATE_SNAP = c.dim("press ") + c.bold(c.yellow("u")) + c.dim(" to update snapshot");
@@ -2843,17 +1958,17 @@ class JsonReporter {
2843
1958
  const numTotalTestSuites = suites.length;
2844
1959
  const tests = getTests(files);
2845
1960
  const numTotalTests = tests.length;
2846
- const numFailedTestSuites = suites.filter((s) => s.result?.errors).length;
2847
- const numPassedTestSuites = numTotalTestSuites - numFailedTestSuites;
1961
+ const numFailedTestSuites = suites.filter((s) => s.result?.state === "fail").length;
2848
1962
  const numPendingTestSuites = suites.filter(
2849
- (s) => s.result?.state === "run"
1963
+ (s) => s.result?.state === "run" || s.mode === "todo"
2850
1964
  ).length;
1965
+ const numPassedTestSuites = numTotalTestSuites - numFailedTestSuites - numPendingTestSuites;
2851
1966
  const numFailedTests = tests.filter(
2852
1967
  (t) => t.result?.state === "fail"
2853
1968
  ).length;
2854
- const numPassedTests = numTotalTests - numFailedTests;
1969
+ const numPassedTests = tests.filter((t) => t.result?.state === "pass").length;
2855
1970
  const numPendingTests = tests.filter(
2856
- (t) => t.result?.state === "run"
1971
+ (t) => t.result?.state === "run" || t.mode === "skip" || t.result?.state === "skip"
2857
1972
  ).length;
2858
1973
  const numTodoTests = tests.filter((t) => t.mode === "todo").length;
2859
1974
  const testResults = [];
@@ -3404,11 +2519,11 @@ if (!processOk(process$1)) {
3404
2519
  return function () {}
3405
2520
  };
3406
2521
  } else {
3407
- var assert = require$$0$2;
2522
+ var assert = require$$0$1;
3408
2523
  var signals = requireSignals();
3409
2524
  var isWin = /^win/i.test(process$1.platform);
3410
2525
 
3411
- var EE = require$$0$1;
2526
+ var EE = require$$0;
3412
2527
  /* istanbul ignore if */
3413
2528
  if (typeof EE !== 'function') {
3414
2529
  EE = EE.EventEmitter;
@@ -4310,61 +3425,6 @@ function highlightCode(id, source, colors) {
4310
3425
  return highlight(source, { jsx: isJsx, colors: c });
4311
3426
  }
4312
3427
 
4313
- class BaseSequencer {
4314
- ctx;
4315
- constructor(ctx) {
4316
- this.ctx = ctx;
4317
- }
4318
- // async so it can be extended by other sequelizers
4319
- async shard(files) {
4320
- const { config } = this.ctx;
4321
- const { index, count } = config.shard;
4322
- const shardSize = Math.ceil(files.length / count);
4323
- const shardStart = shardSize * (index - 1);
4324
- const shardEnd = shardSize * index;
4325
- return [...files].map((spec) => {
4326
- const fullPath = resolve(slash(config.root), slash(spec[1]));
4327
- const specPath = fullPath?.slice(config.root.length);
4328
- return {
4329
- spec,
4330
- hash: createHash("sha1").update(specPath).digest("hex")
4331
- };
4332
- }).sort((a, b) => a.hash < b.hash ? -1 : a.hash > b.hash ? 1 : 0).slice(shardStart, shardEnd).map(({ spec }) => spec);
4333
- }
4334
- // async so it can be extended by other sequelizers
4335
- async sort(files) {
4336
- const cache = this.ctx.cache;
4337
- return [...files].sort((a, b) => {
4338
- const keyA = `${a[0].getName()}:${relative(this.ctx.config.root, a[1])}`;
4339
- const keyB = `${b[0].getName()}:${relative(this.ctx.config.root, b[1])}`;
4340
- const aState = cache.getFileTestResults(keyA);
4341
- const bState = cache.getFileTestResults(keyB);
4342
- if (!aState || !bState) {
4343
- const statsA = cache.getFileStats(keyA);
4344
- const statsB = cache.getFileStats(keyB);
4345
- if (!statsA || !statsB) {
4346
- return !statsA && statsB ? -1 : !statsB && statsA ? 1 : 0;
4347
- }
4348
- return statsB.size - statsA.size;
4349
- }
4350
- if (aState.failed && !bState.failed) {
4351
- return -1;
4352
- }
4353
- if (!aState.failed && bState.failed) {
4354
- return 1;
4355
- }
4356
- return bState.duration - aState.duration;
4357
- });
4358
- }
4359
- }
4360
-
4361
- class RandomSequencer extends BaseSequencer {
4362
- async sort(files) {
4363
- const { sequence } = this.ctx.config;
4364
- return shuffle(files, sequence.seed);
4365
- }
4366
- }
4367
-
4368
3428
  const ESC = "\x1B[";
4369
3429
  const ERASE_DOWN = `${ESC}J`;
4370
3430
  const ERASE_SCROLLBACK = `${ESC}3J`;
@@ -6151,4 +5211,4 @@ const ReportersMap = {
6151
5211
  "github-actions": GithubActionsReporter
6152
5212
  };
6153
5213
 
6154
- export { BasicReporter as B, DefaultReporter as D, GithubActionsReporter as G, HangingProcessReporter as H, JsonReporter as J, Logger as L, ReportersMap as R, TapReporter as T, VerboseReporter as V, DotReporter as a, JUnitReporter as b, TapFlatReporter as c, TestCase as d, TestFile as e, TestSuite as f, BenchmarkReportsMap as g, BaseSequencer as h, TestProject as i, Typechecker as j, RandomSequencer as k, findNodeAround as l, generateCodeFrame as m, highlightCode as n, BlobReporter as o, parse as p, readBlobs as r, stringify as s, wrapSerializableConfig as w };
5214
+ export { BasicReporter as B, DefaultReporter as D, GithubActionsReporter as G, HangingProcessReporter as H, JsonReporter as J, Logger as L, ReportersMap as R, TapReporter as T, VerboseReporter as V, DotReporter as a, JUnitReporter as b, TapFlatReporter as c, TestCase as d, TestFile as e, TestSuite as f, BenchmarkReportsMap as g, TestProject as h, generateCodeFrame as i, highlightCode as j, BlobReporter as k, parse as p, readBlobs as r, stringify as s };