vitest 1.0.0-beta.3 → 1.0.0-beta.5

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 (66) hide show
  1. package/LICENSE.md +3 -498
  2. package/dist/browser.d.ts +1 -2
  3. package/dist/browser.js +4 -4
  4. package/dist/child.js +15 -18
  5. package/dist/{chunk-api-setup.37a43981.js → chunks/api-setup.jHV5vgr2.js} +101 -39
  6. package/dist/chunks/install-pkg.ORGzQeqb.js +457 -0
  7. package/dist/chunks/integrations-globals.-pds_Gug.js +29 -0
  8. package/dist/{chunk-node-git.6c12e560.js → chunks/node-git.Hw101KjS.js} +1 -18
  9. package/dist/{chunk-runtime-console.f3263f87.js → chunks/runtime-console.iCAG0Yz3.js} +1 -1
  10. package/dist/cli-wrapper.js +2 -18
  11. package/dist/cli.js +21 -23
  12. package/dist/config.cjs +2 -1
  13. package/dist/config.d.ts +4 -7
  14. package/dist/config.js +2 -1
  15. package/dist/coverage.d.ts +25 -16
  16. package/dist/coverage.js +118 -49
  17. package/dist/entry-vm.js +13 -13
  18. package/dist/entry.js +14 -14
  19. package/dist/environments.d.ts +1 -2
  20. package/dist/environments.js +1 -1
  21. package/dist/execute.d.ts +2 -3
  22. package/dist/execute.js +3 -4
  23. package/dist/index.d.ts +396 -95
  24. package/dist/index.js +10 -10
  25. package/dist/node.d.ts +10 -6
  26. package/dist/node.js +17 -22
  27. package/dist/{vendor-paths.84fc7a99.js → paths.js} +1 -1
  28. package/dist/{reporters-1678fe04.d.ts → reporters-ANEBTnOh.d.ts} +336 -340
  29. package/dist/reporters.d.ts +1 -2
  30. package/dist/reporters.js +7 -8
  31. package/dist/runners.d.ts +1 -2
  32. package/dist/runners.js +8 -9
  33. package/dist/{suite-0579b50d.d.ts → suite-C1OmA61l.d.ts} +1 -1
  34. package/dist/suite.d.ts +2 -3
  35. package/dist/suite.js +3 -3
  36. package/dist/{vendor-benchmark.44931cfa.js → vendor/benchmark.WVm6DARl.js} +1 -1
  37. package/dist/{vendor-execute.e6e4e89b.js → vendor/execute.aMjV5C9u.js} +4 -7
  38. package/dist/vendor/global.L7JRz1qU.js +14 -0
  39. package/dist/{vendor-index.68ecee35.js → vendor/index.Npc-eff0.js} +11 -4
  40. package/dist/{vendor-index.29282562.js → vendor/index.XU72Rmy8.js} +1 -1
  41. package/dist/{vendor-index.3d079eea.js → vendor/index.h0j9y5vy.js} +5 -5
  42. package/dist/vendor/index.xL8XjTLv.js +3962 -0
  43. package/dist/vendor/loader.CU0NY2Is.js +39 -0
  44. package/dist/{vendor-node.327f8f1f.js → vendor/node.c-kzGvOB.js} +2192 -5614
  45. package/dist/{vendor-reporters.b9600369.js → vendor/reporters.1xKxm8im.js} +424 -374
  46. package/dist/{vendor-rpc.cbd8e972.js → vendor/rpc.Bl-ysZIr.js} +1 -1
  47. package/dist/{vendor-run-once.3e5ef7d7.js → vendor/run-once.X3E7xx3F.js} +1 -1
  48. package/dist/{vendor-vi.d30b47ae.js → vendor/vi.voNYQWB_.js} +35 -38
  49. package/dist/vm.js +16 -20
  50. package/dist/worker.js +16 -20
  51. package/index.cjs +5 -0
  52. package/package.json +50 -54
  53. package/dist/chunk-install-pkg.6349b322.js +0 -1740
  54. package/dist/chunk-integrations-globals.9df12d91.js +0 -29
  55. package/dist/vendor-global.97e4527c.js +0 -9
  56. package/dist/vendor-index.8efe7746.js +0 -2236
  57. package/dist/vendor-loader.9c966f23.js +0 -2089
  58. /package/dist/{vendor-_commonjsHelpers.7d1333e8.js → vendor/_commonjsHelpers.jjO7Zipk.js} +0 -0
  59. /package/dist/{vendor-base.9c08bbd0.js → vendor/base._79unx2z.js} +0 -0
  60. /package/dist/{vendor-constants.538d9b49.js → vendor/constants.WSvnD_fn.js} +0 -0
  61. /package/dist/{vendor-coverage.78040316.js → vendor/coverage.v6aD8iAh.js} +0 -0
  62. /package/dist/{vendor-date.6e993429.js → vendor/date.W90-E5kF.js} +0 -0
  63. /package/dist/{vendor-environments.dcc4a34e.js → vendor/environments.hpEVJZPC.js} +0 -0
  64. /package/dist/{vendor-index.1ca68bd5.js → vendor/index.cAUulNDf.js} +0 -0
  65. /package/dist/{vendor-inspector.209edf5a.js → vendor/inspector.lFAeuaAt.js} +0 -0
  66. /package/dist/{vendor-tasks.f9d75aed.js → vendor/tasks.IknbGB2n.js} +0 -0
