@nx/react 23.0.0-pr.35413.460eeef → 23.0.0-rc.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.
Files changed (626) hide show
  1. package/{ast-utils.d.ts → dist/ast-utils.d.ts} +0 -1
  2. package/dist/babel.d.ts +1 -0
  3. package/{babel.js → dist/babel.js} +2 -0
  4. package/{index.d.ts → dist/index.d.ts} +0 -6
  5. package/{index.js → dist/index.js} +1 -8
  6. package/dist/internal.d.ts +7 -0
  7. package/dist/internal.js +26 -0
  8. package/{mf → dist/mf}/dynamic-federation.d.ts +0 -1
  9. package/{mf → dist/mf}/index.d.ts +0 -1
  10. package/{module-federation.d.ts → dist/module-federation.d.ts} +0 -1
  11. package/dist/plugins/bundle-rollup.d.ts +1 -0
  12. package/{plugins → dist/plugins}/component-testing/index.d.ts +0 -1
  13. package/{plugins → dist/plugins}/component-testing/index.js +9 -12
  14. package/{plugins → dist/plugins}/component-testing/webpack-fallback.d.ts +0 -1
  15. package/{plugins → dist/plugins}/component-testing/webpack-fallback.js +2 -2
  16. package/dist/plugins/jest.d.ts +1 -0
  17. package/{plugins → dist/plugins}/nx-react-webpack-plugin/lib/apply-react-config.d.ts +0 -1
  18. package/{plugins → dist/plugins}/nx-react-webpack-plugin/nx-react-webpack-plugin.d.ts +0 -1
  19. package/{plugins → dist/plugins}/storybook/index.d.ts +0 -1
  20. package/{plugins → dist/plugins}/storybook/index.js +18 -12
  21. package/{plugins → dist/plugins}/storybook/merge-plugins.d.ts +0 -1
  22. package/dist/plugins/webpack.d.ts +1 -0
  23. package/{plugins → dist/plugins}/with-react.d.ts +4 -1
  24. package/{plugins → dist/plugins}/with-react.js +6 -0
  25. package/dist/router-plugin.d.ts +1 -0
  26. package/{router-plugin.js → dist/router-plugin.js} +2 -1
  27. package/{src → dist/src}/executors/module-federation-dev-server/lib/index.d.ts +0 -1
  28. package/{src → dist/src}/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -1
  29. package/{src → dist/src}/executors/module-federation-dev-server/lib/start-remotes.d.ts +0 -1
  30. package/{src → dist/src}/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -1
  31. package/{src → dist/src}/executors/module-federation-dev-server/module-federation-dev-server.impl.js +13 -13
  32. package/{src → dist/src}/executors/module-federation-dev-server/schema.d.ts +1 -1
  33. package/{src → dist/src}/executors/module-federation-dev-server/schema.json +1 -0
  34. package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/index.d.ts +0 -1
  35. package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +0 -1
  36. package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts +0 -1
  37. package/{src → dist/src}/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -1
  38. package/{src → dist/src}/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +13 -12
  39. package/{src → dist/src}/executors/module-federation-ssr-dev-server/schema.d.ts +2 -2
  40. package/{src → dist/src}/executors/module-federation-ssr-dev-server/schema.json +1 -0
  41. package/{src → dist/src}/executors/module-federation-static-server/module-federation-static-server.impl.d.ts +1 -2
  42. package/{src → dist/src}/executors/module-federation-static-server/module-federation-static-server.impl.js +15 -16
  43. package/{src → dist/src}/executors/module-federation-static-server/schema.json +1 -0
  44. package/dist/src/generators/_utils/mf-dependencies.d.ts +7 -0
  45. package/dist/src/generators/_utils/mf-dependencies.js +84 -0
  46. package/dist/src/generators/_utils/mf-versions.d.ts +11 -0
  47. package/dist/src/generators/_utils/mf-versions.js +29 -0
  48. package/dist/src/generators/_utils/normalize.d.ts +19 -0
  49. package/dist/src/generators/_utils/normalize.js +48 -0
  50. package/{src → dist/src}/generators/application/application.d.ts +0 -1
  51. package/{src → dist/src}/generators/application/application.js +34 -33
  52. package/{src → dist/src}/generators/application/files/base-rsbuild/tsconfig.app.json__tmpl__ +0 -2
  53. package/{src/generators/application/files/base-webpack → dist/src/generators/application/files/base-rspack}/tsconfig.app.json__tmpl__ +0 -2
  54. package/{src → dist/src}/generators/application/files/base-vite/index.html__tmpl__ +1 -1
  55. package/{src/generators/application/files/base-rspack → dist/src/generators/application/files/base-vite}/tsconfig.app.json__tmpl__ +0 -2
  56. package/{src/generators/application/files/base-vite → dist/src/generators/application/files/base-webpack}/tsconfig.app.json__tmpl__ +0 -2
  57. package/{src → dist/src}/generators/application/lib/add-e2e.d.ts +0 -1
  58. package/{src → dist/src}/generators/application/lib/add-e2e.js +1 -34
  59. package/{src → dist/src}/generators/application/lib/add-jest.d.ts +0 -1
  60. package/{src → dist/src}/generators/application/lib/add-linting.d.ts +0 -1
  61. package/{src → dist/src}/generators/application/lib/add-linting.js +10 -45
  62. package/{src → dist/src}/generators/application/lib/add-project.d.ts +0 -1
  63. package/{src → dist/src}/generators/application/lib/add-project.js +14 -4
  64. package/{src → dist/src}/generators/application/lib/add-routing.d.ts +0 -1
  65. package/{src → dist/src}/generators/application/lib/add-routing.js +3 -3
  66. package/{src → dist/src}/generators/application/lib/bundlers/add-rsbuild.d.ts +0 -1
  67. package/dist/src/generators/application/lib/bundlers/add-rsbuild.js +47 -0
  68. package/{src → dist/src}/generators/application/lib/bundlers/add-rspack.d.ts +0 -2
  69. package/dist/src/generators/application/lib/bundlers/add-rspack.js +13 -0
  70. package/{src → dist/src}/generators/application/lib/bundlers/add-vite.d.ts +0 -1
  71. package/{src → dist/src}/generators/application/lib/bundlers/add-vite.js +11 -36
  72. package/{src → dist/src}/generators/application/lib/bundlers/add-webpack.d.ts +0 -1
  73. package/dist/src/generators/application/lib/bundlers/add-webpack.js +18 -0
  74. package/{src → dist/src}/generators/application/lib/create-application-files.d.ts +2 -4
  75. package/{src → dist/src}/generators/application/lib/create-application-files.js +10 -62
  76. package/{src → dist/src}/generators/application/lib/find-free-port.d.ts +0 -1
  77. package/{src → dist/src}/generators/application/lib/get-app-tests.d.ts +0 -1
  78. package/{src → dist/src}/generators/application/lib/install-common-dependencies.d.ts +0 -1
  79. package/{src → dist/src}/generators/application/lib/install-common-dependencies.js +7 -12
  80. package/{src → dist/src}/generators/application/lib/normalize-options.d.ts +0 -1
  81. package/{src → dist/src}/generators/application/lib/normalize-options.js +5 -9
  82. package/{src/generators/library → dist/src/generators/application}/lib/set-defaults.d.ts +0 -1
  83. package/{src → dist/src}/generators/application/lib/update-jest-config.d.ts +0 -1
  84. package/{src → dist/src}/generators/application/lib/update-jest-config.js +0 -3
  85. package/{src → dist/src}/generators/application/schema.d.ts +0 -1
  86. package/{src → dist/src}/generators/application/schema.json +2 -21
  87. package/{src → dist/src}/generators/component/component.d.ts +0 -1
  88. package/{src → dist/src}/generators/component/component.js +8 -9
  89. package/{src → dist/src}/generators/component/files/__fileName__.__ext__ +3 -18
  90. package/{src → dist/src}/generators/component/lib/get-component-tests.d.ts +0 -1
  91. package/{src → dist/src}/generators/component/lib/normalize-options.d.ts +0 -1
  92. package/{src → dist/src}/generators/component/lib/normalize-options.js +5 -10
  93. package/{src → dist/src}/generators/component/schema.d.ts +2 -8
  94. package/{src → dist/src}/generators/component/schema.json +2 -26
  95. package/{src → dist/src}/generators/component-story/component-story.d.ts +0 -1
  96. package/{src → dist/src}/generators/component-story/component-story.js +5 -4
  97. package/{src → dist/src}/generators/component-test/component-test.d.ts +0 -1
  98. package/{src → dist/src}/generators/component-test/component-test.js +5 -4
  99. package/{src → dist/src}/generators/component-test/schema.d.ts +0 -1
  100. package/dist/src/generators/consumer/consumer.d.ts +4 -0
  101. package/dist/src/generators/consumer/consumer.js +137 -0
  102. package/dist/src/generators/consumer/files/_common/src/App.tsx__tmpl__ +53 -0
  103. package/dist/src/generators/consumer/files/_common/src/bootstrap.tsx__tmpl__ +12 -0
  104. package/dist/src/generators/consumer/files/_common/src/index.ts__tmpl__ +4 -0
  105. package/dist/src/generators/consumer/files/_common/src/mf.ts__tmpl__ +35 -0
  106. package/dist/src/generators/consumer/files/_common/tsconfig.json__tmpl__ +17 -0
  107. package/dist/src/generators/consumer/files/rsbuild/index.html__tmpl__ +12 -0
  108. package/dist/src/generators/consumer/files/rsbuild/package.json__tmpl__ +23 -0
  109. package/dist/src/generators/consumer/files/rsbuild/rsbuild.config.ts__tmpl__ +25 -0
  110. package/dist/src/generators/consumer/files/rspack/index.html__tmpl__ +12 -0
  111. package/dist/src/generators/consumer/files/rspack/package.json__tmpl__ +23 -0
  112. package/dist/src/generators/consumer/files/rspack/rspack.config.ts__tmpl__ +59 -0
  113. package/dist/src/generators/consumer/files/vite/index.html__tmpl__ +12 -0
  114. package/dist/src/generators/consumer/files/vite/package.json__tmpl__ +24 -0
  115. package/dist/src/generators/consumer/files/vite/vite.config.ts__tmpl__ +27 -0
  116. package/dist/src/generators/consumer/schema.d.ts +8 -0
  117. package/dist/src/generators/consumer/schema.json +43 -0
  118. package/{src → dist/src}/generators/cypress-component-configuration/cypress-component-configuration.d.ts +0 -1
  119. package/{src → dist/src}/generators/cypress-component-configuration/cypress-component-configuration.js +2 -0
  120. package/{src → dist/src}/generators/cypress-component-configuration/lib/add-files.d.ts +1 -2
  121. package/{src → dist/src}/generators/cypress-component-configuration/lib/add-files.js +5 -39
  122. package/{src → dist/src}/generators/federate-module/federate-module.d.ts +0 -1
  123. package/{src → dist/src}/generators/federate-module/federate-module.js +6 -2
  124. package/{src → dist/src}/generators/federate-module/lib/utils.d.ts +0 -1
  125. package/{src → dist/src}/generators/federate-module/lib/utils.js +2 -2
  126. package/{src → dist/src}/generators/hook/hook.d.ts +0 -1
  127. package/{src → dist/src}/generators/hook/hook.js +7 -6
  128. package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  129. package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
  130. package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  131. package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +2 -2
  132. package/{src → dist/src}/generators/host/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
  133. package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  134. package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
  135. package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  136. package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +2 -2
  137. package/{src → dist/src}/generators/host/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +2 -2
  138. package/{src → dist/src}/generators/host/host.d.ts +0 -1
  139. package/{src → dist/src}/generators/host/host.js +10 -6
  140. package/{src → dist/src}/generators/host/lib/add-module-federation-files.d.ts +0 -1
  141. package/{src → dist/src}/generators/host/lib/add-module-federation-files.js +3 -3
  142. package/{src → dist/src}/generators/host/lib/normalize-host-name.d.ts +0 -1
  143. package/{src → dist/src}/generators/host/lib/normalize-host-name.js +2 -2
  144. package/{src → dist/src}/generators/host/lib/setup-ssr-for-host.d.ts +0 -1
  145. package/{src → dist/src}/generators/host/lib/setup-ssr-for-host.js +1 -1
  146. package/{src → dist/src}/generators/host/lib/update-module-federation-e2e-project.d.ts +0 -1
  147. package/{src → dist/src}/generators/host/lib/update-module-federation-tsconfig.d.ts +0 -1
  148. package/{src → dist/src}/generators/host/lib/update-module-federation-tsconfig.js +2 -2
  149. package/{src → dist/src}/generators/host/schema.json +2 -21
  150. package/{src → dist/src}/generators/init/init.d.ts +0 -1
  151. package/{src → dist/src}/generators/init/init.js +5 -3
  152. package/{src → dist/src}/generators/init/schema.json +1 -1
  153. package/{src → dist/src}/generators/library/files/common/tsconfig.lib.json__tmpl__ +0 -1
  154. package/{src → dist/src}/generators/library/files/vite/tsconfig.lib.json__tmpl__ +0 -1
  155. package/{src → dist/src}/generators/library/lib/add-linting.d.ts +0 -1
  156. package/{src → dist/src}/generators/library/lib/add-linting.js +8 -9
  157. package/{src → dist/src}/generators/library/lib/add-rollup-build-target.d.ts +0 -1
  158. package/{src → dist/src}/generators/library/lib/add-rollup-build-target.js +8 -7
  159. package/{src → dist/src}/generators/library/lib/create-files.d.ts +0 -1
  160. package/{src → dist/src}/generators/library/lib/create-files.js +1 -12
  161. package/{src → dist/src}/generators/library/lib/determine-entry-fields.d.ts +0 -1
  162. package/{src → dist/src}/generators/library/lib/install-common-dependencies.d.ts +0 -1
  163. package/{src → dist/src}/generators/library/lib/install-common-dependencies.js +6 -11
  164. package/{src → dist/src}/generators/library/lib/normalize-options.d.ts +0 -1
  165. package/{src → dist/src}/generators/library/lib/normalize-options.js +7 -7
  166. package/{src/generators/application → dist/src/generators/library}/lib/set-defaults.d.ts +0 -1
  167. package/{src → dist/src}/generators/library/lib/update-app-routes.d.ts +0 -1
  168. package/{src → dist/src}/generators/library/lib/update-app-routes.js +3 -3
  169. package/{src → dist/src}/generators/library/library.d.ts +0 -1
  170. package/{src → dist/src}/generators/library/library.js +17 -19
  171. package/{src → dist/src}/generators/library/schema.json +2 -21
  172. package/dist/src/generators/provider/files/_common/src/__componentName__.tsx__tmpl__ +11 -0
  173. package/dist/src/generators/provider/files/_common/src/bootstrap.tsx__tmpl__ +12 -0
  174. package/dist/src/generators/provider/files/_common/src/index.ts__tmpl__ +5 -0
  175. package/dist/src/generators/provider/files/_common/tsconfig.json__tmpl__ +17 -0
  176. package/dist/src/generators/provider/files/rsbuild/index.html__tmpl__ +12 -0
  177. package/dist/src/generators/provider/files/rsbuild/package.json__tmpl__ +22 -0
  178. package/dist/src/generators/provider/files/rsbuild/rsbuild.config.ts__tmpl__ +31 -0
  179. package/dist/src/generators/provider/files/rspack/index.html__tmpl__ +12 -0
  180. package/dist/src/generators/provider/files/rspack/package.json__tmpl__ +22 -0
  181. package/dist/src/generators/provider/files/rspack/rspack.config.ts__tmpl__ +69 -0
  182. package/dist/src/generators/provider/files/vite/index.html__tmpl__ +12 -0
  183. package/dist/src/generators/provider/files/vite/package.json__tmpl__ +23 -0
  184. package/dist/src/generators/provider/files/vite/vite.config.ts__tmpl__ +37 -0
  185. package/dist/src/generators/provider/provider.d.ts +4 -0
  186. package/dist/src/generators/provider/provider.js +94 -0
  187. package/dist/src/generators/provider/schema.d.ts +9 -0
  188. package/dist/src/generators/provider/schema.json +46 -0
  189. package/{src → dist/src}/generators/redux/redux.d.ts +0 -1
  190. package/{src → dist/src}/generators/redux/redux.js +10 -9
  191. package/{src → dist/src}/generators/redux/schema.d.ts +1 -1
  192. package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  193. package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/rspack.config.ts__tmpl__ +1 -1
  194. package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  195. package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/rspack.config.ts__tmpl__ +1 -1
  196. package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/module-federation.server.config.ts__tmpl__ +1 -1
  197. package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/webpack.server.config.ts__tmpl__ +1 -1
  198. package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/module-federation.config.ts__tmpl__ +1 -1
  199. package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/webpack.config.ts__tmpl__ +1 -1
  200. package/{src → dist/src}/generators/remote/lib/add-remote-to-dynamic-host.d.ts +0 -1
  201. package/{src → dist/src}/generators/remote/lib/setup-package-json-exports-for-remote.d.ts +0 -1
  202. package/{src → dist/src}/generators/remote/lib/setup-package-json-exports-for-remote.js +2 -2
  203. package/{src → dist/src}/generators/remote/lib/setup-ssr-for-remote.d.ts +0 -1
  204. package/{src → dist/src}/generators/remote/lib/setup-ssr-for-remote.js +1 -1
  205. package/{src → dist/src}/generators/remote/lib/setup-tspath-for-remote.d.ts +0 -1
  206. package/{src → dist/src}/generators/remote/lib/update-host-with-remote.d.ts +0 -1
  207. package/{src → dist/src}/generators/remote/lib/update-host-with-remote.js +4 -5
  208. package/{src → dist/src}/generators/remote/remote.d.ts +0 -1
  209. package/{src → dist/src}/generators/remote/remote.js +12 -8
  210. package/{src → dist/src}/generators/remote/schema.json +2 -21
  211. package/{src → dist/src}/generators/setup-ssr/setup-ssr.d.ts +0 -1
  212. package/{src → dist/src}/generators/setup-ssr/setup-ssr.js +8 -8
  213. package/{src → dist/src}/generators/stories/stories.d.ts +0 -1
  214. package/{src → dist/src}/generators/stories/stories.js +9 -8
  215. package/{src → dist/src}/generators/storybook-configuration/configuration.d.ts +0 -1
  216. package/{src → dist/src}/generators/storybook-configuration/configuration.js +3 -1
  217. package/{src → dist/src}/migrations/update-21-0-0/update-babel-loose.d.ts +0 -1
  218. package/dist/src/migrations/update-21-0-0/update-babel-loose.md +43 -0
  219. package/{src → dist/src}/migrations/update-22-0-0/add-svgr-to-webpack-config.d.ts +0 -1
  220. package/{src → dist/src}/migrations/update-22-0-0/add-svgr-to-webpack-config.js +34 -7
  221. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.d.ts +9 -0
  222. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.js +225 -0
  223. package/dist/src/migrations/update-23-0-0/migrate-create-nodes-v2-to-create-nodes.md +25 -0
  224. package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.d.ts +2 -0
  225. package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.js +128 -0
  226. package/dist/src/migrations/update-23-0-0/remove-nx-react-webpack-plugin-import.md +52 -0
  227. package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.d.ts +3 -0
  228. package/dist/src/migrations/update-23-0-0/rewrite-internal-subpath-imports.js +215 -0
  229. package/{src → dist/src}/module-federation/ast-utils.d.ts +0 -1
  230. package/{src → dist/src}/module-federation/ast-utils.js +2 -2
  231. package/dist/src/plugins/router-plugin.d.ts +14 -0
  232. package/{src → dist/src}/plugins/router-plugin.js +20 -25
  233. package/{src → dist/src}/rules/update-module-federation-project.d.ts +0 -1
  234. package/{src → dist/src}/rules/update-module-federation-project.js +3 -3
  235. package/{src → dist/src}/utils/add-mf-env-to-inputs.d.ts +0 -1
  236. package/dist/src/utils/add-mf-env-to-inputs.js +32 -0
  237. package/dist/src/utils/assert-supported-react-version.d.ts +2 -0
  238. package/dist/src/utils/assert-supported-react-version.js +8 -0
  239. package/{src → dist/src}/utils/assertion.d.ts +0 -1
  240. package/{src → dist/src}/utils/assertion.js +1 -10
  241. package/{src → dist/src}/utils/ast-utils.d.ts +0 -1
  242. package/{src → dist/src}/utils/ast-utils.js +15 -15
  243. package/{src → dist/src}/utils/component-props.d.ts +0 -1
  244. package/{src → dist/src}/utils/component-props.js +3 -3
  245. package/{src → dist/src}/utils/create-ts-config.d.ts +0 -1
  246. package/{src → dist/src}/utils/create-ts-config.js +3 -10
  247. package/{src → dist/src}/utils/ct-utils.d.ts +1 -2
  248. package/{src → dist/src}/utils/ct-utils.js +6 -39
  249. package/{src → dist/src}/utils/dependencies.d.ts +0 -1
  250. package/dist/src/utils/deprecation.d.ts +3 -0
  251. package/dist/src/utils/deprecation.js +33 -0
  252. package/{src → dist/src}/utils/framework.d.ts +0 -1
  253. package/{src → dist/src}/utils/get-in-source-vitest-tests-template.d.ts +0 -1
  254. package/{src → dist/src}/utils/has-rsbuild-plugin.d.ts +0 -1
  255. package/dist/src/utils/has-rsbuild-plugin.js +12 -0
  256. package/{src → dist/src}/utils/has-rspack-plugin.d.ts +0 -1
  257. package/{src → dist/src}/utils/has-vite-plugin.d.ts +0 -1
  258. package/{src → dist/src}/utils/has-webpack-plugin.d.ts +0 -1
  259. package/{src → dist/src}/utils/jest-utils.d.ts +0 -1
  260. package/{src → dist/src}/utils/lint.d.ts +0 -1
  261. package/{src → dist/src}/utils/maybe-js.d.ts +0 -1
  262. package/dist/src/utils/module-federation-deprecation.d.ts +12 -0
  263. package/dist/src/utils/module-federation-deprecation.js +46 -0
  264. package/{src → dist/src}/utils/normalize-remote.d.ts +0 -1
  265. package/{src → dist/src}/utils/normalize-remote.js +2 -2
  266. package/{src → dist/src}/utils/testing-generators.d.ts +0 -1
  267. package/{src → dist/src}/utils/version-utils.d.ts +1 -1
  268. package/{src → dist/src}/utils/version-utils.js +3 -0
  269. package/{src → dist/src}/utils/versions.d.ts +5 -18
  270. package/dist/src/utils/versions.js +53 -0
  271. package/dist/tailwind.d.ts +5 -0
  272. package/{tailwind.js → dist/tailwind.js} +13 -7
  273. package/dist/typings/cssmodule.d.ts +19 -0
  274. package/dist/typings/image.d.ts +48 -0
  275. package/dist/typings/style.d.ts +1 -0
  276. package/dist/typings/styled-jsx.d.ts +8 -0
  277. package/{webpack-plugin.d.ts → dist/webpack-plugin.d.ts} +0 -1
  278. package/executors.json +6 -6
  279. package/generators.json +46 -40
  280. package/migrations.json +45 -79
  281. package/package.json +143 -144
  282. package/typings/style.d.ts +1 -9
  283. package/ast-utils.d.ts.map +0 -1
  284. package/babel.d.ts +0 -25
  285. package/babel.d.ts.map +0 -1
  286. package/index.d.ts.map +0 -1
  287. package/mf/dynamic-federation.d.ts.map +0 -1
  288. package/mf/index.d.ts.map +0 -1
  289. package/module-federation.d.ts.map +0 -1
  290. package/plugins/bundle-rollup.d.ts +0 -2
  291. package/plugins/bundle-rollup.d.ts.map +0 -1
  292. package/plugins/component-testing/index.d.ts.map +0 -1
  293. package/plugins/component-testing/webpack-fallback.d.ts.map +0 -1
  294. package/plugins/jest.d.ts +0 -2
  295. package/plugins/jest.d.ts.map +0 -1
  296. package/plugins/nx-react-webpack-plugin/lib/apply-react-config.d.ts.map +0 -1
  297. package/plugins/nx-react-webpack-plugin/nx-react-webpack-plugin.d.ts.map +0 -1
  298. package/plugins/storybook/index.d.ts.map +0 -1
  299. package/plugins/storybook/merge-plugins.d.ts.map +0 -1
  300. package/plugins/webpack.d.ts +0 -2
  301. package/plugins/webpack.d.ts.map +0 -1
  302. package/plugins/with-react.d.ts.map +0 -1
  303. package/router-plugin.d.ts +0 -2
  304. package/router-plugin.d.ts.map +0 -1
  305. package/src/executors/module-federation-dev-server/lib/index.d.ts.map +0 -1
  306. package/src/executors/module-federation-dev-server/lib/normalize-options.d.ts.map +0 -1
  307. package/src/executors/module-federation-dev-server/lib/start-remotes.d.ts.map +0 -1
  308. package/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts.map +0 -1
  309. package/src/executors/module-federation-ssr-dev-server/lib/index.d.ts.map +0 -1
  310. package/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts.map +0 -1
  311. package/src/executors/module-federation-ssr-dev-server/lib/start-remotes.d.ts.map +0 -1
  312. package/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts.map +0 -1
  313. package/src/executors/module-federation-static-server/module-federation-static-server.impl.d.ts.map +0 -1
  314. package/src/generators/application/application.d.ts.map +0 -1
  315. package/src/generators/application/files/style-styled-jsx/src/app/__fileName__.tsx__tmpl__ +0 -46
  316. package/src/generators/application/files/style-styled-module/src/app/__fileName__.tsx__tmpl__ +0 -49
  317. package/src/generators/application/files/style-tailwind/src/app/__fileName__.tsx__tmpl__ +0 -45
  318. package/src/generators/application/files/style-tailwind/src/styles.css +0 -1
  319. package/src/generators/application/lib/add-e2e.d.ts.map +0 -1
  320. package/src/generators/application/lib/add-jest.d.ts.map +0 -1
  321. package/src/generators/application/lib/add-linting.d.ts.map +0 -1
  322. package/src/generators/application/lib/add-project.d.ts.map +0 -1
  323. package/src/generators/application/lib/add-routing.d.ts.map +0 -1
  324. package/src/generators/application/lib/bundlers/add-rsbuild.d.ts.map +0 -1
  325. package/src/generators/application/lib/bundlers/add-rsbuild.js +0 -99
  326. package/src/generators/application/lib/bundlers/add-rspack.d.ts.map +0 -1
  327. package/src/generators/application/lib/bundlers/add-rspack.js +0 -38
  328. package/src/generators/application/lib/bundlers/add-vite.d.ts.map +0 -1
  329. package/src/generators/application/lib/bundlers/add-webpack.d.ts.map +0 -1
  330. package/src/generators/application/lib/bundlers/add-webpack.js +0 -51
  331. package/src/generators/application/lib/create-application-files.d.ts.map +0 -1
  332. package/src/generators/application/lib/find-free-port.d.ts.map +0 -1
  333. package/src/generators/application/lib/get-app-tests.d.ts.map +0 -1
  334. package/src/generators/application/lib/install-common-dependencies.d.ts.map +0 -1
  335. package/src/generators/application/lib/normalize-options.d.ts.map +0 -1
  336. package/src/generators/application/lib/set-defaults.d.ts.map +0 -1
  337. package/src/generators/application/lib/show-possible-warnings.d.ts +0 -4
  338. package/src/generators/application/lib/show-possible-warnings.d.ts.map +0 -1
  339. package/src/generators/application/lib/show-possible-warnings.js +0 -11
  340. package/src/generators/application/lib/update-jest-config.d.ts.map +0 -1
  341. package/src/generators/component/component.d.ts.map +0 -1
  342. package/src/generators/component/lib/get-component-tests.d.ts.map +0 -1
  343. package/src/generators/component/lib/normalize-options.d.ts.map +0 -1
  344. package/src/generators/component-story/component-story.d.ts.map +0 -1
  345. package/src/generators/component-test/component-test.d.ts.map +0 -1
  346. package/src/generators/component-test/schema.d.ts.map +0 -1
  347. package/src/generators/cypress-component-configuration/cypress-component-configuration.d.ts.map +0 -1
  348. package/src/generators/cypress-component-configuration/lib/add-files.d.ts.map +0 -1
  349. package/src/generators/federate-module/federate-module.d.ts.map +0 -1
  350. package/src/generators/federate-module/lib/utils.d.ts.map +0 -1
  351. package/src/generators/hook/hook.d.ts.map +0 -1
  352. package/src/generators/host/host.d.ts.map +0 -1
  353. package/src/generators/host/lib/add-module-federation-files.d.ts.map +0 -1
  354. package/src/generators/host/lib/normalize-host-name.d.ts.map +0 -1
  355. package/src/generators/host/lib/setup-ssr-for-host.d.ts.map +0 -1
  356. package/src/generators/host/lib/update-module-federation-e2e-project.d.ts.map +0 -1
  357. package/src/generators/host/lib/update-module-federation-tsconfig.d.ts.map +0 -1
  358. package/src/generators/init/init.d.ts.map +0 -1
  359. package/src/generators/library/lib/add-linting.d.ts.map +0 -1
  360. package/src/generators/library/lib/add-rollup-build-target.d.ts.map +0 -1
  361. package/src/generators/library/lib/create-files.d.ts.map +0 -1
  362. package/src/generators/library/lib/determine-entry-fields.d.ts.map +0 -1
  363. package/src/generators/library/lib/install-common-dependencies.d.ts.map +0 -1
  364. package/src/generators/library/lib/normalize-options.d.ts.map +0 -1
  365. package/src/generators/library/lib/set-defaults.d.ts.map +0 -1
  366. package/src/generators/library/lib/update-app-routes.d.ts.map +0 -1
  367. package/src/generators/library/library.d.ts.map +0 -1
  368. package/src/generators/redux/redux.d.ts.map +0 -1
  369. package/src/generators/remote/lib/add-remote-to-dynamic-host.d.ts.map +0 -1
  370. package/src/generators/remote/lib/setup-package-json-exports-for-remote.d.ts.map +0 -1
  371. package/src/generators/remote/lib/setup-ssr-for-remote.d.ts.map +0 -1
  372. package/src/generators/remote/lib/setup-tspath-for-remote.d.ts.map +0 -1
  373. package/src/generators/remote/lib/update-host-with-remote.d.ts.map +0 -1
  374. package/src/generators/remote/remote.d.ts.map +0 -1
  375. package/src/generators/setup-ssr/setup-ssr.d.ts.map +0 -1
  376. package/src/generators/setup-tailwind/files/postcss.config.js__tmpl__ +0 -15
  377. package/src/generators/setup-tailwind/files/tailwind.config.js__tmpl__ +0 -17
  378. package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts +0 -4
  379. package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.d.ts.map +0 -1
  380. package/src/generators/setup-tailwind/lib/add-tailwind-style-imports.js +0 -27
  381. package/src/generators/setup-tailwind/lib/update-project.d.ts +0 -4
  382. package/src/generators/setup-tailwind/lib/update-project.d.ts.map +0 -1
  383. package/src/generators/setup-tailwind/lib/update-project.js +0 -11
  384. package/src/generators/setup-tailwind/schema.d.ts +0 -7
  385. package/src/generators/setup-tailwind/schema.d.ts.map +0 -1
  386. package/src/generators/setup-tailwind/schema.js +0 -2
  387. package/src/generators/setup-tailwind/schema.json +0 -47
  388. package/src/generators/setup-tailwind/setup-tailwind.d.ts +0 -5
  389. package/src/generators/setup-tailwind/setup-tailwind.d.ts.map +0 -1
  390. package/src/generators/setup-tailwind/setup-tailwind.js +0 -35
  391. package/src/generators/stories/stories.d.ts.map +0 -1
  392. package/src/generators/storybook-configuration/configuration.d.ts.map +0 -1
  393. package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts +0 -3
  394. package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.d.ts.map +0 -1
  395. package/src/migrations/update-18-0-0/add-mf-env-var-to-target-defaults.js +0 -31
  396. package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts +0 -3
  397. package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.d.ts.map +0 -1
  398. package/src/migrations/update-20-2-0/migrate-mf-imports-to-new-package.js +0 -66
  399. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts +0 -3
  400. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.d.ts.map +0 -1
  401. package/src/migrations/update-20-2-0/migrate-with-mf-import-to-new-package.js +0 -41
  402. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts +0 -3
  403. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.d.ts.map +0 -1
  404. package/src/migrations/update-20-3-0/ensure-nx-module-federation-package.js +0 -18
  405. package/src/migrations/update-21-0-0/update-babel-loose.d.ts.map +0 -1
  406. package/src/migrations/update-22-0-0/add-svgr-to-webpack-config.d.ts.map +0 -1
  407. package/src/module-federation/ast-utils.d.ts.map +0 -1
  408. package/src/plugins/router-plugin.d.ts +0 -11
  409. package/src/plugins/router-plugin.d.ts.map +0 -1
  410. package/src/rules/add-styled-dependencies.d.ts +0 -6
  411. package/src/rules/add-styled-dependencies.d.ts.map +0 -1
  412. package/src/rules/add-styled-dependencies.js +0 -16
  413. package/src/rules/update-module-federation-project.d.ts.map +0 -1
  414. package/src/utils/add-mf-env-to-inputs.d.ts.map +0 -1
  415. package/src/utils/add-mf-env-to-inputs.js +0 -25
  416. package/src/utils/assertion.d.ts.map +0 -1
  417. package/src/utils/ast-utils.d.ts.map +0 -1
  418. package/src/utils/component-props.d.ts.map +0 -1
  419. package/src/utils/create-ts-config.d.ts.map +0 -1
  420. package/src/utils/ct-utils.d.ts.map +0 -1
  421. package/src/utils/dependencies.d.ts.map +0 -1
  422. package/src/utils/framework.d.ts.map +0 -1
  423. package/src/utils/get-in-source-vitest-tests-template.d.ts.map +0 -1
  424. package/src/utils/has-rsbuild-plugin.d.ts.map +0 -1
  425. package/src/utils/has-rsbuild-plugin.js +0 -43
  426. package/src/utils/has-rspack-plugin.d.ts.map +0 -1
  427. package/src/utils/has-vite-plugin.d.ts.map +0 -1
  428. package/src/utils/has-webpack-plugin.d.ts.map +0 -1
  429. package/src/utils/jest-utils.d.ts.map +0 -1
  430. package/src/utils/lint.d.ts.map +0 -1
  431. package/src/utils/maybe-js.d.ts.map +0 -1
  432. package/src/utils/normalize-remote.d.ts.map +0 -1
  433. package/src/utils/styled.d.ts +0 -4
  434. package/src/utils/styled.d.ts.map +0 -1
  435. package/src/utils/styled.js +0 -62
  436. package/src/utils/testing-generators.d.ts.map +0 -1
  437. package/src/utils/version-utils.d.ts.map +0 -1
  438. package/src/utils/versions.d.ts.map +0 -1
  439. package/src/utils/versions.js +0 -64
  440. package/tailwind.d.ts +0 -7
  441. package/tailwind.d.ts.map +0 -1
  442. package/webpack-plugin.d.ts.map +0 -1
  443. /package/{LICENSE → dist/LICENSE} +0 -0
  444. /package/{ast-utils.js → dist/ast-utils.js} +0 -0
  445. /package/{mf → dist/mf}/dynamic-federation.js +0 -0
  446. /package/{mf → dist/mf}/index.js +0 -0
  447. /package/{module-federation.js → dist/module-federation.js} +0 -0
  448. /package/{plugins → dist/plugins}/bundle-rollup.js +0 -0
  449. /package/{plugins → dist/plugins}/jest.js +0 -0
  450. /package/{plugins → dist/plugins}/nx-react-webpack-plugin/lib/apply-react-config.js +0 -0
  451. /package/{plugins → dist/plugins}/nx-react-webpack-plugin/nx-react-webpack-plugin.js +0 -0
  452. /package/{plugins → dist/plugins}/storybook/merge-plugins.js +0 -0
  453. /package/{plugins → dist/plugins}/webpack.js +0 -0
  454. /package/{src → dist/src}/executors/module-federation-dev-server/lib/index.js +0 -0
  455. /package/{src → dist/src}/executors/module-federation-dev-server/lib/normalize-options.js +0 -0
  456. /package/{src → dist/src}/executors/module-federation-dev-server/lib/start-remotes.js +0 -0
  457. /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/index.js +0 -0
  458. /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/normalize-options.js +0 -0
  459. /package/{src → dist/src}/executors/module-federation-ssr-dev-server/lib/start-remotes.js +0 -0
  460. /package/{src → dist/src}/executors/module-federation-static-server/schema.d.ts +0 -0
  461. /package/{src → dist/src}/generators/application/files/base-rsbuild/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
  462. /package/{src → dist/src}/generators/application/files/base-rsbuild/src/assets/.gitkeep +0 -0
  463. /package/{src → dist/src}/generators/application/files/base-rsbuild/src/favicon.ico +0 -0
  464. /package/{src → dist/src}/generators/application/files/base-rsbuild/src/index.html +0 -0
  465. /package/{src → dist/src}/generators/application/files/base-rsbuild/src/main.tsx__tmpl__ +0 -0
  466. /package/{src → dist/src}/generators/application/files/base-rspack/rspack.config.js__tmpl__ +0 -0
  467. /package/{src → dist/src}/generators/application/files/base-rspack/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
  468. /package/{src → dist/src}/generators/application/files/base-rspack/src/assets/.gitkeep +0 -0
  469. /package/{src → dist/src}/generators/application/files/base-rspack/src/favicon.ico +0 -0
  470. /package/{src → dist/src}/generators/application/files/base-rspack/src/index.html +0 -0
  471. /package/{src → dist/src}/generators/application/files/base-rspack/src/main.tsx__tmpl__ +0 -0
  472. /package/{src → dist/src}/generators/application/files/base-vite/public/favicon.ico +0 -0
  473. /package/{src → dist/src}/generators/application/files/base-vite/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
  474. /package/{src → dist/src}/generators/application/files/base-vite/src/assets/.gitkeep +0 -0
  475. /package/{src → dist/src}/generators/application/files/base-vite/src/environments/environment.prod.ts__tmpl__ +0 -0
  476. /package/{src → dist/src}/generators/application/files/base-vite/src/environments/environment.ts__tmpl__ +0 -0
  477. /package/{src → dist/src}/generators/application/files/base-vite/src/main.tsx__tmpl__ +0 -0
  478. /package/{src → dist/src}/generators/application/files/base-webpack/src/app/__fileName__.spec.tsx__tmpl__ +0 -0
  479. /package/{src → dist/src}/generators/application/files/base-webpack/src/assets/.gitkeep +0 -0
  480. /package/{src → dist/src}/generators/application/files/base-webpack/src/favicon.ico +0 -0
  481. /package/{src → dist/src}/generators/application/files/base-webpack/src/index.html +0 -0
  482. /package/{src → dist/src}/generators/application/files/base-webpack/src/main.tsx__tmpl__ +0 -0
  483. /package/{src → dist/src}/generators/application/files/base-webpack/webpack.config.js__tmpl__ +0 -0
  484. /package/{src → dist/src}/generators/application/files/nx-welcome/claimed/src/app/nx-welcome.tsx__tmpl__ +0 -0
  485. /package/{src → dist/src}/generators/application/files/nx-welcome/not-configured/src/app/nx-welcome.tsx__tmpl__ +0 -0
  486. /package/{src → dist/src}/generators/application/files/nx-welcome/unclaimed/src/app/nx-welcome.tsx__tmpl__ +0 -0
  487. /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/app-nav.tsx__tmpl__ +0 -0
  488. /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/entry.client.tsx__tmpl__ +0 -0
  489. /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/entry.server.tsx__tmpl__ +0 -0
  490. /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/root.tsx__tmpl__ +0 -0
  491. /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/routes/about.tsx__tmpl__ +0 -0
  492. /package/{src → dist/src}/generators/application/files/react-router-ssr/common/app/routes.tsx__tmpl__ +0 -0
  493. /package/{src → dist/src}/generators/application/files/react-router-ssr/common/public/favicon.ico +0 -0
  494. /package/{src → dist/src}/generators/application/files/react-router-ssr/common/react-router.config.ts__tmpl__ +0 -0
  495. /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tests/routes/_index.spec.tsx__tmpl__ +0 -0
  496. /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tsconfig.app.json__tmpl__ +0 -0
  497. /package/{src → dist/src}/generators/application/files/react-router-ssr/common/tsconfig.json__tmpl__ +0 -0
  498. /package/{src → dist/src}/generators/application/files/react-router-ssr/non-root/.gitignore__tmpl__ +0 -0
  499. /package/{src → dist/src}/generators/application/files/react-router-ssr/non-root/package.json__tmpl__ +0 -0
  500. /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/claimed/app/nx-welcome.tsx__tmpl__ +0 -0
  501. /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/not-configured/app/nx-welcome.tsx__tmpl__ +0 -0
  502. /package/{src → dist/src}/generators/application/files/react-router-ssr/nx-welcome/unclaimed/app/nx-welcome.tsx__tmpl__ +0 -0
  503. /package/{src → dist/src}/generators/application/files/react-router-ssr/ts-solution/package.json__tmpl__ +0 -0
  504. /package/{src → dist/src}/generators/application/files/react-router-ssr/ts-solution/tsconfig.app.json__tmpl__ +0 -0
  505. /package/{src → dist/src}/generators/application/files/style-css-module/src/app/__fileName__.module.__style__ +0 -0
  506. /package/{src → dist/src}/generators/application/files/style-css-module/src/app/__fileName__.tsx__tmpl__ +0 -0
  507. /package/{src → dist/src}/generators/application/files/style-css-module/src/styles.__style__ +0 -0
  508. /package/{src → dist/src}/generators/application/files/style-global-css/src/app/__fileName__.__style__ +0 -0
  509. /package/{src → dist/src}/generators/application/files/style-global-css/src/app/__fileName__.tsx__tmpl__ +0 -0
  510. /package/{src → dist/src}/generators/application/files/style-global-css/src/styles.__style__ +0 -0
  511. /package/{src → dist/src}/generators/application/files/style-none/src/app/__fileName__.tsx__tmpl__ +0 -0
  512. /package/{src → dist/src}/generators/application/lib/add-jest.js +0 -0
  513. /package/{src → dist/src}/generators/application/lib/find-free-port.js +0 -0
  514. /package/{src → dist/src}/generators/application/lib/get-app-tests.js +0 -0
  515. /package/{src → dist/src}/generators/application/lib/set-defaults.js +0 -0
  516. /package/{src → dist/src}/generators/component/files/__fileName__.__style__ +0 -0
  517. /package/{src → dist/src}/generators/component/files/__fileName__.module.__style__ +0 -0
  518. /package/{src → dist/src}/generators/component/files/__fileName__.spec.__ext__ +0 -0
  519. /package/{src → dist/src}/generators/component/lib/get-component-tests.js +0 -0
  520. /package/{src → dist/src}/generators/component-story/files/jsx/__componentFileName__.stories.jsx__tmpl__ +0 -0
  521. /package/{src → dist/src}/generators/component-story/files/tsx/__componentFileName__.stories.tsx__tmpl__ +0 -0
  522. /package/{src → dist/src}/generators/component-story/schema.json +0 -0
  523. /package/{src → dist/src}/generators/component-test/files/__fileName__.cy__ext__ +0 -0
  524. /package/{src → dist/src}/generators/component-test/schema.js +0 -0
  525. /package/{src → dist/src}/generators/component-test/schema.json +0 -0
  526. /package/{src → dist/src}/generators/cypress-component-configuration/schema.d.ts +0 -0
  527. /package/{src → dist/src}/generators/cypress-component-configuration/schema.json +0 -0
  528. /package/{src → dist/src}/generators/federate-module/schema.d.ts +0 -0
  529. /package/{src → dist/src}/generators/federate-module/schema.json +0 -0
  530. /package/{src → dist/src}/generators/hook/files/__fileName__.__ext__ +0 -0
  531. /package/{src → dist/src}/generators/hook/files/__fileName__.spec.__specExt__ +0 -0
  532. /package/{src → dist/src}/generators/hook/schema.d.ts +0 -0
  533. /package/{src → dist/src}/generators/hook/schema.json +0 -0
  534. /package/{src → dist/src}/generators/host/files/common/src/app/__fileName__.js__tmpl__ +0 -0
  535. /package/{src → dist/src}/generators/host/files/common/src/main.js__tmpl__ +0 -0
  536. /package/{src → dist/src}/generators/host/files/common/tsconfig.lint.json__tmpl__ +0 -0
  537. /package/{src → dist/src}/generators/host/files/common-ts/src/app/__fileName__.tsx__tmpl__ +0 -0
  538. /package/{src → dist/src}/generators/host/files/common-ts/src/main.ts__tmpl__ +0 -0
  539. /package/{src → dist/src}/generators/host/files/rspack-common/src/app/__fileName__.jsx__tmpl__ +0 -0
  540. /package/{src → dist/src}/generators/host/files/rspack-common/src/main.jsx__tmpl__ +0 -0
  541. /package/{src → dist/src}/generators/host/files/rspack-common/tsconfig.lint.json__tmpl__ +0 -0
  542. /package/{src → dist/src}/generators/host/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -0
  543. /package/{src → dist/src}/generators/host/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -0
  544. /package/{src → dist/src}/generators/host/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -0
  545. /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
  546. /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -0
  547. /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -0
  548. /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -0
  549. /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -0
  550. /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
  551. /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -0
  552. /package/{src → dist/src}/generators/host/files/rspack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -0
  553. /package/{src → dist/src}/generators/host/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -0
  554. /package/{src → dist/src}/generators/host/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -0
  555. /package/{src → dist/src}/generators/host/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -0
  556. /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
  557. /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -0
  558. /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/tsconfig.server.json__tmpl__ +0 -0
  559. /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -0
  560. /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
  561. /package/{src → dist/src}/generators/host/files/webpack-module-federation-ssr-ts/tsconfig.server.json__tmpl__ +0 -0
  562. /package/{src → dist/src}/generators/host/lib/update-module-federation-e2e-project.js +0 -0
  563. /package/{src → dist/src}/generators/host/schema.d.ts +0 -0
  564. /package/{src → dist/src}/generators/init/schema.d.ts +0 -0
  565. /package/{src → dist/src}/generators/library/files/common/README.md +0 -0
  566. /package/{src → dist/src}/generators/library/files/common/src/index.ts__tmpl__ +0 -0
  567. /package/{src → dist/src}/generators/library/files/vite/README.md +0 -0
  568. /package/{src → dist/src}/generators/library/lib/determine-entry-fields.js +0 -0
  569. /package/{src → dist/src}/generators/library/lib/set-defaults.js +0 -0
  570. /package/{src → dist/src}/generators/library/schema.d.ts +0 -0
  571. /package/{src → dist/src}/generators/redux/files/js/__fileName__.__ext__ +0 -0
  572. /package/{src → dist/src}/generators/redux/files/js/__fileName__.spec.__ext__ +0 -0
  573. /package/{src → dist/src}/generators/redux/files/ts/__fileName__.__ext__ +0 -0
  574. /package/{src → dist/src}/generators/redux/files/ts/__fileName__.spec.__ext__ +0 -0
  575. /package/{src → dist/src}/generators/redux/schema.json +0 -0
  576. /package/{src → dist/src}/generators/remote/files/common/src/main.js__tmpl__ +0 -0
  577. /package/{src → dist/src}/generators/remote/files/common/src/remote-entry.js__tmpl__ +0 -0
  578. /package/{src → dist/src}/generators/remote/files/common-ts/src/main.ts__tmpl__ +0 -0
  579. /package/{src → dist/src}/generators/remote/files/common-ts/src/remote-entry.ts__tmpl__ +0 -0
  580. /package/{src → dist/src}/generators/remote/files/rspack-common/src/main.jsx__tmpl__ +0 -0
  581. /package/{src → dist/src}/generators/remote/files/rspack-common/src/remote-entry.js__tmpl__ +0 -0
  582. /package/{src → dist/src}/generators/remote/files/rspack-module-federation/module-federation.config.js__tmpl__ +0 -0
  583. /package/{src → dist/src}/generators/remote/files/rspack-module-federation/rspack.config.js__tmpl__ +0 -0
  584. /package/{src → dist/src}/generators/remote/files/rspack-module-federation/rspack.config.prod.js__tmpl__ +0 -0
  585. /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
  586. /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/rspack.config.js__tmpl__ +0 -0
  587. /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/server.ts__tmpl__ +0 -0
  588. /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr/src/main.server.tsx__tmpl__ +0 -0
  589. /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
  590. /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/src/main.server.tsx__tmpl__ +0 -0
  591. /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -0
  592. /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/rspack.config.prod.ts__tmpl__ +0 -0
  593. /package/{src → dist/src}/generators/remote/files/rspack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -0
  594. /package/{src → dist/src}/generators/remote/files/webpack-module-federation/module-federation.config.js__tmpl__ +0 -0
  595. /package/{src → dist/src}/generators/remote/files/webpack-module-federation/webpack.config.js__tmpl__ +0 -0
  596. /package/{src → dist/src}/generators/remote/files/webpack-module-federation/webpack.config.prod.js__tmpl__ +0 -0
  597. /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/module-federation.server.config.js__tmpl__ +0 -0
  598. /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/server.ts__tmpl__ +0 -0
  599. /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr/webpack.server.config.js__tmpl__ +0 -0
  600. /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/server.ts__tmpl__ +0 -0
  601. /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ssr-ts/tsconfig.lint.json__tmpl__ +0 -0
  602. /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/tsconfig.lint.json__tmpl__ +0 -0
  603. /package/{src → dist/src}/generators/remote/files/webpack-module-federation-ts/webpack.config.prod.ts__tmpl__ +0 -0
  604. /package/{src → dist/src}/generators/remote/lib/add-remote-to-dynamic-host.js +0 -0
  605. /package/{src → dist/src}/generators/remote/lib/setup-tspath-for-remote.js +0 -0
  606. /package/{src → dist/src}/generators/remote/schema.d.ts +0 -0
  607. /package/{src → dist/src}/generators/setup-ssr/files/server.ts__tmpl__ +0 -0
  608. /package/{src → dist/src}/generators/setup-ssr/files/src/main.server.tsx__tmpl__ +0 -0
  609. /package/{src → dist/src}/generators/setup-ssr/files/tsconfig.server.json__tmpl__ +0 -0
  610. /package/{src → dist/src}/generators/setup-ssr/schema.d.ts +0 -0
  611. /package/{src → dist/src}/generators/setup-ssr/schema.json +0 -0
  612. /package/{src → dist/src}/generators/stories/schema.json +0 -0
  613. /package/{src → dist/src}/generators/storybook-configuration/schema.d.ts +0 -0
  614. /package/{src → dist/src}/generators/storybook-configuration/schema.json +0 -0
  615. /package/{src → dist/src}/migrations/update-21-0-0/update-babel-loose.js +0 -0
  616. /package/{src → dist/src}/utils/dependencies.js +0 -0
  617. /package/{src → dist/src}/utils/framework.js +0 -0
  618. /package/{src → dist/src}/utils/get-in-source-vitest-tests-template.js +0 -0
  619. /package/{src → dist/src}/utils/has-rspack-plugin.js +0 -0
  620. /package/{src → dist/src}/utils/has-vite-plugin.js +0 -0
  621. /package/{src → dist/src}/utils/has-webpack-plugin.js +0 -0
  622. /package/{src → dist/src}/utils/jest-utils.js +0 -0
  623. /package/{src → dist/src}/utils/lint.js +0 -0
  624. /package/{src → dist/src}/utils/maybe-js.js +0 -0
  625. /package/{src → dist/src}/utils/testing-generators.js +0 -0
  626. /package/{webpack-plugin.js → dist/webpack-plugin.js} +0 -0
