@cypress/webpack-dev-server 6.1.1 → 6.1.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/CypressCTWebpackPlugin.js +18 -11
- package/package.json +1 -1
|
@@ -39,17 +39,24 @@ class CypressCTWebpackPlugin {
|
|
|
39
39
|
callback();
|
|
40
40
|
return;
|
|
41
41
|
}
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
42
|
+
let files;
|
|
43
|
+
let foundFiles;
|
|
44
|
+
// onSpecsChange can replace the list while the checks are pending. Checking again until
|
|
45
|
+
// the list holds still means this compile builds the newest list, filtered.
|
|
46
|
+
do {
|
|
47
|
+
files = this.files;
|
|
48
|
+
// Ensure we don't try to load files that have been removed from the file system
|
|
49
|
+
// but have not yet been detected by the onSpecsChange handler
|
|
50
|
+
foundFiles = await Promise.all(files.map(async (file) => {
|
|
51
|
+
try {
|
|
52
|
+
const exists = await fs_extra_1.default.pathExists(file.absolute);
|
|
53
|
+
return exists ? file : null;
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
return null;
|
|
57
|
+
}
|
|
58
|
+
}));
|
|
59
|
+
} while (this.files !== files);
|
|
53
60
|
this.files = foundFiles.filter((file) => file !== null);
|
|
54
61
|
callback();
|
|
55
62
|
};
|