@vitest/browser 4.1.10 → 4.1.12

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.
@@ -4,7 +4,7 @@
4
4
  "name": "utils"
5
5
  },
6
6
  "orchestrator.html": {
7
- "file": "__vitest_browser__/orchestrator-KVYrTcFi.js",
7
+ "file": "__vitest_browser__/orchestrator-jtzFEKPy.js",
8
8
  "name": "orchestrator",
9
9
  "src": "orchestrator.html",
10
10
  "isEntry": true,
@@ -261,7 +261,7 @@ If you are using a framework that manipulates browser history (like React Router
261
261
  }
262
262
  createTestIframe(iframeId) {
263
263
  const iframe = document.createElement("iframe");
264
- const src = `/?sessionId=${getBrowserState().sessionId}&iframeId=${iframeId}`;
264
+ const src = `/?sessionId=${getBrowserState().sessionId}&iframeId=${encodeURIComponent(iframeId)}`;
265
265
  iframe.setAttribute("loading", "eager");
266
266
  iframe.setAttribute("src", src);
267
267
  iframe.setAttribute("data-vitest", "true");
@@ -26,7 +26,7 @@
26
26
  {__VITEST_INJECTOR__}
27
27
  {__VITEST_ERROR_CATCHER__}
28
28
  {__VITEST_SCRIPTS__}
29
- <script type="module" crossorigin src="/__vitest_browser__/orchestrator-KVYrTcFi.js"></script>
29
+ <script type="module" crossorigin src="/__vitest_browser__/orchestrator-jtzFEKPy.js"></script>
30
30
  <link rel="modulepreload" crossorigin href="/__vitest_browser__/utils-BsFW67Gk.js">
31
31
  </head>
32
32
  <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.10";
21
+ var version = "4.1.12";
22
22
 
23
23
  const _DRIVE_LETTER_START_RE = /^[A-Za-z]:\//;
24
24
  function normalizeWindowsPath(input = "") {
@@ -3265,6 +3265,7 @@ function setupBrowserRpc(globalServer, defaultMockerRegistry) {
3265
3265
  if (module.type === "redirect") {
3266
3266
  const redirectUrl = new URL(module.redirect);
3267
3267
  module.redirect = join(vite.config.root, redirectUrl.pathname);
3268
+ checkFileAccess(module.redirect);
3268
3269
  }
3269
3270
  defaultMockerRegistry.register(module);
3270
3271
  }
@@ -7947,7 +7948,10 @@ const createBrowserServer = async (options) => {
7947
7948
  options.metaEnvReplacer(),
7948
7949
  ...project.options?.plugins || [],
7949
7950
  BrowserPlugin(server),
7950
- interceptorPlugin({ registry: mockerRegistry }),
7951
+ interceptorPlugin({
7952
+ registry: mockerRegistry,
7953
+ registerWebSocketEvents: false
7954
+ }),
7951
7955
  options.coveragePlugin()
7952
7956
  ]
7953
7957
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vitest/browser",
3
3
  "type": "module",
4
- "version": "4.1.10",
4
+ "version": "4.1.12",
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.10"
60
+ "vitest": "4.1.12"
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/mocker": "4.1.10",
70
- "@vitest/utils": "4.1.10"
69
+ "@vitest/mocker": "4.1.12",
70
+ "@vitest/utils": "4.1.12"
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.10",
83
- "vitest": "4.1.10"
82
+ "vitest": "4.1.12",
83
+ "@vitest/runner": "4.1.12"
84
84
  },
85
85
  "scripts": {
86
86
  "typecheck": "tsc -p ./src/client/tsconfig.json --noEmit",