package/dist/config.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { UserConfig as UserConfig$1, ConfigEnv } from 'vite';
2
2
  export { ConfigEnv, UserConfig, mergeConfig } from 'vite';
3
- import { a as ResolvedCoverageOptions, U as UserConfig, C as CoverageV8Options, P as ProjectConfig } from './reporters-1678fe04.js';
3
+ import { a as ResolvedCoverageOptions, U as UserConfig, C as CoverageV8Options, P as ProjectConfig } from './reporters-ANEBTnOh.js';
4
4
  import '@vitest/runner';
5
5
  import 'vite-node';
6
6
  import '@vitest/snapshot';
@@ -12,7 +12,6 @@ import 'vite-node/client';
12
12
  import '@vitest/snapshot/manager';
13
13
  import 'vite-node/server';
14
14
  import 'node:worker_threads';
15
- import 'rollup';
16
15
  import 'node:fs';
17
16
  import 'chai';
18
17
 
@@ -77,11 +76,9 @@ declare function defineConfig(config: UserConfig$1): UserConfig$1;
77
76
  declare function defineConfig(config: Promise<UserConfig$1>): Promise<UserConfig$1>;
78
77
  declare function defineConfig(config: UserConfigFnObject): UserConfigFnObject;
79
78
  declare function defineConfig(config: UserConfigExport): UserConfigExport;
80
- declare function defineProject(config: UserProjectConfigExport): UserProjectConfigExport;
81
- declare function defineWorkspace(config: (string | (UserProjectConfigExport & {
79
+ declare function defineProject<T extends UserProjectConfigExport>(config: T): T;
80
+ declare function defineWorkspace<T extends (string | (UserProjectConfigExport & {
82
81
  extends?: string;
83
- }))[]): (string | (UserProjectConfigExport & {
84
- extends?: string | undefined;
85
- }))[];
82
+ }))[]>(config: T): T;
86
83
 
87
84
  export { type UserConfigExport, type UserConfigFn, type UserConfigFnObject, type UserConfigFnPromise, type UserProjectConfigExport, type UserProjectConfigFn, type UserWorkspaceConfig, configDefaults, coverageConfigDefaults, defaultExclude, defaultInclude, defineConfig, defineProject, defineWorkspace };
