vitest 1.3.0 → 1.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/LICENSE.md +1 -2
  2. package/dist/browser.d.ts +1 -1
  3. package/dist/browser.js +1 -1
  4. package/dist/chunks/{integrations-globals.FlQVNhQx.js → integrations-globals.trMeEBob.js} +3 -3
  5. package/dist/chunks/{runtime-console.Iloo9fIt.js → runtime-console.tUKE_2UJ.js} +4 -4
  6. package/dist/chunks/{runtime-runBaseTests.0UwIvo_U.js → runtime-runBaseTests.SKlFOhuq.js} +6 -6
  7. package/dist/cli.js +41 -1373
  8. package/dist/config.d.ts +1 -1
  9. package/dist/coverage.d.ts +6 -6
  10. package/dist/coverage.js +34 -3
  11. package/dist/environments.d.ts +1 -1
  12. package/dist/execute.d.ts +1 -1
  13. package/dist/execute.js +2 -2
  14. package/dist/index.d.ts +5 -3
  15. package/dist/index.js +4 -4
  16. package/dist/node.d.ts +11 -3
  17. package/dist/node.js +21 -13
  18. package/dist/{reporters-QGe8gs4b.d.ts → reporters-P7C2ytIv.d.ts} +230 -173
  19. package/dist/reporters.d.ts +1 -1
  20. package/dist/reporters.js +3 -3
  21. package/dist/runners.d.ts +2 -1
  22. package/dist/runners.js +8 -3
  23. package/dist/{suite-xGC-mxBC.d.ts → suite-a18diDsI.d.ts} +1 -1
  24. package/dist/suite.d.ts +2 -2
  25. package/dist/utils.d.ts +5 -0
  26. package/dist/utils.js +6 -0
  27. package/dist/vendor/{base.knFzp7G3.js → base.Xt0Omgh7.js} +9 -3
  28. package/dist/vendor/{base.RpormaJz.js → base.nhvUBzQY.js} +2 -2
  29. package/dist/vendor/{cli-api.RIYLcWhB.js → cac.RvTIWZBK.js} +6288 -106
  30. package/dist/vendor/{execute.aFSzc0Da.js → execute.2_yoIC01.js} +1 -1
  31. package/dist/vendor/{index.n-Ib4UWN.js → index.BeX1oZht.js} +1 -1
  32. package/dist/vendor/{index.CKbXK54q.js → index.LNWuEnUT.js} +1 -1
  33. package/dist/vendor/{index.QcWmThJv.js → index.e9RDLAeW.js} +43 -25
  34. package/dist/vendor/{setup-common.NSpEdAQm.js → setup-common.vyF1kALR.js} +1 -1
  35. package/dist/vendor/{utils.GbToHGHI.js → utils.w0xgzP1h.js} +15 -10
  36. package/dist/vendor/{vi.-Nr_x6dl.js → vi.JYQecGiw.js} +16 -1
  37. package/dist/vendor/{vm.UmCkcXp-.js → vm.cAHVDF92.js} +2 -2
  38. package/dist/worker.js +20 -5
  39. package/dist/workers/forks.js +5 -5
  40. package/dist/workers/runVmTests.js +5 -5
  41. package/dist/workers/threads.js +4 -4
  42. package/dist/workers/vmForks.js +6 -6
  43. package/dist/workers/vmThreads.js +5 -5
  44. package/dist/workers.d.ts +6 -3
  45. package/dist/workers.js +6 -6
  46. package/package.json +10 -10
  47. package/dist/chunks/api-setup.Xh60JpeM.js +0 -4771
@@ -7,7 +7,7 @@ import { processError } from '@vitest/utils/error';
7
7
  import { distDir } from '../path.js';
8
8
  import { existsSync, readdirSync } from 'node:fs';
9
9
  import { highlight, getType } from '@vitest/utils';
10
- import { g as getAllMockableProperties } from './base.knFzp7G3.js';
10
+ import { g as getAllMockableProperties } from './base.Xt0Omgh7.js';
11
11
 
12
12
  const spyModulePath = resolve(distDir, "spy.js");
13
13
  class RefTracker {
@@ -1,7 +1,7 @@
1
1
  import { afterAll, afterEach, beforeAll, beforeEach, describe, it, onTestFailed, onTestFinished, suite, test } from '@vitest/runner';
2
2
  import { b as bench } from './benchmark.eeqk2rd8.js';
3
3
  import { i as isFirstRun, a as runOnce } from './run-once.Olz_Zkd8.js';
4
- import { c as createExpect, a as globalExpect, v as vi, b as vitest } from './vi.-Nr_x6dl.js';
4
+ import { c as createExpect, a as globalExpect, v as vi, b as vitest } from './vi.JYQecGiw.js';
5
5
  import { g as getWorkerState } from './global.CkGT_TMy.js';
6
6
  import * as chai from 'chai';
7
7
  import { assert, should } from 'chai';
@@ -5,7 +5,7 @@ import { distDir } from '../path.js';
5
5
  import { g as getWorkerState } from './global.CkGT_TMy.js';
6
6
  import { r as rpc } from './rpc.joBhAkyK.js';
7
7
  import { t as takeCoverageInsideWorker } from './coverage.E7sG1b3r.js';
8
- import { l as loadDiffConfig, a as loadSnapshotSerializers } from './setup-common.NSpEdAQm.js';
8
+ import { l as loadDiffConfig, a as loadSnapshotSerializers } from './setup-common.vyF1kALR.js';
9
9
 
10
10
  function setupChaiConfig(config) {
11
11
  Object.assign(chai.config, config);
@@ -5,8 +5,8 @@ import { generateHash, calculateSuiteHash, someTasksAreOnly, interpretTaskModes,
5
5
  import c from 'picocolors';
6
6
  import { getSafeTimers, notNullish, inspect, positionToOffset, lineSplitRE, highlight, shuffle } from '@vitest/utils';
7
7
  import { performance } from 'node:perf_hooks';
8
- import { UNKNOWN_TEST_ID } from '../chunks/runtime-console.Iloo9fIt.js';
9
- import { b as slash, t as toArray, a as isPrimitive } from './base.knFzp7G3.js';
8
+ import { UNKNOWN_TEST_ID } from '../chunks/runtime-console.tUKE_2UJ.js';
9
+ import { a as slash, t as toArray, b as isPrimitive } from './base.Xt0Omgh7.js';
10
10
  import { g as getFullName, h as hasFailedSnapshot } from './tasks.IknbGB2n.js';
11
11
  import { isCI } from 'std-env';
12
12
  import { TraceMap, generatedPositionFor, parseErrorStacktrace } from '@vitest/utils/source-map';
@@ -24,8 +24,8 @@ import { parseAstAsync } from 'vite';
24
24
  import { ancestor } from 'acorn-walk';
25
25
  import process$2 from 'node:process';
26
26
  import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './_commonjsHelpers.jjO7Zipk.js';
27
- import require$$0$1 from 'assert';
28
- import require$$2 from 'events';
27
+ import require$$0$2 from 'assert';
28
+ import require$$0$1 from 'events';
29
29
  import { createHash } from 'node:crypto';
30
30
  import { slash as slash$1 } from 'vite-node/utils';
31
31
 
@@ -221,11 +221,33 @@ function formatProjectName(name, suffix = " ") {
221
221
  return colors[index % colors.length](`|${name}|`) + suffix;
222
222
  }
223
223
 
224
+ const REGEXP_WRAP_PREFIX = "$$vitest:";
225
+ function getOutputFile(config, reporter) {
226
+ if (!(config == null ? void 0 : config.outputFile))
227
+ return;
228
+ if (typeof config.outputFile === "string")
229
+ return config.outputFile;
230
+ return config.outputFile[reporter];
231
+ }
232
+ function wrapSerializableConfig(config) {
233
+ let testNamePattern = config.testNamePattern;
234
+ let defines = config.defines;
235
+ if (testNamePattern && typeof testNamePattern !== "string")
236
+ testNamePattern = `${REGEXP_WRAP_PREFIX}${testNamePattern.toString()}`;
237
+ if (defines)
238
+ defines = { keys: Object.keys(defines), original: defines };
239
+ return {
240
+ ...config,
241
+ testNamePattern,
242
+ defines
243
+ };
244
+ }
245
+
224
246
  const A=r=>r!==null&&typeof r=="object",a=(r,t)=>Object.assign(new Error(`[${r}]: ${t}`),{code:r}),_$1="ERR_INVALID_PACKAGE_CONFIG",E$1="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$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(_$1,"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(_$1,'"exports" cannot contain some keys starting with "." and some not')},void 0),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$1,`Invalid "exports" target "${i}" defined in the package config`);return n};
