@nx/cypress 16.8.0-beta.2 → 16.8.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": "16.8.0-beta.
|
|
3
|
+
"version": "16.8.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": {
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"migrations": "./migrations.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@nrwl/cypress": "16.8.0-beta.
|
|
38
|
-
"@nx/devkit": "16.8.0-beta.
|
|
39
|
-
"@nx/js": "16.8.0-beta.
|
|
40
|
-
"@nx/linter": "16.8.0-beta.
|
|
37
|
+
"@nrwl/cypress": "16.8.0-beta.4",
|
|
38
|
+
"@nx/devkit": "16.8.0-beta.4",
|
|
39
|
+
"@nx/js": "16.8.0-beta.4",
|
|
40
|
+
"@nx/linter": "16.8.0-beta.4",
|
|
41
41
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
42
42
|
"detect-port": "^1.5.1",
|
|
43
43
|
"semver": "7.5.3",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"access": "public"
|
|
56
56
|
},
|
|
57
57
|
"type": "commonjs",
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "c9aad2dc8c2b34531cf61549bff872e68c481e4e"
|
|
59
59
|
}
|
|
@@ -26,7 +26,9 @@ function findBuildConfig(tree, options) {
|
|
|
26
26
|
}
|
|
27
27
|
catch (e) {
|
|
28
28
|
devkit_1.logger.error(e);
|
|
29
|
-
throw new Error((0, devkit_1.stripIndents) `Error trying to find build configuration.
|
|
29
|
+
throw new Error((0, devkit_1.stripIndents) `Error trying to find build configuration. ${options.buildTarget
|
|
30
|
+
? 'Try using an app of the same framework for the --build-target.'
|
|
31
|
+
: 'Try manually specifying the build target with the --build-target flag.'}
|
|
30
32
|
Provided project? ${options.project}
|
|
31
33
|
Provided build target? ${options.buildTarget}
|
|
32
34
|
Provided Executors? ${[...options.validExecutorNames].join(', ')}`);
|
|
@@ -46,10 +48,11 @@ ${Array.from(options.validExecutorNames)
|
|
|
46
48
|
.map((ve) => ` - ${ve}`)
|
|
47
49
|
.join('\n')}
|
|
48
50
|
|
|
49
|
-
|
|
51
|
+
${frameworkHelperMessage(Array.from(options.buildTarget), executorName)}
|
|
52
|
+
This is most likely because the provided --build-target is not a build target for an application or framework.
|
|
50
53
|
For example, the provide build target, '${options.buildTarget}' is:
|
|
51
54
|
- the build target for a buildable/publishable library instead of an app.
|
|
52
|
-
- using a different framework than expected like react library using an angular app build target.
|
|
55
|
+
- using a different framework than expected like react library using an angular or next app build target.
|
|
53
56
|
|
|
54
57
|
If you do not have an app in the workspace to you can make a new app with 'nx g app' and use it just for component testing
|
|
55
58
|
`);
|
|
@@ -58,6 +61,29 @@ If you do not have an app in the workspace to you can make a new app with 'nx g
|
|
|
58
61
|
const foundConfig = configuration || ((_d = (_c = projectConfig === null || projectConfig === void 0 ? void 0 : projectConfig.targets) === null || _c === void 0 ? void 0 : _c[target]) === null || _d === void 0 ? void 0 : _d.defaultConfiguration);
|
|
59
62
|
return (0, devkit_1.readTargetOptions)({ project, target, configuration: foundConfig }, createExecutorContext(graph, projectConfig.targets, project, target, foundConfig));
|
|
60
63
|
}
|
|
64
|
+
function frameworkHelperMessage(validExecutorNames, executorName) {
|
|
65
|
+
const executorsToFramework = {
|
|
66
|
+
'@nx/webpack:webpack': 'react',
|
|
67
|
+
'@nx/vite:build': 'react',
|
|
68
|
+
'@nrwl/webpack:webpack': 'react',
|
|
69
|
+
'@nrwl/vite:build': 'react',
|
|
70
|
+
'@nx/angular:webpack-browser': 'angular',
|
|
71
|
+
'@nrwl/angular:webpack-browser': 'angular',
|
|
72
|
+
'@angular-devkit/build-angular:browser': 'angular',
|
|
73
|
+
'@nx/next:build': 'next',
|
|
74
|
+
'@nrwl/next:build': 'next',
|
|
75
|
+
};
|
|
76
|
+
const buildTargetFramework = executorsToFramework[executorName];
|
|
77
|
+
const invokedGeneratorFramework = validExecutorNames.find((e) => !!executorsToFramework[e]);
|
|
78
|
+
if (buildTargetFramework &&
|
|
79
|
+
invokedGeneratorFramework &&
|
|
80
|
+
buildTargetFramework !== invokedGeneratorFramework) {
|
|
81
|
+
return `It looks like you're using a different plugin generator than the --build-target framework is set up for.
|
|
82
|
+
The provided build target is configured for ${buildTargetFramework} instead of ${invokedGeneratorFramework}.
|
|
83
|
+
Try using @nx/${buildTargetFramework} instead.`;
|
|
84
|
+
}
|
|
85
|
+
return '';
|
|
86
|
+
}
|
|
61
87
|
function findInGraph(tree, graph, options) {
|
|
62
88
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
63
89
|
const parents = findParentsOfProject(graph, options.project);
|