@nx/detox 17.3.0-beta.3 → 17.3.0-beta.5

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": "17.3.0-beta.3",
3
+ "version": "17.3.0-beta.5",
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": "17.3.0-beta.3",
29
- "@nx/jest": "17.3.0-beta.3",
30
- "@nx/js": "17.3.0-beta.3",
31
- "@nx/eslint": "17.3.0-beta.3",
32
- "@nx/react": "17.3.0-beta.3",
28
+ "@nx/devkit": "17.3.0-beta.5",
29
+ "@nx/jest": "17.3.0-beta.5",
30
+ "@nx/js": "17.3.0-beta.5",
31
+ "@nx/eslint": "17.3.0-beta.5",
32
+ "@nx/react": "17.3.0-beta.5",
33
33
  "tslib": "^2.3.0",
34
- "@nrwl/detox": "17.3.0-beta.3"
34
+ "@nrwl/detox": "17.3.0-beta.5"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "detox": "^20.9.0"
@@ -8,6 +8,7 @@ const add_linting_1 = require("./lib/add-linting");
8
8
  const add_project_1 = require("./lib/add-project");
9
9
  const create_files_1 = require("./lib/create-files");
10
10
  const normalize_options_1 = require("./lib/normalize-options");
11
+ const ensure_dependencies_1 = require("./lib/ensure-dependencies");
11
12
  async function detoxApplicationGenerator(host, schema) {
12
13
  return await detoxApplicationGeneratorInternal(host, {
13
14
  projectNameAndRootFormat: 'derived',
@@ -25,10 +26,11 @@ async function detoxApplicationGeneratorInternal(host, schema) {
25
26
  (0, add_project_1.addProject)(host, options);
26
27
  (0, add_git_ignore_entry_1.addGitIgnoreEntry)(host, options);
27
28
  const lintingTask = await (0, add_linting_1.addLinting)(host, options);
29
+ const depsTask = (0, ensure_dependencies_1.ensureDependencies)(host, options);
28
30
  if (!options.skipFormat) {
29
31
  await (0, devkit_1.formatFiles)(host);
30
32
  }
31
- return (0, devkit_1.runTasksInSerial)(initTask, lintingTask);
33
+ return (0, devkit_1.runTasksInSerial)(initTask, lintingTask, depsTask);
32
34
  }
33
35
  exports.detoxApplicationGeneratorInternal = detoxApplicationGeneratorInternal;
34
36
  exports.default = detoxApplicationGenerator;
@@ -0,0 +1,3 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ import type { NormalizedSchema } from './normalize-options';
3
+ export declare function ensureDependencies(tree: Tree, options: NormalizedSchema): import("@nx/devkit").GeneratorCallback;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ensureDependencies = void 0;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const versions_1 = require("@nx/jest/src/utils/versions");
6
+ const versions_2 = require("../../../utils/versions");
7
+ function ensureDependencies(tree, options) {
8
+ const devDependencies = {
9
+ '@testing-library/jest-dom': versions_2.testingLibraryJestDom,
10
+ '@types/node': versions_1.typesNodeVersion,
11
+ 'jest-circus': versions_1.jestVersion,
12
+ };
13
+ if (options.framework === 'expo') {
14
+ devDependencies['@config-plugins/detox'] = versions_2.configPluginsDetoxVersion;
15
+ }
16
+ return (0, devkit_1.addDependenciesToPackageJson)(tree, {}, devDependencies);
17
+ }
18
+ exports.ensureDependencies = ensureDependencies;
@@ -2,8 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateDependencies = exports.detoxInitGenerator = void 0;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const versions_1 = require("@nx/jest/src/utils/versions");
6
- const versions_2 = require("../../utils/versions");
5
+ const versions_1 = require("../../utils/versions");
7
6
  async function detoxInitGenerator(host, schema) {
8
7
  const tasks = [];
9
8
  if (!schema.skipPackageJson) {
@@ -21,14 +20,8 @@ async function detoxInitGenerator(host, schema) {
21
20
  exports.detoxInitGenerator = detoxInitGenerator;
22
21
  function updateDependencies(host, schema) {
23
22
  return (0, devkit_1.addDependenciesToPackageJson)(host, {}, {
24
- '@nx/detox': versions_2.nxVersion,
25
- detox: versions_2.detoxVersion,
26
- '@testing-library/jest-dom': versions_2.testingLibraryJestDom,
27
- '@types/node': versions_1.typesNodeVersion,
28
- 'jest-circus': versions_1.jestVersion,
29
- ...(schema.framework === 'expo'
30
- ? { '@config-plugins/detox': versions_2.configPluginsDetoxVersion }
31
- : {}),
23
+ '@nx/detox': versions_1.nxVersion,
24
+ detox: versions_1.detoxVersion,
32
25
  });
33
26
  }
34
27
  exports.updateDependencies = updateDependencies;
@@ -15,12 +15,6 @@
15
15
  "default": false,
16
16
  "description": "Do not add dependencies to `package.json`.",
17
17
  "x-priority": "internal"
18
- },
19
- "framework": {
20
- "type": "string",
21
- "description": "App framework to test",
22
- "enum": ["react-native", "expo"],
23
- "default": "react-native"
24
18
  }
25
19
  },
26
20
  "required": []