@nx/react 23.0.0-beta.16 → 23.0.0-beta.17

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",
3
- "version": "23.0.0-beta.16",
3
+ "version": "23.0.0-beta.17",
4
4
  "private": false,
5
5
  "description": "The React plugin for Nx contains executors and generators for managing React applications and libraries within an Nx workspace. It provides:\n\n\n- Integration with libraries such as Jest, Vitest, Playwright, Cypress, and Storybook.\n\n- Generators for applications, libraries, components, hooks, and more.\n\n- Library build support for publishing packages to npm or other registries.\n\n- Utilities for automatic workspace refactoring.",
6
6
  "repository": {
@@ -37,28 +37,28 @@
37
37
  "@svgr/webpack": "^8.0.1",
38
38
  "minimatch": "10.2.5",
39
39
  "tslib": "^2.3.0",
40
- "@nx/devkit": "23.0.0-beta.16",
41
- "@nx/js": "23.0.0-beta.16",
42
- "@nx/eslint": "23.0.0-beta.16",
43
- "@nx/web": "23.0.0-beta.16",
44
- "@nx/module-federation": "23.0.0-beta.16",
45
- "@nx/rollup": "23.0.0-beta.16",
40
+ "@nx/devkit": "23.0.0-beta.17",
41
+ "@nx/js": "23.0.0-beta.17",
42
+ "@nx/eslint": "23.0.0-beta.17",
43
+ "@nx/web": "23.0.0-beta.17",
44
+ "@nx/module-federation": "23.0.0-beta.17",
45
+ "@nx/rollup": "23.0.0-beta.17",
46
46
  "express": "^4.21.2",
47
47
  "http-proxy-middleware": "^3.0.5",
48
48
  "semver": "^7.6.3"
49
49
  },
50
50
  "devDependencies": {
51
- "@nx/cypress": "23.0.0-beta.16",
52
- "@nx/playwright": "23.0.0-beta.16",
53
- "@nx/rsbuild": "23.0.0-beta.16",
54
- "@nx/vite": "23.0.0-beta.16",
55
- "@nx/vitest": "23.0.0-beta.16",
56
- "@nx/webpack": "23.0.0-beta.16",
57
- "@nx/storybook": "23.0.0-beta.16",
58
- "nx": "23.0.0-beta.16"
51
+ "@nx/cypress": "23.0.0-beta.17",
52
+ "@nx/playwright": "23.0.0-beta.17",
53
+ "@nx/rsbuild": "23.0.0-beta.17",
54
+ "@nx/vite": "23.0.0-beta.17",
55
+ "@nx/vitest": "23.0.0-beta.17",
56
+ "@nx/webpack": "23.0.0-beta.17",
57
+ "@nx/storybook": "23.0.0-beta.17",
58
+ "nx": "23.0.0-beta.17"
59
59
  },
60
60
  "optionalDependencies": {
61
- "@nx/vite": "23.0.0-beta.16"
61
+ "@nx/vite": "23.0.0-beta.17"
62
62
  },
