@cypress/vite-dev-server 5.0.1 → 5.0.3
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.
|
@@ -32,13 +32,17 @@ if (supportFile) {
|
|
|
32
32
|
})
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
+
// Using relative path wouldn't allow to load tests outside Vite project root folder
|
|
36
|
+
// So we use the "@fs" bit to load the test file using its absolute path
|
|
37
|
+
const testFileAbsolutePathRoute = `${devServerPublicPathRoute}/@fs${CypressInstance.spec.absolute}`
|
|
38
|
+
|
|
35
39
|
/* Spec file import logic */
|
|
36
40
|
// We need a slash before /src/my-spec.js, this does not happen by default.
|
|
37
41
|
importsToLoad.push({
|
|
38
|
-
load: () => import(
|
|
42
|
+
load: () => import(testFileAbsolutePathRoute),
|
|
39
43
|
absolute: CypressInstance.spec.absolute,
|
|
40
44
|
relative: CypressInstance.spec.relative,
|
|
41
|
-
relativeUrl:
|
|
45
|
+
relativeUrl: testFileAbsolutePathRoute,
|
|
42
46
|
})
|
|
43
47
|
|
|
44
48
|
if (!CypressInstance) {
|
package/dist/plugins/cypress.js
CHANGED
|
@@ -88,7 +88,7 @@ const Cypress = (options, vite) => {
|
|
|
88
88
|
while (moduleImporters === null || moduleImporters === void 0 ? void 0 : moduleImporters.size) {
|
|
89
89
|
if (iterationNumber > HMR_DEPENDENCY_LOOKUP_MAX_ITERATION) {
|
|
90
90
|
debug(`max hmr iteration reached: ${HMR_DEPENDENCY_LOOKUP_MAX_ITERATION}; Rerun will not happen on this file change.`);
|
|
91
|
-
return
|
|
91
|
+
return;
|
|
92
92
|
}
|
|
93
93
|
// as soon as we find one of the specs, we trigger the re-run of tests
|
|
94
94
|
for (const mod of moduleImporters.values()) {
|
|
@@ -98,7 +98,7 @@ const Cypress = (options, vite) => {
|
|
|
98
98
|
devServerEvents.emit('dev-server:compile:success');
|
|
99
99
|
// if we update support we know we have to re-run it all
|
|
100
100
|
// no need to check further
|
|
101
|
-
return
|
|
101
|
+
return;
|
|
102
102
|
}
|
|
103
103
|
if (mod.file && specsPathsSet.has(mod.file)) {
|
|
104
104
|
debug('handleHotUpdate - spec compile success', mod.file);
|
|
@@ -112,7 +112,7 @@ const Cypress = (options, vite) => {
|
|
|
112
112
|
moduleImporters = getImporters(moduleImporters, exploredFiles);
|
|
113
113
|
iterationNumber += 1;
|
|
114
114
|
}
|
|
115
|
-
return
|
|
115
|
+
return;
|
|
116
116
|
},
|
|
117
117
|
};
|
|
118
118
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cypress/vite-dev-server",
|
|
3
|
-
"version": "5.0.
|
|
3
|
+
"version": "5.0.3",
|
|
4
4
|
"description": "Launches Vite Dev Server for Component Testing",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"mocha": "^9.2.2",
|
|
27
27
|
"sinon": "^13.0.1",
|
|
28
28
|
"ts-node": "^10.9.1",
|
|
29
|
-
"vite": "
|
|
29
|
+
"vite": "4.0.1",
|
|
30
30
|
"vite-plugin-inspect": "0.4.3"
|
|
31
31
|
},
|
|
32
32
|
"files": [
|