@vitest/browser 4.1.4 → 4.1.6

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.
@@ -23,7 +23,7 @@
23
23
  })();
24
24
  </script>
25
25
  <!-- !LOAD_METADATA! -->
26
- <script type="module" src="./assets/index-DflzHTY2.js"></script>
26
+ <script type="module" src="./assets/index-DaKof6xz.js"></script>
27
27
  <link rel="stylesheet" href="./assets/index-Da0hb3oU.css">
28
28
  </head>
29
29
  <body>
@@ -1,4 +1,4 @@
1
- import { g as getBrowserState, a as getConfig, r as relative, b as generateFileHash } from "./utils-DmkAiRYk.js";
1
+ import { g as getBrowserState, a as getConfig, r as relative, b as generateFileHash } from "./utils-BsFW67Gk.js";
2
2
  import { channel, globalChannel, client } from "@vitest/browser/client";
3
3
  import { Traces } from "vitest/internal/browser";
4
4
  // @__NO_SIDE_EFFECTS__
@@ -1,4 +1,4 @@
1
- import { c as resolve, m as moduleRunner, d as getWorkerState, g as getBrowserState, e as getTestName, a as getConfig } from "./utils-DmkAiRYk.js";
1
+ import { c as resolve, m as moduleRunner, d as getWorkerState, g as getBrowserState, e as getTestName, a as getConfig } from "./utils-BsFW67Gk.js";
2
2
  import { onCancel, globalChannel, channel, client } from "@vitest/browser/client";
3
3
  import { userEvent, page, server } from "vitest/browser";
4
4
  import { getSafeTimers, DecodedMap as DecodedMap$1, getOriginalPosition as getOriginalPosition$1, loadDiffConfig, loadSnapshotSerializers, takeCoverageInsideWorker, browserFormat, Traces, setupCommonEnv, startCoverageInsideWorker, stopCoverageInsideWorker, startTests, collectTests, SpyModule } from "vitest/internal/browser";
