@vitest/browser 0.19.1 → 0.20.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.
@@ -218,6 +218,7 @@ class StateManager {
218
218
  constructor() {
219
219
  this.filesMap = /* @__PURE__ */ new Map();
220
220
  this.pathsSet = /* @__PURE__ */ new Set();
221
+ this.collectingPromise = void 0;
221
222
  this.idMap = /* @__PURE__ */ new Map();
222
223
  this.taskFileMap = /* @__PURE__ */ new WeakMap();
223
224
  this.errorsSet = /* @__PURE__ */ new Set();
@@ -232,7 +233,21 @@ class StateManager {
232
233
  getUnhandledErrors() {
233
234
  return Array.from(this.errorsSet.values());
234
235
  }
235
- getPaths() {
236
+ startCollectingPaths() {
237
+ let _resolve;
238
+ const promise = new Promise((resolve) => {
239
+ _resolve = resolve;
240
+ });
241
+ this.collectingPromise = { promise, resolve: _resolve };
242
+ }
243
+ finishCollectingPaths() {
244
+ var _a;
245
+ (_a = this.collectingPromise) == null ? void 0 : _a.resolve();
246
+ this.collectingPromise = void 0;
247
+ }
248
+ async getPaths() {
249
+ var _a;
250
+ await ((_a = this.collectingPromise) == null ? void 0 : _a.promise);
236
251
  return Array.from(this.pathsSet);
237
252
  }
238
253
  getFiles(keys2) {
@@ -21,7 +21,7 @@
21
21
  border: none;
22
22
  }
23
23
  </style>
24
- <script type="module" crossorigin src="/assets/index.6fe36f2b.js"></script>
24
+ <script type="module" crossorigin src="/assets/index.85f8aabb.js"></script>
25
25
  </head>
26
26
  <body>
27
27
  <iframe id="vitest-ui" src=""></iframe>
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/browser",
3
3
  "type": "module",
4
- "version": "0.19.1",
4
+ "version": "0.20.0",
5
5
  "description": "Browser running for Vitest",
6
6
  "repository": {
7
7
  "type": "git",
@@ -32,10 +32,10 @@
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/ws": "^8.2.2",
35
- "@vitest/ws-client": "0.19.1",
35
+ "@vitest/ws-client": "0.20.0",
36
36
  "picocolors": "^1.0.0",
37
37
  "rollup": "^2.67.2",
38
- "vitest": "0.19.1"
38
+ "vitest": "0.20.0"
39
39
  },
40
40
  "scripts": {
41
41
  "build": "rimraf dist && pnpm build:node && pnpm build:client && pnpm copy",