@nx/detox 23.1.0 → 23.1.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.
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = detoxTestExecutor;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const internal_1 = require("@nx/devkit/internal");
6
- const devkit_2 = require("@nx/devkit");
7
6
  const path_1 = require("path");
8
7
  const child_process_1 = require("child_process");
9
8
  const build_impl_1 = require("../build/build.impl");
@@ -77,7 +76,7 @@ function createDetoxTestOptions(options) {
77
76
  }
78
77
  }
79
78
  else {
80
- const propertyName = (0, devkit_2.names)(k).fileName; // convert camelCase to kebab-case
79
+ const propertyName = (0, devkit_1.names)(k).fileName; // convert camelCase to kebab-case
81
80
  acc.push(`--${propertyName}`, propertyValue);
82
81
  }
83
82
  return acc;
@@ -17,6 +17,7 @@ async function addLinting(host, options) {
17
17
  (0, devkit_1.joinPathFragments)(options.e2eProjectRoot, 'tsconfig.app.json'),
18
18
  ],
19
19
  skipFormat: true,
20
+ enableTypedLinting: (0, internal_1.isTypedLintingEnabled)(options),
20
21
  addPlugin: options.addPlugin,
21
22
  });
22
23
  tasks.push(lintTask);
@@ -9,6 +9,10 @@ export interface Schema {
9
9
  linter?: Linter | LinterType;
10
10
  js?: boolean;
11
11
  skipFormat?: boolean;
12
+ enableTypedLinting?: boolean;
13
+ /**
14
+ * @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
15
+ */
12
16
  setParserOptionsProject?: boolean;
13
17
  framework: 'react-native' | 'expo';
14
18
  addPlugin?: boolean;
@@ -56,11 +56,17 @@
56
56
  "default": false,
57
57
  "x-priority": "internal"
58
58
  },
59
- "setParserOptionsProject": {
59
+ "enableTypedLinting": {
60
60
  "type": "boolean",
61
- "description": "Whether or not to configure the ESLint `parserOptions.project` option. We do not do this by default for lint performance reasons.",
61
+ "description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
62
62
  "default": false
63
63
  },
64
+ "setParserOptionsProject": {
65
+ "type": "boolean",
66
+ "description": "Deprecated alias for `enableTypedLinting`.",
67
+ "default": false,
68
+ "x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
69
+ },
64
70
  "useProjectJson": {
65
71
  "type": "boolean",
66
72
  "description": "Use a `project.json` configuration file instead of inlining the Nx configuration in the `package.json` file."
@@ -44,6 +44,12 @@ async function detoxInitGeneratorInternal(host, schema) {
44
44
  return (0, devkit_1.runTasksInSerial)(...tasks);
45
45
  }
46
46
  function updateDependencies(host, schema) {
47
+ // The user explicitly asked for detox, and its postinstall builds the
48
+ // framework cache it needs to run at all, so enable it — npm and yarn run
49
+ // it unconditionally. Transitive deps stay denied.
50
+ (0, internal_1.acknowledgeBuildScripts)(host, (0, devkit_1.detectPackageManager)(host.root), {
51
+ detox: true,
52
+ });
47
53
  return (0, devkit_1.addDependenciesToPackageJson)(host, {}, {
48
54
  '@nx/detox': versions_1.nxVersion,
49
55
  detox: versions_1.detoxVersion,
@@ -5,14 +5,12 @@ const internal_1 = require("@nx/devkit/internal");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const path_1 = require("path");
7
7
  const js_1 = require("@nx/js");
8
- const cache_directory_1 = require("nx/src/utils/cache-directory");
9
- const devkit_internals_1 = require("nx/src/devkit-internals");
10
8
  const internal_2 = require("@nx/js/internal");
11
9
  exports.createNodes = [
12
10
  '**/{detox.config,.detoxrc}.{json,js}',
13
11
  async (configFiles, options, context) => {
14
- const optionsHash = (0, devkit_internals_1.hashObject)(options);
15
- const cachePath = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, `detox-${optionsHash}.hash`);
12
+ const optionsHash = (0, internal_1.hashObject)(options);
13
+ const cachePath = (0, path_1.join)(internal_1.workspaceDataDirectory, `detox-${optionsHash}.hash`);
16
14
  const targetsCache = new internal_1.PluginCache(cachePath);
17
15
  const packageManager = (0, devkit_1.detectPackageManager)(context.workspaceRoot);
18
16
  const pmc = (0, devkit_1.getPackageManagerCommand)(packageManager);
@@ -1,4 +1,4 @@
1
- import type { Tree } from 'nx/src/generators/tree';
1
+ import { type Tree } from '@nx/devkit';
2
2
  /**
3
3
  * Get the installed Expo version from package.json.
4
4
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nx/detox",
3
- "version": "23.1.0",
3
+ "version": "23.1.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": [
@@ -37,14 +37,14 @@
37
37
  "dependencies": {
38
38
  "semver": "^7.6.3",
39
39
  "tslib": "^2.3.0",
40
- "@nx/devkit": "23.1.0",
41
- "@nx/jest": "23.1.0",
42
- "@nx/eslint": "23.1.0",
43
- "@nx/react": "23.1.0",
44
- "@nx/js": "23.1.0"
40
+ "@nx/devkit": "23.1.2",
41
+ "@nx/js": "23.1.2",
42
+ "@nx/eslint": "23.1.2",
43
+ "@nx/react": "23.1.2",
44
+ "@nx/jest": "23.1.2"
45
45
  },
46
46
  "devDependencies": {
47
- "nx": "23.1.0"
47
+ "nx": "23.1.2"
48
48
  },
49
49
  "peerDependencies": {
50
50
  "detox": "^20.0.0"