63
63
  "publishConfig": {
64
64
  "access": "public"
@@ -37,10 +37,9 @@ exports.addLinting = addLinting;
37
37
  exports.isEslintInstalled = isEslintInstalled;
38
38
  const devkit_1 = require("@nx/devkit");
39
39
  const eslint_1 = require("@nx/eslint");
40
- const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
41
- const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
40
+ const internal_1 = require("@nx/eslint/internal");
42
41
  const devkit_2 = require("@nx/devkit");
43
- const internal_1 = require("@nx/js/internal");
42
+ const internal_2 = require("@nx/js/internal");
44
43
  const lint_1 = require("../../../utils/lint");
45
44
  const versions_1 = require("../../../utils/versions");
46
45
  async function addLinting(host, options) {
@@ -59,23 +58,23 @@ async function addLinting(host, options) {
59
58
  addPlugin: options.addPlugin,
60
59
  });
61
60
  tasks.push(lintTask);
62
- if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
63
- if ((0, flat_config_1.useFlatConfig)(host)) {
64
- (0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(host, options.appProjectRoot, 'flat/react', { checkBaseConfig: true });
61
+ if ((0, internal_1.isEslintConfigSupported)(host)) {
62
+ if ((0, internal_1.useFlatConfig)(host)) {
63
+ (0, internal_1.addPredefinedConfigToFlatLintConfig)(host, options.appProjectRoot, 'flat/react', { checkBaseConfig: true });
65
64
  // Add an empty rules object to users know how to add/override rules
66
- (0, eslint_file_1.addOverrideToLintConfig)(host, options.appProjectRoot, {
65
+ (0, internal_1.addOverrideToLintConfig)(host, options.appProjectRoot, {
67
66
  files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
68
67
  rules: {},
69
68
  });
70
69
  }
71
70
  else {
72
- const addExtendsTask = (0, eslint_file_1.addExtendsToLintConfig)(host, options.appProjectRoot, { name: 'plugin:@nx/react', needCompatFixup: true });
71
+ const addExtendsTask = (0, internal_1.addExtendsToLintConfig)(host, options.appProjectRoot, { name: 'plugin:@nx/react', needCompatFixup: true });
73
72
  tasks.push(addExtendsTask);
74
73
  }
75
74
  }
76
75
  if (!options.skipPackageJson) {
77
76
  const installTask = (0, devkit_2.addDependenciesToPackageJson)(host, lint_1.extraEslintDependencies.dependencies, lint_1.extraEslintDependencies.devDependencies);
78
- const addSwcTask = (0, internal_1.addSwcDependencies)(host);
77
+ const addSwcTask = (0, internal_2.addSwcDependencies)(host);
79
78
  tasks.push(installTask, addSwcTask);
80
79
  }
81
80
  if (options.useReactRouter) {
@@ -89,11 +88,11 @@ async function ignoreReactRouterFilesInEslintConfig(tree, projectRoot) {
89
88
  return;
90
89
  }
91
90
  (0, devkit_1.ensurePackage)('@nx/eslint', versions_1.nxVersion);
92
- const { addIgnoresToLintConfig, isEslintConfigSupported } = await Promise.resolve().then(() => __importStar(require('@nx/eslint/src/generators/utils/eslint-file')));
91
+ const { addIgnoresToLintConfig, isEslintConfigSupported } = await Promise.resolve().then(() => __importStar(require('@nx/eslint/internal')));
93
92
  if (!isEslintConfigSupported(tree)) {
94
93
  return;
95
94
  }
96
- const { useFlatConfig } = await Promise.resolve().then(() => __importStar(require('@nx/eslint/src/utils/flat-config')));
95
+ const { useFlatConfig } = await Promise.resolve().then(() => __importStar(require('@nx/eslint/internal')));
97
96
  const isUsingFlatConfig = useFlatConfig(tree);
98
97
  if (!projectRoot && !isUsingFlatConfig) {
99
98
  // root eslintrc files ignore all files and the root eslintrc files add
@@ -37,7 +37,7 @@ export declare function getDefaultTemplateVariables(host: Tree, options: Normali
37
37
  tags?: string;
38
38
  inSourceTests?: boolean;
39
39
  e2eTestRunner: "cypress" | "playwright" | "none";
40
- linter: import("packages/eslint").Linter | import("packages/eslint").LinterType;
40
+ linter: import("packages/eslint/dist").Linter | import("packages/eslint/dist").LinterType;
41
41
  classComponent?: boolean;
42
42
  routing?: boolean;
43
43
  useReactRouter?: boolean;
@@ -5,8 +5,7 @@ const eslint_1 = require("@nx/eslint");
5
5
  const path_1 = require("nx/src/utils/path");
6
6
  const devkit_1 = require("@nx/devkit");
7
7
  const lint_1 = require("../../../utils/lint");
8
- const eslint_file_1 = require("@nx/eslint/src/generators/utils/eslint-file");
9
- const flat_config_1 = require("@nx/eslint/src/utils/flat-config");
8
+ const internal_1 = require("@nx/eslint/internal");
10
9
  async function addLinting(host, options) {
11
10
  if (options.linter === 'eslint') {
12
11
  const tasks = [];
@@ -23,17 +22,17 @@ async function addLinting(host, options) {
23
22
  addPlugin: options.addPlugin,
24
23
  });
25
24
  tasks.push(lintTask);
26
- if ((0, eslint_file_1.isEslintConfigSupported)(host)) {
27
- if ((0, flat_config_1.useFlatConfig)(host)) {
28
- (0, eslint_file_1.addPredefinedConfigToFlatLintConfig)(host, options.projectRoot, 'flat/react', { checkBaseConfig: true });
25
+ if ((0, internal_1.isEslintConfigSupported)(host)) {
26
+ if ((0, internal_1.useFlatConfig)(host)) {
27
+ (0, internal_1.addPredefinedConfigToFlatLintConfig)(host, options.projectRoot, 'flat/react', { checkBaseConfig: true });
29
28
  // Add an empty rules object to users know how to add/override rules
30
- (0, eslint_file_1.addOverrideToLintConfig)(host, options.projectRoot, {
29
+ (0, internal_1.addOverrideToLintConfig)(host, options.projectRoot, {
31
30
  files: ['*.ts', '*.tsx', '*.js', '*.jsx'],
32
31
  rules: {},
33
32
  });
34
33
  }
35
34
  else {
36
- const addExtendsTask = (0, eslint_file_1.addExtendsToLintConfig)(host, options.projectRoot, {
35
+ const addExtendsTask = (0, internal_1.addExtendsToLintConfig)(host, options.projectRoot, {
37
36
  name: 'plugin:@nx/react',
38
37
  needCompatFixup: true,
39
38
  });
@@ -41,7 +40,7 @@ async function addLinting(host, options) {
41
40
  }
42
41
  // Add out-tsc ignore pattern when using TS solution setup
43
42
  if (options.isUsingTsSolutionConfig) {
44
- (0, eslint_file_1.addIgnoresToLintConfig)(host, options.projectRoot, ['**/out-tsc']);
43
+ (0, internal_1.addIgnoresToLintConfig)(host, options.projectRoot, ['**/out-tsc']);
45
44
  }
46
45
  }
47
46
  let installTask = () => { };