vitest 3.2.4 → 4.0.0-beta.10

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 (88) hide show
  1. package/LICENSE.md +2 -2
  2. package/dist/browser.d.ts +13 -16
  3. package/dist/browser.js +6 -5
  4. package/dist/chunks/base.Cjha6usc.js +129 -0
  5. package/dist/chunks/{benchmark.CYdenmiT.js → benchmark.CJUa-Hsa.js} +6 -8
  6. package/dist/chunks/{benchmark.d.BwvBVTda.d.ts → benchmark.d.DAaHLpsq.d.ts} +4 -4
  7. package/dist/chunks/browser.d.yFAklsD1.d.ts +18 -0
  8. package/dist/chunks/{cac.Cb-PYCCB.js → cac.DCxo_nSu.js} +72 -163
  9. package/dist/chunks/{cli-api.BkDphVBG.js → cli-api.BJJXh9BV.js} +1331 -1678
  10. package/dist/chunks/{config.d.D2ROskhv.d.ts → config.d.B_LthbQq.d.ts} +59 -65
  11. package/dist/chunks/{console.CtFJOzRO.js → console.7h5kHUIf.js} +34 -70
  12. package/dist/chunks/{constants.DnKduX2e.js → constants.D_Q9UYh-.js} +1 -9
  13. package/dist/chunks/{coverage.DL5VHqXY.js → coverage.BCU-r2QL.js} +538 -765
  14. package/dist/chunks/{coverage.DVF1vEu8.js → coverage.D_JHT54q.js} +2 -2
  15. package/dist/chunks/{coverage.d.S9RMNXIe.d.ts → coverage.d.BZtK59WP.d.ts} +10 -8
  16. package/dist/chunks/{creator.GK6I-cL4.js → creator.08Gi-vCA.js} +93 -77
  17. package/dist/chunks/{date.Bq6ZW5rf.js → date.-jtEtIeV.js} +6 -17
  18. package/dist/chunks/{defaults.B7q_naMc.js → defaults.CXFFjsi8.js} +2 -42
  19. package/dist/chunks/environment.d.BsToaxti.d.ts +65 -0
  20. package/dist/chunks/{git.BVQ8w_Sw.js → git.BFNcloKD.js} +1 -2
  21. package/dist/chunks/{global.d.MAmajcmJ.d.ts → global.d.BK3X7FW1.d.ts} +7 -32
  22. package/dist/chunks/{globals.DEHgCU4V.js → globals.DG-S3xFe.js} +8 -8
  23. package/dist/chunks/{index.VByaPkjc.js → index.BIP7prJq.js} +472 -803
  24. package/dist/chunks/{index.B521nVV-.js → index.Bgo3tNWt.js} +23 -4
  25. package/dist/chunks/{index.BCWujgDG.js → index.BjKEiSn0.js} +14 -24
  26. package/dist/chunks/{index.CdQS2e2Q.js → index.CMfqw92x.js} +7 -8
  27. package/dist/chunks/{index.CmSc2RE5.js → index.DIWhzsUh.js} +72 -118
  28. package/dist/chunks/{inspector.C914Efll.js → inspector.CvQD-Nie.js} +10 -25
  29. package/dist/chunks/moduleRunner.d.D9nBoC4p.d.ts +201 -0
  30. package/dist/chunks/moduleTransport.I-bgQy0S.js +19 -0
  31. package/dist/chunks/{node.fjCdwEIl.js → node.CyipiPvJ.js} +1 -1
  32. package/dist/chunks/plugin.d.BMVSnsGV.d.ts +9 -0
  33. package/dist/chunks/{reporters.d.BFLkQcL6.d.ts → reporters.d.BUWjmRYq.d.ts} +2086 -2146
  34. package/dist/chunks/resolveSnapshotEnvironment.Bkht6Yor.js +81 -0
  35. package/dist/chunks/resolver.Bx6lE0iq.js +119 -0
  36. package/dist/chunks/rpc.BKr6mtxz.js +65 -0
  37. package/dist/chunks/{setup-common.Dd054P77.js → setup-common.uiMcU3cv.js} +17 -29
  38. package/dist/chunks/startModuleRunner.p67gbNo9.js +665 -0
  39. package/dist/chunks/{suite.d.FvehnV49.d.ts → suite.d.BJWk38HB.d.ts} +1 -1
  40. package/dist/chunks/test.BiqSKISg.js +214 -0
  41. package/dist/chunks/{typechecker.DRKU1-1g.js → typechecker.DB-fIMaH.js} +165 -234
  42. package/dist/chunks/{utils.CAioKnHs.js → utils.C2YI6McM.js} +5 -14
  43. package/dist/chunks/{utils.XdZDrNZV.js → utils.D2R2NiOH.js} +8 -27
  44. package/dist/chunks/{vi.bdSIJ99Y.js → vi.ZPgvtBao.js} +156 -305
  45. package/dist/chunks/{vm.BThCzidc.js → vm.Ca0Y0W5f.js} +116 -226
  46. package/dist/chunks/{worker.d.1GmBbd7G.d.ts → worker.d.BDsXGkwh.d.ts} +31 -32
  47. package/dist/chunks/{worker.d.CKwWzBSj.d.ts → worker.d.BNcX_2mH.d.ts} +1 -1
  48. package/dist/cli.js +10 -10
  49. package/dist/config.cjs +5 -58
  50. package/dist/config.d.ts +72 -71
  51. package/dist/config.js +3 -9
  52. package/dist/coverage.d.ts +31 -24
  53. package/dist/coverage.js +9 -9
  54. package/dist/environments.d.ts +9 -14
  55. package/dist/environments.js +1 -1
  56. package/dist/index.d.ts +52 -213
  57. package/dist/index.js +7 -9
  58. package/dist/module-evaluator.d.ts +13 -0
  59. package/dist/module-evaluator.js +276 -0
  60. package/dist/module-runner.js +15 -0
  61. package/dist/node.d.ts +62 -51
  62. package/dist/node.js +26 -42
  63. package/dist/reporters.d.ts +11 -12
  64. package/dist/reporters.js +12 -12
  65. package/dist/runners.d.ts +3 -4
  66. package/dist/runners.js +13 -231
  67. package/dist/snapshot.js +2 -2
  68. package/dist/suite.d.ts +2 -2
  69. package/dist/suite.js +2 -2
  70. package/dist/worker.js +90 -47
  71. package/dist/workers/forks.js +34 -10
  72. package/dist/workers/runVmTests.js +36 -56
  73. package/dist/workers/threads.js +34 -10
  74. package/dist/workers/vmForks.js +11 -10
  75. package/dist/workers/vmThreads.js +11 -10
  76. package/dist/workers.d.ts +5 -7
  77. package/dist/workers.js +35 -17
  78. package/globals.d.ts +17 -17
  79. package/package.json +32 -31
  80. package/dist/chunks/base.DfmxU-tU.js +0 -38
  81. package/dist/chunks/environment.d.cL3nLXbE.d.ts +0 -119
  82. package/dist/chunks/execute.B7h3T_Hc.js +0 -708
  83. package/dist/chunks/index.CwejwG0H.js +0 -105
  84. package/dist/chunks/rpc.-pEldfrD.js +0 -83
  85. package/dist/chunks/runBaseTests.9Ij9_de-.js +0 -129
  86. package/dist/chunks/vite.d.CMLlLIFP.d.ts +0 -25
  87. package/dist/execute.d.ts +0 -150
  88. package/dist/execute.js +0 -13