@@ -690,7 +690,14 @@ function parseStacktrace(stack, options = {}) {
690
690
  const { ignoreStackEntries = stackIgnorePatterns } = options;
691
691
  let stacks = !CHROME_IE_STACK_REGEXP.test(stack) ? parseFFOrSafariStackTrace(stack) : parseV8Stacktrace(stack);
692
692
  const helperIndex = stacks.findLastIndex(
693
- (s) => s.method === "__VITEST_HELPER__" || s.method === "async*__VITEST_HELPER__" || s.method === "async __VITEST_HELPER__"
693
+ (s) => (
694
+ // this covers cases such as
695
+ // "__VITEST_HELPER__"
696
+ // "__VITEST_HELPER__ [as <object method name>]"
697
+ // "async*__VITEST_HELPER__" (firefox)
698
+ // "async __VITEST_HELPER__" (webkit)
699
+ s.method.includes("__VITEST_HELPER__")
700
+ )
694
701
  );
695
702
  if (helperIndex >= 0) {
696
703
  stacks = stacks.slice(helperIndex + 1);
@@ -3065,7 +3065,7 @@ function createSuiteCollector(name, factory = () => {
3065
3065
  if (task2.mode === "run" && !handler) {
3066
3066
  task2.mode = "todo";
3067
3067
  }
3068
- if (options.concurrent || !options.sequential && runner.config.sequence.concurrent) {
3068
+ if (options.concurrent ?? (!options.sequential && runner.config.sequence.concurrent)) {
3069
3069
  task2.concurrent = true;
3070
3070
  }
3071
3071
  task2.shuffle = suiteOptions == null ? void 0 : suiteOptions.shuffle;
@@ -26,8 +26,8 @@
26
26
  {__VITEST_INJECTOR__}
27
27
  {__VITEST_ERROR_CATCHER__}
28
28
  {__VITEST_SCRIPTS__}
29
- <script type="module" crossorigin src="/__vitest_browser__/orchestrator-DM4mHHP0.js"></script>
30
- <link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-DmkAiRYk.js">
29
+ <script type="module" crossorigin src="/__vitest_browser__/orchestrator-B-wB8WWP.js"></script>
30
+ <link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-BsFW67Gk.js">
31
31
  </head>
32
32
  <body>
33
33
  <div id="vitest-tester"></div>
@@ -5,8 +5,8 @@
5
5
  <link rel="icon" href="{__VITEST_FAVICON__}" type="image/svg+xml">
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>Vitest Browser Tester</title>
8
- <script type="module" crossorigin src="/__vitest_browser__/tester-DvOWMUmv.js"></script>
9
- <link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-DmkAiRYk.js">
8
+ <script type="module" crossorigin src="/__vitest_browser__/tester-DQAp97S5.js"></script>
9
+ <link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-BsFW67Gk.js">
10
10
  </head>
11
11
  <body>
12
12
  </body>
package/dist/index.js CHANGED
@@ -18,7 +18,7 @@ import { PNG } from 'pngjs';
18
18
  import { diff } from '@blazediff/core';
19
19
  import { WebSocketServer } from 'ws';
20
20
 
21
- var version = "4.1.4";
21
+ var version = "4.1.6";
22
22
 
23
23
  const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
24
24
  function normalizeWindowsPath(input = "") {
@@ -702,7 +702,7 @@ async function resolveOrchestrator(globalServer, url, res) {
702
702
  __VITEST_TYPE__: "\"orchestrator\"",
703
703
  __VITEST_SESSION_ID__: JSON.stringify(sessionId),
704
704
  __VITEST_TESTER_ID__: "\"none\"",
705
- __VITEST_OTEL_CARRIER__: url.searchParams.get("otelCarrier") ?? "null",
705
+ __VITEST_OTEL_CARRIER__: JSON.stringify(session?.otelCarrier ?? null),
706
706
  __VITEST_PROVIDED_CONTEXT__: JSON.stringify(stringify(browserProject.project.getProvidedContext())),
707
707
  __VITEST_API_TOKEN__: JSON.stringify(globalServer.vitest.config.api.token)
708
708
  });
@@ -2090,7 +2090,8 @@ function resolveOptions({ context, name, options, testName }) {
2090
2090
  testFileDirectory: relative(root, dirname(context.testPath)),
2091
2091
  testFileName: basename(context.testPath),
2092
2092
  testName: sanitize(testName, false),
2093
- browserName: context.project.config.browser.name
2093
+ browserName: context.project.config.browser.name,
2094
+ project: context.project
2094
2095
  };
2095
2096
  return {
2096
2097
  codec: getCodec(extension),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/browser",
3
3
  "type": "module",
4
- "version": "4.1.4",
4
+ "version": "4.1.6",
5
5
  "description": "Browser running for Vitest",
6
6
  "license": "MIT",
7
7
  "funding": "https://opencollective.com/vitest",
@@ -57,7 +57,7 @@
57
57
  "providers"
58
58
  ],
59
59
  "peerDependencies": {
60
- "vitest": "4.1.4"
60
+ "vitest": "4.1.6"
61
61
  },
62
62
  "dependencies": {
63
63
  "@blazediff/core": "1.9.1",
@@ -66,8 +66,8 @@
66
66
  "sirv": "^3.0.2",
67
67
  "tinyrainbow": "^3.1.0",
68
68
  "ws": "^8.19.0",
69
- "@vitest/utils": "4.1.4",
70
- "@vitest/mocker": "4.1.4"
69
+ "@vitest/mocker": "4.1.6",
70
+ "@vitest/utils": "4.1.6"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@opentelemetry/api": "^1.9.0",
@@ -79,8 +79,8 @@
79
79
  "ivya": "^1.8.0",
80
80
  "mime": "^4.1.0",
81
81
  "pathe": "^2.0.3",
82
- "@vitest/runner": "4.1.4",
83
- "vitest": "4.1.4"
82
+ "@vitest/runner": "4.1.6",
83
+ "vitest": "4.1.6"
84
84
  },
85
85
  "scripts": {
86
86
  "typecheck": "tsc -p ./src/client/tsconfig.json --noEmit",