@nx/cypress 19.6.0-beta.2 → 19.6.0-beta.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.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/cypress",
|
|
3
|
-
"version": "19.6.0-beta.
|
|
3
|
+
"version": "19.6.0-beta.3",
|
|
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,13 +36,13 @@
|
|
|
36
36
|
"migrations": "./migrations.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@nx/devkit": "19.6.0-beta.
|
|
40
|
-
"@nx/eslint": "19.6.0-beta.
|
|
41
|
-
"@nx/js": "19.6.0-beta.
|
|
39
|
+
"@nx/devkit": "19.6.0-beta.3",
|
|
40
|
+
"@nx/eslint": "19.6.0-beta.3",
|
|
41
|
+
"@nx/js": "19.6.0-beta.3",
|
|
42
42
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
43
43
|
"detect-port": "^1.5.1",
|
|
44
44
|
"tslib": "^2.3.0",
|
|
45
|
-
"@nrwl/cypress": "19.6.0-beta.
|
|
45
|
+
"@nrwl/cypress": "19.6.0-beta.3"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"cypress": ">= 3 < 14"
|
|
@@ -6,6 +6,7 @@ const target_defaults_utils_1 = require("@nx/devkit/src/generators/target-defaul
|
|
|
6
6
|
const internal_api_1 = require("nx/src/project-graph/plugins/internal-api");
|
|
7
7
|
const devkit_internals_1 = require("nx/src/devkit-internals");
|
|
8
8
|
const tsquery_1 = require("@phenomnomnominal/tsquery");
|
|
9
|
+
const path_1 = require("path");
|
|
9
10
|
async function addE2eCiTargetDefaults(tree) {
|
|
10
11
|
const pluginName = '@nx/cypress/plugin';
|
|
11
12
|
const graph = await (0, devkit_1.createProjectGraphAsync)();
|
|
@@ -50,9 +51,13 @@ async function addE2eCiTargetDefaults(tree) {
|
|
|
50
51
|
}
|
|
51
52
|
const targetString = matches[0];
|
|
52
53
|
const { project, target, configuration } = (0, devkit_1.parseTargetString)(targetString, graph);
|
|
54
|
+
const targetDependsOnSelf = graph.nodes[project].data.root === (0, path_1.dirname)(configFile);
|
|
53
55
|
const serveStaticTarget = graph.nodes[project].data.targets[target];
|
|
56
|
+
if (!serveStaticTarget) {
|
|
57
|
+
continue;
|
|
58
|
+
}
|
|
54
59
|
let resolvedBuildTarget;
|
|
55
|
-
if (serveStaticTarget
|
|
60
|
+
if (serveStaticTarget?.dependsOn) {
|
|
56
61
|
resolvedBuildTarget = serveStaticTarget.dependsOn.join(',');
|
|
57
62
|
}
|
|
58
63
|
else {
|
|
@@ -61,7 +66,7 @@ async function addE2eCiTargetDefaults(tree) {
|
|
|
61
66
|
? serveStaticTarget.configurations[configuration].buildTarget
|
|
62
67
|
: serveStaticTarget.options.buildTarget) ?? 'build';
|
|
63
68
|
}
|
|
64
|
-
const buildTarget =
|
|
69
|
+
const buildTarget = `${targetDependsOnSelf ? '' : '^'}${resolvedBuildTarget}`;
|
|
65
70
|
await (0, target_defaults_utils_1.addE2eCiTargetDefaults)(tree, pluginName, buildTarget, configFile);
|
|
66
71
|
}
|
|
67
72
|
}
|