@nx/cypress 19.0.6 → 19.0.8
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 +8 -6
- package/src/plugins/plugin.js +11 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/cypress",
|
|
3
|
-
"version": "19.0.
|
|
3
|
+
"version": "19.0.8",
|
|
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": {
|
|
@@ -17,7 +17,9 @@
|
|
|
17
17
|
"Nest",
|
|
18
18
|
"Jest",
|
|
19
19
|
"Cypress",
|
|
20
|
-
"CLI"
|
|
20
|
+
"CLI",
|
|
21
|
+
"Front-end",
|
|
22
|
+
"Testing"
|
|
21
23
|
],
|
|
22
24
|
"main": "./index",
|
|
23
25
|
"typings": "./index.d.ts",
|
|
@@ -34,13 +36,13 @@
|
|
|
34
36
|
"migrations": "./migrations.json"
|
|
35
37
|
},
|
|
36
38
|
"dependencies": {
|
|
37
|
-
"@nx/devkit": "19.0.
|
|
38
|
-
"@nx/eslint": "19.0.
|
|
39
|
-
"@nx/js": "19.0.
|
|
39
|
+
"@nx/devkit": "19.0.8",
|
|
40
|
+
"@nx/eslint": "19.0.8",
|
|
41
|
+
"@nx/js": "19.0.8",
|
|
40
42
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
41
43
|
"detect-port": "^1.5.1",
|
|
42
44
|
"tslib": "^2.3.0",
|
|
43
|
-
"@nrwl/cypress": "19.0.
|
|
45
|
+
"@nrwl/cypress": "19.0.8"
|
|
44
46
|
},
|
|
45
47
|
"peerDependencies": {
|
|
46
48
|
"cypress": ">= 3 < 14"
|
package/src/plugins/plugin.js
CHANGED
|
@@ -12,16 +12,19 @@ const cache_directory_1 = require("nx/src/utils/cache-directory");
|
|
|
12
12
|
const constants_1 = require("../utils/constants");
|
|
13
13
|
const config_utils_1 = require("@nx/devkit/src/utils/config-utils");
|
|
14
14
|
const cachePath = (0, path_1.join)(cache_directory_1.projectGraphCacheDirectory, 'cypress.hash');
|
|
15
|
-
const targetsCache =
|
|
16
|
-
const calculatedTargets = {};
|
|
15
|
+
const targetsCache = readTargetsCache();
|
|
17
16
|
function readTargetsCache() {
|
|
18
|
-
return (0, devkit_1.readJsonFile)(cachePath);
|
|
17
|
+
return (0, fs_1.existsSync)(cachePath) ? (0, devkit_1.readJsonFile)(cachePath) : {};
|
|
19
18
|
}
|
|
20
|
-
function writeTargetsToCache(
|
|
21
|
-
|
|
19
|
+
function writeTargetsToCache() {
|
|
20
|
+
const oldCache = readTargetsCache();
|
|
21
|
+
(0, devkit_1.writeJsonFile)(cachePath, {
|
|
22
|
+
...oldCache,
|
|
23
|
+
targetsCache,
|
|
24
|
+
});
|
|
22
25
|
}
|
|
23
26
|
const createDependencies = () => {
|
|
24
|
-
writeTargetsToCache(
|
|
27
|
+
writeTargetsToCache();
|
|
25
28
|
return [];
|
|
26
29
|
};
|
|
27
30
|
exports.createDependencies = createDependencies;
|
|
@@ -39,10 +42,8 @@ exports.createNodes = [
|
|
|
39
42
|
const hash = (0, calculate_hash_for_create_nodes_1.calculateHashForCreateNodes)(projectRoot, options, context, [
|
|
40
43
|
(0, js_1.getLockFileName)((0, devkit_1.detectPackageManager)(context.workspaceRoot)),
|
|
41
44
|
]);
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
: await buildCypressTargets(configFilePath, projectRoot, options, context);
|
|
45
|
-
calculatedTargets[hash] = { targets, metadata };
|
|
45
|
+
targetsCache[hash] ??= await buildCypressTargets(configFilePath, projectRoot, options, context);
|
|
46
|
+
const { targets, metadata } = targetsCache[hash];
|
|
46
47
|
const project = {
|
|
47
48
|
projectType: 'application',
|
|
48
49
|
targets,
|