@nx/cypress 20.2.0-beta.3 → 20.2.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": "20.2.0-beta.
|
|
3
|
+
"version": "20.2.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": {
|
|
@@ -36,9 +36,9 @@
|
|
|
36
36
|
"migrations": "./migrations.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@nx/devkit": "20.2.0-beta.
|
|
40
|
-
"@nx/eslint": "20.2.0-beta.
|
|
41
|
-
"@nx/js": "20.2.0-beta.
|
|
39
|
+
"@nx/devkit": "20.2.0-beta.4",
|
|
40
|
+
"@nx/eslint": "20.2.0-beta.4",
|
|
41
|
+
"@nx/js": "20.2.0-beta.4",
|
|
42
42
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
43
43
|
"detect-port": "^1.5.1",
|
|
44
44
|
"tslib": "^2.3.0"
|
|
@@ -43,6 +43,20 @@ async function configurationGeneratorInternal(tree, options) {
|
|
|
43
43
|
if (!hasPlugin) {
|
|
44
44
|
addTarget(tree, opts, projectGraph);
|
|
45
45
|
}
|
|
46
|
+
const projectTsConfigPath = (0, devkit_1.joinPathFragments)(opts.projectRoot, 'tsconfig.json');
|
|
47
|
+
if (tree.exists(projectTsConfigPath)) {
|
|
48
|
+
(0, devkit_1.updateJson)(tree, projectTsConfigPath, (json) => {
|
|
49
|
+
// Cypress uses commonjs, unless the project is also using commonjs (or does not set "module" i.e. uses default of commonjs),
|
|
50
|
+
// then we need to set the moduleResolution to node10 or else Cypress will fail with TS5095 error.
|
|
51
|
+
// See: https://github.com/cypress-io/cypress/issues/27731
|
|
52
|
+
if ((json.compilerOptions?.module ||
|
|
53
|
+
json.compilerOptions?.module !== 'commonjs') &&
|
|
54
|
+
json.compilerOptions?.moduleResolution) {
|
|
55
|
+
json.compilerOptions.moduleResolution = 'node10';
|
|
56
|
+
}
|
|
57
|
+
return json;
|
|
58
|
+
});
|
|
59
|
+
}
|
|
46
60
|
const { root: projectRoot } = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
47
61
|
const isTsSolutionSetup = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(tree);
|
|
48
62
|
if (isTsSolutionSetup) {
|
|
@@ -111,6 +125,7 @@ In this case you need to provide a devServerTarget,'<projectName>:<targetName>[:
|
|
|
111
125
|
return {
|
|
112
126
|
...options,
|
|
113
127
|
bundler: options.bundler ?? 'webpack',
|
|
128
|
+
projectRoot: projectConfig.root,
|
|
114
129
|
rootProject: options.rootProject ?? projectConfig.root === '.',
|
|
115
130
|
linter,
|
|
116
131
|
devServerTarget,
|
|
@@ -253,6 +268,9 @@ function createPackageJson(tree, options) {
|
|
|
253
268
|
name: importPath,
|
|
254
269
|
version: '0.0.1',
|
|
255
270
|
private: true,
|
|
271
|
+
nx: {
|
|
272
|
+
name: options.project,
|
|
273
|
+
},
|
|
256
274
|
};
|
|
257
275
|
(0, devkit_1.writeJson)(tree, packageJsonPath, packageJson);
|
|
258
276
|
}
|