@nx/cypress 22.5.0-pr.34329.70ea9ca → 22.5.0-pr.34459.104c3ee

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/PLUGIN.md CHANGED
@@ -8,19 +8,11 @@ Check in order (first match wins):
8
8
 
9
9
  | Mode | Detection |
10
10
  | --------- | ------------------------------------------------------ |
11
- | Atomized | `ciTargetName` in nx.json `@nx/cypress` plugin options |
12
11
  | Inference | `@nx/cypress/plugin` in nx.json plugins array |
13
12
  | Executor | `@nx/cypress:cypress` executor in project.json targets |
14
13
 
15
14
  ## Run Specific Test File
16
15
 
17
- ### Atomized
18
-
19
- ```bash
20
- nx run <project>:<ciTargetName>--<path/to/file.cy.ts>
21
- # Example: nx run my-app-e2e:e2e-ci--src/login.cy.ts
22
- ```
23
-
24
16
  ### Inference
25
17
 
26
18
  ```bash
@@ -35,7 +27,7 @@ nx run <project>:e2e --spec=<path/to/file.cy.ts>
35
27
 
36
28
  ## Quick Reference
37
29
 
38
- | Task | Atomized | Inference | Executor |
39
- | ----------- | ------------------------------------- | --------------------------------------- | ---------------------------------------- |
40
- | Run file | `nx run proj:e2e-ci--path/file.cy.ts` | `nx e2e proj -- --spec=path/file.cy.ts` | `nx run proj:e2e --spec=path/file.cy.ts` |
41
- | Run pattern | N/A | `nx e2e proj -- --spec="**/*login*"` | `nx run proj:e2e --spec="**/*login*"` |
30
+ | Task | Inference | Executor |
31
+ | ----------- | --------------------------------------- | ---------------------------------------- |
32
+ | Run file | `nx e2e proj -- --spec=path/file.cy.ts` | `nx run proj:e2e --spec=path/file.cy.ts` |
33
+ | Run pattern | `nx e2e proj -- --spec="**/*login*"` | `nx run proj:e2e --spec="**/*login*"` |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/cypress",
3
- "version": "22.5.0-pr.34329.70ea9ca",
3
+ "version": "22.5.0-pr.34459.104c3ee",
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.5.0-pr.34329.70ea9ca",
40
- "@nx/eslint": "22.5.0-pr.34329.70ea9ca",
41
- "@nx/js": "22.5.0-pr.34329.70ea9ca",
39
+ "@nx/devkit": "22.5.0-pr.34459.104c3ee",
40
+ "@nx/eslint": "22.5.0-pr.34459.104c3ee",
41
+ "@nx/js": "22.5.0-pr.34459.104c3ee",
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.5.0-pr.34329.70ea9ca"
49
+ "nx": "22.5.0-pr.34459.104c3ee"
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;