@@ -1,7 +1,6 @@
1
1
  import { PrettyFormatOptions } from '@vitest/pretty-format';
2
2
  import { SequenceHooks, SequenceSetupFiles } from '@vitest/runner';
3
- import { SnapshotUpdateState } from '@vitest/snapshot';
4
- import { SnapshotEnvironment } from '@vitest/snapshot/environment';
3
+ import { SnapshotUpdateState, SnapshotEnvironment } from '@vitest/snapshot';
5
4
  import { SerializedDiffOptions } from '@vitest/utils/diff';
6
5
 
7
6
  /**
@@ -94,73 +93,67 @@ interface SerializedConfig {
94
93
  restoreMocks: boolean;
95
94
  unstubGlobals: boolean;
96
95
  unstubEnvs: boolean;
97
- // TODO: make optional
98
96
  fakeTimers: FakeTimerInstallOpts;
99
97
  maxConcurrency: number;
100
98
  defines: Record<string, any>;
101
99
  expect: {
102
- requireAssertions?: boolean
100
+ requireAssertions?: boolean;
103
101
  poll?: {
104
- timeout?: number
105
- interval?: number
106
- }
102
+ timeout?: number;
103
+ interval?: number;
104
+ };
107
105
  };
108
106
  printConsoleTrace: boolean | undefined;
109
107
  sequence: {
110
- shuffle?: boolean
111
- concurrent?: boolean
112
- seed: number
113
- hooks: SequenceHooks
114
- setupFiles: SequenceSetupFiles
108
+ shuffle?: boolean;
109
+ concurrent?: boolean;
110
+ seed: number;
111
+ hooks: SequenceHooks;
112
+ setupFiles: SequenceSetupFiles;
115
113
  };
116
114
  poolOptions: {
117
115
  forks: {
118
- singleFork: boolean
119
- isolate: boolean
120
- }
116
+ singleFork: boolean;
117
+ isolate: boolean;
118
+ };
121
119
  threads: {
122
- singleThread: boolean
123
- isolate: boolean
124
- }
120
+ singleThread: boolean;
121
+ isolate: boolean;
122
+ };
125
123
  vmThreads: {
126
- singleThread: boolean
127
- }
124
+ singleThread: boolean;
125
+ };
128
126
  vmForks: {
129
- singleFork: boolean
130
- }
127
+ singleFork: boolean;
128
+ };
131
129
  };
132
130
  deps: {
133
131
  web: {
134
- transformAssets?: boolean
135
- transformCss?: boolean
136
- transformGlobPattern?: RegExp | RegExp[]
137
- }
138
- optimizer: {
139
- web: {
140
- enabled: boolean
141
- }
142
- ssr: {
143
- enabled: boolean
144
- }
145
- }
146
- interopDefault: boolean | undefined
147
- moduleDirectories: string[] | undefined
132
+ transformAssets?: boolean;
133
+ transformCss?: boolean;
134
+ transformGlobPattern?: RegExp | RegExp[];
135
+ };
136
+ optimizer: Record<string, {
137
+ enabled: boolean;
138
+ }>;
139
+ interopDefault: boolean | undefined;
140
+ moduleDirectories: string[] | undefined;
148
141
  };
149
142
  snapshotOptions: {
150
- updateSnapshot: SnapshotUpdateState
151
- expand: boolean | undefined
152
- snapshotFormat: PrettyFormatOptions | undefined
143
+ updateSnapshot: SnapshotUpdateState;
144
+ expand: boolean | undefined;
145
+ snapshotFormat: PrettyFormatOptions | undefined;
153
146
  /**
154
147
  * only exists for tests, not available in the main process
155
148
  */
