vitest 3.0.0 → 3.0.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.
- package/dist/browser.js +1 -1
- package/dist/chunks/{base.CUDzyU2J.js → base.gZAre3Yy.js} +3 -3
- package/dist/chunks/{cac.DZC9WjGM.js → cac.Davy6Tyx.js} +22 -22
- package/dist/chunks/{cli-api.CmJw5Cd_.js → cli-api.DO-hp2Kx.js} +164 -131
- package/dist/chunks/{console.CN7AiMGV.js → console.BxE0RUCr.js} +3 -3
- package/dist/chunks/{creator.DztqrnyH.js → creator.B8v1wNyQ.js} +3 -3
- package/dist/chunks/{execute.BMOaRArH.js → execute.4vt3NSmG.js} +3 -4
- package/dist/chunks/{globals.C5RQxaV3.js → globals.BSNBk3vE.js} +2 -2
- package/dist/chunks/{index.BQbxGbG9.js → index.Bf4FgyZN.js} +1 -1
- package/dist/chunks/{index.BJDntFik.js → index.Bh7wTRhh.js} +8 -8
- package/dist/chunks/{index.CUcwvygK.js → index.C2XSkjNu.js} +2 -2
- package/dist/chunks/{index.D9C26wCk.js → index.DfqWks-F.js} +1 -1
- package/dist/chunks/{index.TKSL1HjN.js → index.DyQPL4DO.js} +15 -15
- package/dist/chunks/{index.68735LiX.js → index.TH3f4LSA.js} +2 -2
- package/dist/chunks/{index.K90BXFOx.js → index.cYxyd29h.js} +12 -12
- package/dist/chunks/{inspector.DKLceBVD.js → inspector.CU9GlB9I.js} +1 -1
- package/dist/chunks/{resolveConfig.CSLLD33d.js → resolveConfig.DATSOo7x.js} +14 -14
- package/dist/chunks/{rpc.TVf73xOu.js → rpc.Bf456uf4.js} +1 -1
- package/dist/chunks/{runBaseTests.C0T_TQwH.js → runBaseTests.Ba8jtu6O.js} +8 -8
- package/dist/chunks/{setup-common.D0zLenuv.js → setup-common.jLbIuaww.js} +1 -1
- package/dist/chunks/{typechecker.BJMkWMXo.js → typechecker.ChNaIV36.js} +9 -9
- package/dist/chunks/{vi.Da_PT3Vw.js → vi.CjhMlMwf.js} +6 -6
- package/dist/chunks/{vm.DrFVeTXo.js → vm.CUw7ChSp.js} +5 -5
- package/dist/cli.js +1 -1
- package/dist/config.cjs +1 -1
- package/dist/config.js +1 -1
- package/dist/coverage.js +9 -9
- package/dist/environments.js +1 -1
- package/dist/execute.js +1 -1
- package/dist/index.js +2 -2
- package/dist/node.js +9 -9
- package/dist/reporters.js +2 -2
- package/dist/runners.js +4 -4
- package/dist/worker.js +5 -5
- package/dist/workers/forks.js +2 -2
- package/dist/workers/runVmTests.js +7 -7
- package/dist/workers/threads.js +2 -2
- package/dist/workers/vmForks.js +3 -3
- package/dist/workers/vmThreads.js +3 -3
- package/dist/workers.js +8 -8
- package/package.json +15 -15
|
@@ -46,7 +46,7 @@ function convertTasksToEvents(file, onTask) {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
const isNode = typeof process < "u" && typeof process.stdout < "u" && !process.versions?.deno && !globalThis.window;
|
|
49
|
-
const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !==
|
|
49
|
+
const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !== undefined;
|
|
50
50
|
const isWindows = (isNode || isDeno) && process.platform === "win32";
|
|
51
51
|
const isTTY = (isNode || isDeno) && process.stdout?.isTTY && !isCI;
|
|
52
52
|
|
|
@@ -498,7 +498,7 @@ async function collectTests(ctx, filepath) {
|
|
|
498
498
|
interpretTaskModes(
|
|
499
499
|
file,
|
|
500
500
|
ctx.config.testNamePattern,
|
|
501
|
-
|
|
501
|
+
undefined,
|
|
502
502
|
hasOnly,
|
|
503
503
|
false,
|
|
504
504
|
ctx.config.allowOnly
|
|
@@ -512,15 +512,15 @@ async function collectTests(ctx, filepath) {
|
|
|
512
512
|
};
|
|
513
513
|
}
|
|
514
514
|
|
|
515
|
-
const A=r=>r!==null&&typeof r=="object",a=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),_="ERR_INVALID_PACKAGE_CONFIG",E="ERR_INVALID_PACKAGE_TARGET",I$1="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,`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,`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===
|
|
515
|
+
const A=r=>r!==null&&typeof r=="object",a=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),_="ERR_INVALID_PACKAGE_CONFIG",E="ERR_INVALID_PACKAGE_TARGET",I$1="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,`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,`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===undefined&&t.startsWith(n)&&t.endsWith(i)){const g=t.slice(n.length,-i.length||undefined);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===undefined||t===o)return o;throw a(_,'"exports" cannot contain some keys starting with "." and some not')},undefined),u=/^\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$1,t==="."?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(const i of n)if(!i.startsWith("./")&&!u.test(i))throw a(E,`Invalid "exports" target "${i}" defined in the package config`);return n};
|
|
516
516
|
|
|
517
|
-
var ve=Object.defineProperty;var l=(e,t)=>ve(e,"name",{value:t,configurable
|
|
518
|
-
`;break;case 114:c+="\r";break;case 116:c+=" ";break;case 117:const j=O(4
|
|
519
|
-
`),f++,p=n,r=14;switch(c){case 123:return n++,r=1;case 125:return n++,r=2;case 91:return n++,r=3;case 93:return n++,r=4;case 58:return n++,r=6;case 44:return n++,r=5;case 34:return n++,o=b(),r=10;case 47:const m=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<i&&!h(e.charCodeAt(n));)n++;return o=e.substring(m,n),r=12}if(e.charCodeAt(n+1)===42){n+=2;const g=i-1;let y
|
|
517
|
+
var ve=Object.defineProperty;var l=(e,t)=>ve(e,"name",{value:t,configurable:true});function B(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}l(B,"slash");const R=l(e=>{const t=fs[e];return (i,...n)=>{const o=`${e}:${n.join(":")}`;let s=i==null?undefined:i.get(o);return s===undefined&&(s=Reflect.apply(t,fs,n),i==null||i.set(o,s)),s}},"cacheFs"),F=R("existsSync"),je=R("readFileSync"),P=R("statSync"),ne=l((e,t,i)=>{for(;;){const n=a$1.posix.join(e,t);if(F(i,n))return n;const o=a$1.dirname(e);if(o===e)return;e=o;}},"findUp"),J=/^\.{1,2}(\/.*)?$/,M=l(e=>{const t=B(e);return J.test(t)?t:`./${t}`},"normalizeRelativePath");function _e(e,t=false){const i=e.length;let n=0,o="",s=0,r=16,f=0,u=0,p=0,T=0,w=0;function O(c,m){let g=0,y=0;for(;g<c||!m;){let j=e.charCodeAt(n);if(j>=48&&j<=57)y=y*16+j-48;else if(j>=65&&j<=70)y=y*16+j-65+10;else if(j>=97&&j<=102)y=y*16+j-97+10;else break;n++,g++;}return g<c&&(y=-1),y}l(O,"scanHexDigits");function v(c){n=c,o="",s=0,r=16,w=0;}l(v,"setPosition");function A(){let c=n;if(e.charCodeAt(n)===48)n++;else for(n++;n<e.length&&N(e.charCodeAt(n));)n++;if(n<e.length&&e.charCodeAt(n)===46)if(n++,n<e.length&&N(e.charCodeAt(n)))for(n++;n<e.length&&N(e.charCodeAt(n));)n++;else return w=3,e.substring(c,n);let m=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&&N(e.charCodeAt(n))){for(n++;n<e.length&&N(e.charCodeAt(n));)n++;m=n;}else w=3;return e.substring(c,m)}l(A,"scanNumber");function b(){let c="",m=n;for(;;){if(n>=i){c+=e.substring(m,n),w=2;break}const g=e.charCodeAt(n);if(g===34){c+=e.substring(m,n),n++;break}if(g===92){if(c+=e.substring(m,n),n++,n>=i){w=2;break}switch(e.charCodeAt(n++)){case 34:c+='"';break;case 92:c+="\\";break;case 47:c+="/";break;case 98:c+="\b";break;case 102:c+="\f";break;case 110:c+=`
|
|
518
|
+
`;break;case 114:c+="\r";break;case 116:c+=" ";break;case 117:const j=O(4,true);j>=0?c+=String.fromCharCode(j):w=4;break;default:w=5;}m=n;continue}if(g>=0&&g<=31)if(h(g)){c+=e.substring(m,n),w=2;break}else w=6;n++;}return c}l(b,"scanString");function $(){if(o="",w=0,s=n,u=f,T=p,n>=i)return s=i,r=17;let c=e.charCodeAt(n);if(G(c)){do n++,o+=String.fromCharCode(c),c=e.charCodeAt(n);while(G(c));return r=15}if(h(c))return n++,o+=String.fromCharCode(c),c===13&&e.charCodeAt(n)===10&&(n++,o+=`
|
|
519
|
+
`),f++,p=n,r=14;switch(c){case 123:return n++,r=1;case 125:return n++,r=2;case 91:return n++,r=3;case 93:return n++,r=4;case 58:return n++,r=6;case 44:return n++,r=5;case 34:return n++,o=b(),r=10;case 47:const m=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<i&&!h(e.charCodeAt(n));)n++;return o=e.substring(m,n),r=12}if(e.charCodeAt(n+1)===42){n+=2;const g=i-1;let y=false;for(;n<g;){const j=e.charCodeAt(n);if(j===42&&e.charCodeAt(n+1)===47){n+=2,y=true;break}n++,h(j)&&(j===13&&e.charCodeAt(n)===10&&n++,f++,p=n);}return y||(n++,w=1),o=e.substring(m,n),r=13}return o+=String.fromCharCode(c),n++,r=16;case 45:if(o+=String.fromCharCode(c),n++,n===i||!N(e.charCodeAt(n)))return r=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return o+=A(),r=11;default:for(;n<i&&U(c);)n++,c=e.charCodeAt(n);if(s!==n){switch(o=e.substring(s,n),o){case "true":return r=8;case "false":return r=9;case "null":return r=7}return r=16}return o+=String.fromCharCode(c),n++,r=16}}l($,"scanNext");function U(c){if(G(c)||h(c))return false;switch(c){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return false}return true}l(U,"isUnknownContentCharacter");function E(){let c;do c=$();while(c>=12&&c<=15);return c}return l(E,"scanNextNonTrivia"),{setPosition:v,getPosition:l(()=>n,"getPosition"),scan:t?E:$,getToken:l(()=>r,"getToken"),getTokenValue:l(()=>o,"getTokenValue"),getTokenOffset:l(()=>s,"getTokenOffset"),getTokenLength:l(()=>n-s,"getTokenLength"),getTokenStartLine:l(()=>u,"getTokenStartLine"),getTokenStartCharacter:l(()=>s-T,"getTokenStartCharacter"),getTokenError:l(()=>w,"getTokenError")}}l(_e,"createScanner");function G(e){return e===32||e===9}l(G,"isWhiteSpace");function h(e){return e===10||e===13}l(h,"isLineBreak");function N(e){return e>=48&&e<=57}l(N,"isDigit");var te;((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";}))(te||(te={})),new Array(20).fill(0).map((e,t)=>" ".repeat(t));const D=200;new Array(D).fill(0).map((e,t)=>`
|
|
520
520
|
`+" ".repeat(t)),new Array(D).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(D).fill(0).map((e,t)=>`\r
|
|
521
521
|
`+" ".repeat(t)),new Array(D).fill(0).map((e,t)=>`
|
|
522
522
|
`+" ".repeat(t)),new Array(D).fill(0).map((e,t)=>"\r"+" ".repeat(t)),new Array(D).fill(0).map((e,t)=>`\r
|
|
523
|
-
`+" ".repeat(t));var x;(function(e){e.DEFAULT={allowTrailingComma:!1};})(x||(x={}));function $e(e,t=[],i=x.DEFAULT){let n=null,o=[];const s=[];function r(u){Array.isArray(o)?o.push(u):n!==null&&(o[n]=u);}return l(r,"onValue"),ye(e,{onObjectBegin:l(()=>{const u={};r(u),s.push(o),o=u,n=null;},"onObjectBegin"),onObjectProperty:l(u=>{n=u;},"onObjectProperty"),onObjectEnd:l(()=>{o=s.pop();},"onObjectEnd"),onArrayBegin:l(()=>{const u=[];r(u),s.push(o),o=u,n=null;},"onArrayBegin"),onArrayEnd:l(()=>{o=s.pop();},"onArrayEnd"),onLiteralValue:r,onError:l((u,p,T)=>{t.push({error:u,offset:p,length:T});},"onError")},i),o[0]}l($e,"parse$1");function ye(e,t,i=x.DEFAULT){const n=_e(e,!1),o=[];function s(k){return k?()=>k(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}l(s,"toNoArgVisit");function r(k){return k?()=>k(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice()):()=>!0}l(r,"toNoArgVisitWithPath");function f(k){return k?_=>k(_,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}l(f,"toOneArgVisit");function u(k){return k?_=>k(_,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice()):()=>!0}l(u,"toOneArgVisitWithPath");const p=r(t.onObjectBegin),T=u(t.onObjectProperty),w=s(t.onObjectEnd),O=r(t.onArrayBegin),v=s(t.onArrayEnd),A=u(t.onLiteralValue),b=f(t.onSeparator),$=s(t.onComment),U=f(t.onError),E=i&&i.disallowComments,c=i&&i.allowTrailingComma;function m(){for(;;){const k=n.scan();switch(n.getTokenError()){case 4:g(14);break;case 5:g(15);break;case 3:g(13);break;case 1:E||g(11);break;case 2:g(12);break;case 6:g(16);break}switch(k){case 12:case 13:E?g(10):$();break;case 16:g(1);break;case 15:case 14:break;default:return k}}}l(m,"scanNext");function g(k,_=[],C=[]){if(U(k),_.length+C.length>0){let d=n.getToken();for(;d!==17;){if(_.indexOf(d)!==-1){m();break}else if(C.indexOf(d)!==-1)break;d=m();}}}l(g,"handleError");function y(k){const _=n.getTokenValue();return k?A(_):(T(_),o.push(_)),m(),!0}l(y,"parseString");function j(){switch(n.getToken()){case 11:const k=n.getTokenValue();let _=Number(k);isNaN(_)&&(g(2),_=0),A(_);break;case 7:A(null);break;case 8:A(!0);break;case 9:A(!1);break;default:return !1}return m(),!0}l(j,"parseLiteral");function ke(){return n.getToken()!==10?(g(3,[],[2,5]),!1):(y(!1),n.getToken()===6?(b(":"),m(),V()||g(4,[],[2,5])):g(5,[],[2,5]),o.pop(),!0)}l(ke,"parseProperty");function be(){p(),m();let k=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(k||g(4,[],[]),b(","),m(),n.getToken()===2&&c)break}else k&&g(6,[],[]);ke()||g(4,[],[2,5]),k=!0;}return w(),n.getToken()!==2?g(7,[2],[]):m(),!0}l(be,"parseObject");function we(){O(),m();let k=!0,_=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(_||g(4,[],[]),b(","),m(),n.getToken()===4&&c)break}else _&&g(6,[],[]);k?(o.push(0),k=!1):o[o.length-1]++,V()||g(4,[],[4,5]),_=!0;}return v(),k||o.pop(),n.getToken()!==4?g(8,[4],[]):m(),!0}l(we,"parseArray");function V(){switch(n.getToken()){case 3:return we();case 1:return be();case 10:return y(!0);default:return j()}}return l(V,"parseValue"),m(),n.getToken()===17?i.allowEmptyContent?!0:(g(4,[],[]),!1):V()?(n.getToken()!==17&&g(9,[],[]),!0):(g(4,[],[]),!1)}l(ye,"visit");var ie;(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";})(ie||(ie={}));var oe;(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";})(oe||(oe={}));const Be=$e;var se;(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";})(se||(se={}));const le=l((e,t)=>Be(je(t,e,"utf8")),"readJsonc"),z=Symbol("implicitBaseUrl"),L="${configDir}",Fe=l(()=>{const{findPnpApi:e}=Te;return e&&e(process.cwd())},"getPnpApi"),Q=l((e,t,i,n)=>{const o=`resolveFromPackageJsonPath:${e}:${t}:${i}`;if(n!=null&&n.has(o))return n.get(o);const s=le(e,n);if(!s)return;let r=t||"tsconfig.json";if(!i&&s.exports)try{const[f]=v(s.exports,t,["require","types"]);r=f;}catch{return !1}else !t&&s.tsconfig&&(r=s.tsconfig);return r=a$1.join(e,"..",r),n==null||n.set(o,r),r},"resolveFromPackageJsonPath"),H="package.json",X="tsconfig.json",Le=l((e,t,i)=>{let n=e;if(e===".."&&(n=a$1.join(n,X)),e[0]==="."&&(n=a$1.resolve(t,n)),a$1.isAbsolute(n)){if(F(i,n)){if(P(i,n).isFile())return n}else if(!n.endsWith(".json")){const v=`${n}.json`;if(F(i,v))return v}return}const[o,...s]=e.split("/"),r=o[0]==="@"?`${o}/${s.shift()}`:o,f=s.join("/"),u=Fe();if(u){const{resolveRequest:v}=u;try{if(r===e){const A=v(a$1.join(r,H),t);if(A){const b=Q(A,f,!1,i);if(b&&F(i,b))return b}}else {let A;try{A=v(e,t,{extensions:[".json"]});}catch{A=v(a$1.join(e,X),t);}if(A)return A}}catch{}}const p=ne(a$1.resolve(t),a$1.join("node_modules",r),i);if(!p||!P(i,p).isDirectory())return;const T=a$1.join(p,H);if(F(i,T)){const v=Q(T,f,!1,i);if(v===!1)return;if(v&&F(i,v)&&P(i,v).isFile())return v}const w=a$1.join(p,f),O=w.endsWith(".json");if(!O){const v=`${w}.json`;if(F(i,v))return v}if(F(i,w)){if(P(i,w).isDirectory()){const v=a$1.join(w,H);if(F(i,v)){const b=Q(v,"",!0,i);if(b&&F(i,b))return b}const A=a$1.join(w,X);if(F(i,A))return A}else if(O)return w}},"resolveExtendsPath"),Y=l((e,t)=>M(a$1.relative(e,t)),"pathRelative"),re=["files","include","exclude"],Ue=l((e,t,i,n)=>{const o=Le(e,t,n);if(!o)throw new Error(`File '${e}' not found.`);if(i.has(o))throw new Error(`Circularity detected while resolving configuration: ${o}`);i.add(o);const s=a$1.dirname(o),r=ue(o,n,i);delete r.references;const{compilerOptions:f}=r;if(f){const{baseUrl:u}=f;u&&!u.startsWith(L)&&(f.baseUrl=B(a$1.relative(t,a$1.join(s,u)))||"./");let{outDir:p}=f;p&&(p.startsWith(L)||(p=a$1.relative(t,a$1.join(s,p))),f.outDir=B(p)||"./");}for(const u of re){const p=r[u];p&&(r[u]=p.map(T=>T.startsWith(L)?T:B(a$1.relative(t,a$1.join(s,T)))));}return r},"resolveExtends"),Ee=["outDir","declarationDir"],ue=l((e,t,i=new Set)=>{let n;try{n=le(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 o=a$1.dirname(e);if(n.compilerOptions){const{compilerOptions:s}=n;s.paths&&!s.baseUrl&&(s[z]=o);}if(n.extends){const s=Array.isArray(n.extends)?n.extends:[n.extends];delete n.extends;for(const r of s.reverse()){const f=Ue(r,o,new Set(i),t),u={...f,...n,compilerOptions:{...f.compilerOptions,...n.compilerOptions}};f.watchOptions&&(u.watchOptions={...f.watchOptions,...n.watchOptions}),n=u;}}if(n.compilerOptions){const{compilerOptions:s}=n,r=["baseUrl","rootDir"];for(const f of r){const u=s[f];if(u&&!u.startsWith(L)){const p=a$1.resolve(o,u),T=Y(o,p);s[f]=T;}}for(const f of Ee){let u=s[f];u&&(Array.isArray(n.exclude)||(n.exclude=[]),n.exclude.includes(u)||n.exclude.push(u),u.startsWith(L)||(u=M(u)),s[f]=u);}}else n.compilerOptions={};if(n.include?(n.include=n.include.map(B),n.files&&delete n.files):n.files&&(n.files=n.files.map(s=>s.startsWith(L)?s:M(s))),n.watchOptions){const{watchOptions:s}=n;s.excludeDirectories&&(s.excludeDirectories=s.excludeDirectories.map(r=>B(a$1.resolve(o,r))));}return n},"_parseTsconfig"),I=l((e,t)=>{if(e.startsWith(L))return B(a$1.join(t,e.slice(L.length)))},"interpolateConfigDir"),Ne=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],fe=l((e,t=new Map)=>{const i=a$1.resolve(e),n=ue(i,t),o=a$1.dirname(i),{compilerOptions:s}=n;if(s){for(const f of Ne){const u=s[f];if(u){const p=I(u,o);s[f]=p?Y(o,p):u;}}for(const f of ["rootDirs","typeRoots"]){const u=s[f];u&&(s[f]=u.map(p=>{const T=I(p,o);return T?Y(o,T):p}));}const{paths:r}=s;if(r)for(const f of Object.keys(r))r[f]=r[f].map(u=>{var p;return (p=I(u,o))!=null?p:u});}for(const r of re){const f=n[r];f&&(n[r]=f.map(u=>{var p;return (p=I(u,o))!=null?p:u}));}return n},"parseTsconfig"),De=l((e=process.cwd(),t="tsconfig.json",i=new Map)=>{const n=ne(B(e),t,i);if(!n)return null;const o=fe(n,i);return {path:n,config:o}},"getTsconfig"),he=/\*/g,ce=l((e,t)=>{const i=e.match(he);if(i&&i.length>1)throw new Error(t)},"assertStarCount"),de=l(e=>{if(e.includes("*")){const[t,i]=e.split("*");return {prefix:t,suffix:i}}return e},"parsePattern"),Pe=l(({prefix:e,suffix:t},i)=>i.startsWith(e)&&i.endsWith(t),"isPatternMatch"),xe=l((e,t,i)=>Object.entries(e).map(([n,o])=>(ce(n,`Pattern '${n}' can have at most one '*' character.`),{pattern:de(n),substitutions:o.map(s=>{if(ce(s,`Substitution '${s}' in pattern '${n}' can have at most one '*' character.`),!t&&!J.test(s))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return a$1.resolve(i,s)})})),"parsePaths");l(e=>{const{compilerOptions:t}=e.config;if(!t)return null;const{baseUrl:i,paths:n}=t;if(!i&&!n)return null;const o=z in t&&t[z],s=a$1.resolve(a$1.dirname(e.path),i||o||"."),r=n?xe(n,i,s):[];return f=>{if(J.test(f))return [];const u=[];for(const O of r){if(O.pattern===f)return O.substitutions.map(B);typeof O.pattern!="string"&&u.push(O);}let p,T=-1;for(const O of u)Pe(O.pattern,f)&&O.pattern.prefix.length>T&&(T=O.pattern.prefix.length,p=O);if(!p)return i?[B(a$1.join(s,f))]:[];const w=f.slice(p.pattern.prefix.length,f.length-p.pattern.suffix.length);return p.substitutions.map(O=>B(O.replace("*",w)))}},"createPathsMatcher");const pe=l(e=>{let t="";for(let i=0;i<e.length;i+=1){const n=e[i],o=n.toUpperCase();t+=n===o?n.toLowerCase():o;}return t},"s"),Se=65,We=97,Ve=l(()=>Math.floor(Math.random()*26),"m"),Re=l(e=>Array.from({length:e},()=>String.fromCodePoint(Ve()+(Math.random()>.5?Se:We))).join(""),"S"),Je=l((e=require$$0)=>{const t=process.execPath;if(e.existsSync(t))return !e.existsSync(pe(t));const i=`/${Re(10)}`;e.writeFileSync(i,"");const n=!e.existsSync(pe(i));return e.unlinkSync(i),n},"l"),{join:S}=a$1.posix,Z={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Me=l(e=>{const t=[...Z.ts],i=[...Z.cts],n=[...Z.mts];return e!=null&&e.allowJs&&(t.push(".js",".jsx"),i.push(".cjs"),n.push(".mjs")),[...t,...i,...n]},"getSupportedExtensions"),Ge=l(e=>{const t=[];if(!e)return t;const{outDir:i,declarationDir:n}=e;return i&&t.push(i),n&&t.push(n),t},"getDefaultExcludeSpec"),ae=l(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),ze=["node_modules","bower_components","jspm_packages"],q=`(?!(${ze.join("|")})(/|$))`,Qe=/(?:^|\/)[^.*?]+$/,ge="**/*",W="[^/]",K="[^./]",me=process.platform==="win32";l(({config:e,path:t},i=Je())=>{if("extends"in e)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!a$1.isAbsolute(t))throw new Error("The tsconfig path must be absolute");me&&(t=B(t));const n=a$1.dirname(t),{files:o,include:s,exclude:r,compilerOptions:f}=e,u=o==null?void 0:o.map(b=>S(n,b)),p=Me(f),T=i?"":"i",O=(r||Ge(f)).map(b=>{const $=S(n,b),U=ae($).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${W}*`).replaceAll(String.raw`\?`,W);return new RegExp(`^${U}($|/)`,T)}),v=o||s?s:[ge],A=v?v.map(b=>{let $=S(n,b);Qe.test($)&&($=S($,ge));const U=ae($).replaceAll(String.raw`/\*\*`,`(/${q}${K}${W}*)*?`).replaceAll(/(\/)?\\\*/g,(E,c)=>{const m=`(${K}|(\\.(?!min\\.js$))?)*`;return c?`/${q}${K}${m}`:m}).replaceAll(/(\/)?\\\?/g,(E,c)=>{const m=W;return c?`/${q}${m}`:m});return new RegExp(`^${U}$`,T)}):void 0;return b=>{if(!a$1.isAbsolute(b))throw new Error("filePath must be absolute");if(me&&(b=B(b)),u!=null&&u.includes(b))return e;if(!(!p.some($=>b.endsWith($))||O.some($=>$.test(b)))&&A&&A.some($=>$.test(b)))return e}},"createFilesMatcher");
|
|
523
|
+
`+" ".repeat(t));var x;(function(e){e.DEFAULT={allowTrailingComma:false};})(x||(x={}));function $e(e,t=[],i=x.DEFAULT){let n=null,o=[];const s=[];function r(u){Array.isArray(o)?o.push(u):n!==null&&(o[n]=u);}return l(r,"onValue"),ye(e,{onObjectBegin:l(()=>{const u={};r(u),s.push(o),o=u,n=null;},"onObjectBegin"),onObjectProperty:l(u=>{n=u;},"onObjectProperty"),onObjectEnd:l(()=>{o=s.pop();},"onObjectEnd"),onArrayBegin:l(()=>{const u=[];r(u),s.push(o),o=u,n=null;},"onArrayBegin"),onArrayEnd:l(()=>{o=s.pop();},"onArrayEnd"),onLiteralValue:r,onError:l((u,p,T)=>{t.push({error:u,offset:p,length:T});},"onError")},i),o[0]}l($e,"parse$1");function ye(e,t,i=x.DEFAULT){const n=_e(e,false),o=[];function s(k){return k?()=>k(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>true}l(s,"toNoArgVisit");function r(k){return k?()=>k(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice()):()=>true}l(r,"toNoArgVisitWithPath");function f(k){return k?_=>k(_,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>true}l(f,"toOneArgVisit");function u(k){return k?_=>k(_,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>o.slice()):()=>true}l(u,"toOneArgVisitWithPath");const p=r(t.onObjectBegin),T=u(t.onObjectProperty),w=s(t.onObjectEnd),O=r(t.onArrayBegin),v=s(t.onArrayEnd),A=u(t.onLiteralValue),b=f(t.onSeparator),$=s(t.onComment),U=f(t.onError),E=i&&i.disallowComments,c=i&&i.allowTrailingComma;function m(){for(;;){const k=n.scan();switch(n.getTokenError()){case 4:g(14);break;case 5:g(15);break;case 3:g(13);break;case 1:E||g(11);break;case 2:g(12);break;case 6:g(16);break}switch(k){case 12:case 13:E?g(10):$();break;case 16:g(1);break;case 15:case 14:break;default:return k}}}l(m,"scanNext");function g(k,_=[],C=[]){if(U(k),_.length+C.length>0){let d=n.getToken();for(;d!==17;){if(_.indexOf(d)!==-1){m();break}else if(C.indexOf(d)!==-1)break;d=m();}}}l(g,"handleError");function y(k){const _=n.getTokenValue();return k?A(_):(T(_),o.push(_)),m(),true}l(y,"parseString");function j(){switch(n.getToken()){case 11:const k=n.getTokenValue();let _=Number(k);isNaN(_)&&(g(2),_=0),A(_);break;case 7:A(null);break;case 8:A(true);break;case 9:A(false);break;default:return false}return m(),true}l(j,"parseLiteral");function ke(){return n.getToken()!==10?(g(3,[],[2,5]),false):(y(false),n.getToken()===6?(b(":"),m(),V()||g(4,[],[2,5])):g(5,[],[2,5]),o.pop(),true)}l(ke,"parseProperty");function be(){p(),m();let k=false;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(k||g(4,[],[]),b(","),m(),n.getToken()===2&&c)break}else k&&g(6,[],[]);ke()||g(4,[],[2,5]),k=true;}return w(),n.getToken()!==2?g(7,[2],[]):m(),true}l(be,"parseObject");function we(){O(),m();let k=true,_=false;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(_||g(4,[],[]),b(","),m(),n.getToken()===4&&c)break}else _&&g(6,[],[]);k?(o.push(0),k=false):o[o.length-1]++,V()||g(4,[],[4,5]),_=true;}return v(),k||o.pop(),n.getToken()!==4?g(8,[4],[]):m(),true}l(we,"parseArray");function V(){switch(n.getToken()){case 3:return we();case 1:return be();case 10:return y(true);default:return j()}}return l(V,"parseValue"),m(),n.getToken()===17?i.allowEmptyContent?true:(g(4,[],[]),false):V()?(n.getToken()!==17&&g(9,[],[]),true):(g(4,[],[]),false)}l(ye,"visit");var ie;(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";})(ie||(ie={}));var oe;(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";})(oe||(oe={}));const Be=$e;var se;(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";})(se||(se={}));const le=l((e,t)=>Be(je(t,e,"utf8")),"readJsonc"),z=Symbol("implicitBaseUrl"),L="${configDir}",Fe=l(()=>{const{findPnpApi:e}=Te;return e&&e(process.cwd())},"getPnpApi"),Q=l((e,t,i,n)=>{const o=`resolveFromPackageJsonPath:${e}:${t}:${i}`;if(n!=null&&n.has(o))return n.get(o);const s=le(e,n);if(!s)return;let r=t||"tsconfig.json";if(!i&&s.exports)try{const[f]=v(s.exports,t,["require","types"]);r=f;}catch{return false}else !t&&s.tsconfig&&(r=s.tsconfig);return r=a$1.join(e,"..",r),n==null||n.set(o,r),r},"resolveFromPackageJsonPath"),H="package.json",X="tsconfig.json",Le=l((e,t,i)=>{let n=e;if(e===".."&&(n=a$1.join(n,X)),e[0]==="."&&(n=a$1.resolve(t,n)),a$1.isAbsolute(n)){if(F(i,n)){if(P(i,n).isFile())return n}else if(!n.endsWith(".json")){const v=`${n}.json`;if(F(i,v))return v}return}const[o,...s]=e.split("/"),r=o[0]==="@"?`${o}/${s.shift()}`:o,f=s.join("/"),u=Fe();if(u){const{resolveRequest:v}=u;try{if(r===e){const A=v(a$1.join(r,H),t);if(A){const b=Q(A,f,!1,i);if(b&&F(i,b))return b}}else {let A;try{A=v(e,t,{extensions:[".json"]});}catch{A=v(a$1.join(e,X),t);}if(A)return A}}catch{}}const p=ne(a$1.resolve(t),a$1.join("node_modules",r),i);if(!p||!P(i,p).isDirectory())return;const T=a$1.join(p,H);if(F(i,T)){const v=Q(T,f,false,i);if(v===false)return;if(v&&F(i,v)&&P(i,v).isFile())return v}const w=a$1.join(p,f),O=w.endsWith(".json");if(!O){const v=`${w}.json`;if(F(i,v))return v}if(F(i,w)){if(P(i,w).isDirectory()){const v=a$1.join(w,H);if(F(i,v)){const b=Q(v,"",true,i);if(b&&F(i,b))return b}const A=a$1.join(w,X);if(F(i,A))return A}else if(O)return w}},"resolveExtendsPath"),Y=l((e,t)=>M(a$1.relative(e,t)),"pathRelative"),re=["files","include","exclude"],Ue=l((e,t,i,n)=>{const o=Le(e,t,n);if(!o)throw new Error(`File '${e}' not found.`);if(i.has(o))throw new Error(`Circularity detected while resolving configuration: ${o}`);i.add(o);const s=a$1.dirname(o),r=ue(o,n,i);delete r.references;const{compilerOptions:f}=r;if(f){const{baseUrl:u}=f;u&&!u.startsWith(L)&&(f.baseUrl=B(a$1.relative(t,a$1.join(s,u)))||"./");let{outDir:p}=f;p&&(p.startsWith(L)||(p=a$1.relative(t,a$1.join(s,p))),f.outDir=B(p)||"./");}for(const u of re){const p=r[u];p&&(r[u]=p.map(T=>T.startsWith(L)?T:B(a$1.relative(t,a$1.join(s,T)))));}return r},"resolveExtends"),Ee=["outDir","declarationDir"],ue=l((e,t,i=new Set)=>{let n;try{n=le(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 o=a$1.dirname(e);if(n.compilerOptions){const{compilerOptions:s}=n;s.paths&&!s.baseUrl&&(s[z]=o);}if(n.extends){const s=Array.isArray(n.extends)?n.extends:[n.extends];delete n.extends;for(const r of s.reverse()){const f=Ue(r,o,new Set(i),t),u={...f,...n,compilerOptions:{...f.compilerOptions,...n.compilerOptions}};f.watchOptions&&(u.watchOptions={...f.watchOptions,...n.watchOptions}),n=u;}}if(n.compilerOptions){const{compilerOptions:s}=n,r=["baseUrl","rootDir"];for(const f of r){const u=s[f];if(u&&!u.startsWith(L)){const p=a$1.resolve(o,u),T=Y(o,p);s[f]=T;}}for(const f of Ee){let u=s[f];u&&(Array.isArray(n.exclude)||(n.exclude=[]),n.exclude.includes(u)||n.exclude.push(u),u.startsWith(L)||(u=M(u)),s[f]=u);}}else n.compilerOptions={};if(n.include?(n.include=n.include.map(B),n.files&&delete n.files):n.files&&(n.files=n.files.map(s=>s.startsWith(L)?s:M(s))),n.watchOptions){const{watchOptions:s}=n;s.excludeDirectories&&(s.excludeDirectories=s.excludeDirectories.map(r=>B(a$1.resolve(o,r))));}return n},"_parseTsconfig"),I=l((e,t)=>{if(e.startsWith(L))return B(a$1.join(t,e.slice(L.length)))},"interpolateConfigDir"),Ne=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],fe=l((e,t=new Map)=>{const i=a$1.resolve(e),n=ue(i,t),o=a$1.dirname(i),{compilerOptions:s}=n;if(s){for(const f of Ne){const u=s[f];if(u){const p=I(u,o);s[f]=p?Y(o,p):u;}}for(const f of ["rootDirs","typeRoots"]){const u=s[f];u&&(s[f]=u.map(p=>{const T=I(p,o);return T?Y(o,T):p}));}const{paths:r}=s;if(r)for(const f of Object.keys(r))r[f]=r[f].map(u=>{var p;return (p=I(u,o))!=null?p:u});}for(const r of re){const f=n[r];f&&(n[r]=f.map(u=>{var p;return (p=I(u,o))!=null?p:u}));}return n},"parseTsconfig"),De=l((e=process.cwd(),t="tsconfig.json",i=new Map)=>{const n=ne(B(e),t,i);if(!n)return null;const o=fe(n,i);return {path:n,config:o}},"getTsconfig"),he=/\*/g,ce=l((e,t)=>{const i=e.match(he);if(i&&i.length>1)throw new Error(t)},"assertStarCount"),de=l(e=>{if(e.includes("*")){const[t,i]=e.split("*");return {prefix:t,suffix:i}}return e},"parsePattern"),Pe=l(({prefix:e,suffix:t},i)=>i.startsWith(e)&&i.endsWith(t),"isPatternMatch"),xe=l((e,t,i)=>Object.entries(e).map(([n,o])=>(ce(n,`Pattern '${n}' can have at most one '*' character.`),{pattern:de(n),substitutions:o.map(s=>{if(ce(s,`Substitution '${s}' in pattern '${n}' can have at most one '*' character.`),!t&&!J.test(s))throw new Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return a$1.resolve(i,s)})})),"parsePaths");l(e=>{const{compilerOptions:t}=e.config;if(!t)return null;const{baseUrl:i,paths:n}=t;if(!i&&!n)return null;const o=z in t&&t[z],s=a$1.resolve(a$1.dirname(e.path),i||o||"."),r=n?xe(n,i,s):[];return f=>{if(J.test(f))return [];const u=[];for(const O of r){if(O.pattern===f)return O.substitutions.map(B);typeof O.pattern!="string"&&u.push(O);}let p,T=-1;for(const O of u)Pe(O.pattern,f)&&O.pattern.prefix.length>T&&(T=O.pattern.prefix.length,p=O);if(!p)return i?[B(a$1.join(s,f))]:[];const w=f.slice(p.pattern.prefix.length,f.length-p.pattern.suffix.length);return p.substitutions.map(O=>B(O.replace("*",w)))}},"createPathsMatcher");const pe=l(e=>{let t="";for(let i=0;i<e.length;i+=1){const n=e[i],o=n.toUpperCase();t+=n===o?n.toLowerCase():o;}return t},"s"),Se=65,We=97,Ve=l(()=>Math.floor(Math.random()*26),"m"),Re=l(e=>Array.from({length:e},()=>String.fromCodePoint(Ve()+(Math.random()>.5?Se:We))).join(""),"S"),Je=l((e=require$$0)=>{const t=process.execPath;if(e.existsSync(t))return !e.existsSync(pe(t));const i=`/${Re(10)}`;e.writeFileSync(i,"");const n=!e.existsSync(pe(i));return e.unlinkSync(i),n},"l"),{join:S}=a$1.posix,Z={ts:[".ts",".tsx",".d.ts"],cts:[".cts",".d.cts"],mts:[".mts",".d.mts"]},Me=l(e=>{const t=[...Z.ts],i=[...Z.cts],n=[...Z.mts];return e!=null&&e.allowJs&&(t.push(".js",".jsx"),i.push(".cjs"),n.push(".mjs")),[...t,...i,...n]},"getSupportedExtensions"),Ge=l(e=>{const t=[];if(!e)return t;const{outDir:i,declarationDir:n}=e;return i&&t.push(i),n&&t.push(n),t},"getDefaultExcludeSpec"),ae=l(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),ze=["node_modules","bower_components","jspm_packages"],q=`(?!(${ze.join("|")})(/|$))`,Qe=/(?:^|\/)[^.*?]+$/,ge="**/*",W="[^/]",K="[^./]",me=process.platform==="win32";l(({config:e,path:t},i=Je())=>{if("extends"in e)throw new Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!a$1.isAbsolute(t))throw new Error("The tsconfig path must be absolute");me&&(t=B(t));const n=a$1.dirname(t),{files:o,include:s,exclude:r,compilerOptions:f}=e,u=o==null?undefined:o.map(b=>S(n,b)),p=Me(f),T=i?"":"i",O=(r||Ge(f)).map(b=>{const $=S(n,b),U=ae($).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${W}*`).replaceAll(String.raw`\?`,W);return new RegExp(`^${U}($|/)`,T)}),v=o||s?s:[ge],A=v?v.map(b=>{let $=S(n,b);Qe.test($)&&($=S($,ge));const U=ae($).replaceAll(String.raw`/\*\*`,`(/${q}${K}${W}*)*?`).replaceAll(/(\/)?\\\*/g,(E,c)=>{const m=`(${K}|(\\.(?!min\\.js$))?)*`;return c?`/${q}${K}${m}`:m}).replaceAll(/(\/)?\\\?/g,(E,c)=>{const m=W;return c?`/${q}${m}`:m});return new RegExp(`^${U}$`,T)}):undefined;return b=>{if(!a$1.isAbsolute(b))throw new Error("filePath must be absolute");if(me&&(b=B(b)),u!=null&&u.includes(b))return e;if(!(!p.some($=>b.endsWith($))||O.some($=>$.test(b)))&&A&&A.some($=>$.test(b)))return e}},"createFilesMatcher");
|
|
524
524
|
|
|
525
525
|
const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
|
|
526
526
|
const newLineRegExp = /\r?\n/;
|
|
@@ -562,7 +562,7 @@ async function makeTscErrorInfo(errInfo) {
|
|
|
562
562
|
];
|
|
563
563
|
}
|
|
564
564
|
async function getTsconfig(root, config) {
|
|
565
|
-
const configName = config.tsconfig ? basename(config.tsconfig) :
|
|
565
|
+
const configName = config.tsconfig ? basename(config.tsconfig) : undefined;
|
|
566
566
|
const configSearchPath = config.tsconfig ? dirname(resolve(root, config.tsconfig)) : root;
|
|
567
567
|
const tsconfig = De(configSearchPath, configName);
|
|
568
568
|
if (!tsconfig) {
|
|
@@ -834,7 +834,7 @@ class Typechecker {
|
|
|
834
834
|
async stop() {
|
|
835
835
|
await this.clear();
|
|
836
836
|
this.process?.kill();
|
|
837
|
-
this.process =
|
|
837
|
+
this.process = undefined;
|
|
838
838
|
}
|
|
839
839
|
async ensurePackageInstalled(ctx, checker) {
|
|
840
840
|
if (checker !== "tsc" && checker !== "vue-tsc") {
|
|
@@ -138,7 +138,7 @@ await ${assertionString}
|
|
|
138
138
|
};
|
|
139
139
|
}
|
|
140
140
|
function copyStackTrace$1(target, source) {
|
|
141
|
-
if (source.stack !==
|
|
141
|
+
if (source.stack !== undefined) {
|
|
142
142
|
target.stack = source.stack.replace(source.message, target.message);
|
|
143
143
|
}
|
|
144
144
|
return target;
|
|
@@ -353,7 +353,7 @@ const SnapshotPlugin = (chai, utils) => {
|
|
|
353
353
|
const test = getTest(key, this);
|
|
354
354
|
if (typeof properties === "string" && typeof message === "undefined") {
|
|
355
355
|
message = properties;
|
|
356
|
-
properties =
|
|
356
|
+
properties = undefined;
|
|
357
357
|
}
|
|
358
358
|
const errorMessage = utils.flag(this, "message");
|
|
359
359
|
getSnapshotClient().assert({
|
|
@@ -419,7 +419,7 @@ const SnapshotPlugin = (chai, utils) => {
|
|
|
419
419
|
if (typeof properties === "string") {
|
|
420
420
|
message = inlineSnapshot;
|
|
421
421
|
inlineSnapshot = properties;
|
|
422
|
-
properties =
|
|
422
|
+
properties = undefined;
|
|
423
423
|
}
|
|
424
424
|
if (inlineSnapshot) {
|
|
425
425
|
inlineSnapshot = stripSnapshotIndentation(inlineSnapshot);
|
|
@@ -3844,7 +3844,7 @@ class FakeTimers {
|
|
|
3844
3844
|
}
|
|
3845
3845
|
|
|
3846
3846
|
function copyStackTrace(target, source) {
|
|
3847
|
-
if (source.stack !==
|
|
3847
|
+
if (source.stack !== undefined) {
|
|
3848
3848
|
target.stack = source.stack.replace(source.message, target.message);
|
|
3849
3849
|
}
|
|
3850
3850
|
return target;
|
|
@@ -4196,7 +4196,7 @@ function createVitest() {
|
|
|
4196
4196
|
}
|
|
4197
4197
|
if (_envBooleans.includes(name)) {
|
|
4198
4198
|
process.env[name] = value ? "1" : "";
|
|
4199
|
-
} else if (value ===
|
|
4199
|
+
} else if (value === undefined) {
|
|
4200
4200
|
delete process.env[name];
|
|
4201
4201
|
} else {
|
|
4202
4202
|
process.env[name] = String(value);
|
|
@@ -4216,7 +4216,7 @@ function createVitest() {
|
|
|
4216
4216
|
},
|
|
4217
4217
|
unstubAllEnvs() {
|
|
4218
4218
|
_stubsEnv.forEach((original, name) => {
|
|
4219
|
-
if (original ===
|
|
4219
|
+
if (original === undefined) {
|
|
4220
4220
|
delete process.env[name];
|
|
4221
4221
|
} else {
|
|
4222
4222
|
process.env[name] = original;
|
|
@@ -2,8 +2,8 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
|
2
2
|
import vm, { isContext } from 'node:vm';
|
|
3
3
|
import { dirname, basename, extname, normalize, join, resolve } from 'pathe';
|
|
4
4
|
import { distDir } from '../path.js';
|
|
5
|
-
import { createCustomConsole } from './console.
|
|
6
|
-
import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.
|
|
5
|
+
import { createCustomConsole } from './console.BxE0RUCr.js';
|
|
6
|
+
import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.4vt3NSmG.js';
|
|
7
7
|
import fs from 'node:fs';
|
|
8
8
|
import { dirname as dirname$1 } from 'node:path';
|
|
9
9
|
import { isNodeBuiltin, isPrimitive, toArray, getCachedData, setCacheData } from 'vite-node/utils';
|
|
@@ -151,7 +151,7 @@ class CommonjsExecutor {
|
|
|
151
151
|
},
|
|
152
152
|
configurable: true
|
|
153
153
|
});
|
|
154
|
-
require.main =
|
|
154
|
+
require.main = undefined;
|
|
155
155
|
require.cache = this.publicRequireCache;
|
|
156
156
|
return require;
|
|
157
157
|
};
|
|
@@ -353,7 +353,7 @@ class EsmExecutor {
|
|
|
353
353
|
const imports = WebAssembly.Module.imports(wasmModule);
|
|
354
354
|
const moduleLookup = {};
|
|
355
355
|
for (const { module } of imports) {
|
|
356
|
-
if (moduleLookup[module] ===
|
|
356
|
+
if (moduleLookup[module] === undefined) {
|
|
357
357
|
moduleLookup[module] = await this.executor.resolveModule(
|
|
358
358
|
module,
|
|
359
359
|
identifier
|
|
@@ -832,7 +832,7 @@ async function runVmTests(method, state) {
|
|
|
832
832
|
entryFile
|
|
833
833
|
);
|
|
834
834
|
const fileSpecs = ctx.files.map(
|
|
835
|
-
(f) => typeof f === "string" ? { filepath: f, testLocations:
|
|
835
|
+
(f) => typeof f === "string" ? { filepath: f, testLocations: undefined } : f
|
|
836
836
|
);
|
|
837
837
|
try {
|
|
838
838
|
await run(
|
package/dist/cli.js
CHANGED
package/dist/config.cjs
CHANGED
|
@@ -13,7 +13,7 @@ const extraInlineDeps = [
|
|
|
13
13
|
];
|
|
14
14
|
|
|
15
15
|
const isNode = typeof process < "u" && typeof process.stdout < "u" && !process.versions?.deno && !globalThis.window;
|
|
16
|
-
const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !==
|
|
16
|
+
const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !== undefined;
|
|
17
17
|
(isNode || isDeno) && process.platform === "win32";
|
|
18
18
|
(isNode || isDeno) && process.stdout?.isTTY && !stdEnv.isCI;
|
|
19
19
|
|
package/dist/config.js
CHANGED
|
@@ -11,7 +11,7 @@ const extraInlineDeps = [
|
|
|
11
11
|
];
|
|
12
12
|
|
|
13
13
|
const isNode = typeof process < "u" && typeof process.stdout < "u" && !process.versions?.deno && !globalThis.window;
|
|
14
|
-
const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !==
|
|
14
|
+
const isDeno = typeof process < "u" && typeof process.stdout < "u" && process.versions?.deno !== undefined;
|
|
15
15
|
(isNode || isDeno) && process.platform === "win32";
|
|
16
16
|
(isNode || isDeno) && process.stdout?.isTTY && !isCI;
|
|
17
17
|
|
package/dist/coverage.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { existsSync, promises, readdirSync, writeFileSync } from 'node:fs';
|
|
2
|
-
import { c as coverageConfigDefaults, r as resolveCoverageReporters, m as mm } from './chunks/resolveConfig.
|
|
2
|
+
import { c as coverageConfigDefaults, r as resolveCoverageReporters, m as mm } from './chunks/resolveConfig.DATSOo7x.js';
|
|
3
3
|
import { resolve, relative } from 'pathe';
|
|
4
4
|
import c from 'tinyrainbow';
|
|
5
5
|
import '@vitest/utils';
|
|
@@ -13,7 +13,7 @@ import 'node:v8';
|
|
|
13
13
|
import 'node:util';
|
|
14
14
|
import './chunks/constants.fzPh7AOq.js';
|
|
15
15
|
import 'node:os';
|
|
16
|
-
import './chunks/typechecker.
|
|
16
|
+
import './chunks/typechecker.ChNaIV36.js';
|
|
17
17
|
import 'std-env';
|
|
18
18
|
import 'node:perf_hooks';
|
|
19
19
|
import '@vitest/utils/source-map';
|
|
@@ -27,7 +27,7 @@ import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
|
27
27
|
import 'util';
|
|
28
28
|
import 'path';
|
|
29
29
|
import 'node:events';
|
|
30
|
-
import './chunks/index.
|
|
30
|
+
import './chunks/index.TH3f4LSA.js';
|
|
31
31
|
import 'tinypool';
|
|
32
32
|
import 'node:worker_threads';
|
|
33
33
|
import './path.js';
|
|
@@ -262,7 +262,7 @@ Update your dependencies and make sure the versions match.`
|
|
|
262
262
|
*/
|
|
263
263
|
checkThresholds(allThresholds) {
|
|
264
264
|
for (const { coverageMap, thresholds, name } of allThresholds) {
|
|
265
|
-
if (thresholds.branches ===
|
|
265
|
+
if (thresholds.branches === undefined && thresholds.functions === undefined && thresholds.lines === undefined && thresholds.statements === undefined) {
|
|
266
266
|
continue;
|
|
267
267
|
}
|
|
268
268
|
const summaries = this.options.thresholds?.perFile ? coverageMap.files().map((file) => ({
|
|
@@ -272,7 +272,7 @@ Update your dependencies and make sure the versions match.`
|
|
|
272
272
|
for (const { summary, file } of summaries) {
|
|
273
273
|
for (const thresholdKey of THRESHOLD_KEYS) {
|
|
274
274
|
const threshold = thresholds[thresholdKey];
|
|
275
|
-
if (threshold ===
|
|
275
|
+
if (threshold === undefined) {
|
|
276
276
|
continue;
|
|
277
277
|
}
|
|
278
278
|
if (threshold >= 0) {
|
|
@@ -414,10 +414,10 @@ function resolveGlobThresholds(thresholds) {
|
|
|
414
414
|
};
|
|
415
415
|
}
|
|
416
416
|
return {
|
|
417
|
-
lines: "lines" in thresholds && typeof thresholds.lines === "number" ? thresholds.lines :
|
|
418
|
-
branches: "branches" in thresholds && typeof thresholds.branches === "number" ? thresholds.branches :
|
|
419
|
-
functions: "functions" in thresholds && typeof thresholds.functions === "number" ? thresholds.functions :
|
|
420
|
-
statements: "statements" in thresholds && typeof thresholds.statements === "number" ? thresholds.statements :
|
|
417
|
+
lines: "lines" in thresholds && typeof thresholds.lines === "number" ? thresholds.lines : undefined,
|
|
418
|
+
branches: "branches" in thresholds && typeof thresholds.branches === "number" ? thresholds.branches : undefined,
|
|
419
|
+
functions: "functions" in thresholds && typeof thresholds.functions === "number" ? thresholds.functions : undefined,
|
|
420
|
+
statements: "statements" in thresholds && typeof thresholds.statements === "number" ? thresholds.statements : undefined
|
|
421
421
|
};
|
|
422
422
|
}
|
|
423
423
|
function assertConfigurationModule(config) {
|
package/dist/environments.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.
|
|
1
|
+
export { e as builtinEnvironments, p as populateGlobal } from './chunks/index.cYxyd29h.js';
|
|
2
2
|
import 'node:console';
|
package/dist/execute.js
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { c as createExpect, a as expect, i as inject, v as vi, b as vitest } from './chunks/vi.
|
|
1
|
+
export { c as createExpect, a as expect, i as inject, v as vi, b as vitest } from './chunks/vi.CjhMlMwf.js';
|
|
2
2
|
export { i as isFirstRun, a as runOnce } from './chunks/run-once.2ogXb3JV.js';
|
|
3
|
-
export { a as assertType, g as getRunningMode, i as isWatchMode } from './chunks/index.
|
|
3
|
+
export { a as assertType, g as getRunningMode, i as isWatchMode } from './chunks/index.Bf4FgyZN.js';
|
|
4
4
|
export { b as bench } from './chunks/benchmark.Cdu9hjj4.js';
|
|
5
5
|
export { expectTypeOf } from 'expect-type';
|
|
6
6
|
export { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
|
package/dist/node.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { resolveConfig as resolveConfig$1, mergeConfig, createServer as createServer$1 } from 'vite';
|
|
2
2
|
export { esbuildVersion, isFileServingAllowed, parseAst, parseAstAsync, rollupVersion, version as viteVersion } from 'vite';
|
|
3
|
-
import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.
|
|
4
|
-
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, e as createViteLogger, c as createVitest, d as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.
|
|
5
|
-
export { p as parseCLI } from './chunks/cac.
|
|
6
|
-
import { a as resolveConfig$2 } from './chunks/resolveConfig.
|
|
7
|
-
export { B as BaseSequencer, d as createMethodsRPC, g as getFilePoolName, b as resolveApiServerConfig } from './chunks/resolveConfig.
|
|
3
|
+
import { V as Vitest, a as VitestPlugin, T as TestModule } from './chunks/cli-api.DO-hp2Kx.js';
|
|
4
|
+
export { G as GitNotFoundError, F as TestsNotFoundError, b as VitestPackageInstaller, e as createViteLogger, c as createVitest, d as registerConsoleShortcuts, r as resolveFsAllow, s as startVitest } from './chunks/cli-api.DO-hp2Kx.js';
|
|
5
|
+
export { p as parseCLI } from './chunks/cac.Davy6Tyx.js';
|
|
6
|
+
import { a as resolveConfig$2 } from './chunks/resolveConfig.DATSOo7x.js';
|
|
7
|
+
export { B as BaseSequencer, d as createMethodsRPC, g as getFilePoolName, b as resolveApiServerConfig } from './chunks/resolveConfig.DATSOo7x.js';
|
|
8
8
|
import { slash } from '@vitest/utils';
|
|
9
|
-
import { f as findUp } from './chunks/index.
|
|
9
|
+
import { f as findUp } from './chunks/index.Bh7wTRhh.js';
|
|
10
10
|
import { resolve } from 'pathe';
|
|
11
11
|
import { c as configFiles } from './chunks/constants.fzPh7AOq.js';
|
|
12
12
|
export { distDir, rootDir } from './path.js';
|
|
@@ -18,14 +18,14 @@ import 'node:path';
|
|
|
18
18
|
import '@vitest/snapshot/manager';
|
|
19
19
|
import 'vite-node/client';
|
|
20
20
|
import 'vite-node/server';
|
|
21
|
-
import './chunks/index.
|
|
22
|
-
import './chunks/index.
|
|
21
|
+
import './chunks/index.TH3f4LSA.js';
|
|
22
|
+
import './chunks/index.DyQPL4DO.js';
|
|
23
23
|
import 'tinyrainbow';
|
|
24
24
|
import './chunks/utils.DJWL04yX.js';
|
|
25
25
|
import 'node:util';
|
|
26
26
|
import 'node:perf_hooks';
|
|
27
27
|
import '@vitest/utils/source-map';
|
|
28
|
-
import './chunks/typechecker.
|
|
28
|
+
import './chunks/typechecker.ChNaIV36.js';
|
|
29
29
|
import 'std-env';
|
|
30
30
|
import 'node:fs/promises';
|
|
31
31
|
import 'tinyexec';
|
package/dist/reporters.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { B as BasicReporter, a as BenchmarkReporter, b as BenchmarkReportsMap, D as DefaultReporter, c as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, d as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, e as TapReporter, V as VerboseBenchmarkReporter, f as VerboseReporter } from './chunks/index.
|
|
1
|
+
export { B as BasicReporter, a as BenchmarkReporter, b as BenchmarkReportsMap, D as DefaultReporter, c as DotReporter, G as GithubActionsReporter, H as HangingProcessReporter, d as JUnitReporter, J as JsonReporter, R as ReportersMap, T as TapFlatReporter, e as TapReporter, V as VerboseBenchmarkReporter, f as VerboseReporter } from './chunks/index.DyQPL4DO.js';
|
|
2
2
|
import 'node:fs';
|
|
3
3
|
import '@vitest/runner/utils';
|
|
4
4
|
import 'pathe';
|
|
@@ -8,7 +8,7 @@ import 'node:util';
|
|
|
8
8
|
import '@vitest/utils';
|
|
9
9
|
import 'node:perf_hooks';
|
|
10
10
|
import '@vitest/utils/source-map';
|
|
11
|
-
import './chunks/typechecker.
|
|
11
|
+
import './chunks/typechecker.ChNaIV36.js';
|
|
12
12
|
import 'std-env';
|
|
13
13
|
import 'node:fs/promises';
|
|
14
14
|
import 'tinyexec';
|
package/dist/runners.js
CHANGED
|
@@ -4,8 +4,8 @@ import { a as getBenchOptions, g as getBenchFn } from './chunks/benchmark.Cdu9hj
|
|
|
4
4
|
import { g as getWorkerState } from './chunks/utils.C8RiOc4B.js';
|
|
5
5
|
import { setState, GLOBAL_EXPECT, getState } from '@vitest/expect';
|
|
6
6
|
import { getTests, getNames, getTestName } from '@vitest/runner/utils';
|
|
7
|
-
import { g as getSnapshotClient, i as inject, c as createExpect, v as vi } from './chunks/vi.
|
|
8
|
-
import { r as rpc } from './chunks/rpc.
|
|
7
|
+
import { g as getSnapshotClient, i as inject, c as createExpect, v as vi } from './chunks/vi.CjhMlMwf.js';
|
|
8
|
+
import { r as rpc } from './chunks/rpc.Bf456uf4.js';
|
|
9
9
|
import 'chai';
|
|
10
10
|
import './chunks/_commonjsHelpers.BFTU3MAI.js';
|
|
11
11
|
import '@vitest/snapshot';
|
|
@@ -13,7 +13,7 @@ import '@vitest/utils/error';
|
|
|
13
13
|
import '@vitest/utils/source-map';
|
|
14
14
|
import './chunks/date.W2xKR2qe.js';
|
|
15
15
|
import '@vitest/spy';
|
|
16
|
-
import './chunks/index.
|
|
16
|
+
import './chunks/index.TH3f4LSA.js';
|
|
17
17
|
|
|
18
18
|
function createBenchmarkResult(name) {
|
|
19
19
|
return {
|
|
@@ -163,7 +163,7 @@ class VitestTestRunner {
|
|
|
163
163
|
}
|
|
164
164
|
onAfterRunFiles() {
|
|
165
165
|
this.snapshotClient.clear();
|
|
166
|
-
this.workerState.current =
|
|
166
|
+
this.workerState.current = undefined;
|
|
167
167
|
}
|
|
168
168
|
async onAfterRunSuite(suite) {
|
|
169
169
|
if (this.config.logHeapUsage && typeof process !== "undefined") {
|
package/dist/worker.js
CHANGED
|
@@ -4,15 +4,15 @@ import { workerId } from 'tinypool';
|
|
|
4
4
|
import { ViteNodeRunner, ModuleCacheMap } from 'vite-node/client';
|
|
5
5
|
import { readFileSync } from 'node:fs';
|
|
6
6
|
import { resolve, normalize } from 'pathe';
|
|
7
|
-
import { e as environments } from './chunks/index.
|
|
8
|
-
import { s as setupInspect } from './chunks/inspector.
|
|
9
|
-
import { c as createRuntimeRpc, a as rpcDone } from './chunks/rpc.
|
|
7
|
+
import { e as environments } from './chunks/index.cYxyd29h.js';
|
|
8
|
+
import { s as setupInspect } from './chunks/inspector.CU9GlB9I.js';
|
|
9
|
+
import { c as createRuntimeRpc, a as rpcDone } from './chunks/rpc.Bf456uf4.js';
|
|
10
10
|
import { i as isChildProcess, s as setProcessTitle } from './chunks/utils.C8RiOc4B.js';
|
|
11
11
|
import { d as disposeInternalListeners } from './chunks/utils.Cn0zI1t3.js';
|
|
12
12
|
import 'node:console';
|
|
13
13
|
import 'node:module';
|
|
14
14
|
import '@vitest/utils';
|
|
15
|
-
import './chunks/index.
|
|
15
|
+
import './chunks/index.TH3f4LSA.js';
|
|
16
16
|
|
|
17
17
|
function isBuiltinEnvironment(env) {
|
|
18
18
|
return env in environments;
|
|
@@ -43,7 +43,7 @@ async function loadEnvironment(ctx, rpc) {
|
|
|
43
43
|
resolveId: (id, importer) => rpc.resolveId(id, importer, "ssr")
|
|
44
44
|
});
|
|
45
45
|
const root = loader.root;
|
|
46
|
-
const packageId = name[0] === "." || name[0] === "/" ? resolve(root, name) : (await rpc.resolveId(`vitest-environment-${name}`,
|
|
46
|
+
const packageId = name[0] === "." || name[0] === "/" ? resolve(root, name) : (await rpc.resolveId(`vitest-environment-${name}`, undefined, "ssr"))?.id ?? resolve(root, name);
|
|
47
47
|
const pkg = await loader.executeId(normalize(packageId));
|
|
48
48
|
if (!pkg || !pkg.default || typeof pkg.default !== "object") {
|
|
49
49
|
throw new TypeError(
|
package/dist/workers/forks.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
2
|
+
import { r as runBaseTests } from '../chunks/base.gZAre3Yy.js';
|
|
3
3
|
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.Cn0zI1t3.js';
|
|
4
4
|
import 'vite-node/client';
|
|
5
|
-
import '../chunks/execute.
|
|
5
|
+
import '../chunks/execute.4vt3NSmG.js';
|
|
6
6
|
import 'node:fs';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import 'node:vm';
|
|
@@ -6,20 +6,20 @@ import util from 'node:util';
|
|
|
6
6
|
import { startTests, collectTests } from '@vitest/runner';
|
|
7
7
|
import { KNOWN_ASSET_TYPES } from 'vite-node/constants';
|
|
8
8
|
import { installSourcemapsSupport } from 'vite-node/source-map';
|
|
9
|
-
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.
|
|
9
|
+
import { s as setupChaiConfig, r as resolveTestRunner, a as resolveSnapshotEnvironment } from '../chunks/index.C2XSkjNu.js';
|
|
10
10
|
import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from '../chunks/coverage.BWeNbfBa.js';
|
|
11
|
-
import { V as VitestIndex } from '../chunks/index.
|
|
12
|
-
import { c as closeInspector } from '../chunks/inspector.
|
|
13
|
-
import { s as setupCommonEnv } from '../chunks/setup-common.
|
|
11
|
+
import { V as VitestIndex } from '../chunks/index.Bf4FgyZN.js';
|
|
12
|
+
import { c as closeInspector } from '../chunks/inspector.CU9GlB9I.js';
|
|
13
|
+
import { s as setupCommonEnv } from '../chunks/setup-common.jLbIuaww.js';
|
|
14
14
|
import { g as getWorkerState } from '../chunks/utils.C8RiOc4B.js';
|
|
15
15
|
import 'chai';
|
|
16
16
|
import 'node:path';
|
|
17
17
|
import '../path.js';
|
|
18
18
|
import 'node:url';
|
|
19
|
-
import '../chunks/rpc.
|
|
19
|
+
import '../chunks/rpc.Bf456uf4.js';
|
|
20
20
|
import '@vitest/utils';
|
|
21
|
-
import '../chunks/index.
|
|
22
|
-
import '../chunks/vi.
|
|
21
|
+
import '../chunks/index.TH3f4LSA.js';
|
|
22
|
+
import '../chunks/vi.CjhMlMwf.js';
|
|
23
23
|
import '@vitest/expect';
|
|
24
24
|
import '@vitest/runner/utils';
|
|
25
25
|
import '../chunks/_commonjsHelpers.BFTU3MAI.js';
|
package/dist/workers/threads.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as runBaseTests } from '../chunks/base.
|
|
1
|
+
import { r as runBaseTests } from '../chunks/base.gZAre3Yy.js';
|
|
2
2
|
import { a as createThreadsRpcOptions } from '../chunks/utils.Cn0zI1t3.js';
|
|
3
3
|
import 'vite-node/client';
|
|
4
|
-
import '../chunks/execute.
|
|
4
|
+
import '../chunks/execute.4vt3NSmG.js';
|
|
5
5
|
import 'node:fs';
|
|
6
6
|
import 'node:url';
|
|
7
7
|
import 'node:vm';
|
package/dist/workers/vmForks.js
CHANGED
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import v8 from 'node:v8';
|
|
2
2
|
import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../chunks/utils.Cn0zI1t3.js';
|
|
3
|
-
import { r as runVmTests } from '../chunks/vm.
|
|
3
|
+
import { r as runVmTests } from '../chunks/vm.CUw7ChSp.js';
|
|
4
4
|
import '@vitest/utils';
|
|
5
5
|
import 'node:url';
|
|
6
6
|
import 'node:vm';
|
|
7
7
|
import 'pathe';
|
|
8
8
|
import '../path.js';
|
|
9
9
|
import 'node:path';
|
|
10
|
-
import '../chunks/console.
|
|
10
|
+
import '../chunks/console.BxE0RUCr.js';
|
|
11
11
|
import 'node:console';
|
|
12
12
|
import 'node:stream';
|
|
13
13
|
import 'tinyrainbow';
|
|
14
14
|
import '../chunks/date.W2xKR2qe.js';
|
|
15
15
|
import '../chunks/utils.C8RiOc4B.js';
|
|
16
|
-
import '../chunks/execute.
|
|
16
|
+
import '../chunks/execute.4vt3NSmG.js';
|
|
17
17
|
import 'node:fs';
|
|
18
18
|
import '@vitest/utils/error';
|
|
19
19
|
import 'vite-node/client';
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
import { a as createThreadsRpcOptions } from '../chunks/utils.Cn0zI1t3.js';
|
|
2
|
-
import { r as runVmTests } from '../chunks/vm.
|
|
2
|
+
import { r as runVmTests } from '../chunks/vm.CUw7ChSp.js';
|
|
3
3
|
import '@vitest/utils';
|
|
4
4
|
import 'node:url';
|
|
5
5
|
import 'node:vm';
|
|
6
6
|
import 'pathe';
|
|
7
7
|
import '../path.js';
|
|
8
8
|
import 'node:path';
|
|
9
|
-
import '../chunks/console.
|
|
9
|
+
import '../chunks/console.BxE0RUCr.js';
|
|
10
10
|
import 'node:console';
|
|
11
11
|
import 'node:stream';
|
|
12
12
|
import 'tinyrainbow';
|
|
13
13
|
import '../chunks/date.W2xKR2qe.js';
|
|
14
14
|
import '../chunks/utils.C8RiOc4B.js';
|
|
15
|
-
import '../chunks/execute.
|
|
15
|
+
import '../chunks/execute.4vt3NSmG.js';
|
|
16
16
|
import 'node:fs';
|
|
17
17
|
import '@vitest/utils/error';
|
|
18
18
|
import 'vite-node/client';
|
package/dist/workers.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
export { p as provideWorkerState } from './chunks/utils.C8RiOc4B.js';
|
|
2
2
|
export { collect as collectVitestWorkerTests, run as runVitestWorker } from './worker.js';
|
|
3
|
-
export { r as runBaseTests } from './chunks/base.
|
|
3
|
+
export { r as runBaseTests } from './chunks/base.gZAre3Yy.js';
|
|
4
4
|
export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './chunks/utils.Cn0zI1t3.js';
|
|
5
|
-
export { r as runVmTests } from './chunks/vm.
|
|
5
|
+
export { r as runVmTests } from './chunks/vm.CUw7ChSp.js';
|
|
6
6
|
import '@vitest/utils';
|
|
7
7
|
import 'node:url';
|
|
8
8
|
import '@vitest/utils/source-map';
|
|
@@ -10,20 +10,20 @@ import 'tinypool';
|
|
|
10
10
|
import 'vite-node/client';
|
|
11
11
|
import 'node:fs';
|
|
12
12
|
import 'pathe';
|
|
13
|
-
import './chunks/index.
|
|
13
|
+
import './chunks/index.cYxyd29h.js';
|
|
14
14
|
import 'node:console';
|
|
15
|
-
import './chunks/inspector.
|
|
15
|
+
import './chunks/inspector.CU9GlB9I.js';
|
|
16
16
|
import 'node:module';
|
|
17
|
-
import './chunks/rpc.
|
|
18
|
-
import './chunks/index.
|
|
19
|
-
import './chunks/execute.
|
|
17
|
+
import './chunks/rpc.Bf456uf4.js';
|
|
18
|
+
import './chunks/index.TH3f4LSA.js';
|
|
19
|
+
import './chunks/execute.4vt3NSmG.js';
|
|
20
20
|
import 'node:vm';
|
|
21
21
|
import '@vitest/utils/error';
|
|
22
22
|
import 'vite-node/utils';
|
|
23
23
|
import './path.js';
|
|
24
24
|
import 'node:path';
|
|
25
25
|
import '@vitest/mocker';
|
|
26
|
-
import './chunks/console.
|
|
26
|
+
import './chunks/console.BxE0RUCr.js';
|
|
27
27
|
import 'node:stream';
|
|
28
28
|
import 'tinyrainbow';
|
|
29
29
|
import './chunks/date.W2xKR2qe.js';
|