@cypress/vite-dev-server 5.0.5 → 5.0.6
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/resolveConfig.js +3 -6
- package/package.json +4 -4
package/dist/resolveConfig.js
CHANGED
|
@@ -52,7 +52,8 @@ const createViteDevServerConfig = async (config, vite) => {
|
|
|
52
52
|
exports.createViteDevServerConfig = createViteDevServerConfig;
|
|
53
53
|
function makeCypressViteConfig(config, vite) {
|
|
54
54
|
var _a, _b, _c;
|
|
55
|
-
const { cypressConfig: { projectRoot, devServerPublicPathRoute, supportFile, cypressBinaryRoot, isTextTerminal, }, specs, } = config;
|
|
55
|
+
const { cypressConfig: { port, projectRoot, devServerPublicPathRoute, supportFile, cypressBinaryRoot, isTextTerminal, }, specs, } = config;
|
|
56
|
+
const vitePort = port !== null && port !== void 0 ? port : undefined;
|
|
56
57
|
// Vite caches its output in the .vite directory in the node_modules where vite lives.
|
|
57
58
|
// So we want to find that node_modules path and ensure it's added to the "allow" list
|
|
58
59
|
const vitePathNodeModules = path_1.default.dirname(path_1.default.dirname(require.resolve(`vite/package.json`, {
|
|
@@ -63,8 +64,6 @@ function makeCypressViteConfig(config, vite) {
|
|
|
63
64
|
base: `${devServerPublicPathRoute}/`,
|
|
64
65
|
optimizeDeps: {
|
|
65
66
|
esbuildOptions: {
|
|
66
|
-
// We are using Vite 4.2.0+, so `incremental` doesn't exist in the types
|
|
67
|
-
// @ts-expect-error
|
|
68
67
|
incremental: true,
|
|
69
68
|
plugins: [
|
|
70
69
|
{
|
|
@@ -96,7 +95,7 @@ function makeCypressViteConfig(config, vite) {
|
|
|
96
95
|
// Supported from Vite v3 - add null check for v2 users.
|
|
97
96
|
(_a = vite.searchForWorkspaceRoot) === null || _a === void 0 ? void 0 : _a.call(vite, process.cwd()),
|
|
98
97
|
],
|
|
99
|
-
}, host: '127.0.0.1' }, (isTextTerminal
|
|
98
|
+
}, port: vitePort, host: '127.0.0.1' }, (isTextTerminal
|
|
100
99
|
? { watch: { ignored: '**/*' }, hmr: false }
|
|
101
100
|
: {})),
|
|
102
101
|
plugins: [
|
|
@@ -105,8 +104,6 @@ function makeCypressViteConfig(config, vite) {
|
|
|
105
104
|
],
|
|
106
105
|
};
|
|
107
106
|
if (vite.version && (0, gte_1.default)(vite.version, '4.2.0')) {
|
|
108
|
-
// We are using Vite 4.2.0+, so `incremental` doesn't exist in the types
|
|
109
|
-
// @ts-expect-error
|
|
110
107
|
(_c = (_b = viteConfig.optimizeDeps) === null || _b === void 0 ? void 0 : _b.esbuildOptions) === null || _c === void 0 ? true : delete _c.incremental;
|
|
111
108
|
}
|
|
112
109
|
return viteConfig;
|
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.6",
|
|
4
4
|
"description": "Launches Vite Dev Server for Component Testing",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"debug": "^4.3.4",
|
|
20
20
|
"find-up": "6.3.0",
|
|
21
21
|
"node-html-parser": "5.3.3",
|
|
22
|
-
"semver": "^7.3
|
|
22
|
+
"semver": "^7.5.3"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"chai": "^4.3.6",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"mocha": "^9.2.2",
|
|
28
28
|
"sinon": "^13.0.1",
|
|
29
29
|
"ts-node": "^10.9.1",
|
|
30
|
-
"vite": "4.2
|
|
31
|
-
"vite-plugin-inspect": "0.
|
|
30
|
+
"vite": "4.3.2",
|
|
31
|
+
"vite-plugin-inspect": "0.7.24"
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"dist",
|