@vitest/browser 0.31.1 → 0.31.2

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.
@@ -17,7 +17,7 @@
17
17
  })()
18
18
  </script>
19
19
  <!-- !LOAD_METADATA! -->
20
- <script type="module" crossorigin src="./assets/index-22e8477a.js"></script>
20
+ <script type="module" crossorigin src="./assets/index-ee3ae6f1.js"></script>
21
21
  <link rel="stylesheet" href="./assets/index-8c3757f8.css">
22
22
  </head>
23
23
  <body>
@@ -95,6 +95,7 @@ function defaultSerialize(i) {
95
95
  }
96
96
  const defaultDeserialize = defaultSerialize;
97
97
  const { setTimeout: setTimeout$1 } = globalThis;
98
+ const random = Math.random.bind(Math);
98
99
  function createBirpc(functions, options) {
99
100
  const {
100
101
  post,
@@ -175,7 +176,7 @@ function nanoid(size = 21) {
175
176
  let id = "";
176
177
  let i = size;
177
178
  while (i--)
178
- id += urlAlphabet[Math.random() * 64 | 0];
179
+ id += urlAlphabet[random() * 64 | 0];
179
180
  return id;
180
181
  }
181
182
  /*! (c) 2020 Andrea Giammarchi */
@@ -449,9 +450,12 @@ class StateManager {
449
450
  }
450
451
  }
451
452
  updateTasks(packs) {
452
- for (const [id, result] of packs) {
453
- if (this.idMap.has(id))
454
- this.idMap.get(id).result = result;
453
+ for (const [id, result, meta] of packs) {
454
+ const task = this.idMap.get(id);
455
+ if (task) {
456
+ task.result = result;
457
+ task.meta = meta;
458
+ }
455
459
  }
456
460
  }
457
461
  updateUserLog(log) {
@@ -478,6 +482,7 @@ class StateManager {
478
482
  result: {
479
483
  state: "skip"
480
484
  },
485
+ meta: {},
481
486
  // Cancelled files have not yet collected tests
482
487
  tasks: []
483
488
  })));
@@ -21,7 +21,7 @@
21
21
  border: none;
22
22
  }
23
23
  </style>
24
- <script type="module" crossorigin src="/assets/index-0f520297.js"></script>
24
+ <script type="module" crossorigin src="/assets/index-0eaf4198.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.31.1",
4
+ "version": "0.31.2",
5
5
  "description": "Browser running for Vitest",
6
6
  "license": "MIT",
7
7
  "funding": "https://opencollective.com/vitest",
@@ -42,10 +42,10 @@
42
42
  "estree-walker": "^3.0.3",
43
43
  "periscopic": "^3.1.0",
44
44
  "rollup": "3.20.2",
45
- "@vitest/ws-client": "0.31.1",
46
- "vitest": "0.31.1",
47
- "@vitest/ui": "0.31.1",
48
- "@vitest/runner": "0.31.1"
45
+ "@vitest/runner": "0.31.2",
46
+ "@vitest/ui": "0.31.2",
47
+ "@vitest/ws-client": "0.31.2",
48
+ "vitest": "0.31.2"
49
49
  },
50
50
  "scripts": {
51
51
  "build": "rimraf dist && pnpm build:node && pnpm build:client",