@nx/cypress 17.0.0-beta.6 → 17.0.0-beta.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 +5 -5
- package/src/generators/configuration/configuration.d.ts +1 -1
- package/src/generators/configuration/configuration.js +2 -2
- package/src/generators/cypress-project/cypress-project.js +2 -2
- package/src/generators/cypress-project/schema.d.ts +1 -1
- package/src/utils/add-linter.d.ts +1 -1
- package/src/utils/add-linter.js +6 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/cypress",
|
|
3
|
-
"version": "17.0.0-beta.
|
|
3
|
+
"version": "17.0.0-beta.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": {
|
|
@@ -38,10 +38,10 @@
|
|
|
38
38
|
"detect-port": "^1.5.1",
|
|
39
39
|
"semver": "7.5.3",
|
|
40
40
|
"tslib": "^2.3.0",
|
|
41
|
-
"@nx/devkit": "17.0.0-beta.
|
|
42
|
-
"@nx/js": "17.0.0-beta.
|
|
43
|
-
"@nx/
|
|
44
|
-
"@nrwl/cypress": "17.0.0-beta.
|
|
41
|
+
"@nx/devkit": "17.0.0-beta.8",
|
|
42
|
+
"@nx/js": "17.0.0-beta.8",
|
|
43
|
+
"@nx/eslint": "17.0.0-beta.8",
|
|
44
|
+
"@nrwl/cypress": "17.0.0-beta.8"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
47
47
|
"cypress": ">= 3 < 14"
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.configurationGenerator = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const js_1 = require("@nx/js");
|
|
6
|
-
const
|
|
6
|
+
const eslint_1 = require("@nx/eslint");
|
|
7
7
|
const path_1 = require("path");
|
|
8
8
|
const add_linter_1 = require("../../utils/add-linter");
|
|
9
9
|
const config_1 = require("../../utils/config");
|
|
@@ -49,7 +49,7 @@ In this case you need to provide a devServerTarget,'<projectName>:<targetName>[:
|
|
|
49
49
|
...options,
|
|
50
50
|
bundler: options.bundler ?? 'webpack',
|
|
51
51
|
rootProject: projectConfig.root === '.',
|
|
52
|
-
linter: options.linter ??
|
|
52
|
+
linter: options.linter ?? eslint_1.Linter.EsLint,
|
|
53
53
|
devServerTarget: options.devServerTarget ??
|
|
54
54
|
(projectConfig.targets.serve ? `${options.project}:serve` : undefined),
|
|
55
55
|
};
|
|
@@ -5,7 +5,7 @@ const devkit_1 = require("@nx/devkit");
|
|
|
5
5
|
const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
|
|
6
6
|
const semver_1 = require("@nx/devkit/src/utils/semver");
|
|
7
7
|
const js_1 = require("@nx/js");
|
|
8
|
-
const
|
|
8
|
+
const eslint_1 = require("@nx/eslint");
|
|
9
9
|
const path_1 = require("path");
|
|
10
10
|
const semver_2 = require("semver");
|
|
11
11
|
const add_linter_1 = require("../../utils/add-linter");
|
|
@@ -180,7 +180,7 @@ async function normalizeOptions(host, options) {
|
|
|
180
180
|
: options.projectNameAndRootFormat,
|
|
181
181
|
callingGenerator: '@nx/cypress:cypress-project',
|
|
182
182
|
});
|
|
183
|
-
options.linter = options.linter ||
|
|
183
|
+
options.linter = options.linter || eslint_1.Linter.EsLint;
|
|
184
184
|
options.bundler = options.bundler || 'webpack';
|
|
185
185
|
return {
|
|
186
186
|
...options,
|
package/src/utils/add-linter.js
CHANGED
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.addLinterToCyProject = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
|
-
const
|
|
5
|
+
const eslint_1 = require("@nx/eslint");
|
|
6
6
|
const cypress_version_1 = require("./cypress-version");
|
|
7
7
|
const versions_1 = require("./versions");
|
|
8
|
-
const eslint_file_1 = require("@nx/
|
|
9
|
-
const global_eslint_config_1 = require("@nx/
|
|
8
|
+
const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
|
|
9
|
+
const global_eslint_config_1 = require("@nx/eslint/src/generators/init/global-eslint-config");
|
|
10
10
|
async function addLinterToCyProject(tree, options) {
|
|
11
|
-
if (options.linter ===
|
|
11
|
+
if (options.linter === eslint_1.Linter.None) {
|
|
12
12
|
return () => { };
|
|
13
13
|
}
|
|
14
14
|
const tasks = [];
|
|
15
15
|
const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.project);
|
|
16
16
|
const eslintFile = (0, eslint_file_1.findEslintFile)(tree, projectConfig.root);
|
|
17
17
|
if (!eslintFile) {
|
|
18
|
-
tasks.push(await (0,
|
|
18
|
+
tasks.push(await (0, eslint_1.lintProjectGenerator)(tree, {
|
|
19
19
|
project: options.project,
|
|
20
20
|
linter: options.linter,
|
|
21
21
|
skipFormat: true,
|
|
@@ -28,7 +28,7 @@ async function addLinterToCyProject(tree, options) {
|
|
|
28
28
|
rootProject: options.rootProject,
|
|
29
29
|
}));
|
|
30
30
|
}
|
|
31
|
-
if (!options.linter || options.linter !==
|
|
31
|
+
if (!options.linter || options.linter !== eslint_1.Linter.EsLint) {
|
|
32
32
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
33
33
|
}
|
|
34
34
|
tasks.push(!options.skipPackageJson
|