@nx/detox 19.7.4 → 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/detox",
|
|
3
|
-
"version": "19.
|
|
3
|
+
"version": "19.8.0-beta.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The Nx Plugin for Detox contains executors and generators for allowing your workspace to use the powerful Detox integration testing capabilities.",
|
|
6
6
|
"keywords": [
|
|
@@ -27,13 +27,13 @@
|
|
|
27
27
|
"main": "./index",
|
|
28
28
|
"types": "index.d.ts",
|
|
29
29
|
"dependencies": {
|
|
30
|
-
"@nx/devkit": "19.
|
|
31
|
-
"@nx/jest": "19.
|
|
32
|
-
"@nx/js": "19.
|
|
33
|
-
"@nx/eslint": "19.
|
|
34
|
-
"@nx/react": "19.
|
|
30
|
+
"@nx/devkit": "19.8.0-beta.0",
|
|
31
|
+
"@nx/jest": "19.8.0-beta.0",
|
|
32
|
+
"@nx/js": "19.8.0-beta.0",
|
|
33
|
+
"@nx/eslint": "19.8.0-beta.0",
|
|
34
|
+
"@nx/react": "19.8.0-beta.0",
|
|
35
35
|
"tslib": "^2.3.0",
|
|
36
|
-
"@nrwl/detox": "19.
|
|
36
|
+
"@nrwl/detox": "19.8.0-beta.0"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"detox": "^20.9.0"
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Tree } from '@nx/devkit';
|
|
1
|
+
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
2
|
import { NormalizedSchema } from './normalize-options';
|
|
3
|
-
export declare function addLinting(host: Tree, options: NormalizedSchema): Promise<
|
|
3
|
+
export declare function addLinting(host: Tree, options: NormalizedSchema): Promise<GeneratorCallback>;
|
|
@@ -5,10 +5,12 @@ const eslint_1 = require("@nx/eslint");
|
|
|
5
5
|
const devkit_1 = require("@nx/devkit");
|
|
6
6
|
const react_1 = require("@nx/react");
|
|
7
7
|
const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
|
|
8
|
+
const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
|
|
8
9
|
async function addLinting(host, options) {
|
|
9
10
|
if (options.linter === eslint_1.Linter.None) {
|
|
10
11
|
return () => { };
|
|
11
12
|
}
|
|
13
|
+
const tasks = [];
|
|
12
14
|
const lintTask = await (0, eslint_1.lintProjectGenerator)(host, {
|
|
13
15
|
linter: options.linter,
|
|
14
16
|
project: options.e2eProjectName,
|
|
@@ -18,9 +20,22 @@ async function addLinting(host, options) {
|
|
|
18
20
|
skipFormat: true,
|
|
19
21
|
addPlugin: options.addPlugin,
|
|
20
22
|
});
|
|
23
|
+
tasks.push(lintTask);
|
|
21
24
|
if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
|
|
22
|
-
(0,
|
|
25
|
+
if ((0, flat_config_1.useFlatConfig)(host)) {
|
|
26
|
+
(0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(host, options.e2eProjectRoot, 'flat/react');
|
|
27
|
+
// Add an empty rules object to users know how to add/override rules
|
|
28
|
+
(0, eslint_file_1.addOverrideToLintConfig)(host, options.e2eProjectRoot, {
|
|
29
|
+
files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
|
|
30
|
+
rules: {},
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
else {
|
|
34
|
+
const addExtendsTask = (0, eslint_file_1.addExtendsToLintConfig)(host, options.e2eProjectRoot, { name: 'plugin:@nx/react', needCompatFixup: true });
|
|
35
|
+
tasks.push(addExtendsTask);
|
|
36
|
+
}
|
|
23
37
|
}
|
|
24
38
|
const installTask = (0, devkit_1.addDependenciesToPackageJson)(host, react_1.extraEslintDependencies.dependencies, react_1.extraEslintDependencies.devDependencies);
|
|
25
|
-
|
|
39
|
+
tasks.push(installTask);
|
|
40
|
+
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
26
41
|
}
|
|
@@ -67,7 +67,7 @@ async function convertToInferred(tree, options) {
|
|
|
67
67
|
}
|
|
68
68
|
(0, devkit_1.updateNxJson)(tree, nxJson);
|
|
69
69
|
if (migratedProjects.size === 0) {
|
|
70
|
-
throw new
|
|
70
|
+
throw new executor_to_plugin_migrator_1.NoTargetsToMigrateError();
|
|
71
71
|
}
|
|
72
72
|
if (!options.skipFormat) {
|
|
73
73
|
await (0, devkit_1.formatFiles)(tree);
|