@nx/cypress 17.2.6 → 17.3.0-beta.1
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/README.md +9 -4
- package/package.json +5 -5
- package/src/generators/component-configuration/component-configuration.d.ts +1 -1
- package/src/generators/component-configuration/component-configuration.js +1 -3
- package/src/plugins/plugin.js +8 -1
- package/src/utils/ct-helpers.d.ts +1 -1
- package/src/utils/ct-helpers.js +6 -2
package/README.md
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
<p style="text-align: center;"
|
|
1
|
+
<p style="text-align: center;">
|
|
2
|
+
<picture>
|
|
3
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-dark.svg">
|
|
4
|
+
<img alt="Nx - Smart Monorepos · Fast CI" src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-light.svg" width="100%">
|
|
5
|
+
</picture>
|
|
6
|
+
</p>
|
|
2
7
|
|
|
3
8
|
<div style="text-align: center;">
|
|
4
9
|
|
|
@@ -15,9 +20,9 @@
|
|
|
15
20
|
|
|
16
21
|
<hr>
|
|
17
22
|
|
|
18
|
-
# Nx: Smart
|
|
23
|
+
# Nx: Smart Monorepos · Fast CI
|
|
19
24
|
|
|
20
|
-
Nx is a
|
|
25
|
+
Nx is a build system with built-in tooling and advanced CI capabilities. It helps you maintain and scale monorepos, both locally and on CI.
|
|
21
26
|
|
|
22
27
|
This package is a [Cypress plugin for Nx](https://nx.dev/cypress/overview).
|
|
23
28
|
|
|
@@ -59,5 +64,5 @@ npx nx@latest init
|
|
|
59
64
|
- [Blog Posts About Nx](https://blog.nrwl.io/nx/home)
|
|
60
65
|
|
|
61
66
|
<p style="text-align: center;"><a href="https://nx.dev/#learning-materials" target="_blank" rel="noreferrer"><img src="https://raw.githubusercontent.com/nrwl/nx/master/images/nx-courses-and-videos.svg"
|
|
62
|
-
width="100%" alt="Nx - Smart
|
|
67
|
+
width="100%" alt="Nx - Smart Monorepos · Fast CI"></a></p>
|
|
63
68
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/cypress",
|
|
3
|
-
"version": "17.
|
|
3
|
+
"version": "17.3.0-beta.1",
|
|
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,14 +34,14 @@
|
|
|
34
34
|
"migrations": "./migrations.json"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
-
"@nx/devkit": "17.
|
|
38
|
-
"@nx/eslint": "17.
|
|
39
|
-
"@nx/js": "17.
|
|
37
|
+
"@nx/devkit": "17.3.0-beta.1",
|
|
38
|
+
"@nx/eslint": "17.3.0-beta.1",
|
|
39
|
+
"@nx/js": "17.3.0-beta.1",
|
|
40
40
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
41
41
|
"detect-port": "^1.5.1",
|
|
42
42
|
"semver": "7.5.3",
|
|
43
43
|
"tslib": "^2.3.0",
|
|
44
|
-
"@nrwl/cypress": "17.
|
|
44
|
+
"@nrwl/cypress": "17.3.0-beta.1"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"cypress": ">= 3 < 14"
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ProjectConfiguration, Tree } from '@nx/devkit';
|
|
2
2
|
import { CypressComponentConfigurationSchema } from './schema';
|
|
3
|
-
export declare function componentConfigurationGenerator(tree: Tree, options: CypressComponentConfigurationSchema): Promise<()
|
|
3
|
+
export declare function componentConfigurationGenerator(tree: Tree, options: CypressComponentConfigurationSchema): Promise<import("@nx/devkit").GeneratorCallback>;
|
|
4
4
|
export declare function updateTsConfigForComponentTesting(tree: Tree, projectConfig: ProjectConfiguration): void;
|
|
5
5
|
export default componentConfigurationGenerator;
|
|
@@ -22,9 +22,7 @@ async function componentConfigurationGenerator(tree, options) {
|
|
|
22
22
|
if (!opts.skipFormat) {
|
|
23
23
|
await (0, devkit_1.formatFiles)(tree);
|
|
24
24
|
}
|
|
25
|
-
return
|
|
26
|
-
installDepsTask();
|
|
27
|
-
};
|
|
25
|
+
return installDepsTask;
|
|
28
26
|
}
|
|
29
27
|
exports.componentConfigurationGenerator = componentConfigurationGenerator;
|
|
30
28
|
function normalizeOptions(options) {
|
package/src/plugins/plugin.js
CHANGED
|
@@ -220,11 +220,18 @@ function getInputs(namedInputs) {
|
|
|
220
220
|
/**
|
|
221
221
|
* Load the module after ensuring that the require cache is cleared.
|
|
222
222
|
*/
|
|
223
|
+
const packageInstallationDirectories = ['node_modules', '.yarn'];
|
|
223
224
|
function load(path) {
|
|
224
225
|
// Clear cache if the path is in the cache
|
|
225
226
|
if (require.cache[path]) {
|
|
226
227
|
for (const k of Object.keys(require.cache)) {
|
|
227
|
-
|
|
228
|
+
// We don't want to clear the require cache of installed packages.
|
|
229
|
+
// Clearing them can cause some issues when running Nx without the daemon
|
|
230
|
+
// and may cause issues for other packages that use the module state
|
|
231
|
+
// in some to store cached information.
|
|
232
|
+
if (!packageInstallationDirectories.some((dir) => k.includes(dir))) {
|
|
233
|
+
delete require.cache[k];
|
|
234
|
+
}
|
|
228
235
|
}
|
|
229
236
|
}
|
|
230
237
|
// Then require
|
|
@@ -11,6 +11,6 @@ export declare function getTempTailwindPath(context: ExecutorContext): string;
|
|
|
11
11
|
* Checks if the childProjectName is a descendent of the parentProjectName
|
|
12
12
|
* in the project graph
|
|
13
13
|
**/
|
|
14
|
-
export declare function isCtProjectUsingBuildProject(graph: ProjectGraph, parentProjectName: string, childProjectName: string): boolean;
|
|
14
|
+
export declare function isCtProjectUsingBuildProject(graph: ProjectGraph, parentProjectName: string, childProjectName: string, seen?: Set<string>): boolean;
|
|
15
15
|
export declare function getProjectConfigByPath(graph: ProjectGraph, configPath: string): ProjectConfiguration;
|
|
16
16
|
export declare function createExecutorContext(graph: ProjectGraph, targets: Record<string, TargetConfiguration>, projectName: string, targetName: string, configurationName: string): ExecutorContext;
|
package/src/utils/ct-helpers.js
CHANGED
|
@@ -30,14 +30,18 @@ exports.getTempTailwindPath = getTempTailwindPath;
|
|
|
30
30
|
* Checks if the childProjectName is a descendent of the parentProjectName
|
|
31
31
|
* in the project graph
|
|
32
32
|
**/
|
|
33
|
-
function isCtProjectUsingBuildProject(graph, parentProjectName, childProjectName) {
|
|
33
|
+
function isCtProjectUsingBuildProject(graph, parentProjectName, childProjectName, seen = new Set()) {
|
|
34
|
+
if (seen.has(parentProjectName)) {
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
seen.add(parentProjectName);
|
|
34
38
|
const isProjectDirectDep = graph.dependencies[parentProjectName].some((p) => p.target === childProjectName);
|
|
35
39
|
if (isProjectDirectDep) {
|
|
36
40
|
return true;
|
|
37
41
|
}
|
|
38
42
|
const maybeIntermediateProjects = graph.dependencies[parentProjectName].filter((p) => !graph.externalNodes[p.target]);
|
|
39
43
|
for (const maybeIntermediateProject of maybeIntermediateProjects) {
|
|
40
|
-
if (isCtProjectUsingBuildProject(graph, maybeIntermediateProject.target, childProjectName)) {
|
|
44
|
+
if (isCtProjectUsingBuildProject(graph, maybeIntermediateProject.target, childProjectName, seen)) {
|
|
41
45
|
return true;
|
|
42
46
|
}
|
|
43
47
|
}
|