225
247
 
226
- function B(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}const x=e=>{const o=require$$0[e];return function(i,...n){const t=`${e}:${n.join(":")}`;let l=i==null?void 0:i.get(t);return l===void 0&&(l=Reflect.apply(o,require$$0,n),i==null||i.set(t,l)),l}},E=x("existsSync"),ae=x("realpathSync"),ke=x("readFileSync"),P=x("statSync"),Z=(e,o,i)=>{for(;;){const n=p$1.posix.join(e,o);if(E(i,n))return n;const t=p$1.dirname(e);if(t===e)return;e=t;}},h=/^\.{1,2}(\/.*)?$/,W=e=>{const o=B(e);return h.test(o)?o:`./${o}`};function be(e,o=!1){const i=e.length;let n=0,t="",l=0,s=16,m=0,r=0,b=0,v=0,c=0;function L(u,g){let f=0,$=0;for(;f<u||!g;){let O=e.charCodeAt(n);if(O>=48&&O<=57)$=$*16+O-48;else if(O>=65&&O<=70)$=$*16+O-65+10;else if(O>=97&&O<=102)$=$*16+O-97+10;else break;n++,f++;}return f<u&&($=-1),$}function T(u){n=u,t="",l=0,s=16,c=0;}function w(){let u=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 c=3,e.substring(u,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&&N(e.charCodeAt(n))){for(n++;n<e.length&&N(e.charCodeAt(n));)n++;g=n;}else c=3;return e.substring(u,g)}function k(){let u="",g=n;for(;;){if(n>=i){u+=e.substring(g,n),c=2;break}const f=e.charCodeAt(n);if(f===34){u+=e.substring(g,n),n++;break}if(f===92){if(u+=e.substring(g,n),n++,n>=i){c=2;break}switch(e.charCodeAt(n++)){case 34:u+='"';break;case 92:u+="\\";break;case 47:u+="/";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+=`
227
- `;break;case 114:u+="\r";break;case 116:u+=" ";break;case 117:const O=L(4,!0);O>=0?u+=String.fromCharCode(O):c=4;break;default:c=5;}g=n;continue}if(f>=0&&f<=31)if(_(f)){u+=e.substring(g,n),c=2;break}else c=6;n++;}return u}function A(){if(t="",c=0,l=n,r=m,v=b,n>=i)return l=i,s=17;let u=e.charCodeAt(n);if(J(u)){do n++,t+=String.fromCharCode(u),u=e.charCodeAt(n);while(J(u));return s=15}if(_(u))return n++,t+=String.fromCharCode(u),u===13&&e.charCodeAt(n)===10&&(n++,t+=`
228
- `),m++,b=n,s=14;switch(u){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++,t=k(),s=10;case 47:const g=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<i&&!_(e.charCodeAt(n));)n++;return t=e.substring(g,n),s=12}if(e.charCodeAt(n+1)===42){n+=2;const f=i-1;let $=!1;for(;n<f;){const O=e.charCodeAt(n);if(O===42&&e.charCodeAt(n+1)===47){n+=2,$=!0;break}n++,_(O)&&(O===13&&e.charCodeAt(n)===10&&n++,m++,b=n);}return $||(n++,c=1),t=e.substring(g,n),s=13}return t+=String.fromCharCode(u),n++,s=16;case 45:if(t+=String.fromCharCode(u),n++,n===i||!N(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 t+=w(),s=11;default:for(;n<i&&U(u);)n++,u=e.charCodeAt(n);if(l!==n){switch(t=e.substring(l,n),t){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return t+=String.fromCharCode(u),n++,s=16}}function U(u){if(J(u)||_(u))return !1;switch(u){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return !1}return !0}function F(){let u;do u=A();while(u>=12&&u<=15);return u}return {setPosition:T,getPosition:()=>n,scan:o?F:A,getToken:()=>s,getTokenValue:()=>t,getTokenOffset:()=>l,getTokenLength:()=>n-l,getTokenStartLine:()=>r,getTokenStartCharacter:()=>l-v,getTokenError:()=>c}}function J(e){return e===32||e===9}function _(e){return e===10||e===13}function N(e){return e>=48&&e<=57}var q;(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";})(q||(q={}));var I;(function(e){e.DEFAULT={allowTrailingComma:!1};})(I||(I={}));function Te(e,o=[],i=I.DEFAULT){let n=null,t=[];const l=[];function s(r){Array.isArray(t)?t.push(r):n!==null&&(t[n]=r);}return we(e,{onObjectBegin:()=>{const r={};s(r),l.push(t),t=r,n=null;},onObjectProperty:r=>{n=r;},onObjectEnd:()=>{t=l.pop();},onArrayBegin:()=>{const r=[];s(r),l.push(t),t=r,n=null;},onArrayEnd:()=>{t=l.pop();},onLiteralValue:s,onError:(r,b,v)=>{o.push({error:r,offset:b,length:v});}},i),t[0]}function we(e,o,i=I.DEFAULT){const n=be(e,!1),t=[];function l(a){return a?()=>a(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function s(a){return a?()=>a(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>t.slice()):()=>!0}function m(a){return a?j=>a(j,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function r(a){return a?j=>a(j,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>t.slice()):()=>!0}const b=s(o.onObjectBegin),v=r(o.onObjectProperty),c=l(o.onObjectEnd),L=s(o.onArrayBegin),T=l(o.onArrayEnd),w=r(o.onLiteralValue),k=m(o.onSeparator),A=l(o.onComment),U=m(o.onError),F=i&&i.disallowComments,u=i&&i.allowTrailingComma;function g(){for(;;){const a=n.scan();switch(n.getTokenError()){case 4:f(14);break;case 5:f(15);break;case 3:f(13);break;case 1:F||f(11);break;case 2:f(12);break;case 6:f(16);break}switch(a){case 12:case 13:F?f(10):A();break;case 16:f(1);break;case 15:case 14:break;default:return a}}}function f(a,j=[],Y=[]){if(U(a),j.length+Y.length>0){let y=n.getToken();for(;y!==17;){if(j.indexOf(y)!==-1){g();break}else if(Y.indexOf(y)!==-1)break;y=g();}}}function $(a){const j=n.getTokenValue();return a?w(j):(v(j),t.push(j)),g(),!0}function O(){switch(n.getToken()){case 11:const a=n.getTokenValue();let j=Number(a);isNaN(j)&&(f(2),j=0),w(j);break;case 7:w(null);break;case 8:w(!0);break;case 9:w(!1);break;default:return !1}return g(),!0}function ce(){return n.getToken()!==10?(f(3,[],[2,5]),!1):($(!1),n.getToken()===6?(k(":"),g(),V()||f(4,[],[2,5])):f(5,[],[2,5]),t.pop(),!0)}function fe(){b(),g();let a=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(a||f(4,[],[]),k(","),g(),n.getToken()===2&&u)break}else a&&f(6,[],[]);ce()||f(4,[],[2,5]),a=!0;}return c(),n.getToken()!==2?f(7,[2],[]):g(),!0}function pe(){L(),g();let a=!0,j=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(j||f(4,[],[]),k(","),g(),n.getToken()===4&&u)break}else j&&f(6,[],[]);a?(t.push(0),a=!1):t[t.length-1]++,V()||f(4,[],[4,5]),j=!0;}return T(),a||t.pop(),n.getToken()!==4?f(8,[4],[]):g(),!0}function V(){switch(n.getToken()){case 3:return pe();case 1:return fe();case 10:return $(!0);default:return O()}}return g(),n.getToken()===17?i.allowEmptyContent?!0:(f(4,[],[]),!1):V()?(n.getToken()!==17&&f(9,[],[]),!0):(f(4,[],[]),!1)}var K;(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";})(K||(K={}));var C;(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";})(C||(C={}));const ve=Te;var ee;(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";})(ee||(ee={}));const ne=(e,o)=>ve(ke(o,e,"utf8")),M=Symbol("implicitBaseUrl"),Oe=()=>{const{findPnpApi:e}=ge;return e&&e(process.cwd())},R=(e,o,i,n)=>{const t=`resolveFromPackageJsonPath:${e}:${o}:${i}`;if(n!=null&&n.has(t))return n.get(t);const l=ne(e,n);if(!l)return;let s=o||"tsconfig.json";if(!i&&l.exports)try{const[m]=v(l.exports,o,["require","types"]);s=m;}catch{return !1}else !o&&l.tsconfig&&(s=l.tsconfig);return s=p$1.join(e,"..",s),n==null||n.set(t,s),s},G="package.json",z="tsconfig.json",je=(e,o,i)=>{let n=e;if(e===".."&&(n=p$1.join(n,z)),e[0]==="."&&(n=p$1.resolve(o,n)),p$1.isAbsolute(n)){if(E(i,n)){if(P(i,n).isFile())return n}else if(!n.endsWith(".json")){const T=`${n}.json`;if(E(i,T))return T}return}const[t,...l]=e.split("/"),s=t[0]==="@"?`${t}/${l.shift()}`:t,m=l.join("/"),r=Oe();if(r){const{resolveRequest:T}=r;try{if(s===e){const w=T(p$1.join(s,G),o);if(w){const k=R(w,m,!1,i);if(k&&E(i,k))return k}}else {let w;try{w=T(e,o,{extensions:[".json"]});}catch{w=T(p$1.join(e,z),o);}if(w)return w}}catch{}}const b=Z(o,p$1.join("node_modules",s),i);if(!b||!P(i,b).isDirectory())return;const v=p$1.join(b,G);if(E(i,v)){const T=R(v,m,!1,i);if(T===!1)return;if(T&&E(i,T)&&P(i,T).isFile())return T}const c=p$1.join(b,m),L=c.endsWith(".json");if(!L){const T=`${c}.json`;if(E(i,T))return T}if(E(i,c)){if(P(i,c).isDirectory()){const T=p$1.join(c,G);if(E(i,T)){const k=R(T,"",!0,i);if(k&&E(i,k))return k}const w=p$1.join(c,z);if(E(i,w))return w}else if(L)return c}},Ae=(e,o,i,n)=>{const t=je(e,o,n);if(!t)throw new Error(`File '${e}' not found.`);if(i.has(t))throw new Error(`Circularity detected while resolving configuration: ${t}`);i.add(t);const l=p$1.dirname(t),s=te(t,n,i);delete s.references;const{compilerOptions:m}=s;if(m){const r=["baseUrl","outDir"];for(const b of r){const v=m[b];v&&(m[b]=B(p$1.relative(o,p$1.join(l,v)))||"./");}}return s.files&&(s.files=s.files.map(r=>B(p$1.relative(o,p$1.join(l,r))))),s.include&&(s.include=s.include.map(r=>B(p$1.relative(o,p$1.join(l,r))))),s.exclude&&(s.exclude=s.exclude.map(r=>B(p$1.relative(o,p$1.join(l,r))))),s},te=(e,o,i=new Set)=>{let n;try{n=ae(o,e);}catch{throw new Error(`Cannot resolve tsconfig at path: ${e}`)}let t=ne(n,o)||{};if(typeof t!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);const l=p$1.dirname(n);if(t.compilerOptions){const{compilerOptions:s}=t;s.paths&&!s.baseUrl&&(s[M]=l);}if(t.extends){const s=Array.isArray(t.extends)?t.extends:[t.extends];delete t.extends;for(const m of s.reverse()){const r=Ae(m,l,i,o),b={...r,...t,compilerOptions:{...r.compilerOptions,...t.compilerOptions}};r.watchOptions&&(b.watchOptions={...r.watchOptions,...t.watchOptions}),t=b;}}if(t.compilerOptions){const{compilerOptions:s}=t,m=["baseUrl","rootDir"];for(const b of m){const v=s[b];if(v){const c=p$1.resolve(l,v),L=W(p$1.relative(l,c));s[b]=L;}}const{outDir:r}=s;r&&(Array.isArray(t.exclude)||(t.exclude=[]),t.exclude.includes(r)||t.exclude.push(r),s.outDir=W(r));}else t.compilerOptions={};if(t.files&&(t.files=t.files.map(W)),t.include&&(t.include=t.include.map(B)),t.watchOptions){const{watchOptions:s}=t;s.excludeDirectories&&(s.excludeDirectories=s.excludeDirectories.map(m=>B(p$1.resolve(l,m))));}return t},ie=(e,o=new Map)=>te(e,o),$e=(e=process.cwd(),o="tsconfig.json",i=new Map)=>{const n=Z(B(e),o,i);if(!n)return null;const t=ie(n,i);return {path:n,config:t}};p$1.posix;process.platform==="win32";
248
+ function B(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}const x=e=>{const o=require$$0[e];return (i,...n)=>{const t=`${e}:${n.join(":")}`;let l=i==null?void 0:i.get(t);return l===void 0&&(l=Reflect.apply(o,require$$0,n),i==null||i.set(t,l)),l}},E=x("existsSync"),ae=x("realpathSync"),ke=x("readFileSync"),P=x("statSync"),Z=(e,o,i)=>{for(;;){const n=p$1.posix.join(e,o);if(E(i,n))return n;const t=p$1.dirname(e);if(t===e)return;e=t;}},h=/^\.{1,2}(\/.*)?$/,W=e=>{const o=B(e);return h.test(o)?o:`./${o}`};function be(e,o=!1){const i=e.length;let n=0,t="",l=0,s=16,m=0,r=0,b=0,v=0,c=0;function L(u,g){let f=0,$=0;for(;f<u||!g;){let O=e.charCodeAt(n);if(O>=48&&O<=57)$=$*16+O-48;else if(O>=65&&O<=70)$=$*16+O-65+10;else if(O>=97&&O<=102)$=$*16+O-97+10;else break;n++,f++;}return f<u&&($=-1),$}function T(u){n=u,t="",l=0,s=16,c=0;}function w(){let u=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 c=3,e.substring(u,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&&N(e.charCodeAt(n))){for(n++;n<e.length&&N(e.charCodeAt(n));)n++;g=n;}else c=3;return e.substring(u,g)}function k(){let u="",g=n;for(;;){if(n>=i){u+=e.substring(g,n),c=2;break}const f=e.charCodeAt(n);if(f===34){u+=e.substring(g,n),n++;break}if(f===92){if(u+=e.substring(g,n),n++,n>=i){c=2;break}switch(e.charCodeAt(n++)){case 34:u+='"';break;case 92:u+="\\";break;case 47:u+="/";break;case 98:u+="\b";break;case 102:u+="\f";break;case 110:u+=`
249
+ `;break;case 114:u+="\r";break;case 116:u+=" ";break;case 117:const O=L(4,!0);O>=0?u+=String.fromCharCode(O):c=4;break;default:c=5;}g=n;continue}if(f>=0&&f<=31)if(_(f)){u+=e.substring(g,n),c=2;break}else c=6;n++;}return u}function j(){if(t="",c=0,l=n,r=m,v=b,n>=i)return l=i,s=17;let u=e.charCodeAt(n);if(J(u)){do n++,t+=String.fromCharCode(u),u=e.charCodeAt(n);while(J(u));return s=15}if(_(u))return n++,t+=String.fromCharCode(u),u===13&&e.charCodeAt(n)===10&&(n++,t+=`
250
+ `),m++,b=n,s=14;switch(u){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++,t=k(),s=10;case 47:const g=n-1;if(e.charCodeAt(n+1)===47){for(n+=2;n<i&&!_(e.charCodeAt(n));)n++;return t=e.substring(g,n),s=12}if(e.charCodeAt(n+1)===42){n+=2;const f=i-1;let $=!1;for(;n<f;){const O=e.charCodeAt(n);if(O===42&&e.charCodeAt(n+1)===47){n+=2,$=!0;break}n++,_(O)&&(O===13&&e.charCodeAt(n)===10&&n++,m++,b=n);}return $||(n++,c=1),t=e.substring(g,n),s=13}return t+=String.fromCharCode(u),n++,s=16;case 45:if(t+=String.fromCharCode(u),n++,n===i||!N(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 t+=w(),s=11;default:for(;n<i&&U(u);)n++,u=e.charCodeAt(n);if(l!==n){switch(t=e.substring(l,n),t){case"true":return s=8;case"false":return s=9;case"null":return s=7}return s=16}return t+=String.fromCharCode(u),n++,s=16}}function U(u){if(J(u)||_(u))return !1;switch(u){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return !1}return !0}function F(){let u;do u=j();while(u>=12&&u<=15);return u}return {setPosition:T,getPosition:()=>n,scan:o?F:j,getToken:()=>s,getTokenValue:()=>t,getTokenOffset:()=>l,getTokenLength:()=>n-l,getTokenStartLine:()=>r,getTokenStartCharacter:()=>l-v,getTokenError:()=>c}}function J(e){return e===32||e===9}function _(e){return e===10||e===13}function N(e){return e>=48&&e<=57}var q;(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";})(q||(q={}));var I;(function(e){e.DEFAULT={allowTrailingComma:!1};})(I||(I={}));function Te(e,o=[],i=I.DEFAULT){let n=null,t=[];const l=[];function s(r){Array.isArray(t)?t.push(r):n!==null&&(t[n]=r);}return we(e,{onObjectBegin:()=>{const r={};s(r),l.push(t),t=r,n=null;},onObjectProperty:r=>{n=r;},onObjectEnd:()=>{t=l.pop();},onArrayBegin:()=>{const r=[];s(r),l.push(t),t=r,n=null;},onArrayEnd:()=>{t=l.pop();},onLiteralValue:s,onError:(r,b,v)=>{o.push({error:r,offset:b,length:v});}},i),t[0]}function we(e,o,i=I.DEFAULT){const n=be(e,!1),t=[];function l(a){return a?()=>a(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function s(a){return a?()=>a(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>t.slice()):()=>!0}function m(a){return a?A=>a(A,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function r(a){return a?A=>a(A,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>t.slice()):()=>!0}const b=s(o.onObjectBegin),v=r(o.onObjectProperty),c=l(o.onObjectEnd),L=s(o.onArrayBegin),T=l(o.onArrayEnd),w=r(o.onLiteralValue),k=m(o.onSeparator),j=l(o.onComment),U=m(o.onError),F=i&&i.disallowComments,u=i&&i.allowTrailingComma;function g(){for(;;){const a=n.scan();switch(n.getTokenError()){case 4:f(14);break;case 5:f(15);break;case 3:f(13);break;case 1:F||f(11);break;case 2:f(12);break;case 6:f(16);break}switch(a){case 12:case 13:F?f(10):j();break;case 16:f(1);break;case 15:case 14:break;default:return a}}}function f(a,A=[],Y=[]){if(U(a),A.length+Y.length>0){let y=n.getToken();for(;y!==17;){if(A.indexOf(y)!==-1){g();break}else if(Y.indexOf(y)!==-1)break;y=g();}}}function $(a){const A=n.getTokenValue();return a?w(A):(v(A),t.push(A)),g(),!0}function O(){switch(n.getToken()){case 11:const a=n.getTokenValue();let A=Number(a);isNaN(A)&&(f(2),A=0),w(A);break;case 7:w(null);break;case 8:w(!0);break;case 9:w(!1);break;default:return !1}return g(),!0}function ce(){return n.getToken()!==10?(f(3,[],[2,5]),!1):($(!1),n.getToken()===6?(k(":"),g(),V()||f(4,[],[2,5])):f(5,[],[2,5]),t.pop(),!0)}function fe(){b(),g();let a=!1;for(;n.getToken()!==2&&n.getToken()!==17;){if(n.getToken()===5){if(a||f(4,[],[]),k(","),g(),n.getToken()===2&&u)break}else a&&f(6,[],[]);ce()||f(4,[],[2,5]),a=!0;}return c(),n.getToken()!==2?f(7,[2],[]):g(),!0}function pe(){L(),g();let a=!0,A=!1;for(;n.getToken()!==4&&n.getToken()!==17;){if(n.getToken()===5){if(A||f(4,[],[]),k(","),g(),n.getToken()===4&&u)break}else A&&f(6,[],[]);a?(t.push(0),a=!1):t[t.length-1]++,V()||f(4,[],[4,5]),A=!0;}return T(),a||t.pop(),n.getToken()!==4?f(8,[4],[]):g(),!0}function V(){switch(n.getToken()){case 3:return pe();case 1:return fe();case 10:return $(!0);default:return O()}}return g(),n.getToken()===17?i.allowEmptyContent?!0:(f(4,[],[]),!1):V()?(n.getToken()!==17&&f(9,[],[]),!0):(f(4,[],[]),!1)}var K;(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";})(K||(K={}));var C;(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";})(C||(C={}));const ve=Te;var ee;(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";})(ee||(ee={}));const ne=(e,o)=>ve(ke(o,e,"utf8")),M=Symbol("implicitBaseUrl"),Oe=()=>{const{findPnpApi:e}=ge;return e&&e(process.cwd())},R=(e,o,i,n)=>{const t=`resolveFromPackageJsonPath:${e}:${o}:${i}`;if(n!=null&&n.has(t))return n.get(t);const l=ne(e,n);if(!l)return;let s=o||"tsconfig.json";if(!i&&l.exports)try{const[m]=v(l.exports,o,["require","types"]);s=m;}catch{return !1}else !o&&l.tsconfig&&(s=l.tsconfig);return s=p$1.join(e,"..",s),n==null||n.set(t,s),s},G="package.json",z="tsconfig.json",Ae=(e,o,i)=>{let n=e;if(e===".."&&(n=p$1.join(n,z)),e[0]==="."&&(n=p$1.resolve(o,n)),p$1.isAbsolute(n)){if(E(i,n)){if(P(i,n).isFile())return n}else if(!n.endsWith(".json")){const T=`${n}.json`;if(E(i,T))return T}return}const[t,...l]=e.split("/"),s=t[0]==="@"?`${t}/${l.shift()}`:t,m=l.join("/"),r=Oe();if(r){const{resolveRequest:T}=r;try{if(s===e){const w=T(p$1.join(s,G),o);if(w){const k=R(w,m,!1,i);if(k&&E(i,k))return k}}else {let w;try{w=T(e,o,{extensions:[".json"]});}catch{w=T(p$1.join(e,z),o);}if(w)return w}}catch{}}const b=Z(o,p$1.join("node_modules",s),i);if(!b||!P(i,b).isDirectory())return;const v=p$1.join(b,G);if(E(i,v)){const T=R(v,m,!1,i);if(T===!1)return;if(T&&E(i,T)&&P(i,T).isFile())return T}const c=p$1.join(b,m),L=c.endsWith(".json");if(!L){const T=`${c}.json`;if(E(i,T))return T}if(E(i,c)){if(P(i,c).isDirectory()){const T=p$1.join(c,G);if(E(i,T)){const k=R(T,"",!0,i);if(k&&E(i,k))return k}const w=p$1.join(c,z);if(E(i,w))return w}else if(L)return c}},je=(e,o,i,n)=>{const t=Ae(e,o,n);if(!t)throw new Error(`File '${e}' not found.`);if(i.has(t))throw new Error(`Circularity detected while resolving configuration: ${t}`);i.add(t);const l=p$1.dirname(t),s=te(t,n,i);delete s.references;const{compilerOptions:m}=s;if(m){const r=["baseUrl","outDir"];for(const b of r){const v=m[b];v&&(m[b]=B(p$1.relative(o,p$1.join(l,v)))||"./");}}return s.files&&(s.files=s.files.map(r=>B(p$1.relative(o,p$1.join(l,r))))),s.include&&(s.include=s.include.map(r=>B(p$1.relative(o,p$1.join(l,r))))),s.exclude&&(s.exclude=s.exclude.map(r=>B(p$1.relative(o,p$1.join(l,r))))),s},te=(e,o,i=new Set)=>{let n;try{n=ae(o,e);}catch{throw new Error(`Cannot resolve tsconfig at path: ${e}`)}let t=ne(n,o)||{};if(typeof t!="object")throw new SyntaxError(`Failed to parse tsconfig at: ${e}`);const l=p$1.dirname(n);if(t.compilerOptions){const{compilerOptions:s}=t;s.paths&&!s.baseUrl&&(s[M]=l);}if(t.extends){const s=Array.isArray(t.extends)?t.extends:[t.extends];delete t.extends;for(const m of s.reverse()){const r=je(m,l,new Set(i),o),b={...r,...t,compilerOptions:{...r.compilerOptions,...t.compilerOptions}};r.watchOptions&&(b.watchOptions={...r.watchOptions,...t.watchOptions}),t=b;}}if(t.compilerOptions){const{compilerOptions:s}=t,m=["baseUrl","rootDir"];for(const b of m){const v=s[b];if(v){const c=p$1.resolve(l,v),L=W(p$1.relative(l,c));s[b]=L;}}const{outDir:r}=s;r&&(Array.isArray(t.exclude)||(t.exclude=[]),t.exclude.includes(r)||t.exclude.push(r),s.outDir=W(r));}else t.compilerOptions={};if(t.files&&(t.files=t.files.map(W)),t.include&&(t.include=t.include.map(B)),t.watchOptions){const{watchOptions:s}=t;s.excludeDirectories&&(s.excludeDirectories=s.excludeDirectories.map(m=>B(p$1.resolve(l,m))));}return t},ie=(e,o=new Map)=>te(e,o),$e=(e=process.cwd(),o="tsconfig.json",i=new Map)=>{const n=Z(B(e),o,i);if(!n)return null;const t=ie(n,i);return {path:n,config:t}};p$1.posix;process.platform==="win32";
229
251
 
