@nx/detox 18.0.0-beta.0 → 18.0.0-beta.2
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/generators.json +1 -1
- package/migrations.json +9 -0
- package/package.json +7 -7
- package/src/generators/application/application.js +1 -0
- package/src/generators/application/lib/add-linting.js +1 -0
- package/src/generators/application/lib/normalize-options.js +1 -0
- package/src/generators/application/schema.json +1 -1
- package/src/generators/init/init.d.ts +1 -0
- package/src/generators/init/init.js +9 -4
- package/src/generators/init/schema.json +1 -1
- package/src/utils/versions.d.ts +2 -2
- package/src/utils/versions.js +2 -2
package/generators.json
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
"extends": ["@nx/workspace"],
|
|
5
5
|
"generators": {
|
|
6
6
|
"init": {
|
|
7
|
-
"factory": "./src/generators/init/init#
|
|
7
|
+
"factory": "./src/generators/init/init#detoxInitGeneratorInternal",
|
|
8
8
|
"schema": "./src/generators/init/schema.json",
|
|
9
9
|
"description": "Initialize the `@nrwl/detox` plugin.",
|
|
10
10
|
"hidden": true
|
package/migrations.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nx/detox",
|
|
3
|
-
"version": "18.0.0-beta.
|
|
3
|
+
"version": "18.0.0-beta.2",
|
|
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": [
|
|
@@ -25,13 +25,13 @@
|
|
|
25
25
|
"main": "./index.js",
|
|
26
26
|
"types": "index.d.ts",
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@nx/devkit": "18.0.0-beta.
|
|
29
|
-
"@nx/jest": "18.0.0-beta.
|
|
30
|
-
"@nx/js": "18.0.0-beta.
|
|
31
|
-
"@nx/eslint": "18.0.0-beta.
|
|
32
|
-
"@nx/react": "18.0.0-beta.
|
|
28
|
+
"@nx/devkit": "18.0.0-beta.2",
|
|
29
|
+
"@nx/jest": "18.0.0-beta.2",
|
|
30
|
+
"@nx/js": "18.0.0-beta.2",
|
|
31
|
+
"@nx/eslint": "18.0.0-beta.2",
|
|
32
|
+
"@nx/react": "18.0.0-beta.2",
|
|
33
33
|
"tslib": "^2.3.0",
|
|
34
|
-
"@nrwl/detox": "18.0.0-beta.
|
|
34
|
+
"@nrwl/detox": "18.0.0-beta.2"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"detox": "^20.9.0"
|
|
@@ -11,6 +11,7 @@ const normalize_options_1 = require("./lib/normalize-options");
|
|
|
11
11
|
const ensure_dependencies_1 = require("./lib/ensure-dependencies");
|
|
12
12
|
async function detoxApplicationGenerator(host, schema) {
|
|
13
13
|
return await detoxApplicationGeneratorInternal(host, {
|
|
14
|
+
addPlugin: false,
|
|
14
15
|
projectNameAndRootFormat: 'derived',
|
|
15
16
|
...schema,
|
|
16
17
|
});
|
|
@@ -16,6 +16,7 @@ async function addLinting(host, options) {
|
|
|
16
16
|
(0, devkit_1.joinPathFragments)(options.e2eProjectRoot, 'tsconfig.app.json'),
|
|
17
17
|
],
|
|
18
18
|
skipFormat: true,
|
|
19
|
+
addPlugin: options.addPlugin,
|
|
19
20
|
});
|
|
20
21
|
if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
|
|
21
22
|
(0, eslint_file_1.addExtendsToLintConfig)(host, options.e2eProjectRoot, 'plugin:@nx/react');
|
|
@@ -11,6 +11,7 @@ async function normalizeOptions(host, options) {
|
|
|
11
11
|
projectNameAndRootFormat: options.projectNameAndRootFormat,
|
|
12
12
|
callingGenerator: '@nx/detox:application',
|
|
13
13
|
});
|
|
14
|
+
options.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
|
|
14
15
|
const { fileName: appFileName, className: appClassName } = (0, devkit_1.names)(options.appName || options.appProject);
|
|
15
16
|
const { root: appRoot } = (0, devkit_1.readProjectConfiguration)(host, (0, devkit_1.names)(options.appProject).fileName);
|
|
16
17
|
return {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { GeneratorCallback, Tree } from '@nx/devkit';
|
|
2
2
|
import { Schema } from './schema';
|
|
3
3
|
export declare function detoxInitGenerator(host: Tree, schema: Schema): Promise<GeneratorCallback>;
|
|
4
|
+
export declare function detoxInitGeneratorInternal(host: Tree, schema: Schema): Promise<GeneratorCallback>;
|
|
4
5
|
export declare function updateDependencies(host: Tree, schema: Schema): GeneratorCallback;
|
|
5
6
|
export default detoxInitGenerator;
|
|
@@ -1,17 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.updateDependencies = exports.detoxInitGenerator = void 0;
|
|
3
|
+
exports.updateDependencies = exports.detoxInitGeneratorInternal = exports.detoxInitGenerator = void 0;
|
|
4
4
|
const devkit_1 = require("@nx/devkit");
|
|
5
5
|
const update_package_scripts_1 = require("@nx/devkit/src/utils/update-package-scripts");
|
|
6
6
|
const plugin_1 = require("../../plugins/plugin");
|
|
7
7
|
const versions_1 = require("../../utils/versions");
|
|
8
|
-
|
|
8
|
+
function detoxInitGenerator(host, schema) {
|
|
9
|
+
return detoxInitGeneratorInternal(host, { addPlugin: false, ...schema });
|
|
10
|
+
}
|
|
11
|
+
exports.detoxInitGenerator = detoxInitGenerator;
|
|
12
|
+
async function detoxInitGeneratorInternal(host, schema) {
|
|
9
13
|
const tasks = [];
|
|
14
|
+
schema.addPlugin ??= process.env.NX_ADD_PLUGINS !== 'false';
|
|
10
15
|
if (!schema.skipPackageJson) {
|
|
11
16
|
tasks.push(moveDependency(host));
|
|
12
17
|
tasks.push(updateDependencies(host, schema));
|
|
13
18
|
}
|
|
14
|
-
if (
|
|
19
|
+
if (schema.addPlugin) {
|
|
15
20
|
addPlugin(host);
|
|
16
21
|
}
|
|
17
22
|
if (schema.updatePackageScripts) {
|
|
@@ -22,7 +27,7 @@ async function detoxInitGenerator(host, schema) {
|
|
|
22
27
|
}
|
|
23
28
|
return (0, devkit_1.runTasksInSerial)(...tasks);
|
|
24
29
|
}
|
|
25
|
-
exports.
|
|
30
|
+
exports.detoxInitGeneratorInternal = detoxInitGeneratorInternal;
|
|
26
31
|
function updateDependencies(host, schema) {
|
|
27
32
|
return (0, devkit_1.addDependenciesToPackageJson)(host, {}, {
|
|
28
33
|
'@nx/detox': versions_1.nxVersion,
|
package/src/utils/versions.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const nxVersion: any;
|
|
2
|
-
export declare const detoxVersion = "^20.
|
|
3
|
-
export declare const testingLibraryJestDom = "
|
|
2
|
+
export declare const detoxVersion = "^20.16.0";
|
|
3
|
+
export declare const testingLibraryJestDom = "6.2.0";
|
|
4
4
|
export declare const configPluginsDetoxVersion = "~6.0.0";
|
package/src/utils/versions.js
CHANGED
|
@@ -2,6 +2,6 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.configPluginsDetoxVersion = exports.testingLibraryJestDom = exports.detoxVersion = exports.nxVersion = void 0;
|
|
4
4
|
exports.nxVersion = require('../../package.json').version;
|
|
5
|
-
exports.detoxVersion = '^20.
|
|
6
|
-
exports.testingLibraryJestDom = '
|
|
5
|
+
exports.detoxVersion = '^20.16.0';
|
|
6
|
+
exports.testingLibraryJestDom = '6.2.0';
|
|
7
7
|
exports.configPluginsDetoxVersion = '~6.0.0'; // only required for expo
|