@vitest/web-worker 0.22.1 → 0.23.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.
- package/dist/pure.js +2 -8
- package/package.json +3 -3
package/dist/pure.js
CHANGED
@@ -67,7 +67,6 @@ function defineWebWorker() {
|
|
67
67
|
this.onmessage = null;
|
68
68
|
this.onmessageerror = null;
|
69
69
|
this.onerror = null;
|
70
|
-
const invalidates = [];
|
71
70
|
const context = {
|
72
71
|
onmessage: null,
|
73
72
|
dispatchEvent: (event) => {
|
@@ -84,8 +83,7 @@ function defineWebWorker() {
|
|
84
83
|
},
|
85
84
|
get global() {
|
86
85
|
return context;
|
87
|
-
}
|
88
|
-
invalidates
|
86
|
+
}
|
89
87
|
};
|
90
88
|
this.inside.on("message", (e) => {
|
91
89
|
var _a;
|
@@ -98,12 +96,8 @@ function defineWebWorker() {
|
|
98
96
|
const runner = new InlineWorkerRunner(options, context);
|
99
97
|
const id = (url instanceof URL ? url.toString() : url).replace(/^file:\/+/, "/");
|
100
98
|
const fsPath = toFilePath(id, config.root);
|
101
|
-
invalidates.push(fsPath);
|
102
99
|
runner.executeFile(fsPath).then(() => {
|
103
|
-
|
104
|
-
moduleCache.delete(fsPath2);
|
105
|
-
moduleCache.delete(`mock:${fsPath2}`);
|
106
|
-
});
|
100
|
+
moduleCache.invalidateSubDepTree([fsPath, `mock:${fsPath}`]);
|
107
101
|
const q = this.messageQueue;
|
108
102
|
this.messageQueue = null;
|
109
103
|
if (q)
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@vitest/web-worker",
|
3
3
|
"type": "module",
|
4
|
-
"version": "0.
|
4
|
+
"version": "0.23.2",
|
5
5
|
"description": "Web Worker support for testing in Vitest",
|
6
6
|
"exports": {
|
7
7
|
".": {
|
@@ -26,10 +26,10 @@
|
|
26
26
|
"vitest": "*"
|
27
27
|
},
|
28
28
|
"dependencies": {
|
29
|
-
"vite-node": "0.
|
29
|
+
"vite-node": "0.23.2"
|
30
30
|
},
|
31
31
|
"devDependencies": {
|
32
|
-
"rollup": "^2.
|
32
|
+
"rollup": "^2.79.0"
|
33
33
|
},
|
34
34
|
"scripts": {
|
35
35
|
"build": "rimraf dist && rollup -c",
|