230
252
  const __dirname = url.fileURLToPath(new URL(".", import.meta.url));
231
253
  const newLineRegExp = /\r?\n/;
@@ -2340,14 +2362,6 @@ class DotReporter extends BaseReporter {
2340
2362
  }
2341
2363
  }
2342
2364
 
2343
- function getOutputFile(config, reporter) {
2344
- if (!(config == null ? void 0 : config.outputFile))
2345
- return;
2346
- if (typeof config.outputFile === "string")
2347
- return config.outputFile;
2348
- return config.outputFile[reporter];
2349
- }
2350
-
2351
2365
  const StatusMap = {
2352
2366
  fail: "failed",
2353
2367
  only: "pending",
@@ -3423,11 +3437,11 @@ if (!processOk(process$1)) {
3423
3437
  return function () {}
3424
3438
  };
3425
3439
  } else {
3426
- var assert = require$$0$1;
3440
+ var assert = require$$0$2;
3427
3441
  var signals = requireSignals();
3428
3442
  var isWin = /^win/i.test(process$1.platform);
3429
3443
 
3430
- var EE = require$$2;
3444
+ var EE = require$$0$1;
3431
3445
  /* istanbul ignore if */
3432
3446
  if (typeof EE !== 'function') {
3433
3447
  EE = EE.EventEmitter;
@@ -4310,7 +4324,7 @@ createLogUpdate(process$2.stdout);
4310
4324
 
4311
4325
  createLogUpdate(process$2.stderr);
4312
4326
 
4313
- var version = "1.3.0";
4327
+ var version = "1.4.0";
4314
4328
 
4315
4329
  const HIGHLIGHT_SUPPORTED_EXTS = new Set(["js", "ts"].flatMap((lang) => [
4316
4330
  `.${lang}`,
@@ -4409,14 +4423,14 @@ class Logger {
4409
4423
  this.console.warn(...args);
4410
4424
  }
4411
4425
  clearFullScreen(message) {
4412
- if (this.ctx.server.config.clearScreen === false) {
4426
+ if (!this.ctx.config.clearScreen) {
4413
4427
  this.console.log(message);
4414
4428
  return;
4415
4429
  }
4416
4430
  this.console.log(`${ERASE_SCROLLBACK}${CLEAR_SCREEN}${message}`);
4417
4431
  }
4418
4432
  clearScreen(message, force = false) {
4419
- if (this.ctx.server.config.clearScreen === false) {
4433
+ if (!this.ctx.config.clearScreen) {
4420
4434
  this.console.log(message);
4421
4435
  return;
4422
4436
  }
@@ -4493,7 +4507,7 @@ No ${config.mode} files found, exiting with code 1`));
4493
4507
  }
4494
4508
  }
4495
4509
  printBanner() {
4496
- var _a, _b, _c;
4510
+ var _a, _b;
4497
4511
  this.log();
4498
4512
  const versionTest = this.ctx.config.watch ? c.blue(`v${version}`) : c.cyan(`v${version}`);
4499
4513
  const mode = this.ctx.config.watch ? c.blue(" DEV ") : c.cyan(" RUN ");
@@ -4509,10 +4523,14 @@ No ${config.mode} files found, exiting with code 1`));
4509
4523
  const origin = (resolvedUrls == null ? void 0 : resolvedUrls.local[0]) ?? (resolvedUrls == null ? void 0 : resolvedUrls.network[0]);
4510
4524
  this.log(c.dim(c.green(` ${output} Browser runner started at ${new URL("/", origin)}`)));
4511
4525
  });
4512
- if (this.ctx.config.ui)
4526
+ if (this.ctx.config.ui) {
4513
4527
  this.log(c.dim(c.green(` UI started at http://${((_a = this.ctx.config.api) == null ? void 0 : _a.host) || "localhost"}:${c.bold(`${this.ctx.server.config.server.port}`)}${this.ctx.config.uiBase}`)));
4514
- else if ((_b = this.ctx.config.api) == null ? void 0 : _b.port)
4515
- this.log(c.dim(c.green(` API started at http://${((_c = this.ctx.config.api) == null ? void 0 : _c.host) || "localhost"}:${c.bold(`${this.ctx.config.api.port}`)}`)));
4528
+ } else if ((_b = this.ctx.config.api) == null ? void 0 : _b.port) {
4529
+ const resolvedUrls = this.ctx.server.resolvedUrls;
4530
+ const fallbackUrl = `http://${this.ctx.config.api.host || "localhost"}:${this.ctx.config.api.port}`;
4531
+ const origin = (resolvedUrls == null ? void 0 : resolvedUrls.local[0]) ?? (resolvedUrls == null ? void 0 : resolvedUrls.network[0]) ?? fallbackUrl;
4532
+ this.log(c.dim(c.green(` API started at ${new URL("/", origin)}`)));
4533
+ }
4516
4534
  if (this.ctx.coverageProvider)
4517
4535
  this.log(c.dim(" Coverage enabled with ") + c.yellow(this.ctx.coverageProvider.name));
4518
4536
  this.log();
@@ -4924,4 +4942,4 @@ const ReportersMap = {
4924
4942
  "github-actions": GithubActionsReporter
4925
4943
  };
4926
4944
 
4927
- export { BaseSequencer as B, DefaultReporter as D, GithubActionsReporter as G, HangingProcessReporter as H, JsonReporter$1 as J, Logger as L, ReportersMap as R, TapReporter as T, VerboseReporter as V, BasicReporter as a, DotReporter as b, JUnitReporter as c, TapFlatReporter as d, BenchmarkReportsMap as e, divider as f, Typechecker as g, RandomSequencer as h, generateCodeFrame as i, highlightCode as j, stripAnsi as s };
4945
+ export { BaseSequencer as B, DefaultReporter as D, GithubActionsReporter as G, HangingProcessReporter as H, JsonReporter$1 as J, Logger as L, ReportersMap as R, TapReporter as T, VerboseReporter as V, BasicReporter as a, DotReporter as b, JUnitReporter as c, TapFlatReporter as d, BenchmarkReportsMap as e, Typechecker as f, RandomSequencer as g, generateCodeFrame as h, highlightCode as i, divider as j, stripAnsi as s, wrapSerializableConfig as w };
@@ -11,7 +11,7 @@ async function setupCommonEnv(config) {
11
11
  globalSetup = true;
12
12
  setSafeTimers();
13
13
  if (config.globals)
14
- (await import('../chunks/integrations-globals.FlQVNhQx.js')).registerApiGlobally();
14
+ (await import('../chunks/integrations-globals.trMeEBob.js')).registerApiGlobally();
15
15
  }
16
16
  function setupDefines(defines) {
17
17
  for (const key in defines)
@@ -1,5 +1,6 @@
1
1
  import { parseRegexp } from '@vitest/utils';
2
2
 
3
+ const REGEXP_WRAP_PREFIX = "$$vitest:";
3
4
  function createThreadsRpcOptions({ port }) {
4
5
  return {
5
6
  post: (v) => {
@@ -26,16 +27,20 @@ function createForksRpcOptions(nodeV8) {
26
27
  }
27
28
  };
28
29
  }
29
- function parsePossibleRegexp(str) {
30
- const prefix = "$$vitest:";
31
- if (typeof str === "string" && str.startsWith(prefix))
32
- return parseRegexp(str.slice(prefix.length));
33
- return str;
34
- }
35
- function unwrapForksConfig(config) {
36
- if (config.testNamePattern)
37
- config.testNamePattern = parsePossibleRegexp(config.testNamePattern);
30
+ function unwrapSerializableConfig(config) {
31
+ if (config.testNamePattern && typeof config.testNamePattern === "string") {
32
+ const testNamePattern = config.testNamePattern;
33
+ if (testNamePattern.startsWith(REGEXP_WRAP_PREFIX))
34
+ config.testNamePattern = parseRegexp(testNamePattern.slice(REGEXP_WRAP_PREFIX.length));
35
+ }
36
+ if (config.defines && Array.isArray(config.defines.keys) && config.defines.original) {
37
+ const { keys, original } = config.defines;
38
+ const defines = {};
39
+ for (const key of keys)
40
+ defines[key] = original[key];
41
+ config.defines = defines;
42
+ }
38
43
  return config;
39
44
  }
40
45
 
41
- export { createThreadsRpcOptions as a, createForksRpcOptions as c, unwrapForksConfig as u };
46
+ export { createThreadsRpcOptions as a, createForksRpcOptions as c, unwrapSerializableConfig as u };
@@ -9,7 +9,7 @@ import { g as getFullName } from './tasks.IknbGB2n.js';
9
9
  import { g as getWorkerState, a as getCurrentEnvironment } from './global.CkGT_TMy.js';
10
10
  import { getSafeTimers, assertTypes, createSimpleStackTrace } from '@vitest/utils';
11
11
  import { parseSingleStack } from '@vitest/utils/source-map';
12
- import { i as isChildProcess } from './base.knFzp7G3.js';
12
+ import { i as isChildProcess } from './base.Xt0Omgh7.js';
13
13
  import { R as RealDate, r as resetDate, m as mockDate } from './date.Ns1pGd_X.js';
14
14
  import { spyOn, fn, isMockFunction, mocks } from '@vitest/spy';
15
15
 
@@ -221,6 +221,9 @@ const SnapshotPlugin = (chai, utils) => {
221
221
  chai.Assertion.prototype,
222
222
  key,
223
223
  function(properties, message) {
224
+ const isNot = utils.flag(this, "negate");
225
+ if (isNot)
226
+ throw new Error(`${key} cannot be used with "not"`);
224
227
  const expected = utils.flag(this, "object");
225
228
  const test = utils.flag(this, "vitest-test");
226
229
  if (typeof properties === "string" && typeof message === "undefined") {
@@ -243,6 +246,9 @@ const SnapshotPlugin = (chai, utils) => {
243
246
  chai.Assertion.prototype,
244
247
  "toMatchFileSnapshot",
245
248
  function(file, message) {
249
+ const isNot = utils.flag(this, "negate");
250
+ if (isNot)
251
+ throw new Error('toMatchFileSnapshot cannot be used with "not"');
246
252
  const expected = utils.flag(this, "object");
247
253
  const test = utils.flag(this, "vitest-test");
248
254
  const errorMessage = utils.flag(this, "message");
@@ -264,6 +270,9 @@ const SnapshotPlugin = (chai, utils) => {
264
270
  "toMatchInlineSnapshot",
265
271
  function __INLINE_SNAPSHOT__(properties, inlineSnapshot, message) {
266
272
  var _a;
273
+ const isNot = utils.flag(this, "negate");
274
+ if (isNot)
275
+ throw new Error('toMatchInlineSnapshot cannot be used with "not"');
267
276
  const test = utils.flag(this, "vitest-test");
268
277
  const isInsideEach = test && (test.each || ((_a = test.suite) == null ? void 0 : _a.each));
269
278
  if (isInsideEach)
@@ -294,6 +303,9 @@ const SnapshotPlugin = (chai, utils) => {
294
303
  chai.Assertion.prototype,
295
304
  "toThrowErrorMatchingSnapshot",
296
305
  function(message) {
306
+ const isNot = utils.flag(this, "negate");
307
+ if (isNot)
308
+ throw new Error('toThrowErrorMatchingSnapshot cannot be used with "not"');
297
309
  const expected = utils.flag(this, "object");
298
310
  const test = utils.flag(this, "vitest-test");
299
311
  const promise = utils.flag(this, "promise");
@@ -311,6 +323,9 @@ const SnapshotPlugin = (chai, utils) => {
311
323
  "toThrowErrorMatchingInlineSnapshot",
312
324
  function __INLINE_SNAPSHOT__(inlineSnapshot, message) {
313
325
  var _a;
326
+ const isNot = utils.flag(this, "negate");
327
+ if (isNot)
328
+ throw new Error('toThrowErrorMatchingInlineSnapshot cannot be used with "not"');
314
329
  const test = utils.flag(this, "vitest-test");
315
330
  const isInsideEach = test && (test.each || ((_a = test.suite) == null ? void 0 : _a.each));
316
331
  if (isInsideEach)
@@ -1,8 +1,8 @@
1
1
  import vm, { isContext } from 'node:vm';
2
2
  import { fileURLToPath, pathToFileURL } from 'node:url';
3
3
  import { dirname, basename, extname, normalize, join, resolve } from 'pathe';
4
- import { createCustomConsole } from '../chunks/runtime-console.Iloo9fIt.js';
5
- import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.aFSzc0Da.js';
4
+ import { createCustomConsole } from '../chunks/runtime-console.tUKE_2UJ.js';
5
+ import { g as getDefaultRequestStubs, s as startVitestExecutor } from './execute.2_yoIC01.js';
6
6
  import { distDir } from '../path.js';
7
7
  import { dirname as dirname$1 } from 'node:path';
8
8
  import { statSync, existsSync, readFileSync } from 'node:fs';
package/dist/worker.js CHANGED
@@ -3,7 +3,7 @@ import { workerId } from 'tinypool';
3
3
  import { ViteNodeRunner, ModuleCacheMap } from 'vite-node/client';
4
4
  import { resolve, normalize } from 'pathe';
5
5
  import { e as environments } from './vendor/index.GVFv9dZ0.js';
6
- import { i as isChildProcess, s as setProcessTitle } from './vendor/base.knFzp7G3.js';
6
+ import { i as isChildProcess, s as setProcessTitle } from './vendor/base.Xt0Omgh7.js';
7
7
  import { createRequire } from 'node:module';
8
8
  import { c as createRuntimeRpc, a as rpcDone } from './vendor/rpc.joBhAkyK.js';
9
9
  import 'node:console';
@@ -52,24 +52,39 @@ async function loadEnvironment(ctx, rpc) {
52
52
 
53
53
  const __require = createRequire(import.meta.url);
54
54
  let inspector;
55
- function setupInspect(config) {
55
+ let session;
56
+ function setupInspect(ctx) {
56
57
  var _a, _b, _c, _d, _e, _f, _g, _h;
58
+ const config = ctx.config;
57
59
  const isEnabled = config.inspect || config.inspectBrk;
58
60
  if (isEnabled) {
59
61
  inspector = __require("node:inspector");
60
62
  const isOpen = inspector.url() !== void 0;
61
63
  if (!isOpen) {
62
64
  inspector.open();
63
- if (config.inspectBrk)
65
+ if (config.inspectBrk) {
64
66
  inspector.waitForDebugger();
67
+ const firstTestFile = ctx.files[0];
68
+ if (firstTestFile) {
69
+ session = new inspector.Session();
70
+ session.connect();
71
+ session.post("Debugger.enable");
72
+ session.post("Debugger.setBreakpointByUrl", {
73
+ lineNumber: 0,
74
+ url: new URL(firstTestFile, import.meta.url).href
75
+ });
76
+ }
77
+ }
65
78
  }
66
79
  }
67
80
  const isIsolatedSingleThread = config.pool === "threads" && ((_b = (_a = config.poolOptions) == null ? void 0 : _a.threads) == null ? void 0 : _b.isolate) === false && ((_d = (_c = config.poolOptions) == null ? void 0 : _c.threads) == null ? void 0 : _d.singleThread);
68
81
  const isIsolatedSingleFork = config.pool === "forks" && ((_f = (_e = config.poolOptions) == null ? void 0 : _e.forks) == null ? void 0 : _f.isolate) === false && ((_h = (_g = config.poolOptions) == null ? void 0 : _g.forks) == null ? void 0 : _h.singleFork);
69
82
  const keepOpen = config.watch && (isIsolatedSingleFork || isIsolatedSingleThread);
70
83
  return function cleanup() {
71
- if (isEnabled && !keepOpen && inspector)
84
+ if (isEnabled && !keepOpen && inspector) {
72
85
  inspector.close();
86
+ session == null ? void 0 : session.disconnect();
87
+ }
73
88
  };
74
89
  }
75
90
 
@@ -77,7 +92,7 @@ if (isChildProcess())
77
92
  setProcessTitle(`vitest ${workerId}`);
78
93
  async function run(ctx) {
79
94
  const prepareStart = performance.now();
80
- const inspectorCleanup = setupInspect(ctx.config);
95
+ const inspectorCleanup = setupInspect(ctx);
81
96
  process.env.VITEST_WORKER_ID = String(ctx.workerId);
82
97
  process.env.VITEST_POOL_ID = String(workerId);
83
98
  try {
@@ -1,10 +1,10 @@
1
1
  import v8 from 'node:v8';
2
- import { c as createForksRpcOptions, u as unwrapForksConfig } from '../vendor/utils.GbToHGHI.js';
3
- import { r as runBaseTests } from '../vendor/base.RpormaJz.js';
2
+ import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../vendor/utils.w0xgzP1h.js';
3
+ import { r as runBaseTests } from '../vendor/base.nhvUBzQY.js';
4
4
  import '@vitest/utils';
5
5
  import 'vite-node/client';
6
6
  import '../vendor/global.CkGT_TMy.js';
7
- import '../vendor/execute.aFSzc0Da.js';
7
+ import '../vendor/execute.2_yoIC01.js';
8
8
  import 'node:vm';
9
9
  import 'node:url';
10
10
  import 'vite-node/utils';
@@ -12,7 +12,7 @@ import 'pathe';
12
12
  import '@vitest/utils/error';
13
13
  import '../path.js';
14
14
  import 'node:fs';
15
- import '../vendor/base.knFzp7G3.js';
15
+ import '../vendor/base.Xt0Omgh7.js';
16
16
 
17
17
  class ForksBaseWorker {
18
18
  getRpcOptions() {
@@ -20,7 +20,7 @@ class ForksBaseWorker {
20
20
  }
21
21
  async runTests(state) {
22
22
  const exit = process.exit;
23
- state.ctx.config = unwrapForksConfig(state.ctx.config);
23
+ state.ctx.config = unwrapSerializableConfig(state.ctx.config);
24
24
  try {
25
25
  await runBaseTests(state);
26
26
  } finally {
@@ -6,11 +6,11 @@ import { performance } from 'node:perf_hooks';
6
6
  import { startTests } from '@vitest/runner';
7
7
  import { setupColors, createColors } from '@vitest/utils';
8
8
  import { installSourcemapsSupport } from 'vite-node/source-map';
9
- import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.CKbXK54q.js';
9
+ import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from '../vendor/index.LNWuEnUT.js';
10
10
  import { a as startCoverageInsideWorker, s as stopCoverageInsideWorker } from '../vendor/coverage.E7sG1b3r.js';
11
11
  import { g as getWorkerState } from '../vendor/global.CkGT_TMy.js';
12
- import { V as VitestIndex } from '../vendor/index.n-Ib4UWN.js';
13
- import { s as setupCommonEnv } from '../vendor/setup-common.NSpEdAQm.js';
12
+ import { V as VitestIndex } from '../vendor/index.BeX1oZht.js';
13
+ import { s as setupCommonEnv } from '../vendor/setup-common.vyF1kALR.js';
14
14
  import 'chai';
15
15
  import '@vitest/snapshot/environment';
16
16
  import 'pathe';
@@ -23,14 +23,14 @@ import '@vitest/runner/utils';
23
23
  import '../vendor/index.ir9i0ywP.js';
24
24
  import 'std-env';
25
25
  import '../vendor/run-once.Olz_Zkd8.js';
26
- import '../vendor/vi.-Nr_x6dl.js';
26
+ import '../vendor/vi.JYQecGiw.js';
27
27
  import '../vendor/_commonjsHelpers.jjO7Zipk.js';
28
28
  import '@vitest/expect';
29
29
  import '@vitest/snapshot';
30
30
  import '@vitest/utils/error';
31
31
  import '../vendor/tasks.IknbGB2n.js';
32
32
  import '@vitest/utils/source-map';
33
- import '../vendor/base.knFzp7G3.js';
33
+ import '../vendor/base.Xt0Omgh7.js';
34
34
  import '../vendor/date.Ns1pGd_X.js';
35
35
  import '@vitest/spy';
36
36
 
@@ -1,8 +1,8 @@
1
- import { r as runBaseTests } from '../vendor/base.RpormaJz.js';
2
- import { a as createThreadsRpcOptions } from '../vendor/utils.GbToHGHI.js';
1
+ import { r as runBaseTests } from '../vendor/base.nhvUBzQY.js';
2
+ import { a as createThreadsRpcOptions } from '../vendor/utils.w0xgzP1h.js';
3
3
  import 'vite-node/client';
4
4
  import '../vendor/global.CkGT_TMy.js';
5
- import '../vendor/execute.aFSzc0Da.js';
5
+ import '../vendor/execute.2_yoIC01.js';
6
6
  import 'node:vm';
7
7
  import 'node:url';
8
8
  import 'vite-node/utils';
@@ -11,7 +11,7 @@ import '@vitest/utils/error';
11
11
  import '../path.js';
12
12
  import 'node:fs';
13
13
  import '@vitest/utils';
14
- import '../vendor/base.knFzp7G3.js';
14
+ import '../vendor/base.Xt0Omgh7.js';
15
15
 
16
16
  class ThreadsBaseWorker {
17
17
  getRpcOptions(ctx) {
@@ -1,22 +1,22 @@
1
1
  import v8 from 'node:v8';
2
- import { c as createForksRpcOptions, u as unwrapForksConfig } from '../vendor/utils.GbToHGHI.js';
3
- import { r as runVmTests } from '../vendor/vm.UmCkcXp-.js';
2
+ import { c as createForksRpcOptions, u as unwrapSerializableConfig } from '../vendor/utils.w0xgzP1h.js';
3
+ import { r as runVmTests } from '../vendor/vm.cAHVDF92.js';
4
4
  import '@vitest/utils';
5
5
  import 'node:vm';
6
6
  import 'node:url';
7
7
  import 'pathe';
8
- import '../chunks/runtime-console.Iloo9fIt.js';
8
+ import '../chunks/runtime-console.tUKE_2UJ.js';
9
9
  import 'node:stream';
10
10
  import 'node:console';
11
11
  import 'node:path';
12
12
  import '../vendor/date.Ns1pGd_X.js';
13
- import '../vendor/execute.aFSzc0Da.js';
13
+ import '../vendor/execute.2_yoIC01.js';
14
14
  import 'vite-node/client';
15
15
  import 'vite-node/utils';
16
16
  import '@vitest/utils/error';
17
17
  import '../path.js';
18
18
  import 'node:fs';
19
- import '../vendor/base.knFzp7G3.js';
19
+ import '../vendor/base.Xt0Omgh7.js';
20
20
  import 'node:module';
21
21
  import 'vite-node/constants';
22
22
  import '../vendor/index.ir9i0ywP.js';
@@ -30,7 +30,7 @@ class ForksVmWorker {
30
30
  }
31
31
  async runTests(state) {
32
32
  const exit = process.exit;
33
- state.ctx.config = unwrapForksConfig(state.ctx.config);
33
+ state.ctx.config = unwrapSerializableConfig(state.ctx.config);
34
34
  try {
35
35
  await runVmTests(state);
36
36
  } finally {
@@ -1,21 +1,21 @@
1
- import { a as createThreadsRpcOptions } from '../vendor/utils.GbToHGHI.js';
2
- import { r as runVmTests } from '../vendor/vm.UmCkcXp-.js';
1
+ import { a as createThreadsRpcOptions } from '../vendor/utils.w0xgzP1h.js';
2
+ import { r as runVmTests } from '../vendor/vm.cAHVDF92.js';
3
3
  import '@vitest/utils';
4
4
  import 'node:vm';
5
5
  import 'node:url';
6
6
  import 'pathe';
7
- import '../chunks/runtime-console.Iloo9fIt.js';
7
+ import '../chunks/runtime-console.tUKE_2UJ.js';
8
8
  import 'node:stream';
9
9
  import 'node:console';
10
10
  import 'node:path';
11
11
  import '../vendor/date.Ns1pGd_X.js';
12
- import '../vendor/execute.aFSzc0Da.js';
12
+ import '../vendor/execute.2_yoIC01.js';
13
13
  import 'vite-node/client';
14
14
  import 'vite-node/utils';
15
15
  import '@vitest/utils/error';
16
16
  import '../path.js';
17
17
  import 'node:fs';
18
- import '../vendor/base.knFzp7G3.js';
18
+ import '../vendor/base.Xt0Omgh7.js';
19
19
  import 'node:module';
20
20
  import 'vite-node/constants';
21
21
  import '../vendor/index.ir9i0ywP.js';
package/dist/workers.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as v8 from 'v8';
2
- import { n as BirpcOptions, f as RuntimeRPC, o as ContextRPC, p as WorkerGlobalState, q as WorkerContext, R as ResolvedConfig } from './reporters-QGe8gs4b.js';
2
+ import { d as BirpcOptions, e as RuntimeRPC, f as ContextRPC, W as WorkerGlobalState, g as WorkerContext, R as ResolvedConfig } from './reporters-P7C2ytIv.js';
3
3
  import { Awaitable } from '@vitest/utils';
4
4
  import 'vite';
5
5
  import '@vitest/runner';
@@ -23,7 +23,10 @@ interface VitestWorker {
23
23
 
24
24
  declare function createThreadsRpcOptions({ port }: WorkerContext): WorkerRpcOptions;
25
25
  declare function createForksRpcOptions(nodeV8: typeof v8): WorkerRpcOptions;
26
- declare function unwrapForksConfig(config: ResolvedConfig): ResolvedConfig;
26
+ /**
27
+ * Reverts the wrapping done by `utils/config-helpers.ts`'s `wrapSerializableConfig`
28
+ */
29
+ declare function unwrapSerializableConfig(config: ResolvedConfig): ResolvedConfig;
27
30
 
28
31
  declare function provideWorkerState(context: any, state: WorkerGlobalState): WorkerGlobalState;
29
32
 
@@ -33,4 +36,4 @@ declare function runVmTests(state: WorkerGlobalState): Promise<void>;
33
36
 
34
37
  declare function runBaseTests(state: WorkerGlobalState): Promise<void>;
35
38
 
36
- export { type VitestWorker, type WorkerRpcOptions, createForksRpcOptions, createThreadsRpcOptions, provideWorkerState, runBaseTests, run as runVitestWorker, runVmTests, unwrapForksConfig };
39
+ export { type VitestWorker, type WorkerRpcOptions, createForksRpcOptions, createThreadsRpcOptions, provideWorkerState, runBaseTests, run as runVitestWorker, runVmTests, unwrapSerializableConfig };
package/dist/workers.js CHANGED
@@ -1,8 +1,8 @@
1
- export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapForksConfig } from './vendor/utils.GbToHGHI.js';
1
+ export { c as createForksRpcOptions, a as createThreadsRpcOptions, u as unwrapSerializableConfig } from './vendor/utils.w0xgzP1h.js';
2
2
  export { p as provideWorkerState } from './vendor/global.CkGT_TMy.js';
3
3
  export { run as runVitestWorker } from './worker.js';
4
- export { r as runVmTests } from './vendor/vm.UmCkcXp-.js';
5
- export { r as runBaseTests } from './vendor/base.RpormaJz.js';
4
+ export { r as runVmTests } from './vendor/vm.cAHVDF92.js';
5
+ export { r as runBaseTests } from './vendor/base.nhvUBzQY.js';
6
6
  import '@vitest/utils';
7
7
  import 'node:url';
8
8
  import 'tinypool';
@@ -10,16 +10,16 @@ import 'vite-node/client';
10
10
  import 'pathe';
11
11
  import './vendor/index.GVFv9dZ0.js';
12
12
  import 'node:console';
13
- import './vendor/base.knFzp7G3.js';
13
+ import './vendor/base.Xt0Omgh7.js';
14
14
  import 'node:module';
15
15
  import './vendor/rpc.joBhAkyK.js';
16
16
  import './vendor/index.8bPxjt7g.js';
17
17
  import 'node:vm';
18
- import './chunks/runtime-console.Iloo9fIt.js';
18
+ import './chunks/runtime-console.tUKE_2UJ.js';
19
19
  import 'node:stream';
20
20
  import 'node:path';
21
21
  import './vendor/date.Ns1pGd_X.js';
22
- import './vendor/execute.aFSzc0Da.js';
22
+ import './vendor/execute.2_yoIC01.js';
23
23
  import 'vite-node/utils';
24
24
  import '@vitest/utils/error';
25
25
  import './path.js';