@@ -2,8 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = addSvgrToWebpackConfig;
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 executor_options_utils_1 = require("@nx/devkit/src/generators/executor-options-utils");
7
7
  const tsquery_1 = require("@phenomnomnominal/tsquery");
8
8
  const ts = tslib_1.__importStar(require("typescript"));
9
9
  const withSvgrFunctionForWithReact = `
@@ -115,7 +115,7 @@ function withSvgr(svgrOptions = {}) {
115
115
  async function addSvgrToWebpackConfig(tree) {
116
116
  const projects = new Map();
117
117
  // Find all React webpack projects using either withReact OR NxReactWebpackPlugin
118
- (0, executor_options_utils_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', (options, project, target) => {
118
+ (0, internal_1.forEachExecutorOptions)(tree, '@nx/webpack:webpack', (options, project, target) => {
119
119
  if (!options.webpackConfig)
120
120
  return;
121
121
  const webpackConfigPath = options.webpackConfig;
@@ -271,11 +271,38 @@ async function addSvgrToWebpackConfig(tree) {
271
271
  ts.isIdentifier(prop.name) &&
272
272
  prop.name.text === 'svgr');
273
273
  if (svgrProp) {
274
- changes.push({
275
- type: devkit_1.ChangeType.Delete,
276
- start: arg.getStart(),
277
- length: arg.getEnd() - arg.getStart(),
278
- });
274
+ const hasOnlySvgrProperty = arg.properties.length === 1;
275
+ if (hasOnlySvgrProperty) {
276
+ changes.push({
277
+ type: devkit_1.ChangeType.Delete,
278
+ start: arg.getStart(),
279
+ length: arg.getEnd() - arg.getStart(),
280
+ });
281
+ }
282
+ else {
283
+ const propIndex = arg.properties.indexOf(svgrProp);
284
+ const isLastProp = propIndex === arg.properties.length - 1;
285
+ const isFirstProp = propIndex === 0;
286
+ let removeStart = svgrProp.getFullStart();
287
+ let removeEnd = svgrProp.getEnd();
288
+ if (!isLastProp) {
289
+ const nextProp = arg.properties[propIndex + 1];
290
+ removeEnd = nextProp.getFullStart();
291
+ }
292
+ else if (!isFirstProp) {
293
+ const prevProp = arg.properties[propIndex - 1];
294
+ const textBetween = content.substring(prevProp.getEnd(), svgrProp.getFullStart());
295
+ const commaIndex = textBetween.indexOf(',');
296
+ if (commaIndex !== -1) {
297
+ removeStart = prevProp.getEnd() + commaIndex;
298
+ }
299
+ }
300
+ changes.push({
301
+ type: devkit_1.ChangeType.Delete,
302
+ start: removeStart,
303
+ length: removeEnd - removeStart,
304
+ });
305
+ }
279
306
  if (config.svgrOptions) {
280
307
  const composePluginsCalls = (0, tsquery_1.query)(sourceFile, 'CallExpression[expression.name=composePlugins]');
281
308
  if (composePluginsCalls.length > 0) {
@@ -0,0 +1,9 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ export default function migrateCreateNodesV2ToCreateNodes(tree: Tree): Promise<void>;
3
+ /**
4
+ * Rewrites named imports and re-exports of `createNodesV2` to `createNodes`
5
+ * when they come from one of the given module specifiers. Only the named
6
+ * bindings are touched — the module specifier, the `import`/`export` keyword,
7
+ * any `type` modifier, and any default import are left untouched.
8
+ */
9
+ export declare function rewriteCreateNodesV2Imports(source: string, specifiers: ReadonlySet<string>): string;
@@ -0,0 +1,225 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = migrateCreateNodesV2ToCreateNodes;
4
+ exports.rewriteCreateNodesV2Imports = rewriteCreateNodesV2Imports;
5
+ const devkit_1 = require("@nx/devkit");
6
+ const TS_EXTENSIONS = ['.ts', '.tsx', '.cts', '.mts'];
7
+ const DEPRECATED_NAME = 'createNodesV2';
8
+ const CANONICAL_NAME = 'createNodes';
9
+ // Module specifiers from which `@nx/react` publicly exposes `createNodesV2`.
10
+ // A named import or re-export of `createNodesV2` from one of these is rewritten
11
+ // to the canonical `createNodes` export.
12
+ const TARGET_SPECIFIERS = new Set([
13
+ '@nx/react/router-plugin',
14
+ ]);
15
+ let ts;
16
+ async function migrateCreateNodesV2ToCreateNodes(tree) {
17
+ let touchedCount = 0;
18
+ (0, devkit_1.visitNotIgnoredFiles)(tree, '.', (filePath) => {
19
+ if (!TS_EXTENSIONS.some((ext) => filePath.endsWith(ext))) {
20
+ return;
21
+ }
22
+ const original = tree.read(filePath, 'utf-8');
23
+ if (!original || !original.includes(DEPRECATED_NAME)) {
24
+ return;
25
+ }
26
+ const updated = rewriteCreateNodesV2Imports(original, TARGET_SPECIFIERS);
27
+ if (updated !== original) {
28
+ tree.write(filePath, updated);
29
+ touchedCount += 1;
30
+ }
31
+ });
32
+ if (touchedCount > 0) {
33
+ devkit_1.logger.info(`Renamed \`${DEPRECATED_NAME}\` imports to \`${CANONICAL_NAME}\` in ${touchedCount} file(s).`);
34
+ }
35
+ await (0, devkit_1.formatFiles)(tree);
36
+ }
37
+ /**
38
+ * Rewrites named imports and re-exports of `createNodesV2` to `createNodes`
39
+ * when they come from one of the given module specifiers. Only the named
40
+ * bindings are touched — the module specifier, the `import`/`export` keyword,
41
+ * any `type` modifier, and any default import are left untouched.
42
+ */
43
+ function rewriteCreateNodesV2Imports(source, specifiers) {
44
+ ts ??= (0, devkit_1.ensurePackage)('typescript', '*');
45
+ const sourceFile = ts.createSourceFile('tmp.ts', source, ts.ScriptTarget.Latest,
46
+ /* setParentNodes */ true, ts.ScriptKind.TSX);
47
+ const changes = [];
48
+ let renameLocalUsages = false;
49
+ for (const stmt of sourceFile.statements) {
50
+ if (ts.isImportDeclaration(stmt)) {
51
+ renameLocalUsages =
52
+ collectImportRewrite(sourceFile, stmt, specifiers, changes) ||
53
+ renameLocalUsages;
54
+ }
55
+ else if (ts.isExportDeclaration(stmt)) {
56
+ collectExportRewrite(sourceFile, stmt, specifiers, changes);
57
+ }
58
+ }
59
+ // Renaming a local `createNodesV2` import binding to `createNodes` (a lone
60
+ // `{ createNodesV2 }`, or one deduped against an existing `createNodes`)
61
+ // changes the name in scope, so value references to `createNodesV2` in the
62
+ // file body must be renamed too — otherwise they dangle. Aliased imports and
63
+ // re-exports keep their local name, so they never trigger this.
64
+ if (renameLocalUsages) {
65
+ collectValueUsageRewrites(sourceFile, changes);
66
+ }
67
+ return changes.length > 0 ? (0, devkit_1.applyChangesToString)(source, changes) : source;
68
+ }
69
+ function isTargetSpecifier(node, specifiers) {
70
+ return ts.isStringLiteral(node) && specifiers.has(node.text);
71
+ }
72
+ function collectImportRewrite(sourceFile, stmt, specifiers, changes) {
73
+ if (!isTargetSpecifier(stmt.moduleSpecifier, specifiers)) {
74
+ return false;
75
+ }
76
+ const namedBindings = stmt.importClause?.namedBindings;
77
+ // Only `import { ... }` carries renameable named bindings. `import x`,
78
+ // `import * as ns`, and side-effect imports reference the module wholesale
79
+ // and keep working through the `createNodesV2` runtime alias, so we leave
80
+ // them be. A mixed `import def, { createNodesV2 }` still has its named
81
+ // bindings rewritten below — the default binding is untouched.
82
+ if (!namedBindings || !ts.isNamedImports(namedBindings)) {
83
+ return false;
84
+ }
85
+ // The local `createNodesV2` binding only disappears when it is imported
86
+ // without an alias — a lone `{ createNodesV2 }` or one deduped against an
87
+ // existing `createNodes`. `{ createNodesV2 as x }` keeps the local `x`, so
88
+ // its in-file usages are unaffected and must not be rewritten.
89
+ const localBindingRenamed = namedBindings.elements.some((el) => el.name.text === DEPRECATED_NAME &&
90
+ (el.propertyName ?? el.name).text === DEPRECATED_NAME);
91
+ rewriteNamedBindings(sourceFile, namedBindings, changes);
92
+ return localBindingRenamed;
93
+ }
94
+ function collectExportRewrite(sourceFile, stmt, specifiers, changes) {
95
+ if (!stmt.moduleSpecifier ||
96
+ !isTargetSpecifier(stmt.moduleSpecifier, specifiers)) {
97
+ return;
98
+ }
99
+ // `export { ... } from '...'` can be rewritten; `export * from '...'` has no
100
+ // named bindings to rename.
101
+ if (!stmt.exportClause || !ts.isNamedExports(stmt.exportClause)) {
102
+ return;
103
+ }
104
+ rewriteNamedBindings(sourceFile, stmt.exportClause, changes);
105
+ }
106
+ /**
107
+ * Re-renders the `{ ... }` of a named import/export, renaming any
108
+ * `createNodesV2` specifier to `createNodes`. If renaming would collide with a
109
+ * `createNodes` that is already present (e.g. `{ createNodes, createNodesV2 }`),
110
+ * the duplicate is dropped. Returns without recording a change when the binding
111
+ * list contains no `createNodesV2`.
112
+ */
113
+ function rewriteNamedBindings(sourceFile, namedBindings, changes) {
114
+ const elements = namedBindings.elements;
115
+ const hasDeprecated = elements.some((el) => (el.propertyName ?? el.name).text === DEPRECATED_NAME);
116
+ if (!hasDeprecated) {
117
+ return;
118
+ }
119
+ const seen = new Set();
120
+ const rendered = [];
121
+ for (const el of elements) {
122
+ const text = renderSpecifier(el);
123
+ if (!seen.has(text)) {
124
+ seen.add(text);
125
+ rendered.push(text);
126
+ }
127
+ }
128
+ const start = namedBindings.getStart(sourceFile);
129
+ changes.push({
130
+ type: devkit_1.ChangeType.Delete,
131
+ start,
132
+ length: namedBindings.getEnd() - start,
133
+ }, {
134
+ type: devkit_1.ChangeType.Insert,
135
+ index: start,
136
+ text: `{ ${rendered.join(', ')} }`,
137
+ });
138
+ }
139
+ function renderSpecifier(el) {
140
+ const typePrefix = el.isTypeOnly ? 'type ' : '';
141
+ const rename = (name) => name === DEPRECATED_NAME ? CANONICAL_NAME : name;
142
+ // `{ name }` — no alias, so the local binding follows the rename.
143
+ if (!el.propertyName) {
144
+ return `${typePrefix}${rename(el.name.text)}`;
145
+ }
146
+ // `{ propertyName as name }` — only the imported (left) side is renamed; the
147
+ // local alias is preserved. A now-redundant alias such as
148
+ // `createNodesV2 as createNodes` collapses to `createNodes`.
149
+ const canonicalImported = rename(el.propertyName.text);
150
+ const localName = el.name.text;
151
+ return canonicalImported === localName
152
+ ? `${typePrefix}${localName}`
153
+ : `${typePrefix}${canonicalImported} as ${localName}`;
154
+ }
155
+ /**
156
+ * Renames value references of `createNodesV2` to `createNodes` in the file
157
+ * body. Only called once a local `createNodesV2` import binding has actually
158
+ * been renamed, so these references would otherwise dangle. Occurrences that
159
+ * are not references to that binding are skipped: the import/export
160
+ * declarations themselves, property accesses (`x.createNodesV2`), qualified
161
+ * type names, object-literal keys, and declaration names that shadow the
162
+ * import. A shorthand property (`{ createNodesV2 }`) is expanded to
163
+ * `{ createNodesV2: createNodes }` so the property key is preserved. Strings
164
+ * and comments are never `Identifier` nodes, so they are left alone.
165
+ */
166
+ function collectValueUsageRewrites(sourceFile, changes) {
167
+ const visit = (node) => {
168
+ if (ts.isIdentifier(node) &&
169
+ node.text === DEPRECATED_NAME &&
170
+ isRenamableValueUsage(node)) {
171
+ const start = node.getStart(sourceFile);
172
+ changes.push({
173
+ type: devkit_1.ChangeType.Delete,
174
+ start,
175
+ length: node.getEnd() - start,
176
+ }, {
177
+ type: devkit_1.ChangeType.Insert,
178
+ index: start,
179
+ text: ts.isShorthandPropertyAssignment(node.parent)
180
+ ? `${DEPRECATED_NAME}: ${CANONICAL_NAME}`
181
+ : CANONICAL_NAME,
182
+ });
183
+ }
184
+ node.forEachChild(visit);
185
+ };
186
+ sourceFile.forEachChild(visit);
187
+ }
188
+ /**
189
+ * Whether a `createNodesV2` identifier is a value reference to the renamed
190
+ * import binding, as opposed to a position that must be left untouched.
191
+ */
192
+ function isRenamableValueUsage(node) {
193
+ const parent = node.parent;
194
+ if (!parent) {
195
+ return false;
196
+ }
197
+ // Import/export bindings — already handled by the declaration rewrite.
198
+ if (ts.isImportSpecifier(parent) ||
199
+ ts.isExportSpecifier(parent) ||
200
+ ts.isImportClause(parent) ||
201
+ ts.isNamespaceImport(parent)) {
202
+ return false;
203
+ }
204
+ // `x.createNodesV2` / `X.createNodesV2` — a member name, not the binding.
205
+ if (ts.isPropertyAccessExpression(parent) && parent.name === node) {
206
+ return false;
207
+ }
208
+ if (ts.isQualifiedName(parent) && parent.right === node) {
209
+ return false;
210
+ }
211
+ // `{ createNodesV2: ... }` — an object-literal key, not the binding.
212
+ if (ts.isPropertyAssignment(parent) && parent.name === node) {
213
+ return false;
214
+ }
215
+ // A declaration whose name shadows the import (variable, param, etc.).
216
+ if ((ts.isVariableDeclaration(parent) ||
217
+ ts.isParameter(parent) ||
218
+ ts.isBindingElement(parent) ||
219
+ ts.isFunctionDeclaration(parent) ||
220
+ ts.isClassDeclaration(parent)) &&
221
+ parent.name === node) {
222
+ return false;
223
+ }
224
+ return true;
225
+ }
@@ -0,0 +1,25 @@
1
+ #### Rename `createNodesV2` imports to `createNodes`
2
+
3
+ `@nx/react` renamed its primary inferred-plugin export from `createNodesV2` to `createNodes`. The `createNodesV2` name is preserved as a deprecated alias for now, but new code should use `createNodes`.
4
+
5
+ This migration scans every `.ts`, `.tsx`, `.cts`, and `.mts` file in your workspace and rewrites named imports and re-exports of `createNodesV2` from `@nx/react/router-plugin` to `createNodes`.
6
+
7
+ #### Sample Code Changes
8
+
9
+ ##### Before
10
+
11
+ ```ts
12
+ import { createNodesV2 } from '@nx/react/router-plugin';
13
+ ```
14
+
15
+ ##### After
16
+
17
+ ```ts
18
+ import { createNodes } from '@nx/react/router-plugin';
19
+ ```
20
+
21
+ Aliases are preserved (`createNodesV2 as cn` becomes `createNodes as cn`), and if a file already imports both names (`{ createNodes, createNodesV2 }`) the redundant binding is dropped.
22
+
23
+ #### What is not rewritten
24
+
25
+ Only static `import`/`export` named bindings from `@nx/react/router-plugin` are rewritten. Namespace imports, dynamic `import(...)`, `require(...)` destructuring, and property access such as `plugin.createNodesV2` are left untouched — they keep working through the `createNodesV2` runtime alias. Update those by hand if you want to drop the deprecated name everywhere.
@@ -0,0 +1,2 @@
1
+ import { Tree } from '@nx/devkit';
2
+ export default function removeNxReactWebpackPluginImport(tree: Tree): Promise<void>;
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = removeNxReactWebpackPluginImport;
4
+ const devkit_1 = require("@nx/devkit");
5
+ const tsquery_1 = require("@phenomnomnominal/tsquery");
6
+ const DEPRECATED_SYMBOL = 'NxReactWebpackPlugin';
7
+ const DEPRECATED_PACKAGE = '@nx/react';
8
+ const NEW_PACKAGE = '@nx/react/webpack-plugin';
9
+ // ES module import: import { NxReactWebpackPlugin[, ...] } from '@nx/react'
10
+ const ES_IMPORT_SELECTOR = `ImportDeclaration:has(StringLiteral[value=${DEPRECATED_PACKAGE}]):has(ImportClause ImportSpecifier > Identifier[name=${DEPRECATED_SYMBOL}])`;
11
+ const IMPORT_SPECIFIERS_SELECTOR = `ImportClause ImportSpecifier`;
12
+ const TARGET_IMPORT_SPECIFIER_SELECTOR = `ImportClause ImportSpecifier > Identifier[name=${DEPRECATED_SYMBOL}]`;
13
+ const ES_MODULE_PATH_SELECTOR = `StringLiteral[value=${DEPRECATED_PACKAGE}]`;
14
+ // CJS require: const { NxReactWebpackPlugin[, ...] } = require('@nx/react')
15
+ const CJS_REQUIRE_STMT_SELECTOR = `VariableStatement:has(ObjectBindingPattern > BindingElement > Identifier[name=${DEPRECATED_SYMBOL}]):has(CallExpression:has(Identifier[name=require]) > StringLiteral[value=${DEPRECATED_PACKAGE}])`;
16
+ const CJS_BINDING_ELEMENTS_SELECTOR = `ObjectBindingPattern > BindingElement`;
17
+ const CJS_TARGET_BINDING_SELECTOR = `ObjectBindingPattern > BindingElement > Identifier[name=${DEPRECATED_SYMBOL}]`;
18
+ const CJS_REQUIRE_PATH_SELECTOR = `CallExpression:has(Identifier[name=require]) > StringLiteral[value=${DEPRECATED_PACKAGE}]`;
19
+ // Walk past whitespace from `fromIndex` to find a trailing comma. Returns the
20
+ // position AFTER the comma if found, otherwise the original index. Handles
21
+ // the `Foo , withReact` shape where the user wrote whitespace before the
22
+ // comma — `node.getEnd()` stops at the identifier and the comma sits one
23
+ // character past the whitespace.
24
+ function endAfterTrailingComma(text, fromIndex) {
25
+ let i = fromIndex;
26
+ while (i < text.length && /\s/.test(text.charAt(i)))
27
+ i++;
28
+ return text.charAt(i) === ',' ? i + 1 : fromIndex;
29
+ }
30
+ async function removeNxReactWebpackPluginImport(tree) {
31
+ (0, devkit_1.visitNotIgnoredFiles)(tree, '', (filePath) => {
32
+ if (!filePath.endsWith('.ts') &&
33
+ !filePath.endsWith('.tsx') &&
34
+ !filePath.endsWith('.js') &&
35
+ !filePath.endsWith('.jsx') &&
36
+ !filePath.endsWith('.cjs') &&
37
+ !filePath.endsWith('.mjs')) {
38
+ return;
39
+ }
40
+ let contents = tree.read(filePath, 'utf-8');
41
+ if (!contents)
42
+ return;
43
+ // Quick check: must contain the deprecated symbol and the deprecated package path
44
+ if (!contents.includes(DEPRECATED_SYMBOL) ||
45
+ (!contents.includes(`'${DEPRECATED_PACKAGE}'`) &&
46
+ !contents.includes(`"${DEPRECATED_PACKAGE}"`))) {
47
+ return;
48
+ }
49
+ let changed = false;
50
+ // Re-parse on every iteration so multiple matches in the same file work
51
+ // correctly. The multi-specifier branch prepends a new declaration which
52
+ // shifts every offset; collected AST positions go stale after one rewrite,
53
+ // so process one match at a time.
54
+ let didRewrite = true;
55
+ while (didRewrite) {
56
+ didRewrite = false;
57
+ const sourceFile = (0, tsquery_1.ast)(contents);
58
+ const importNode = (0, tsquery_1.query)(sourceFile, ES_IMPORT_SELECTOR)[0];
59
+ if (importNode) {
60
+ const specifiers = (0, tsquery_1.query)(importNode, IMPORT_SPECIFIERS_SELECTOR);
61
+ const targetIdentifier = (0, tsquery_1.query)(importNode, TARGET_IMPORT_SPECIFIER_SELECTOR)[0];
62
+ if (targetIdentifier) {
63
+ // Walk to the ImportSpecifier to cover `Foo` and `Foo as Bar`.
64
+ const targetSpec = targetIdentifier.parent;
65
+ if (specifiers.length === 1) {
66
+ const modulePathNode = (0, tsquery_1.query)(importNode, ES_MODULE_PATH_SELECTOR)[0];
67
+ if (modulePathNode) {
68
+ contents =
69
+ contents.slice(0, modulePathNode.getStart()) +
70
+ `'${NEW_PACKAGE}'` +
71
+ contents.slice(modulePathNode.getEnd());
72
+ changed = true;
73
+ didRewrite = true;
74
+ continue;
75
+ }
76
+ }
77
+ else {
78
+ // Extract target spec verbatim (preserves alias)
79
+ const end = endAfterTrailingComma(contents, targetSpec.getEnd());
80
+ contents =
81
+ `import { ${targetSpec.getText()} } from '${NEW_PACKAGE}';\n` +
82
+ contents.slice(0, targetSpec.getStart()) +
83
+ contents.slice(end);
84
+ changed = true;
85
+ didRewrite = true;
86
+ continue;
87
+ }
88
+ }
89
+ }
90
+ const stmtNode = (0, tsquery_1.query)(sourceFile, CJS_REQUIRE_STMT_SELECTOR)[0];
91
+ if (stmtNode) {
92
+ const bindingElements = (0, tsquery_1.query)(stmtNode, CJS_BINDING_ELEMENTS_SELECTOR);
93
+ const targetIdentifier = (0, tsquery_1.query)(stmtNode, CJS_TARGET_BINDING_SELECTOR)[0];
94
+ if (targetIdentifier) {
95
+ // Walk to the BindingElement to cover `Foo` and `Foo: Bar`.
96
+ const targetBinding = targetIdentifier.parent;
97
+ if (bindingElements.length === 1) {
98
+ const requirePathNode = (0, tsquery_1.query)(stmtNode, CJS_REQUIRE_PATH_SELECTOR)[0];
99
+ if (requirePathNode) {
100
+ contents =
101
+ contents.slice(0, requirePathNode.getStart()) +
102
+ `'${NEW_PACKAGE}'` +
103
+ contents.slice(requirePathNode.getEnd());
104
+ changed = true;
105
+ didRewrite = true;
106
+ continue;
107
+ }
108
+ }
109
+ else {
110
+ // Extract target binding verbatim (preserves alias)
111
+ const end = endAfterTrailingComma(contents, targetBinding.getEnd());
112
+ contents =
113
+ `const { ${targetBinding.getText()} } = require('${NEW_PACKAGE}');\n` +
114
+ contents.slice(0, targetBinding.getStart()) +
115
+ contents.slice(end);
116
+ changed = true;
117
+ didRewrite = true;
118
+ continue;
119
+ }
120
+ }
121
+ }
122
+ }
123
+ if (changed) {
124
+ tree.write(filePath, contents);
125
+ }
126
+ });
127
+ await (0, devkit_1.formatFiles)(tree);
128
+ }
@@ -0,0 +1,52 @@
1
+ #### Rewrite `NxReactWebpackPlugin` Imports to the `@nx/react/webpack-plugin` Sub-path
2
+
3
+ The deprecated re-export of `NxReactWebpackPlugin` from `@nx/react` is removed in v23. The migration rewrites both ES module imports and CJS `require()` calls to use the `@nx/react/webpack-plugin` sub-path. Imports that combine the deprecated symbol with other named imports are split into two declarations so the rest of the original import still resolves from `@nx/react`. Aliases (`as Plugin`, `: Plugin`) are preserved.
4
+
5
+ #### Sample Code Changes
6
+
7
+ ES module import.
8
+
9
+ ##### Before
10
+
11
+ ```ts title="apps/my-app/webpack.config.ts" {1}
12
+ import { NxReactWebpackPlugin } from '@nx/react';
13
+
14
+ export default { plugins: [new NxReactWebpackPlugin()] };
15
+ ```
16
+
17
+ ##### After
18
+
19
+ ```ts title="apps/my-app/webpack.config.ts"
20
+ import { NxReactWebpackPlugin } from '@nx/react/webpack-plugin';
21
+
22
+ export default { plugins: [new NxReactWebpackPlugin()] };
23
+ ```
24
+
25
+ ES module import combined with other named imports.
26
+
27
+ ##### Before
28
+
29
+ ```ts title="apps/my-app/webpack.config.ts" {1}
30
+ import { NxReactWebpackPlugin, withReact } from '@nx/react';
31
+ ```
32
+
33
+ ##### After
34
+
35
+ ```ts title="apps/my-app/webpack.config.ts"
36
+ import { NxReactWebpackPlugin } from '@nx/react/webpack-plugin';
37
+ import { withReact } from '@nx/react';
38
+ ```
39
+
40
+ CJS `require()`.
41
+
42
+ ##### Before
43
+
44
+ ```js title="apps/my-app/webpack.config.js" {1}
45
+ const { NxReactWebpackPlugin } = require('@nx/react');
46
+ ```
47
+
48
+ ##### After
49
+
50
+ ```js title="apps/my-app/webpack.config.js"
51
+ const { NxReactWebpackPlugin } = require('@nx/react/webpack-plugin');
52
+ ```
@@ -0,0 +1,3 @@
1
+ import { type Tree } from '@nx/devkit';
2
+ export default function rewriteInternalSubpathImports(tree: Tree): Promise<void>;
3
+ export declare function rewriteSubpathImports(source: string): string;