@nx/cypress 19.7.3 → 19.8.0-beta.0
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": "19.
|
|
3
|
+
"version": "19.8.0-beta.0",
|
|
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,13 +36,13 @@
|
|
|
36
36
|
"migrations": "./migrations.json"
|
|
37
37
|
},
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@nx/devkit": "19.
|
|
40
|
-
"@nx/eslint": "19.
|
|
41
|
-
"@nx/js": "19.
|
|
39
|
+
"@nx/devkit": "19.8.0-beta.0",
|
|
40
|
+
"@nx/eslint": "19.8.0-beta.0",
|
|
41
|
+
"@nx/js": "19.8.0-beta.0",
|
|
42
42
|
"@phenomnomnominal/tsquery": "~5.0.1",
|
|
43
43
|
"detect-port": "^1.5.1",
|
|
44
44
|
"tslib": "^2.3.0",
|
|
45
|
-
"@nrwl/cypress": "19.
|
|
45
|
+
"@nrwl/cypress": "19.8.0-beta.0"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
48
48
|
"cypress": ">= 3 < 14"
|
|
@@ -24,7 +24,7 @@ async function convertToInferred(tree, options) {
|
|
|
24
24
|
},
|
|
25
25
|
], options.project);
|
|
26
26
|
if (migratedProjects.size === 0) {
|
|
27
|
-
throw new
|
|
27
|
+
throw new executor_to_plugin_migrator_1.NoTargetsToMigrateError();
|
|
28
28
|
}
|
|
29
29
|
if (!options.skipFormat) {
|
|
30
30
|
await (0, devkit_1.formatFiles)(tree);
|
package/src/utils/add-linter.js
CHANGED
|
@@ -7,6 +7,7 @@ const cypress_version_1 = require("./cypress-version");
|
|
|
7
7
|
const versions_1 = require("./versions");
|
|
8
8
|
const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
|
|
9
9
|
const global_eslint_config_1 = require("@nx/eslint/src/generators/init/global-eslint-config");
|
|
10
|
+
const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
|
|
10
11
|
async function addLinterToCyProject(tree, options) {
|
|
11
12
|
if (options.linter === eslint_1.Linter.None) {
|
|
12
13
|
return () => { };
|
|
@@ -36,12 +37,22 @@ async function addLinterToCyProject(tree, options) {
|
|
|
36
37
|
if ((0, eslint_file_1.isEslintConfigSupported)(tree, projectConfig.root) ||
|
|
37
38
|
(0, eslint_file_1.isEslintConfigSupported)(tree)) {
|
|
38
39
|
const overrides = [];
|
|
39
|
-
if (
|
|
40
|
-
(0, eslint_file_1.
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
if ((0, flat_config_1.useFlatConfig)(tree)) {
|
|
41
|
+
(0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(tree, projectConfig.root, 'recommended', 'cypress', 'eslint-plugin-cypress/flat', false, false);
|
|
42
|
+
(0, eslint_file_1.addOverrideToLintConfig)(tree, projectConfig.root, {
|
|
43
|
+
files: ['*.ts', '*.js'],
|
|
44
|
+
rules: {},
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
if (options.rootProject) {
|
|
49
|
+
(0, eslint_file_1.addPluginsToLintConfig)(tree, projectConfig.root, '@nx');
|
|
50
|
+
overrides.push(global_eslint_config_1.typeScriptOverride);
|
|
51
|
+
overrides.push(global_eslint_config_1.javaScriptOverride);
|
|
52
|
+
}
|
|
53
|
+
const addExtendsTask = (0, eslint_file_1.addExtendsToLintConfig)(tree, projectConfig.root, 'plugin:cypress/recommended');
|
|
54
|
+
tasks.push(addExtendsTask);
|
|
43
55
|
}
|
|
44
|
-
(0, eslint_file_1.addExtendsToLintConfig)(tree, projectConfig.root, 'plugin:cypress/recommended');
|
|
45
56
|
const cyVersion = (0, cypress_version_1.installedCypressVersion)();
|
|
46
57
|
/**
|
|
47
58
|
* We need this override because we enabled allowJS in the tsconfig to allow for JS based Cypress tests.
|
|
@@ -57,7 +68,10 @@ async function addLinterToCyProject(tree, options) {
|
|
|
57
68
|
const addCy6Override = cyVersion && cyVersion < 7;
|
|
58
69
|
if (options.overwriteExisting) {
|
|
59
70
|
overrides.unshift({
|
|
60
|
-
files:
|
|
71
|
+
files: (0, flat_config_1.useFlatConfig)(tree)
|
|
72
|
+
? // For flat configs we don't need to specify the files
|
|
73
|
+
undefined
|
|
74
|
+
: ['*.ts', '*.tsx', '*.js', '*.jsx'],
|
|
61
75
|
parserOptions: !options.setParserOptionsProject
|
|
62
76
|
? undefined
|
|
63
77
|
: {
|
|
@@ -72,10 +86,13 @@ async function addLinterToCyProject(tree, options) {
|
|
|
72
86
|
}
|
|
73
87
|
else {
|
|
74
88
|
overrides.unshift({
|
|
75
|
-
files:
|
|
76
|
-
'
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
files: (0, flat_config_1.useFlatConfig)(tree)
|
|
90
|
+
? // For flat configs we don't need to specify the files
|
|
91
|
+
undefined
|
|
92
|
+
: [
|
|
93
|
+
'*.cy.{ts,js,tsx,jsx}',
|
|
94
|
+
`${options.cypressDir}/**/*.{ts,js,tsx,jsx}`,
|
|
95
|
+
],
|
|
79
96
|
parserOptions: !options.setParserOptionsProject
|
|
80
97
|
? undefined
|
|
81
98
|
: {
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const nxVersion: any;
|
|
2
|
-
export declare const eslintPluginCypressVersion = "^
|
|
2
|
+
export declare const eslintPluginCypressVersion = "^3.5.0";
|
|
3
3
|
export declare const typesNodeVersion = "18.16.9";
|
|
4
4
|
export declare const cypressViteDevServerVersion = "^2.2.1";
|
|
5
5
|
export declare const cypressVersion = "^13.13.0";
|
package/src/utils/versions.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.htmlWebpackPluginVersion = exports.viteVersion = exports.cypressWebpackVersion = exports.cypressVersion = exports.cypressViteDevServerVersion = exports.typesNodeVersion = exports.eslintPluginCypressVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
|
5
|
-
exports.eslintPluginCypressVersion = '^
|
|
5
|
+
exports.eslintPluginCypressVersion = '^3.5.0';
|
|
6
6
|
exports.typesNodeVersion = '18.16.9';
|
|
7
7
|
exports.cypressViteDevServerVersion = '^2.2.1';
|
|
8
8
|
exports.cypressVersion = '^13.13.0';
|