@nx/cypress 22.6.0-beta.2 → 22.6.0-beta.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/cypress",
3
- "version": "22.6.0-beta.2",
3
+ "version": "22.6.0-beta.4",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for Cypress contains executors and generators allowing your workspace to use the powerful Cypress integration testing capabilities.",
6
6
  "repository": {
@@ -36,9 +36,9 @@
36
36
  "migrations": "./migrations.json"
37
37
  },
38
38
  "dependencies": {
39
- "@nx/devkit": "22.6.0-beta.2",
40
- "@nx/eslint": "22.6.0-beta.2",
41
- "@nx/js": "22.6.0-beta.2",
39
+ "@nx/devkit": "22.6.0-beta.4",
40
+ "@nx/eslint": "22.6.0-beta.4",
41
+ "@nx/js": "22.6.0-beta.4",
42
42
  "@phenomnomnominal/tsquery": "~6.1.4",
43
43
  "detect-port": "^1.5.1",
44
44
  "semver": "^7.6.3",
@@ -46,7 +46,7 @@
46
46
  "tslib": "^2.3.0"
47
47
  },
48
48
  "devDependencies": {
49
- "nx": "22.6.0-beta.2"
49
+ "nx": "22.6.0-beta.4"
50
50
  },
51
51
  "peerDependencies": {
52
52
  "cypress": ">= 13 < 16"
@@ -1 +1 @@
1
- {"version":3,"file":"start-dev-server.d.ts","sourceRoot":"","sources":["../../../../../packages/cypress/src/utils/start-dev-server.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAShB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAQ3E,wBAAuB,cAAc,CACnC,IAAI,EAAE,IAAI,CAAC,sBAAsB,EAAE,eAAe,CAAC,EACnD,OAAO,EAAE,eAAe;;;;;;kBAiEzB"}
1
+ {"version":3,"file":"start-dev-server.d.ts","sourceRoot":"","sources":["../../../../../packages/cypress/src/utils/start-dev-server.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,eAAe,EAShB,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,sBAAsB,EAAE,MAAM,mCAAmC,CAAC;AAW3E,wBAAuB,cAAc,CACnC,IAAI,EAAE,IAAI,CAAC,sBAAsB,EAAE,eAAe,CAAC,EACnD,OAAO,EAAE,eAAe;;;;;;kBAiEzB"}
@@ -6,6 +6,8 @@ const path_1 = require("path");
6
6
  const detectPort = require("detect-port");
7
7
  const executor_utils_1 = require("nx/src/command-line/run/executor-utils");
8
8
  const fs_1 = require("fs");
9
+ const os_1 = require("os");
10
+ const PORT_LOCK_DIR = (0, path_1.join)((0, os_1.tmpdir)(), 'nx-cypress-port-locks');
9
11
  async function* startDevServer(opts, context) {
10
12
  // no dev server, return the provisioned base url
11
13
  if (!opts.devServerTarget || opts.skipServe) {
@@ -46,7 +48,7 @@ If the port is in use, try using a different port value or passing --port='cypre
46
48
  }
47
49
  yield {
48
50
  baseUrl: opts.baseUrl || output.baseUrl || output.info?.baseUrl,
49
- portLockFilePath: overrides.port && (0, path_1.join)(__dirname, `${overrides.port}.txt`),
51
+ portLockFilePath: overrides.port && (0, path_1.join)(PORT_LOCK_DIR, `${overrides.port}.lock`),
50
52
  };
51
53
  }
52
54
  }
@@ -142,7 +144,13 @@ ${e.message || e}`);
142
144
  return [targetHasOpt, targetOpts[property]];
143
145
  }
144
146
  function attemptToLockPort(port) {
145
- const portLockFilePath = (0, path_1.join)(__dirname, `${port}.txt`);
147
+ try {
148
+ (0, fs_1.mkdirSync)(PORT_LOCK_DIR, { recursive: true });
149
+ }
150
+ catch {
151
+ // ignore if already exists
152
+ }
153
+ const portLockFilePath = (0, path_1.join)(PORT_LOCK_DIR, `${port}.lock`);
146
154
  try {
147
155
  if ((0, fs_1.existsSync)(portLockFilePath)) {
148
156
  return false;