@nx/react 23.0.0-beta.2 → 23.0.0-beta.20

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.
Files changed (110) hide show
  1. package/index.d.ts +0 -3
  2. package/index.d.ts.map +1 -1
  3. package/index.js +1 -4
  4. package/migrations.json +6 -0
  5. package/package.json +18 -18
  6. package/plugins/component-testing/index.js +7 -7
  7. package/plugins/component-testing/webpack-fallback.js +2 -2
  8. package/plugins/storybook/index.js +3 -3
  9. package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +4 -4
  10. package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +5 -5
  11. package/src/executors/module-federation-static-server/module-federation-static-server.impl.js +4 -4
  12. package/src/generators/application/application.d.ts.map +1 -1
  13. package/src/generators/application/application.js +32 -18
  14. package/src/generators/application/lib/add-e2e.d.ts.map +1 -1
  15. package/src/generators/application/lib/add-linting.js +10 -11
  16. package/src/generators/application/lib/add-project.d.ts.map +1 -1
  17. package/src/generators/application/lib/add-project.js +10 -0
  18. package/src/generators/application/lib/add-routing.js +2 -2
  19. package/src/generators/application/lib/bundlers/add-vite.d.ts.map +1 -1
  20. package/src/generators/application/lib/bundlers/add-vite.js +10 -2
  21. package/src/generators/application/lib/create-application-files.d.ts +1 -1
  22. package/src/generators/application/lib/create-application-files.js +2 -2
  23. package/src/generators/application/lib/normalize-options.js +5 -5
  24. package/src/generators/component/component.js +2 -2
  25. package/src/generators/component/lib/normalize-options.d.ts.map +1 -1
  26. package/src/generators/component/lib/normalize-options.js +5 -6
  27. package/src/generators/component/schema.d.ts +2 -7
  28. package/src/generators/component/schema.json +0 -5
  29. package/src/generators/component-story/component-story.d.ts.map +1 -1
  30. package/src/generators/component-story/component-story.js +3 -4
  31. package/src/generators/component-test/component-test.d.ts.map +1 -1
  32. package/src/generators/component-test/component-test.js +3 -4
  33. package/src/generators/cypress-component-configuration/lib/add-files.d.ts +1 -1
  34. package/src/generators/cypress-component-configuration/lib/add-files.d.ts.map +1 -1
  35. package/src/generators/cypress-component-configuration/lib/add-files.js +4 -4
  36. package/src/generators/federate-module/federate-module.d.ts.map +1 -1
  37. package/src/generators/federate-module/federate-module.js +2 -2
  38. package/src/generators/federate-module/lib/utils.js +2 -2
  39. package/src/generators/hook/hook.d.ts.map +1 -1
  40. package/src/generators/hook/hook.js +5 -6
  41. package/src/generators/host/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  42. package/src/generators/host/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
  43. package/src/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  44. package/src/generators/host/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +2 -2
  45. package/src/generators/host/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
  46. package/src/generators/host/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  47. package/src/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
  48. package/src/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  49. package/src/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +2 -2
  50. package/src/generators/host/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +2 -2
  51. package/src/generators/host/host.d.ts.map +1 -1
  52. package/src/generators/host/host.js +5 -5
  53. package/src/generators/host/lib/add-module-federation-files.d.ts.map +1 -1
  54. package/src/generators/host/lib/add-module-federation-files.js +3 -3
  55. package/src/generators/host/lib/normalize-host-name.js +2 -2
  56. package/src/generators/host/lib/update-module-federation-tsconfig.js +2 -2
  57. package/src/generators/init/init.d.ts.map +1 -1
  58. package/src/generators/init/init.js +2 -2
  59. package/src/generators/library/lib/add-linting.js +7 -8
  60. package/src/generators/library/lib/add-rollup-build-target.d.ts.map +1 -1
  61. package/src/generators/library/lib/add-rollup-build-target.js +6 -0
  62. package/src/generators/library/lib/install-common-dependencies.js +2 -2
  63. package/src/generators/library/lib/normalize-options.d.ts.map +1 -1
  64. package/src/generators/library/lib/normalize-options.js +7 -7
  65. package/src/generators/library/lib/update-app-routes.js +2 -2
  66. package/src/generators/library/library.d.ts.map +1 -1
  67. package/src/generators/library/library.js +14 -18
  68. package/src/generators/redux/redux.d.ts.map +1 -1
  69. package/src/generators/redux/redux.js +7 -8
  70. package/src/generators/redux/schema.d.ts +1 -1
  71. package/src/generators/remote/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  72. package/src/generators/remote/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
  73. package/src/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  74. package/src/generators/remote/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
  75. package/src/generators/remote/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  76. package/src/generators/remote/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
  77. package/src/generators/remote/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  78. package/src/generators/remote/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +1 -1
  79. package/src/generators/remote/lib/setup-package-json-exports-for-remote.js +2 -2
  80. package/src/generators/remote/lib/update-host-with-remote.js +4 -5
  81. package/src/generators/remote/remote.d.ts.map +1 -1
  82. package/src/generators/remote/remote.js +7 -7
  83. package/src/generators/setup-ssr/setup-ssr.d.ts.map +1 -1
  84. package/src/generators/setup-ssr/setup-ssr.js +5 -7
  85. package/src/generators/stories/stories.js +5 -6
  86. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts.map +1 -1
  87. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +2 -2
  88. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts.map +1 -1
  89. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +2 -2
  90. package/src/migrations/update-22-0-0/add-svgr-to-webpack-config.d.ts.map +1 -1
  91. package/src/migrations/update-22-0-0/add-svgr-to-webpack-config.js +2 -2
  92. package/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.d.ts +3 -0
  93. package/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.d.ts.map +1 -0
  94. package/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.js +128 -0
  95. package/src/module-federation/ast-utils.js +2 -2
  96. package/src/plugins/router-plugin.d.ts.map +1 -1
  97. package/src/plugins/router-plugin.js +14 -23
  98. package/src/rules/update-module-federation-project.js +3 -3
  99. package/src/utils/add-mf-env-to-inputs.d.ts.map +1 -1
  100. package/src/utils/add-mf-env-to-inputs.js +15 -8
  101. package/src/utils/ast-utils.js +15 -15
  102. package/src/utils/component-props.js +3 -3
  103. package/src/utils/create-ts-config.js +3 -3
  104. package/src/utils/ct-utils.d.ts +1 -1
  105. package/src/utils/ct-utils.d.ts.map +1 -1
  106. package/src/utils/ct-utils.js +6 -6
  107. package/src/utils/normalize-remote.js +2 -2
  108. package/src/utils/versions.d.ts +1 -1
  109. package/src/utils/versions.js +1 -1
  110. package/tailwind.js +2 -2