156
- snapshotEnvironment: SnapshotEnvironment
149
+ snapshotEnvironment: SnapshotEnvironment;
157
150
  };
158
151
  pool: string;
159
152
  snapshotSerializers: string[];
160
153
  chaiConfig: {
161
- includeStack?: boolean
162
- showDiff?: boolean
163
- truncateThreshold?: number
154
+ includeStack?: boolean;
155
+ showDiff?: boolean;
156
+ truncateThreshold?: number;
164
157
  } | undefined;
165
158
  diff: string | SerializedDiffOptions | undefined;
166
159
  retry: number;
@@ -168,52 +161,53 @@ interface SerializedConfig {
168
161
  inspect: boolean | string | undefined;
169
162
  inspectBrk: boolean | string | undefined;
170
163
  inspector: {
171
- enabled?: boolean
172
- port?: number
173
- host?: string
174
- waitForDebugger?: boolean
164
+ enabled?: boolean;
165
+ port?: number;
166
+ host?: string;
167
+ waitForDebugger?: boolean;
175
168
  };
176
169
  watch: boolean;
177
170
  env: Record<string, any>;
178
171
  browser: {
179
- name: string
180
- headless: boolean
181
- isolate: boolean
182
- fileParallelism: boolean
183
- ui: boolean
172
+ name: string;
173
+ headless: boolean;
174
+ isolate: boolean;
175
+ fileParallelism: boolean;
176
+ ui: boolean;
184
177
  viewport: {
185
- width: number
186
- height: number
187
- }
178
+ width: number;
179
+ height: number;
180
+ };
188
181
  locators: {
189
- testIdAttribute: string
190
- }
191
- screenshotFailures: boolean
182
+ testIdAttribute: string;
183
+ };
184
+ screenshotFailures: boolean;
192
185
  providerOptions: {
193
- // for playwright
194
- actionTimeout?: number
195
- }
186
+ actionTimeout?: number;
187
+ };
188
+ trackUnhandledErrors: boolean;
196
189
  };
