@nx/cypress 21.2.3 → 21.2.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 +4 -4
- package/src/plugins/plugin.js +11 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/cypress",
|
|
3
|
-
"version": "21.2.
|
|
3
|
+
"version": "21.2.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": "21.2.
|
|
40
|
-
"@nx/eslint": "21.2.
|
|
41
|
-
"@nx/js": "21.2.
|
|
39
|
+
"@nx/devkit": "21.2.4",
|
|
40
|
+
"@nx/eslint": "21.2.4",
|
|
41
|
+
"@nx/js": "21.2.4",
|
|
42
42
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
43
43
|
"detect-port": "^1.5.1",
|
|
44
44
|
"semver": "^7.6.3",
|
package/src/plugins/plugin.js
CHANGED
|
@@ -236,6 +236,17 @@ async function buildCypressTargets(configFilePath, projectRoot, options, context
|
|
|
236
236
|
: null;
|
|
237
237
|
for (const file of specFiles) {
|
|
238
238
|
const relativeSpecFilePath = (0, devkit_1.normalizePath)((0, path_1.relative)(projectRoot, file));
|
|
239
|
+
if (relativeSpecFilePath.includes('../')) {
|
|
240
|
+
throw new Error('@nx/cypress/plugin attempted to run tests outside of the project root. This is not supported and should not happen. Please open an issue at https://github.com/nrwl/nx/issues/new/choose with the following information:\n\n' +
|
|
241
|
+
`\n\n${JSON.stringify({
|
|
242
|
+
projectRoot,
|
|
243
|
+
relativeSpecFilePath,
|
|
244
|
+
specFiles,
|
|
245
|
+
context,
|
|
246
|
+
excludeSpecPatterns,
|
|
247
|
+
specPatterns,
|
|
248
|
+
}, null, 2)}`);
|
|
249
|
+
}
|
|
239
250
|
const targetName = options.ciTargetName + '--' + relativeSpecFilePath;
|
|
240
251
|
const outputSubfolder = relativeSpecFilePath
|
|
241
252
|
.replace(/[\/\\]/g, '-')
|