package/dist/config.js CHANGED
@@ -9,6 +9,7 @@ const defaultExclude = ["**/node_modules/**", "**/dist/**", "**/cypress/**", "**
9
9
  const defaultCoverageExcludes = [
10
10
  "coverage/**",
11
11
  "dist/**",
12
+ "**/[.]**",
12
13
  "packages/*/test?(s)/**",
13
14
  "**/*.d.ts",
14
15
  "**/virtual:*",
@@ -75,7 +76,7 @@ const config = {
75
76
  api: false,
76
77
  ui: false,
77
78
  uiBase: "/__vitest__/",
78
- open: true,
79
+ open: !isCI,
79
80
  css: {
80
81
  include: []
81
82
  },
@@ -1,4 +1,4 @@
1
- import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-1678fe04.js';
1
+ import { B as BaseCoverageOptions, a as ResolvedCoverageOptions } from './reporters-ANEBTnOh.js';
2
2
  import 'vite';
3
3
  import '@vitest/runner';
4
4
  import 'vite-node';
@@ -11,16 +11,9 @@ import 'vite-node/client';
11
11
  import '@vitest/snapshot/manager';
12
12
  import 'vite-node/server';
13
13
  import 'node:worker_threads';
14
- import 'rollup';
15
14
  import 'node:fs';
16
15
  import 'chai';
17
16
 
18
- // Type definitions for istanbul-lib-coverage 2.0
19
- // Project: https://istanbul.js.org, https://github.com/istanbuljs/istanbuljs
20
- // Definitions by: Jason Cheatham <https://github.com/jason0x43>
21
- // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
22
- // TypeScript Version: 2.4
23
-
24
17
  interface CoverageSummaryData {
25
18
  lines: Totals;
26
19
  statements: Totals;
@@ -126,24 +119,40 @@ declare class FileCoverage implements FileCoverageData {
126
119
  }
127
120
 
128
121
  type Threshold = 'lines' | 'functions' | 'statements' | 'branches';
122
+ interface ResolvedThreshold {
123
+ coverageMap: CoverageMap;
124
+ name: string;
125
+ thresholds: Partial<Record<Threshold, number | undefined>>;
126
+ }
129
127
  declare class BaseCoverageProvider {
130
128
  /**
131
129
  * Check if current coverage is above configured thresholds and bump the thresholds if needed
132
130
  */
133
- updateThresholds({ configurationFile, coverageMap, thresholds, perFile }: {
134
- coverageMap: CoverageMap;
135
- thresholds: Record<Threshold, number | undefined>;
131
+ updateThresholds({ thresholds: allThresholds, perFile, configurationFile }: {
132
+ thresholds: ResolvedThreshold[];
136
133
  perFile?: boolean;
137
- configurationFile?: string;
134
+ configurationFile: {
135
+ read(): unknown;
136
+ write(): void;
137
+ };
138
138
  }): void;
139
139
  /**
140
- * Checked collected coverage against configured thresholds. Sets exit code to 1 when thresholds not reached.
140
+ * Check collected coverage against configured thresholds. Sets exit code to 1 when thresholds not reached.
141
141
  */
142
- checkThresholds({ coverageMap, thresholds, perFile }: {
143
- coverageMap: CoverageMap;
144
- thresholds: Record<Threshold, number | undefined>;
142
+ checkThresholds({ thresholds: allThresholds, perFile }: {
143
+ thresholds: ResolvedThreshold[];
145
144
  perFile?: boolean;
146
145
  }): void;
146
+ /**
147
+ * Constructs collected coverage and users' threshold options into separate sets
148
+ * where each threshold set holds their own coverage maps. Threshold set is either
149
+ * for specific files defined by glob pattern or global for all other files.
150
+ */
151
+ resolveThresholds({ coverageMap, thresholds, createCoverageMap }: {
152
+ coverageMap: CoverageMap;
153
+ thresholds: NonNullable<BaseCoverageOptions['thresholds']>;
154
+ createCoverageMap: () => CoverageMap;
155
+ }): ResolvedThreshold[];
147
156
  /**
148
157
  * Resolve reporters from various configuration options
149
158
  */
package/dist/coverage.js CHANGED
@@ -1,70 +1,120 @@
1
- import { readFileSync, writeFileSync } from 'node:fs';
2
1
  import { relative } from 'pathe';
2
+ import { m as mm } from './vendor/index.xL8XjTLv.js';
3
+ import './vendor/_commonjsHelpers.jjO7Zipk.js';
4
+ import 'util';
5
+ import 'path';
3
6
 
4
7
  const THRESHOLD_KEYS = ["lines", "functions", "statements", "branches"];
8
+ const GLOBAL_THRESHOLDS_KEY = "global";
5
9
  class BaseCoverageProvider {
6
10
  /**
7
11
  * Check if current coverage is above configured thresholds and bump the thresholds if needed
8
12
  */
9
- updateThresholds({ configurationFile, coverageMap, thresholds, perFile }) {
10
- if (!configurationFile)
11
- throw new Error('Missing configurationFile. The "coverage.thresholdAutoUpdate" can only be enabled when configuration file is used.');
12
- const summaries = perFile ? coverageMap.files().map((file) => coverageMap.fileCoverageFor(file).toSummary()) : [coverageMap.getCoverageSummary()];
13
- const thresholdsToUpdate = [];
14
- for (const key of THRESHOLD_KEYS) {
15
- const threshold = thresholds[key] ?? 100;
16
- const actual = Math.min(...summaries.map((summary) => summary[key].pct));
17
- if (actual > threshold)
18
- thresholdsToUpdate.push([key, actual]);
19
- }
20
- if (thresholdsToUpdate.length === 0)
21
- return;
22
- const originalConfig = readFileSync(configurationFile, "utf8");
23
- let updatedConfig = originalConfig;
24
- for (const [threshold, newValue] of thresholdsToUpdate) {
25
- const previousThreshold = (thresholds[threshold] ?? 100).toString();
26
- const pattern = new RegExp(`(${threshold}\\s*:\\s*)${previousThreshold.replace(".", "\\.")}`);
27
- const matches = originalConfig.match(pattern);
28
- if (matches)
29
- updatedConfig = updatedConfig.replace(matches[0], matches[1] + newValue);
30
- else
31
- console.error(`Unable to update coverage threshold ${threshold}. No threshold found using pattern ${pattern}`);
13
+ updateThresholds({ thresholds: allThresholds, perFile, configurationFile }) {
14
+ let updatedThresholds = false;
15
+ const config = configurationFile.read();
16
+ assertConfigurationModule(config);
17
+ for (const { coverageMap, thresholds, name } of allThresholds) {
18
+ const summaries = perFile ? coverageMap.files().map((file) => coverageMap.fileCoverageFor(file).toSummary()) : [coverageMap.getCoverageSummary()];
19
+ const thresholdsToUpdate = [];
20
+ for (const key of THRESHOLD_KEYS) {
21
+ const threshold = thresholds[key] ?? 100;
22
+ const actual = Math.min(...summaries.map((summary) => summary[key].pct));
23
+ if (actual > threshold)
24
+ thresholdsToUpdate.push([key, actual]);
25
+ }
26
+ if (thresholdsToUpdate.length === 0)
27
+ continue;
28
+ updatedThresholds = true;
29
+ for (const [threshold, newValue] of thresholdsToUpdate) {
30
+ if (name === GLOBAL_THRESHOLDS_KEY) {
31
+ config.test.coverage.thresholds[threshold] = newValue;
32
+ } else {
33
+ const glob = config.test.coverage.thresholds[name];
34
+ glob[threshold] = newValue;
35
+ }
36
+ }
32
37
  }
33
- if (updatedConfig !== originalConfig) {
38
+ if (updatedThresholds) {
34
39
  console.log("Updating thresholds to configuration file. You may want to push with updated coverage thresholds.");
35
- writeFileSync(configurationFile, updatedConfig, "utf-8");
40
+ configurationFile.write();
36
41
  }
37
42
  }
38
43
  /**
39
- * Checked collected coverage against configured thresholds. Sets exit code to 1 when thresholds not reached.
44
+ * Check collected coverage against configured thresholds. Sets exit code to 1 when thresholds not reached.
40
45
  */
41
- checkThresholds({ coverageMap, thresholds, perFile }) {
42
- const summaries = perFile ? coverageMap.files().map((file) => ({
43
- file,
44
- summary: coverageMap.fileCoverageFor(file).toSummary()
45
- })) : [{
46
- file: null,
47
- summary: coverageMap.getCoverageSummary()
48
- }];
49
- for (const { summary, file } of summaries) {
50
- for (const thresholdKey of ["lines", "functions", "statements", "branches"]) {
51
- const threshold = thresholds[thresholdKey];
52
- if (threshold !== void 0) {
53
- const coverage = summary.data[thresholdKey].pct;
54
- if (coverage < threshold) {
55
- process.exitCode = 1;
56
- let errorMessage = `ERROR: Coverage for ${thresholdKey} (${coverage}%) does not meet`;
57
- if (!perFile)
58
- errorMessage += " global";
59
- errorMessage += ` threshold (${threshold}%)`;
60
- if (perFile && file)
61
- errorMessage += ` for ${relative("./", file).replace(/\\/g, "/")}`;
62
- console.error(errorMessage);
46
+ checkThresholds({ thresholds: allThresholds, perFile }) {
47
+ for (const { coverageMap, thresholds, name } of allThresholds) {
48
+ if (thresholds.branches === void 0 && thresholds.functions === void 0 && thresholds.lines === void 0 && thresholds.statements === void 0)
49
+ continue;
50
+ const summaries = perFile ? coverageMap.files().map((file) => ({
51
+ file,
52
+ summary: coverageMap.fileCoverageFor(file).toSummary()
53
+ })) : [{
54
+ file: null,
55
+ summary: coverageMap.getCoverageSummary()
56
+ }];
57
+ for (const { summary, file } of summaries) {
58
+ for (const thresholdKey of ["lines", "functions", "statements", "branches"]) {
59
+ const threshold = thresholds[thresholdKey];
60
+ if (threshold !== void 0) {
61
+ const coverage = summary.data[thresholdKey].pct;
62
+ if (coverage < threshold) {
63
+ process.exitCode = 1;
64
+ let errorMessage = `ERROR: Coverage for ${thresholdKey} (${coverage}%) does not meet ${name === GLOBAL_THRESHOLDS_KEY ? name : `"${name}"`} threshold (${threshold}%)`;
65
+ if (perFile && file)
66
+ errorMessage += ` for ${relative("./", file).replace(/\\/g, "/")}`;
67
+ console.error(errorMessage);
68
+ }
63
69
  }
64
70
  }
65
71
  }
66
72
  }
67
73
  }
74
+ /**
75
+ * Constructs collected coverage and users' threshold options into separate sets
76
+ * where each threshold set holds their own coverage maps. Threshold set is either
77
+ * for specific files defined by glob pattern or global for all other files.
78
+ */
79
+ resolveThresholds({ coverageMap, thresholds, createCoverageMap }) {
80
+ const resolvedThresholds = [];
81
+ const files = coverageMap.files();
82
+ const filesMatchedByGlobs = [];
83
+ const globalCoverageMap = createCoverageMap();
84
+ for (const key of Object.keys(thresholds)) {
85
+ if (key === "perFile" || key === "autoUpdate" || key === "100" || THRESHOLD_KEYS.includes(key))
86
+ continue;
87
+ const glob = key;
88
+ const globThresholds = resolveGlobThresholds(thresholds[glob]);
89
+ const globCoverageMap = createCoverageMap();
90
+ const matchingFiles = files.filter((file) => mm.isMatch(file, glob));
91
+ filesMatchedByGlobs.push(...matchingFiles);
92
+ for (const file of matchingFiles) {
93
+ const fileCoverage = coverageMap.fileCoverageFor(file);
94
+ globCoverageMap.addFileCoverage(fileCoverage);
95
+ }
96
+ resolvedThresholds.push({
97
+ name: glob,
98
+ coverageMap: globCoverageMap,
99
+ thresholds: globThresholds
100
+ });
101
+ }
102
+ for (const file of files.filter((file2) => !filesMatchedByGlobs.includes(file2))) {
103
+ const fileCoverage = coverageMap.fileCoverageFor(file);
104
+ globalCoverageMap.addFileCoverage(fileCoverage);
105
+ }
106
+ resolvedThresholds.unshift({
107
+ name: GLOBAL_THRESHOLDS_KEY,
108
+ coverageMap: globalCoverageMap,
109
+ thresholds: {
110
+ branches: thresholds.branches,
111
+ functions: thresholds.functions,
112
+ lines: thresholds.lines,
113
+ statements: thresholds.statements
114
+ }
115
+ });
116
+ return resolvedThresholds;
117
+ }
68
118
  /**
69
119
  * Resolve reporters from various configuration options
70
120
  */
@@ -82,5 +132,24 @@ class BaseCoverageProvider {
82
132
  return resolvedReporters;
83
133
  }
84
134
  }
135
+ function resolveGlobThresholds(thresholds) {
136
+ if (!thresholds || typeof thresholds !== "object")
137
+ return {};
138
+ return {
139
+ lines: "lines" in thresholds && typeof thresholds.lines === "number" ? thresholds.lines : void 0,
140
+ branches: "branches" in thresholds && typeof thresholds.branches === "number" ? thresholds.branches : void 0,
141
+ functions: "functions" in thresholds && typeof thresholds.functions === "number" ? thresholds.functions : void 0,
142
+ statements: "statements" in thresholds && typeof thresholds.statements === "number" ? thresholds.statements : void 0
143
+ };
144
+ }
145
+ function assertConfigurationModule(config) {
146
+ try {
147
+ if (typeof config.test.coverage.thresholds !== "object")
148
+ throw new Error("Expected config.test.coverage.thresholds to be an object");
149
+ } catch (error) {
150
+ const message = error instanceof Error ? error.message : String(error);
151
+ throw new Error(`Unable to parse thresholds from configuration file: ${message}`);
152
+ }
153
+ }
85
154
 
86
155
  export { BaseCoverageProvider };
package/dist/entry-vm.js CHANGED
@@ -5,30 +5,30 @@ import timers from 'node:timers';
5
5
  import { performance } from 'node:perf_hooks';
6
6
  import { startTests } from '@vitest/runner';
7
7
  import { setupColors, createColors } from '@vitest/utils';
8
- import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor-index.3d079eea.js';
9
- import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor-coverage.78040316.js';
10
- import { g as getWorkerState } from './vendor-global.97e4527c.js';
11
- import { i as index } from './vendor-index.68ecee35.js';
8
+ import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor/index.h0j9y5vy.js';
9
+ import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor/coverage.v6aD8iAh.js';
10
+ import { g as getWorkerState } from './vendor/global.L7JRz1qU.js';
11
+ import { i as index } from './vendor/index.Npc-eff0.js';
12
12
  import { setupCommonEnv } from './browser.js';
13
13
  import 'chai';
14
14
  import '@vitest/snapshot/environment';
15
15
  import 'pathe';
16
- import './vendor-paths.84fc7a99.js';
16
+ import './paths.js';
17
17
  import 'node:url';
18
- import './vendor-rpc.cbd8e972.js';
19
- import './vendor-benchmark.44931cfa.js';
18
+ import './vendor/rpc.Bl-ysZIr.js';
19
+ import './vendor/benchmark.WVm6DARl.js';
20
20
  import '@vitest/runner/utils';
21
- import './vendor-index.29282562.js';
21
+ import './vendor/index.XU72Rmy8.js';
22
22
  import 'std-env';
23
- import './vendor-run-once.3e5ef7d7.js';
24
- import './vendor-vi.d30b47ae.js';
25
- import './vendor-_commonjsHelpers.7d1333e8.js';
23
+ import './vendor/run-once.X3E7xx3F.js';
24
+ import './vendor/vi.voNYQWB_.js';
25
+ import './vendor/_commonjsHelpers.jjO7Zipk.js';
26
26
  import '@vitest/expect';
27
27
  import '@vitest/snapshot';
28
28
  import '@vitest/utils/error';
29
- import './vendor-tasks.f9d75aed.js';
29
+ import './vendor/tasks.IknbGB2n.js';
30
30
  import '@vitest/utils/source-map';
31
- import './vendor-date.6e993429.js';
31
+ import './vendor/date.W90-E5kF.js';
32
32
  import '@vitest/spy';
33
33
 
34
34
  async function run(files, config, executor) {
package/dist/entry.js CHANGED
@@ -1,36 +1,36 @@
1
1
  import { performance } from 'node:perf_hooks';
2
2
  import { startTests } from '@vitest/runner';
3
- import './vendor-index.29282562.js';
4
- import { a as globalExpect, r as resetModules, v as vi } from './vendor-vi.d30b47ae.js';
5
- import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor-coverage.78040316.js';
6
- import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor-index.3d079eea.js';
3
+ import './vendor/index.XU72Rmy8.js';
4
+ import { a as globalExpect, r as resetModules, v as vi } from './vendor/vi.voNYQWB_.js';
5
+ import { s as startCoverageInsideWorker, a as stopCoverageInsideWorker } from './vendor/coverage.v6aD8iAh.js';
6
+ import { V as VitestSnapshotEnvironment, s as setupChaiConfig, r as resolveTestRunner } from './vendor/index.h0j9y5vy.js';
7
7
  import { createRequire } from 'node:module';
8
8
  import util from 'node:util';
9
9
  import timers from 'node:timers';
10
10
  import { isatty } from 'node:tty';
11
11
  import { installSourcemapsSupport } from 'vite-node/source-map';
12
12
  import { setupColors, createColors, getSafeTimers } from '@vitest/utils';
13
- import { i as index } from './vendor-index.68ecee35.js';
13
+ import { i as index } from './vendor/index.Npc-eff0.js';
14
14
  import { setupCommonEnv } from './browser.js';
15
- import { g as getWorkerState } from './vendor-global.97e4527c.js';
15
+ import { g as getWorkerState } from './vendor/global.L7JRz1qU.js';
16
16
  import 'pathe';
17
17
  import 'std-env';
18
18
  import '@vitest/runner/utils';
19
19
  import 'chai';
20
- import './vendor-_commonjsHelpers.7d1333e8.js';
20
+ import './vendor/_commonjsHelpers.jjO7Zipk.js';
21
21
  import '@vitest/expect';
22
22
  import '@vitest/snapshot';
23
23
  import '@vitest/utils/error';
24
- import './vendor-tasks.f9d75aed.js';
24
+ import './vendor/tasks.IknbGB2n.js';
25
25
  import '@vitest/utils/source-map';
26
- import './vendor-date.6e993429.js';
26
+ import './vendor/date.W90-E5kF.js';
27
27
  import '@vitest/spy';
28
28
  import '@vitest/snapshot/environment';
29
- import './vendor-paths.84fc7a99.js';
29
+ import './paths.js';
30
30
  import 'node:url';
31
- import './vendor-rpc.cbd8e972.js';
32
- import './vendor-benchmark.44931cfa.js';
33
- import './vendor-run-once.3e5ef7d7.js';
31
+ import './vendor/rpc.Bl-ysZIr.js';
32
+ import './vendor/benchmark.WVm6DARl.js';
33
+ import './vendor/run-once.X3E7xx3F.js';
34
34
 
35
35
  let globalSetup = false;
36
36
  async function setupGlobalEnv(config, { environment }) {
@@ -66,7 +66,7 @@ async function setupGlobalEnv(config, { environment }) {
66
66
  await setupConsoleLogSpy(state);
67
67
  }
68
68
  async function setupConsoleLogSpy(state) {
69
- const { createCustomConsole } = await import('./chunk-runtime-console.f3263f87.js');
69
+ const { createCustomConsole } = await import('./chunks/runtime-console.iCAG0Yz3.js');
70
70
  globalThis.console = createCustomConsole(state);
71
71
  }
72
72
  async function withEnv({ environment }, options, fn) {
@@ -1,4 +1,4 @@
1
- import { E as Environment } from './reporters-1678fe04.js';
1
+ import { E as Environment } from './reporters-ANEBTnOh.js';
2
2
  import 'vite';
3
3
  import '@vitest/runner';
4
4
  import 'vite-node';
@@ -11,7 +11,6 @@ import 'vite-node/client';
11
11
  import '@vitest/snapshot/manager';
12
12
  import 'vite-node/server';
13
13
  import 'node:worker_threads';
14
- import 'rollup';
15
14
  import 'node:fs';
16
15
  import 'chai';
17
16
 
@@ -1,3 +1,3 @@
1
- export { e as builtinEnvironments, p as populateGlobal } from './vendor-environments.dcc4a34e.js';
1
+ export { e as builtinEnvironments, p as populateGlobal } from './vendor/environments.hpEVJZPC.js';
2
2
  import 'node:console';
3
3
  import 'local-pkg';
package/dist/execute.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import vm from 'node:vm';
2
2
  import { ViteNodeRunner } from 'vite-node/client';
3
3
  import { ViteNodeRunnerOptions } from 'vite-node';
4
- import { ak as PendingSuiteMock, al as MockFactory, a0 as WorkerGlobalState, am as MockMap, O as RuntimeRPC } from './reporters-1678fe04.js';
4
+ import { am as PendingSuiteMock, an as MockFactory, ao as MockMap, a2 as WorkerGlobalState, g as RuntimeRPC } from './reporters-ANEBTnOh.js';
5
5
  import 'vite';
6
6
  import '@vitest/runner';
7
7
  import '@vitest/snapshot';
@@ -12,7 +12,6 @@ import 'tinybench';
12
12
  import '@vitest/snapshot/manager';
13
13
  import 'vite-node/server';
14
14
  import 'node:worker_threads';
15
- import 'rollup';
16
15
  import 'node:fs';
17
16
  import 'chai';
18
17
 
@@ -126,7 +125,7 @@ declare class VitestExecutor extends ViteNodeRunner {
126
125
  Reflect: typeof Reflect;
127
126
  Symbol: SymbolConstructor;
128
127
  };
129
- get state(): WorkerGlobalState;
128
+ get state(): any;
130
129
  shouldResolveId(id: string, _importee?: string | undefined): boolean;
131
130
  originalResolveUrl(id: string, importer?: string): Promise<[url: string, fsPath: string]>;
132
131
  resolveUrl(id: string, importer?: string): Promise<[string, string]>;
package/dist/execute.js CHANGED
@@ -1,15 +1,14 @@
1
- export { V as VitestExecutor } from './vendor-execute.e6e4e89b.js';
1
+ export { V as VitestExecutor } from './vendor/execute.aMjV5C9u.js';
2
2
  import 'node:url';
3
3
  import 'node:vm';
4
4
  import 'vite-node/client';
5
5
  import 'vite-node/utils';
6
6
  import 'pathe';
7
7
  import '@vitest/utils/error';
8
- import './vendor-paths.84fc7a99.js';
9
- import './vendor-global.97e4527c.js';
8
+ import './paths.js';
10
9
  import 'node:fs';
11
10
  import '@vitest/utils';
12
- import './vendor-base.9c08bbd0.js';
11
+ import './vendor/base._79unx2z.js';
13
12
  import 'node:path';
14
13
  import 'node:module';
15
14
  import 'vite-node/constants';