197
190
  standalone: boolean;
198
191
  logHeapUsage: boolean | undefined;
199
192
  coverage: SerializedCoverageConfig;
200
193
  benchmark: {
201
- includeSamples: boolean
194
+ includeSamples: boolean;
202
195
  } | undefined;
196
+ serializedDefines: string;
203
197
  }
204
198
  interface SerializedCoverageConfig {
205
199
  provider: "istanbul" | "v8" | "custom" | undefined;
206
200
  reportsDirectory: string;
207
201
  htmlReporter: {
208
- subdir: string | undefined
202
+ subdir: string | undefined;
209
203
  } | undefined;
210
204
  enabled: boolean;
211
205
  customProviderModule: string | undefined;
212
206
  }
213
207
  type RuntimeConfig = Pick<SerializedConfig, "allowOnly" | "testTimeout" | "hookTimeout" | "clearMocks" | "mockReset" | "restoreMocks" | "fakeTimers" | "maxConcurrency" | "expect" | "printConsoleTrace"> & {
214
208
  sequence?: {
215
- hooks?: SequenceHooks
216
- }
209
+ hooks?: SequenceHooks;
210
+ };
217
211
  };
218
212
  type RuntimeOptions = Partial<RuntimeConfig>;
219
213
 
@@ -3,48 +3,35 @@ import { relative } from 'node:path';
3
3
  import { Writable } from 'node:stream';
4
4
  import { getSafeTimers } from '@vitest/utils';
5
5
  import c from 'tinyrainbow';
6
- import { R as RealDate } from './date.Bq6ZW5rf.js';
7
- import { g as getWorkerState } from './utils.XdZDrNZV.js';
6
+ import { R as RealDate } from './date.-jtEtIeV.js';
7
+ import { g as getWorkerState } from './utils.D2R2NiOH.js';
8
8
 
9
9
  const UNKNOWN_TEST_ID = "__vitest__unknown_test__";
10
10
  function getTaskIdByStack(root) {
11
- const stack = new Error("STACK_TRACE_ERROR").stack?.split("\n");
11
+ const stack = (/* @__PURE__ */ new Error("STACK_TRACE_ERROR")).stack?.split("\n");
12
12
  if (!stack) return UNKNOWN_TEST_ID;
13
- const index = stack.findIndex((line) => line.includes("at Console.value"));
14
- const line = index === -1 ? null : stack[index + 2];
13
+ const index = stack.findIndex((line) => line.includes("at Console.value")), line = index === -1 ? null : stack[index + 2];
15
14
  if (!line) return UNKNOWN_TEST_ID;
16
15
  const filepath = line.match(/at\s(.*)\s?/)?.[1];
17
- if (filepath) return relative(root, filepath);
18
- return UNKNOWN_TEST_ID;
16
+ return filepath ? relative(root, filepath) : UNKNOWN_TEST_ID;
19
17
  }
