@vitest/web-worker 2.0.2 → 2.0.4
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.
- package/dist/pure.js +5 -3
- package/package.json +2 -2
package/dist/pure.js
CHANGED
@@ -306,9 +306,11 @@ function createClonedMessageEvent(data, transferOrOptions, clone) {
|
|
306
306
|
}
|
307
307
|
if (clone !== "none") {
|
308
308
|
debug("create message event, using polyfilled structured clone");
|
309
|
-
transfer?.length
|
310
|
-
|
311
|
-
|
309
|
+
if (transfer?.length) {
|
310
|
+
console.warn(
|
311
|
+
'[@vitest/web-worker] `structuredClone` is not supported in this environment. Falling back to polyfill, your transferable options will be lost. Set `VITEST_WEB_WORKER_CLONE` environmental variable to "none", if you don\'t want to loose it,or update to Node 17+.'
|
312
|
+
);
|
313
|
+
}
|
312
314
|
return new MessageEvent("message", {
|
313
315
|
data: ponyfillStructuredClone(data, { lossy: true }),
|
314
316
|
origin
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitest/web-worker",
|
3
3
|
"type": "module",
|
4
|
-
"version": "2.0.
|
4
|
+
"version": "2.0.4",
|
5
5
|
"description": "Web Worker support for testing in Vitest",
|
6
6
|
"license": "MIT",
|
7
7
|
"funding": "https://opencollective.com/vitest",
|
@@ -33,7 +33,7 @@
|
|
33
33
|
"dist"
|
34
34
|
],
|
35
35
|
"peerDependencies": {
|
36
|
-
"vitest": "2.0.
|
36
|
+
"vitest": "2.0.4"
|
37
37
|
},
|
38
38
|
"dependencies": {
|
39
39
|
"debug": "^4.3.5"
|