@nx/react-native 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/react-native",
3
- "version": "19.7.4",
3
+ "version": "19.8.0-beta.0",
4
4
  "private": false,
5
5
  "description": "The Nx Plugin for React Native contains generators for managing React Native applications and libraries within an Nx workspace. It provides: \n\n-Integration with libraries such as Jest, Detox, and Storybook.\n-Scaffolding for creating buildable libraries that can be published to npm.\n-Utilities for automatic workspace refactoring.",
6
6
  "keywords": [
@@ -37,13 +37,13 @@
37
37
  "node-fetch": "^2.6.7",
38
38
  "tsconfig-paths": "^4.1.2",
39
39
  "tslib": "^2.3.0",
40
- "@nx/devkit": "19.7.4",
41
- "@nx/jest": "19.7.4",
42
- "@nx/js": "19.7.4",
43
- "@nx/eslint": "19.7.4",
44
- "@nx/react": "19.7.4",
45
- "@nx/workspace": "19.7.4",
46
- "@nrwl/react-native": "19.7.4"
40
+ "@nx/devkit": "19.8.0-beta.0",
41
+ "@nx/jest": "19.8.0-beta.0",
42
+ "@nx/js": "19.8.0-beta.0",
43
+ "@nx/eslint": "19.8.0-beta.0",
44
+ "@nx/react": "19.8.0-beta.0",
45
+ "@nx/workspace": "19.8.0-beta.0",
46
+ "@nrwl/react-native": "19.8.0-beta.0"
47
47
  },
48
48
  "executors": "./executors.json",
49
49
  "ng-update": {
@@ -80,7 +80,7 @@ async function convertToInferred(tree, options) {
80
80
  },
81
81
  ], options.project);
82
82
  if (migratedProjects.size === 0) {
83
- throw new Error('Could not find any targets to migrate.');
83
+ throw new executor_to_plugin_migrator_1.NoTargetsToMigrateError();
84
84
  }
85
85
  if (!options.skipFormat) {
86
86
  await (0, devkit_1.formatFiles)(tree);
@@ -5,6 +5,7 @@ const eslint_1 = require("@nx/eslint");
5
5
  const devkit_1 = require("@nx/devkit");
6
6
  const lint_1 = require("@nx/react/src/utils/lint");
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 () => { };
@@ -20,7 +21,21 @@ async function addLinting(host, options) {
20
21
  });
21
22
  tasks.push(lintTask);
22
23
  if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
23
- (0, eslint_file_1.addExtendsToLintConfig)(host, options.projectRoot, 'plugin:@nx/react');
24
+ if ((0, flat_config_1.useFlatConfig)(host)) {
25
+ (0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(host, options.projectRoot, 'flat/react');
26
+ // Add an empty rules object to users know how to add/override rules
27
+ (0, eslint_file_1.addOverrideToLintConfig)(host, options.projectRoot, {
28
+ files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
29
+ rules: {},
30
+ });
31
+ }
32
+ else {
33
+ const addExtendsTask = (0, eslint_file_1.addExtendsToLintConfig)(host, options.projectRoot, {
34
+ name: 'plugin:@nx/react',
35
+ needCompatFixup: true,
36
+ });
37
+ tasks.push(addExtendsTask);
38
+ }
24
39
  (0, eslint_file_1.addIgnoresToLintConfig)(host, options.projectRoot, [
25
40
  'public',
26
41
  '.cache',