@cypress/vite-dev-server 5.1.1 → 5.2.0

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/devServer.js CHANGED
@@ -32,7 +32,11 @@ async function devServer(config) {
32
32
  port,
33
33
  // Close is for unit testing only. We kill this child process which will handle the closing of the server
34
34
  close(cb) {
35
- return server.close().then(() => cb === null || cb === void 0 ? void 0 : cb()).catch(cb);
35
+ debug('closing dev server');
36
+ return server.close().then(() => {
37
+ debug('closed dev server');
38
+ cb === null || cb === void 0 ? void 0 : cb();
39
+ }).catch(cb);
36
40
  },
37
41
  };
38
42
  }
@@ -24,6 +24,7 @@ const Cypress = (options, vite) => {
24
24
  // eslint-disable-next-line no-restricted-syntax
25
25
  let loader = fs_1.default.readFileSync(INIT_FILEPATH, 'utf8');
26
26
  devServerEvents.on('dev-server:specs:changed', (specs) => {
27
+ debug(`dev-server:secs:changed: ${specs.map((spec) => spec.relative)}`);
27
28
  specsPathsSet = getSpecsPathsSet(specs);
28
29
  });
29
30
  return {
@@ -52,7 +52,7 @@ 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: { port, projectRoot, devServerPublicPathRoute, supportFile, cypressBinaryRoot, isTextTerminal, }, specs, } = config;
55
+ const { cypressConfig: { experimentalJustInTimeCompile, port, projectRoot, devServerPublicPathRoute, supportFile, cypressBinaryRoot, isTextTerminal, }, specs, } = config;
56
56
  const vitePort = port !== null && port !== void 0 ? port : undefined;
57
57
  // Vite caches its output in the .vite directory in the node_modules where vite lives.
58
58
  // So we want to find that node_modules path and ensure it's added to the "allow" list
@@ -95,7 +95,7 @@ function makeCypressViteConfig(config, vite) {
95
95
  // Supported from Vite v3 - add null check for v2 users.
96
96
  (_a = vite.searchForWorkspaceRoot) === null || _a === void 0 ? void 0 : _a.call(vite, process.cwd()),
97
97
  ],
98
- }, port: vitePort, host: '127.0.0.1' }, (isTextTerminal
98
+ }, port: vitePort, host: '127.0.0.1' }, (isTextTerminal && !experimentalJustInTimeCompile
99
99
  ? { watch: { ignored: '**/*' }, hmr: false }
100
100
  : {})),
101
101
  plugins: [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cypress/vite-dev-server",
3
- "version": "5.1.1",
3
+ "version": "5.2.0",
4
4
  "description": "Launches Vite Dev Server for Component Testing",
5
5
  "main": "index.js",
6
6
  "scripts": {