@vitest/browser 1.6.0 → 1.6.1

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-TpLatVz2.js"></script>
20
+ <script type="module" crossorigin src="./assets/index-9agQl9q3.js"></script>
21
21
  <link rel="stylesheet" crossorigin href="./assets/index-fUmMsp0O.css">
22
22
  </head>
23
23
  <body>
@@ -1,4 +1,4 @@
1
- import { c as client, g as getConfig, a as getBrowserState, b as channel, r as rpcDone } from "./rpc-slP7oy1q.js";
1
+ import { c as client, g as getConfig, a as getBrowserState, b as channel, r as rpcDone } from "./rpc-mFMlTT5u.js";
2
2
  const url = new URL(location.href);
3
3
  const ID_ALL = "__vitest_all__";
4
4
  const iframes = /* @__PURE__ */ new Map();
@@ -575,7 +575,7 @@ function createClient(url, options = {}) {
575
575
  }
576
576
  const PORT = location.port;
577
577
  const HOST = [location.hostname, PORT].filter(Boolean).join(":");
578
- const ENTRY_URL = `${location.protocol === "https:" ? "wss:" : "ws:"}//${HOST}/__vitest_api__`;
578
+ const ENTRY_URL = `${location.protocol === "https:" ? "wss:" : "ws:"}//${HOST}/__vitest_api__?token=${window.VITEST_API_TOKEN}`;
579
579
  let setCancel = (_) => {
580
580
  };
581
581
  const onCancel = new Promise((resolve2) => {
@@ -10,7 +10,7 @@ var __publicField = (obj, key, value) => {
10
10
  __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
11
11
  return value;
12
12
  };
13
- import { i as importId, d as rpc$1, g as getConfig, _ as __vitePreload, b as channel, a as getBrowserState, c as client, l as loadSafeRpc, o as onCancel } from "./rpc-slP7oy1q.js";
13
+ import { i as importId, d as rpc$1, g as getConfig, _ as __vitePreload, b as channel, a as getBrowserState, c as client, l as loadSafeRpc, o as onCancel } from "./rpc-mFMlTT5u.js";
14
14
  function showPopupWarning(name, value, defaultValue) {
15
15
  return (...params) => {
16
16
  const formatedParams = params.map((p) => JSON.stringify(p)).join(", ");
@@ -38,6 +38,7 @@ window.__vitest_browser_runner__ = {
38
38
  config: { __VITEST_CONFIG__ },
39
39
  files: { __VITEST_FILES__ },
40
40
  }
41
+ window.VITEST_API_TOKEN = { __VITEST_API_TOKEN__ }
41
42
 
42
43
  const config = __vitest_browser_runner__.config
43
44
 
@@ -23,8 +23,8 @@
23
23
  </style>
24
24
  <script>{__VITEST_INJECTOR__}</script>
25
25
  {__VITEST_SCRIPTS__}
26
- <script type="module" crossorigin src="/__vitest_browser__/main-v2hiOVax.js"></script>
27
- <link rel="modulepreload" crossorigin href="/__vitest_browser__/rpc-slP7oy1q.js">
26
+ <script type="module" crossorigin src="/__vitest_browser__/main-_I3locjo.js"></script>
27
+ <link rel="modulepreload" crossorigin href="/__vitest_browser__/rpc-mFMlTT5u.js">
28
28
  </head>
29
29
  <body>
30
30
  <iframe id="vitest-ui" src=""></iframe>
@@ -17,8 +17,8 @@
17
17
  </style>
18
18
  <script>{__VITEST_INJECTOR__}</script>
19
19
  {__VITEST_SCRIPTS__}
20
- <script type="module" crossorigin src="/__vitest_browser__/tester-RmfypyZ0.js"></script>
21
- <link rel="modulepreload" crossorigin href="/__vitest_browser__/rpc-slP7oy1q.js">
20
+ <script type="module" crossorigin src="/__vitest_browser__/tester-y7J4ROPm.js"></script>
21
+ <link rel="modulepreload" crossorigin href="/__vitest_browser__/rpc-mFMlTT5u.js">
22
22
  </head>
23
23
  <body>
24
24
  {__VITEST_APPEND__}
package/dist/index.js CHANGED
@@ -441,7 +441,8 @@ var index = (project, base = "/") => {
441
441
  config.env.VITEST_BROWSER_DEBUG = process.env.VITEST_BROWSER_DEBUG || "";
442
442
  const injector = replacer(await injectorJs, {
443
443
  __VITEST_CONFIG__: JSON.stringify(config),
444
- __VITEST_FILES__: JSON.stringify(files)
444
+ __VITEST_FILES__: JSON.stringify(files),
445
+ __VITEST_API_TOKEN__: JSON.stringify(project.ctx.config.api.token)
445
446
  });
446
447
  if (url.pathname === base) {
447
448
  if (!indexScripts)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/browser",
3
3
  "type": "module",
4
- "version": "1.6.0",
4
+ "version": "1.6.1",
5
5
  "description": "Browser running for Vitest",
6
6
  "license": "MIT",
7
7
  "funding": "https://opencollective.com/vitest",
@@ -43,7 +43,7 @@
43
43
  "peerDependencies": {
44
44
  "playwright": "*",
45
45
  "webdriverio": "*",
46
- "vitest": "1.6.0"
46
+ "vitest": "1.6.1"
47
47
  },
48
48
  "peerDependenciesMeta": {
49
49
  "playwright": {
@@ -59,20 +59,20 @@
59
59
  "dependencies": {
60
60
  "magic-string": "^0.30.5",
61
61
  "sirv": "^2.0.4",
62
- "@vitest/utils": "1.6.0"
62
+ "@vitest/utils": "1.6.1"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@types/ws": "^8.5.9",
66
66
  "@wdio/protocols": "^8.29.7",
67
67
  "periscopic": "^4.0.2",
68
- "playwright": "^1.41.0",
68
+ "playwright": "^1.49.1",
69
69
  "playwright-core": "^1.41.0",
70
70
  "safaridriver": "^0.1.2",
71
71
  "webdriverio": "^8.32.2",
72
- "@vitest/runner": "1.6.0",
73
- "@vitest/ui": "1.6.0",
74
- "@vitest/ws-client": "1.6.0",
75
- "vitest": "1.6.0"
72
+ "@vitest/ui": "1.6.1",
73
+ "@vitest/ws-client": "1.6.1",
74
+ "@vitest/runner": "1.6.1",
75
+ "vitest": "1.6.1"
76
76
  },
77
77
  "scripts": {
78
78
  "build": "rimraf dist && pnpm build:node && pnpm build:client",