@@ -59,6 +59,12 @@ module.exports = withNx(
59
59
  }
60
60
  else {
61
61
  // Legacy behavior, there is a target in project.json using rollup executor.
62
+ // Mirrors warnRollupExecutorGenerating from @nx/rollup/src/utils/deprecation.
63
+ // Inlined to avoid a cross-package deep import; @nx/rollup's package
64
+ // exports field doesn't expose internal `src/...` paths, so the import
65
+ // works at compile time (via tsconfig project refs) but fails at runtime
66
+ // in published packages.
67
+ devkit_1.logger.warn('The `@nx/rollup:rollup` executor is deprecated and will be removed in Nx v24. Run `nx g @nx/rollup:convert-to-inferred` to migrate to the `@nx/rollup/plugin` inferred targets. See https://nx.dev/docs/guides/tasks--caching/convert-to-inferred for details.');
62
68
  const { targets } = (0, devkit_1.readProjectConfiguration)(host, options.name);
63
69
  targets.build = {
64
70
  executor: '@nx/rollup:rollup',
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.installCommonDependencies = installCommonDependencies;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const add_swc_dependencies_1 = require("@nx/js/src/utils/swc/add-swc-dependencies");
5
+ const internal_1 = require("@nx/js/internal");
6
6
  const version_utils_1 = require("../../../utils/version-utils");
7
7
  const versions_1 = require("../../../utils/versions");
8
8
  async function installCommonDependencies(host, options) {
@@ -32,7 +32,7 @@ async function installCommonDependencies(host, options) {
32
32
  const baseInstallTask = (0, devkit_1.addDependenciesToPackageJson)(host, dependencies, devDependencies);
33
33
  tasks.push(baseInstallTask);
34
34
  if (options.compiler === 'swc') {
35
- tasks.push((0, add_swc_dependencies_1.addSwcDependencies)(host));
35
+ tasks.push((0, internal_1.addSwcDependencies)(host));
36
36
  }
37
37
  else if (options.compiler === 'babel') {
38
38
  tasks.push((0, devkit_1.addDependenciesToPackageJson)(host, {}, {
@@ -1 +1 @@
1
- {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/normalize-options.ts"],"names":[],"mappings":"AAAA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AAMpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOrD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAmG3B"}
1
+ {"version":3,"file":"normalize-options.d.ts","sourceRoot":"","sources":["../../../../../../../packages/react/src/generators/library/lib/normalize-options.ts"],"names":[],"mappings":"AAIA,OAAO,EAML,IAAI,EACL,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAOrD,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,MAAM,GACd,OAAO,CAAC,gBAAgB,CAAC,CAmG3B"}
@@ -1,14 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.normalizeOptions = normalizeOptions;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
6
6
  const assertion_1 = require("../../../utils/assertion");
7
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
7
+ const internal_2 = require("@nx/js/internal");
8
8
  async function normalizeOptions(host, options) {
9
- const isUsingTsSolutionConfig = (0, ts_solution_setup_1.isUsingTsSolutionSetup)(host);
10
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'library');
11
- const { projectName, names: projectNames, projectRoot, importPath, } = await (0, project_name_and_root_utils_1.determineProjectNameAndRootOptions)(host, {
9
+ const isUsingTsSolutionConfig = (0, internal_2.isUsingTsSolutionSetup)(host);
10
+ await (0, internal_1.ensureRootProjectName)(options, 'library');
11
+ const { projectName, names: projectNames, projectRoot, importPath, } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
12
12
  name: options.name,
13
13
  projectType: 'library',
14
14
  directory: options.directory,
@@ -50,11 +50,11 @@ async function normalizeOptions(host, options) {
50
50
  normalized.inSourceTests === normalized.minimal || normalized.inSourceTests;
51
51
  if (options.appProject) {
52
52
  const appProjectConfig = (0, devkit_1.getProjects)(host).get(options.appProject);
53
- const appProjectType = (0, ts_solution_setup_1.getProjectType)(host, appProjectConfig.root, appProjectConfig.projectType);
53
+ const appProjectType = (0, internal_2.getProjectType)(host, appProjectConfig.root, appProjectConfig.projectType);
54
54
  if (appProjectType !== 'application') {
55
55
  throw new Error(`appProject expected type of "application" but got "${appProjectType}"`);
56
56
  }
57
- const appSourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(appProjectConfig, host);
57
+ const appSourceRoot = (0, internal_2.getProjectSourceRoot)(appProjectConfig, host);
58
58
  normalized.appMain =
59
59
  appProjectConfig.targets.build?.options?.main ??
60
60
  findMainEntry(host, appProjectConfig.root);
@@ -6,7 +6,7 @@ const ast_utils_1 = require("../../../utils/ast-utils");
6
6
  const ast_utils_2 = require("../../../utils/ast-utils");
7
7
  const maybe_js_1 = require("../../../utils/maybe-js");
8
8
  const versions_1 = require("../../../utils/versions");
9
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
9
+ const internal_1 = require("@nx/js/internal");
10
10
  let tsModule;
11
11
  function updateAppRoutes(host, options) {
12
12
  if (!options.appMain || !options.appSourceRoot) {
@@ -53,7 +53,7 @@ function readComponent(host, path) {
53
53
  throw new Error(`Cannot find ${path}`);
54
54
  }
55
55
  if (!tsModule) {
56
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
56
+ tsModule = (0, internal_1.ensureTypescript)();
57
57
  }
58
58
  const content = host.read(path, 'utf-8');
59
59
  const source = tsModule.createSourceFile(path, content, tsModule.ScriptTarget.Latest, true);
@@ -1 +1 @@
1
- {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/library/library.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAgCpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMhE;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BA0RxE;AAED,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"library.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/library/library.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AA4BpB,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAMhE;AAED,wBAAsB,wBAAwB,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAyRxE;AAED,eAAe,gBAAgB,CAAC"}
@@ -3,14 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.libraryGenerator = libraryGenerator;
4
4
  exports.libraryGeneratorInternal = libraryGeneratorInternal;
5
5
  const tslib_1 = require("tslib");
6
+ const internal_1 = require("@nx/devkit/internal");
6
7
  const devkit_1 = require("@nx/devkit");
7
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
8
- const log_show_project_command_1 = require("@nx/devkit/src/utils/log-show-project-command");
9
8
  const js_1 = require("@nx/js");
10
9
  const path_1 = require("path");
11
- const add_release_config_1 = require("@nx/js/src/generators/library/utils/add-release-config");
12
- const sort_fields_1 = require("@nx/js/src/utils/package-json/sort-fields");
13
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
10
+ const internal_2 = require("@nx/js/internal");
14
11
  const create_ts_config_1 = require("../../utils/create-ts-config");
15
12
  const jest_utils_1 = require("../../utils/jest-utils");
16
13
  const maybe_js_1 = require("../../utils/maybe-js");
@@ -34,7 +31,7 @@ async function libraryGenerator(host, schema) {
34
31
  }
35
32
  async function libraryGeneratorInternal(host, schema) {
36
33
  const tasks = [];
37
- const addTsPlugin = (0, ts_solution_setup_1.shouldConfigureTsSolutionSetup)(host, schema.addPlugin);
34
+ const addTsPlugin = (0, internal_2.shouldConfigureTsSolutionSetup)(host, schema.addPlugin);
38
35
  const jsInitTask = await (0, js_1.initGenerator)(host, {
39
36
  ...schema,
40
37
  addTsPlugin,
@@ -85,7 +82,7 @@ async function libraryGeneratorInternal(host, schema) {
85
82
  }
86
83
  (0, create_files_1.createFiles)(host, options);
87
84
  if (options.isUsingTsSolutionConfig) {
88
- await (0, ts_solution_setup_1.addProjectToTsSolutionWorkspace)(host, options.projectRoot);
85
+ await (0, internal_2.addProjectToTsSolutionWorkspace)(host, options.projectRoot);
89
86
  }
90
87
  const lintTask = await (0, add_linting_1.addLinting)(host, options);
91
88
  tasks.push(lintTask);
@@ -110,7 +107,7 @@ async function libraryGeneratorInternal(host, schema) {
110
107
  includeLib: true,
111
108
  includeVitest: options.unitTestRunner === 'vitest',
112
109
  inSourceTests: options.inSourceTests,
113
- rollupOptionsExternal: [
110
+ rolldownOptionsExternal: [
114
111
  "'react'",
115
112
  "'react-dom'",
116
113
  "'react/jsx-runtime'",
@@ -169,7 +166,7 @@ async function libraryGeneratorInternal(host, schema) {
169
166
  includeLib: true,
170
167
  includeVitest: true,
171
168
  inSourceTests: options.inSourceTests,
172
- rollupOptionsExternal: [
169
+ rolldownOptionsExternal: [
173
170
  "'react'",
174
171
  "'react-dom'",
175
172
  "'react/jsx-runtime'",
@@ -184,8 +181,8 @@ async function libraryGeneratorInternal(host, schema) {
184
181
  }, true);
185
182
  }
186
183
  if (options.component) {
187
- const relativeCwd = (0, artifact_name_and_directory_utils_1.getRelativeCwd)();
188
- const path = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.fileName);
184
+ const relativeCwd = (0, internal_1.getRelativeCwd)();
185
+ const path = (0, devkit_1.joinPathFragments)(options.projectRoot, 'src/lib', options.js ? `${options.fileName}.js` : options.fileName);
189
186
  const componentTask = await (0, component_1.default)(host, {
190
187
  path: relativeCwd ? (0, path_1.relative)(relativeCwd, path) : path,
191
188
  style: options.style,
@@ -193,7 +190,6 @@ async function libraryGeneratorInternal(host, schema) {
193
190
  (options.unitTestRunner === 'vitest' && options.inSourceTests == true),
194
191
  export: true,
195
192
  routing: options.routing,
196
- js: options.js,
197
193
  name: options.name,
198
194
  inSourceTests: options.inSourceTests,
199
195
  skipFormat: true,
@@ -204,14 +200,14 @@ async function libraryGeneratorInternal(host, schema) {
204
200
  if (options.publishable) {
205
201
  const projectConfiguration = (0, devkit_1.readProjectConfiguration)(host, options.name);
206
202
  if (options.isUsingTsSolutionConfig) {
207
- await (0, add_release_config_1.addReleaseConfigForTsSolution)(host, options.name, projectConfiguration);
203
+ await (0, internal_2.addReleaseConfigForTsSolution)(host, options.name, projectConfiguration);
208
204
  }
209
205
  else {
210
206
  const nxJson = (0, devkit_1.readNxJson)(host);
211
- await (0, add_release_config_1.addReleaseConfigForNonTsSolution)(host, options.name, projectConfiguration);
207
+ await (0, internal_2.addReleaseConfigForNonTsSolution)(host, options.name, projectConfiguration);
212
208
  }
213
209
  (0, devkit_1.updateProjectConfiguration)(host, options.name, projectConfiguration);
214
- tasks.push(await (0, add_release_config_1.releaseTasks)(host));
210
+ tasks.push(await (0, internal_2.releaseTasks)(host));
215
211
  }
216
212
  if (!options.skipPackageJson) {
217
213
  const installReactTask = await (0, install_common_dependencies_1.installCommonDependencies)(host, options);
@@ -226,14 +222,14 @@ async function libraryGeneratorInternal(host, schema) {
226
222
  (0, maybe_js_1.maybeJs)(options, (0, devkit_1.joinPathFragments)(options.projectRoot, './src/index.ts')),
227
223
  ]);
228
224
  }
229
- (0, ts_solution_setup_1.updateTsconfigFiles)(host, options.projectRoot, 'tsconfig.lib.json', {
225
+ (0, internal_2.updateTsconfigFiles)(host, options.projectRoot, 'tsconfig.lib.json', {
230
226
  jsx: 'react-jsx',
231
227
  module: 'esnext',
232
228
  moduleResolution: 'bundler',
233
229
  }, options.linter === 'eslint'
234
230
  ? ['eslint.config.js', 'eslint.config.cjs', 'eslint.config.mjs']
235
231
  : undefined);
236
- (0, sort_fields_1.sortPackageJsonFields)(host, options.projectRoot);
232
+ (0, internal_2.sortPackageJsonFields)(host, options.projectRoot);
237
233
  if (!options.skipFormat) {
238
234
  await (0, devkit_1.formatFiles)(host);
239
235
  }
@@ -242,7 +238,7 @@ async function libraryGeneratorInternal(host, schema) {
242
238
  tasks.push(() => (0, devkit_1.installPackagesTask)(host, true));
243
239
  }
244
240
  tasks.push(() => {
245
- (0, log_show_project_command_1.logShowProjectCommand)(options.name);
241
+ (0, internal_1.logShowProjectCommand)(options.name);
246
242
  });
247
243
  return (0, devkit_1.runTasksInSerial)(...tasks);
248
244
  }
@@ -1 +1 @@
1
- {"version":3,"file":"redux.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/redux/redux.ts"],"names":[],"mappings":"AAAA,OAAO,EASL,IAAI,EACL,MAAM,YAAY,CAAC;AAepB,OAAO,EAAoB,MAAM,EAAE,MAAM,UAAU,CAAC;AAIpD,wBAAsB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,mDAW9D;AA0LD,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"redux.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/redux/redux.ts"],"names":[],"mappings":"AACA,OAAO,EASL,IAAI,EACL,MAAM,YAAY,CAAC;AAcpB,OAAO,EAAoB,MAAM,EAAE,MAAM,UAAU,CAAC;AAIpD,wBAAsB,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,mDAW9D;AA0LD,eAAe,cAAc,CAAC"}
@@ -2,11 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.reduxGenerator = reduxGenerator;
4
4
  const tslib_1 = require("tslib");
5
+ const internal_1 = require("@nx/devkit/internal");
5
6
  const devkit_1 = require("@nx/devkit");
6
- const artifact_name_and_directory_utils_1 = require("@nx/devkit/src/generators/artifact-name-and-directory-utils");
7
7
  const js_1 = require("@nx/js");
8
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
9
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
8
+ const internal_2 = require("@nx/js/internal");
10
9
  const path = tslib_1.__importStar(require("path"));
11
10
  const ast_utils_1 = require("../../utils/ast-utils");
12
11
  const versions_1 = require("../../utils/versions");
@@ -35,7 +34,7 @@ function addReduxPackageDependencies(host) {
35
34
  }
36
35
  function addExportsToBarrel(host, options) {
37
36
  if (!tsModule) {
38
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
37
+ tsModule = (0, internal_2.ensureTypescript)();
39
38
  }
40
39
  const indexFilePath = (0, devkit_1.joinPathFragments)(options.projectSourcePath, options.fileExtensionType === 'js' ? 'index.js' : 'index.ts');
41
40
  if (!host.exists(indexFilePath)) {
@@ -62,7 +61,7 @@ function addStoreConfiguration(host, options) {
62
61
  }
63
62
  function updateReducerConfiguration(host, options) {
64
63
  if (!tsModule) {
65
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
64
+ tsModule = (0, internal_2.ensureTypescript)();
66
65
  }
67
66
  if (!options.appProjectSourcePath) {
68
67
  return;
@@ -77,7 +76,7 @@ function updateReducerConfiguration(host, options) {
77
76
  host.write(options.appMainFilePath, changes);
78
77
  }
79
78
  async function normalizeOptions(host, options) {
80
- const { artifactName: name, directory, fileName, fileExtension, fileExtensionType, project: projectName, } = await (0, artifact_name_and_directory_utils_1.determineArtifactNameAndDirectoryOptions)(host, {
79
+ const { artifactName: name, directory, fileName, fileExtension, fileExtensionType, project: projectName, } = await (0, internal_1.determineArtifactNameAndDirectoryOptions)(host, {
81
80
  path: options.path,
82
81
  name: options.name,
83
82
  suffix: 'slice',
@@ -95,7 +94,7 @@ async function normalizeOptions(host, options) {
95
94
  const tsPaths = tsConfigJson.compilerOptions
96
95
  ? tsConfigJson.compilerOptions.paths || {}
97
96
  : {};
98
- const modulePath = (0, ts_solution_setup_1.getProjectType)(host, root, projectType) === 'application'
97
+ const modulePath = (0, internal_2.getProjectType)(host, root, projectType) === 'application'
99
98
  ? options.path
100
99
  ? `./app/${options.path}/${extraNames.fileName}.slice`
101
100
  : `./app/${extraNames.fileName}.slice`
@@ -110,7 +109,7 @@ async function normalizeOptions(host, options) {
110
109
  if (appConfig.projectType !== 'application') {
111
110
  throw new Error(`Expected ${options.appProject} to be an application but got ${appConfig.projectType}`);
112
111
  }
113
- appProjectSourcePath = (0, ts_solution_setup_1.getProjectSourceRoot)(appConfig, host);
112
+ appProjectSourcePath = (0, internal_2.getProjectSourceRoot)(appConfig, host);
114
113
  appMainFilePath = path.join(appProjectSourcePath, options.js ? 'main.js' : 'main.tsx');
115
114
  if (!host.exists(appMainFilePath)) {
116
115
  throw new Error(`Could not find ${appMainFilePath} during store configuration`);
@@ -1,4 +1,4 @@
1
- import type { FileExtensionType } from '@nx/devkit/src/generators/artifact-name-and-directory-utils';
1
+ import type { FileExtensionType } from '@nx/devkit/internal';
2
2
 
3
3
  export interface Schema {
4
4
  path: string;
@@ -1,4 +1,4 @@
1
- import {ModuleFederationConfig} from '@nx/module-federation';
1
+ import type {ModuleFederationConfig} from '@nx/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
4
  name: '<%= projectName %>',
@@ -1,6 +1,6 @@
1
1
  import { NxAppRspackPlugin } from '@nx/rspack/app-plugin.js';
2
2
  import { NxReactRspackPlugin } from '@nx/rspack/react-plugin.js';
3
- import { NxModuleFederationPlugin, NxModuleFederationSSRDevServerPlugin } from '@nx/module-federation/rspack.js';
3
+ import { NxModuleFederationPlugin, NxModuleFederationSSRDevServerPlugin } from '@nx/module-federation/rspack';
4
4
  import { join } from 'path';
5
5
 
6
6
  import browserMfConfig from './module-federation.config';
@@ -1,4 +1,4 @@
1
- import {ModuleFederationConfig} from '@nx/module-federation';
1
+ import type {ModuleFederationConfig} from '@nx/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
4
  name: '<%= projectName %>',
@@ -1,6 +1,6 @@
1
1
  import { NxAppRspackPlugin } from '@nx/rspack/app-plugin.js';
2
2
  import { NxReactRspackPlugin } from '@nx/rspack/react-plugin.js';
3
- import { NxModuleFederationPlugin, NxModuleFederationDevServerPlugin } from '@nx/module-federation/rspack.js';
3
+ import { NxModuleFederationPlugin, NxModuleFederationDevServerPlugin } from '@nx/module-federation/rspack';
4
4
  import { join } from 'path';
5
5
 
6
6
  import config from './module-federation.config';
@@ -1,4 +1,4 @@
1
- import {ModuleFederationConfig} from '@nx/module-federation';
1
+ import type {ModuleFederationConfig} from '@nx/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
4
  name: '<%= projectName %>',
@@ -1,6 +1,6 @@
1
1
  import {composePlugins, withNx} from '@nx/webpack';
2
2
  import {withReact} from '@nx/react';
3
- import {withModuleFederationForSSR} from '@nx/module-federation/webpack.js';
3
+ import {withModuleFederationForSSR} from '@nx/module-federation/webpack';
4
4
 
5
5
  import baseConfig from "./module-federation.server.config";
6
6
 
@@ -1,4 +1,4 @@
1
- import {ModuleFederationConfig} from '@nx/module-federation';
1
+ import type {ModuleFederationConfig} from '@nx/module-federation';
2
2
 
3
3
  const config: ModuleFederationConfig = {
4
4
  name: '<%= projectName %>',
@@ -1,6 +1,6 @@
1
1
  import {composePlugins, withNx} from '@nx/webpack';
2
2
  import {withReact} from '@nx/react';
3
- import {withModuleFederation} from '@nx/module-federation/webpack.js';
3
+ import {withModuleFederation} from '@nx/module-federation/webpack';
4
4
 
5
5
  import baseConfig from './module-federation.config';
6
6
 
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setupPackageJsonExportsForRemote = setupPackageJsonExportsForRemote;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
5
+ const internal_1 = require("@nx/js/internal");
6
6
  const maybe_js_1 = require("../../../utils/maybe-js");
7
7
  function setupPackageJsonExportsForRemote(tree, options) {
8
8
  const project = (0, devkit_1.readProjectConfiguration)(tree, options.projectName);
@@ -12,7 +12,7 @@ function setupPackageJsonExportsForRemote(tree, options) {
12
12
  `TypeScript solution setup requires package.json for all projects.`);
13
13
  }
14
14
  const exportPath = (0, maybe_js_1.maybeJs)(options, './src/remote-entry.ts');
15
- const customCondition = (0, ts_solution_setup_1.getDefinedCustomConditionName)(tree);
15
+ const customCondition = (0, internal_1.getDefinedCustomConditionName)(tree);
16
16
  (0, devkit_1.updateJson)(tree, packageJsonPath, (json) => {
17
17
  json.exports = {
18
18
  ...json.exports,
@@ -2,20 +2,19 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.updateHostWithRemote = updateHostWithRemote;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
6
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
5
+ const internal_1 = require("@nx/js/internal");
7
6
  const ast_utils_1 = require("../../../module-federation/ast-utils");
8
7
  let tsModule;
9
8
  function updateHostWithRemote(host, hostName, remoteName) {
10
9
  if (!tsModule) {
11
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
10
+ tsModule = (0, internal_1.ensureTypescript)();
12
11
  }
13
12
  const hostConfig = (0, devkit_1.readProjectConfiguration)(host, hostName);
14
13
  let moduleFederationConfigPath = (0, devkit_1.joinPathFragments)(hostConfig.root, 'module-federation.config.js');
15
14
  if (!host.exists(moduleFederationConfigPath)) {
16
15
  moduleFederationConfigPath = (0, devkit_1.joinPathFragments)(hostConfig.root, 'module-federation.config.ts');
17
16
  }
18
- const appComponentPath = findAppComponentPath(host, (0, ts_solution_setup_1.getProjectSourceRoot)(hostConfig, host));
17
+ const appComponentPath = findAppComponentPath(host, (0, internal_1.getProjectSourceRoot)(hostConfig, host));
19
18
  if (host.exists(moduleFederationConfigPath)) {
20
19
  // find the host project path
21
20
  // Update remotes inside ${host_path}/src/remotes.d.ts
@@ -36,7 +35,7 @@ function updateHostWithRemote(host, hostName, remoteName) {
36
35
  devkit_1.logger.warn(`Could not find app component at ${appComponentPath}. Did you generate this project with "@nx/react:host" or "@nx/react:consumer"?`);
37
36
  }
38
37
  // Add remote as devDependency in TS solution setup
39
- if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host)) {
38
+ if ((0, internal_1.isUsingTsSolutionSetup)(host)) {
40
39
  addRemoteAsHostDependency(host, hostName, remoteName);
41
40
  }
42
41
  }
@@ -1 +1 @@
1
- {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/remote/remote.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAuBpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAOzD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,QAmFlC;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAqK/D;AAED,eAAe,eAAe,CAAC"}
1
+ {"version":3,"file":"remote.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/remote/remote.ts"],"names":[],"mappings":"AACA,OAAO,EAIL,iBAAiB,EAOjB,IAAI,EAGL,MAAM,YAAY,CAAC;AAmBpB,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAOzD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAElC,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,gBAAgB,CAAC,MAAM,CAAC,QAmFlC;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,8BAqK/D;AAED,eAAe,eAAe,CAAC"}
@@ -3,11 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addModuleFederationFiles = addModuleFederationFiles;
4
4
  exports.remoteGenerator = remoteGenerator;
5
5
  const tslib_1 = require("tslib");
6
+ const internal_1 = require("@nx/devkit/internal");
6
7
  const devkit_1 = require("@nx/devkit");
7
8
  const path_1 = require("path");
8
- const project_name_and_root_utils_1 = require("@nx/devkit/src/generators/project-name-and-root-utils");
9
9
  const js_1 = require("@nx/js");
10
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
10
+ const internal_2 = require("@nx/js/internal");
11
11
  const update_module_federation_project_1 = require("../../rules/update-module-federation-project");
12
12
  const add_mf_env_to_inputs_1 = require("../../utils/add-mf-env-to-inputs");
13
13
  const normalize_remote_1 = require("../../utils/normalize-remote");
@@ -57,7 +57,7 @@ function addModuleFederationFiles(host, options) {
57
57
  host.delete(pathToWebpackProdConfig);
58
58
  }
59
59
  // Delete TypeScript prod config in TS solution setup - not needed in Crystal
60
- if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host)) {
60
+ if ((0, internal_2.isUsingTsSolutionSetup)(host)) {
61
61
  const pathToTsProdConfig = (0, devkit_1.joinPathFragments)(options.appProjectRoot, options.bundler === 'rspack'
62
62
  ? 'rspack.config.prod.ts'
63
63
  : 'webpack.config.prod.ts');
@@ -93,7 +93,7 @@ async function remoteGenerator(host, schema) {
93
93
  throw new Error(`Invalid remote name provided: ${options.projectName}. ${isValidRemote.message}`);
94
94
  }
95
95
  }
96
- await (0, project_name_and_root_utils_1.ensureRootProjectName)(options, 'application');
96
+ await (0, internal_1.ensureRootProjectName)(options, 'application');
97
97
  const isValidRemote = (0, js_1.isValidVariable)(options.projectName);
98
98
  if (!isValidRemote.isValid) {
99
99
  throw new Error(`Invalid remote name provided: ${options.projectName}. ${isValidRemote.message}`);
@@ -105,7 +105,7 @@ async function remoteGenerator(host, schema) {
105
105
  });
106
106
  tasks.push(initAppTask);
107
107
  // In TS solution setup, update package.json to use simple name instead of scoped name
108
- if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host)) {
108
+ if ((0, internal_2.isUsingTsSolutionSetup)(host)) {
109
109
  const remotePackageJsonPath = (0, devkit_1.joinPathFragments)(options.appProjectRoot, 'package.json');
110
110
  if (host.exists(remotePackageJsonPath)) {
111
111
  (0, devkit_1.updateJson)(host, remotePackageJsonPath, (json) => {
@@ -124,7 +124,7 @@ async function remoteGenerator(host, schema) {
124
124
  addModuleFederationFiles(host, options);
125
125
  (0, update_module_federation_project_1.updateModuleFederationProject)(host, options);
126
126
  // Conditionally setup TS path or package.json exports based on TS solution setup
127
- if ((0, ts_solution_setup_1.isUsingTsSolutionSetup)(host)) {
127
+ if ((0, internal_2.isUsingTsSolutionSetup)(host)) {
128
128
  (0, setup_package_json_exports_for_remote_1.setupPackageJsonExportsForRemote)(host, options);
129
129
  }
130
130
  else {
@@ -160,7 +160,7 @@ async function remoteGenerator(host, schema) {
160
160
  }
161
161
  if (options.host && options.dynamic) {
162
162
  const hostConfig = (0, devkit_1.readProjectConfiguration)(host, schema.host);
163
- const pathToMFManifest = (0, devkit_1.joinPathFragments)((0, ts_solution_setup_1.getProjectSourceRoot)(hostConfig, host), 'assets/module-federation.manifest.json');
163
+ const pathToMFManifest = (0, devkit_1.joinPathFragments)((0, internal_2.getProjectSourceRoot)(hostConfig, host), 'assets/module-federation.manifest.json');
164
164
  (0, add_remote_to_dynamic_host_1.addRemoteToDynamicHost)(host, options.projectName, options.devServerPort, pathToMFManifest);
165
165
  }
166
166
  (0, add_mf_env_to_inputs_1.addMfEnvToTargetDefaultInputs)(host, options.bundler);
@@ -1 +1 @@
1
- {"version":3,"file":"setup-ssr.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/setup-ssr/setup-ssr.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,IAAI,EAGL,MAAM,YAAY,CAAC;AAcpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AA2CvC,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,mDAkNlE;AAED,eAAe,iBAAiB,CAAC"}
1
+ {"version":3,"file":"setup-ssr.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/generators/setup-ssr/setup-ssr.ts"],"names":[],"mappings":"AAAA,OAAO,EAUL,IAAI,EAGL,MAAM,YAAY,CAAC;AAcpB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AA2CvC,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,mDAgNlE;AAED,eAAe,iBAAiB,CAAC"}
@@ -2,15 +2,15 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.setupSsrGenerator = setupSsrGenerator;
4
4
  const devkit_1 = require("@nx/devkit");
5
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
6
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
5
+ const internal_1 = require("@nx/devkit/internal");
6
+ const internal_2 = require("@nx/js/internal");
7
7
  const path_1 = require("path");
8
8
  const ast_utils_1 = require("../../utils/ast-utils");
9
9
  const versions_1 = require("../../utils/versions");
10
10
  let tsModule;
11
11
  function readEntryFile(host, path) {
12
12
  if (!tsModule) {
13
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
13
+ tsModule = (0, internal_2.ensureTypescript)();
14
14
  }
15
15
  const content = host.read(path, 'utf-8');
16
16
  return {
@@ -44,7 +44,7 @@ async function setupSsrGenerator(tree, options) {
44
44
  ].map((importPath) => {
45
45
  return {
46
46
  importPath,
47
- filePath: (0, devkit_1.joinPathFragments)((0, ts_solution_setup_1.getProjectSourceRoot)(projectConfig, tree), `${importPath}.tsx`),
47
+ filePath: (0, devkit_1.joinPathFragments)((0, internal_2.getProjectSourceRoot)(projectConfig, tree), `${importPath}.tsx`),
48
48
  };
49
49
  });
50
50
  const appComponentInfo = appImportCandidates.find((candidate) => tree.exists(candidate.filePath));
@@ -160,9 +160,6 @@ async function setupSsrGenerator(tree, options) {
160
160
  'server',
161
161
  ];
162
162
  }
163
- nxJson.targetDefaults ??= {};
164
- nxJson.targetDefaults['server'] ??= {};
165
- nxJson.targetDefaults.server.cache = true;
166
163
  (0, devkit_1.generateFiles)(tree, (0, path_1.join)(__dirname, 'files'), projectRoot, {
167
164
  tmpl: '',
168
165
  port: Number(options?.serverPort) || 4200,
@@ -183,6 +180,7 @@ async function setupSsrGenerator(tree, options) {
183
180
  const changes = (0, devkit_1.applyChangesToString)(content, (0, ast_utils_1.addStaticRouter)(serverEntry, source));
184
181
  tree.write(serverEntry, changes);
185
182
  }
183
+ (0, internal_1.upsertTargetDefault)(tree, nxJson, { target: 'server', cache: true });
186
184
  (0, devkit_1.updateNxJson)(tree, nxJson);
187
185
  const installTask = (0, devkit_1.addDependenciesToPackageJson)(tree, {
188
186
  express: versions_1.expressVersion,
@@ -6,8 +6,7 @@ exports.createAllStories = createAllStories;
6
6
  exports.storiesGenerator = storiesGenerator;
7
7
  const tslib_1 = require("tslib");
8
8
  const devkit_1 = require("@nx/devkit");
9
- const ensure_typescript_1 = require("@nx/js/src/utils/typescript/ensure-typescript");
10
- const ts_solution_setup_1 = require("@nx/js/src/utils/typescript/ts-solution-setup");
9
+ const internal_1 = require("@nx/js/internal");
11
10
  const minimatch_1 = require("minimatch");
12
11
  const path_1 = require("path");
13
12
  const ast_utils_1 = require("../../utils/ast-utils");
@@ -16,7 +15,7 @@ const component_story_1 = tslib_1.__importDefault(require("../component-story/co
16
15
  let tsModule;
17
16
  async function projectRootPath(tree, config) {
18
17
  let projectDir;
19
- if ((0, ts_solution_setup_1.getProjectType)(tree, config.root, config.projectType) === 'application') {
18
+ if ((0, internal_1.getProjectType)(tree, config.root, config.projectType) === 'application') {
20
19
  const isNextJs = await isNextJsProject(tree, config);
21
20
  if (isNextJs) {
22
21
  // Next.js apps
@@ -34,11 +33,11 @@ async function projectRootPath(tree, config) {
34
33
  else {
35
34
  projectDir = '.';
36
35
  }
37
- return (0, devkit_1.joinPathFragments)((0, ts_solution_setup_1.getProjectSourceRoot)(config, tree), projectDir);
36
+ return (0, devkit_1.joinPathFragments)((0, internal_1.getProjectSourceRoot)(config, tree), projectDir);
38
37
  }
39
38
  function containsComponentDeclaration(tree, componentPath) {
40
39
  if (!tsModule) {
41
- tsModule = (0, ensure_typescript_1.ensureTypescript)();
40
+ tsModule = (0, internal_1.ensureTypescript)();
42
41
  }
43
42
  const contents = tree.read(componentPath, 'utf-8');
44
43
  if (contents === null) {
@@ -50,7 +49,7 @@ function containsComponentDeclaration(tree, componentPath) {
50
49
  }
51
50
  async function createAllStories(tree, schema, projectConfiguration) {
52
51
  const { isTheFileAStory } = await Promise.resolve().then(() => tslib_1.__importStar(require('@nx/storybook/src/utils/utilities')));
53
- const sourceRoot = (0, ts_solution_setup_1.getProjectSourceRoot)(projectConfiguration, tree);
52
+ const sourceRoot = (0, internal_1.getProjectSourceRoot)(projectConfiguration, tree);
54
53
  let componentPaths = [];
55
54
  const projectPath = await projectRootPath(tree, projectConfiguration);
56
55
  (0, devkit_1.visitNotIgnoredFiles)(tree, projectPath, (path) => {
@@ -1 +1 @@
1
- {"version":3,"file":"migrate-with-mf-import-to-new-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AASpB,wBAA8B,mBAAmB,CAAC,IAAI,EAAE,IAAI,iBAqD3D"}
1
+ {"version":3,"file":"migrate-with-mf-import-to-new-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AAQpB,wBAA8B,mBAAmB,CAAC,IAAI,EAAE,IAAI,iBAqD3D"}
@@ -1,15 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = migrateWithMfImport;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
6
  const tsquery_1 = require("@phenomnomnominal/tsquery");
7
7
  const versions_1 = require("../../utils/versions");
8
8
  const NX_RSPACK_MODULE_FEDERATION_IMPORT_SELECTOR = 'ImportDeclaration > StringLiteral[value=@nx/react/module-federation], VariableStatement CallExpression:has(Identifier[name=require]) > StringLiteral[value=@nx/react/module-federation]';
9
9
  const NEW_IMPORT_PATH = `'@nx/module-federation/webpack'`;
10
10
  async function migrateWithMfImport(tree) {
11
11
  const projects = new Set();
12
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/react:module-federation-dev-server', (options, project, target) => {
12
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/react:module-federation-dev-server', (options, project, target) => {
13
13
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project);
14
14
  projects.add(projectConfig.root);
15
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"ensure-nx-module-federation-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-20-3-0/ensure-nx-module-federation-package.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;AAIpB,wBAA8B,eAAe,CAAC,IAAI,EAAE,IAAI,iBAqBvD"}
1
+ {"version":3,"file":"ensure-nx-module-federation-package.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-20-3-0/ensure-nx-module-federation-package.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EAGV,MAAM,YAAY,CAAC;AAGpB,wBAA8B,eAAe,CAAC,IAAI,EAAE,IAAI,iBAqBvD"}
@@ -1,12 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = ensureMfPackage;
4
+ const internal_1 = require("@nx/devkit/internal");
4
5
  const devkit_1 = require("@nx/devkit");
5
- const executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
6
6
  const versions_1 = require("../../utils/versions");
7
7
  async function ensureMfPackage(tree) {
8
8
  const projects = new Set();
9
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/react:module-federation-dev-server', (options, project, target) => {
9
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/react:module-federation-dev-server', (options, project, target) => {
10
10
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, project);
11
11
  projects.add(projectConfig.root);
12
12
  });
@@ -1 +1 @@
1
- {"version":3,"file":"add-svgr-to-webpack-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-22-0-0/add-svgr-to-webpack-config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AAiHpB,wBAA8B,sBAAsB,CAAC,IAAI,EAAE,IAAI,iBAsZ9D"}
1
+ {"version":3,"file":"add-svgr-to-webpack-config.d.ts","sourceRoot":"","sources":["../../../../../../packages/react/src/migrations/update-22-0-0/add-svgr-to-webpack-config.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,IAAI,EAKV,MAAM,YAAY,CAAC;AAgHpB,wBAA8B,sBAAsB,CAAC,IAAI,EAAE,IAAI,iBAsZ9D"}