20
18
  function createCustomConsole(defaultState) {
21
- const stdoutBuffer = /* @__PURE__ */ new Map();
22
- const stderrBuffer = /* @__PURE__ */ new Map();
23
- const timers = /* @__PURE__ */ new Map();
24
- const { queueMicrotask } = getSafeTimers();
19
+ const stdoutBuffer = /* @__PURE__ */ new Map(), stderrBuffer = /* @__PURE__ */ new Map(), timers = /* @__PURE__ */ new Map(), { queueMicrotask } = getSafeTimers();
25
20
  function queueCancelableMicrotask(callback) {
26
21
  let canceled = false;
27
- queueMicrotask(() => {
22
+ return queueMicrotask(() => {
28
23
  if (!canceled) callback();
29
- });
30
- return () => {
24
+ }), () => {
31
25
  canceled = true;
32
26
  };
33
27
  }
34
28
  const state = () => defaultState || getWorkerState();
35
29
  // group sync console.log calls with micro task
36
30
  function schedule(taskId) {
37
- const timer = timers.get(taskId);
38
- const { stdoutTime, stderrTime } = timer;
39
- timer.cancel?.();
40
- timer.cancel = queueCancelableMicrotask(() => {
41
- if (stderrTime < stdoutTime) {
42
- sendStderr(taskId);
43
- sendStdout(taskId);
44
- } else {
45
- sendStdout(taskId);
46
- sendStderr(taskId);
47
- }
31
+ const timer = timers.get(taskId), { stdoutTime, stderrTime } = timer;
32
+ timer.cancel?.(), timer.cancel = queueCancelableMicrotask(() => {
33
+ if (stderrTime < stdoutTime) sendStderr(taskId), sendStdout(taskId);
34
+ else sendStdout(taskId), sendStderr(taskId);
48
35
  });
49
36
  }
50
37
  function sendStdout(taskId) {
@@ -54,8 +41,7 @@ function createCustomConsole(defaultState) {
54
41
  sendBuffer("stderr", taskId);
55
42
  }
56
43
  function sendBuffer(type, taskId) {
57
- const buffers = type === "stdout" ? stdoutBuffer : stderrBuffer;
58
- const buffer = buffers.get(taskId);
44
+ const buffers = type === "stdout" ? stdoutBuffer : stderrBuffer, buffer = buffers.get(taskId);
59
45
  if (!buffer) return;
60
46
  if (state().config.printConsoleTrace) buffer.forEach(([buffer, origin]) => {
61
47
  sendLog(type, taskId, String(buffer), buffer.length, origin);
@@ -65,13 +51,11 @@ function createCustomConsole(defaultState) {
65
51
  sendLog(type, taskId, content, buffer.length);
66
52
  }
67
53
  const timer = timers.get(taskId);
68
- buffers.delete(taskId);
69
- if (type === "stderr") timer.stderrTime = 0;
54
+ if (buffers.delete(taskId), type === "stderr") timer.stderrTime = 0;
70
55
  else timer.stdoutTime = 0;
71
56
  }
72
57
  function sendLog(type, taskId, content, size, origin) {
73
- const timer = timers.get(taskId);
74
- const time = type === "stderr" ? timer.stderrTime : timer.stdoutTime;
58
+ const timer = timers.get(taskId), time = type === "stderr" ? timer.stderrTime : timer.stdoutTime;
75
59
  state().rpc.onUserConsoleLog({
76
60
  type,
77
61
  content: content || "<empty line>",
@@ -82,65 +66,45 @@ function createCustomConsole(defaultState) {
82
66
  });
83
67
  }
84
68
  const stdout = new Writable({ write(data, encoding, callback) {
85
- const s = state();
86
- const id = s?.current?.id || s?.current?.suite?.id || s.current?.file.id || getTaskIdByStack(s.config.root);
69
+ const s = state(), id = s?.current?.id || s?.current?.suite?.id || s.current?.file.id || getTaskIdByStack(s.config.root);
87
70
  let timer = timers.get(id);
88
71
  if (timer) timer.stdoutTime = timer.stdoutTime || RealDate.now();
89
- else {
90
- timer = {
91
- stdoutTime: RealDate.now(),
92
- stderrTime: RealDate.now()
93
- };
94
- timers.set(id, timer);
95
- }
72
+ else timer = {
73
+ stdoutTime: RealDate.now(),
74
+ stderrTime: RealDate.now()
75
+ }, timers.set(id, timer);
96
76
  let buffer = stdoutBuffer.get(id);
97
- if (!buffer) {
98
- buffer = [];
99
- stdoutBuffer.set(id, buffer);
100
- }
77
+ if (!buffer) buffer = [], stdoutBuffer.set(id, buffer);
101
78
  if (state().config.printConsoleTrace) {
102
79
  const limit = Error.stackTraceLimit;
103
80
  Error.stackTraceLimit = limit + 6;
104
- const stack = new Error("STACK_TRACE").stack;
105
- const trace = stack?.split("\n").slice(7).join("\n");
106
- Error.stackTraceLimit = limit;
107
- buffer.push([data, trace]);
81
+ const stack = (/* @__PURE__ */ new Error("STACK_TRACE")).stack, trace = stack?.split("\n").slice(7).join("\n");
82
+ Error.stackTraceLimit = limit, buffer.push([data, trace]);
108
83
  } else buffer.push([data, void 0]);
109
- schedule(id);
110
- callback();
111
- } });
112
- const stderr = new Writable({ write(data, encoding, callback) {
113
- const s = state();
114
- const id = s?.current?.id || s?.current?.suite?.id || s.current?.file.id || getTaskIdByStack(s.config.root);
84
+ schedule(id), callback();
85
+ } }), stderr = new Writable({ write(data, encoding, callback) {
86
+ const s = state(), id = s?.current?.id || s?.current?.suite?.id || s.current?.file.id || getTaskIdByStack(s.config.root);
115
87
  let timer = timers.get(id);
116
88
  if (timer) timer.stderrTime = timer.stderrTime || RealDate.now();
117
- else {
118
- timer = {
119
- stderrTime: RealDate.now(),
120
- stdoutTime: RealDate.now()
121
- };
122
- timers.set(id, timer);
123
- }
89
+ else timer = {
90
+ stderrTime: RealDate.now(),
91
+ stdoutTime: RealDate.now()
92
+ }, timers.set(id, timer);
124
93
  let buffer = stderrBuffer.get(id);
125
- if (!buffer) {
126
- buffer = [];
127
- stderrBuffer.set(id, buffer);
128
- }
94
+ if (!buffer) buffer = [], stderrBuffer.set(id, buffer);
129
95
  if (state().config.printConsoleTrace) {
130
96
  const limit = Error.stackTraceLimit;
131
97
  Error.stackTraceLimit = limit + 6;
132
- const stack = new Error("STACK_TRACE").stack?.split("\n");
98
+ const stack = (/* @__PURE__ */ new Error("STACK_TRACE")).stack?.split("\n");
133
99
  Error.stackTraceLimit = limit;
134
100
  const isTrace = stack?.some((line) => line.includes("at Console.trace"));
135
101
  if (isTrace) buffer.push([data, void 0]);
136
102
  else {
137
103
  const trace = stack?.slice(7).join("\n");
138
- Error.stackTraceLimit = limit;
139
- buffer.push([data, trace]);
104
+ Error.stackTraceLimit = limit, buffer.push([data, trace]);
140
105
  }
141
106
  } else buffer.push([data, void 0]);
142
- schedule(id);
143
- callback();
107
+ schedule(id), callback();
144
108
  } });
145
109
  return new Console({
146
110
  stdout,
@@ -3,13 +3,7 @@ const defaultPort = 51204;
3
3
  const defaultBrowserPort = 63315;
4
4
  const defaultInspectPort = 9229;
5
5
  const API_PATH = "/__vitest_api__";
6
- const extraInlineDeps = [
7
- /^(?!.*node_modules).*\.mjs$/,
8
- /^(?!.*node_modules).*\.cjs\.js$/,
9
- /vite\w*\/dist\/client\/env.mjs/
10
- ];
11
6
  const CONFIG_NAMES = ["vitest.config", "vite.config"];
12
- const WORKSPACES_NAMES = ["vitest.workspace", "vitest.projects"];
13
7
  const CONFIG_EXTENSIONS = [
14
8
  ".ts",
15
9
  ".mts",
@@ -19,8 +13,6 @@ const CONFIG_EXTENSIONS = [
19
13
  ".cjs"
20
14
  ];
21
15
  const configFiles = CONFIG_NAMES.flatMap((name) => CONFIG_EXTENSIONS.map((ext) => name + ext));
22
- const WORKSPACES_EXTENSIONS = [...CONFIG_EXTENSIONS, ".json"];
23
- const workspacesFiles = WORKSPACES_NAMES.flatMap((name) => WORKSPACES_EXTENSIONS.map((ext) => name + ext));
24
16
  const globalApis = [
25
17
  "suite",
26
18
  "test",
@@ -41,4 +33,4 @@ const globalApis = [
41
33
  "onTestFailed"
42
34
  ];
43
35
 
44
- export { API_PATH as A, defaultPort as a, defaultInspectPort as b, configFiles as c, defaultBrowserPort as d, extraInlineDeps as e, globalApis as g, workspacesFiles as w };
36
+ export { API_PATH as A, defaultPort as a, defaultInspectPort as b, configFiles as c, defaultBrowserPort as d, globalApis as g };