@vitest/browser 0.20.3 → 0.21.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.
|
@@ -216,6 +216,11 @@ const stringify = (value, replacer, space) => {
|
|
|
216
216
|
return after;
|
|
217
217
|
}
|
|
218
218
|
};
|
|
219
|
+
const isAggregateError = (err) => {
|
|
220
|
+
if (typeof AggregateError !== "undefined" && err instanceof AggregateError)
|
|
221
|
+
return true;
|
|
222
|
+
return err instanceof Error && "errors" in err;
|
|
223
|
+
};
|
|
219
224
|
class StateManager {
|
|
220
225
|
constructor() {
|
|
221
226
|
this.filesMap = /* @__PURE__ */ new Map();
|
|
@@ -226,6 +231,8 @@ class StateManager {
|
|
|
226
231
|
this.errorsSet = /* @__PURE__ */ new Set();
|
|
227
232
|
}
|
|
228
233
|
catchError(err, type) {
|
|
234
|
+
if (isAggregateError(err))
|
|
235
|
+
return err.errors.forEach((error) => this.catchError(error, type));
|
|
229
236
|
err.type = type;
|
|
230
237
|
this.errorsSet.add(err);
|
|
231
238
|
}
|
package/dist/client/index.html
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vitest/browser",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.21.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.5.3",
|
|
35
|
-
"@vitest/ws-client": "0.
|
|
35
|
+
"@vitest/ws-client": "0.21.0",
|
|
36
36
|
"picocolors": "^1.0.0",
|
|
37
37
|
"rollup": "^2.77.2",
|
|
38
|
-
"vitest": "0.
|
|
38
|
+
"vitest": "0.21.0"
|
|
39
39
|
},
|
|
40
40
|
"scripts": {
|
|
41
41
|
"build": "rimraf dist && pnpm build:node && pnpm build:client && pnpm copy",
|