@nx/angular 24.0.0-pr.37405.acdaf31 → 24.0.0-rc.1

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 (280) hide show
  1. package/dist/executors.d.ts +0 -2
  2. package/dist/executors.js +0 -2
  3. package/dist/fesm2022/nx-angular.mjs +0 -4
  4. package/dist/generators.d.ts +0 -8
  5. package/dist/generators.js +0 -8
  6. package/dist/ready-check.d.ts +1 -0
  7. package/dist/ready-check.js +8 -0
  8. package/dist/src/executors/application/schema.json +1 -2
  9. package/dist/src/executors/ng-packagr-lite/ng-packagr-adjustments/ng-package/entry-point/write-bundles.transform.js +9 -1
  10. package/dist/src/executors/unit-test/schema.json +6 -1
  11. package/dist/src/executors/unit-test/unit-test.impl.js +5 -0
  12. package/dist/src/executors/utilities/ng-packagr/stylesheet-processor.js +35 -10
  13. package/dist/src/generators/add-linting/add-linting.js +1 -3
  14. package/dist/src/generators/add-linting/schema.d.ts +0 -5
  15. package/dist/src/generators/add-linting/schema.json +0 -6
  16. package/dist/src/generators/application/application.js +1 -2
  17. package/dist/src/generators/application/lib/add-e2e.js +3 -8
  18. package/dist/src/generators/application/lib/add-linting.js +1 -3
  19. package/dist/src/generators/application/lib/add-serve-static-target.js +2 -0
  20. package/dist/src/generators/application/lib/add-unit-test-runner.js +0 -2
  21. package/dist/src/generators/application/lib/create-project.js +2 -0
  22. package/dist/src/generators/application/lib/normalize-options.d.ts +1 -1
  23. package/dist/src/generators/application/lib/normalize-options.js +1 -8
  24. package/dist/src/generators/application/schema.d.ts +0 -5
  25. package/dist/src/generators/application/schema.json +1 -7
  26. package/dist/src/generators/convert-to-rspack/convert-to-rspack.js +9 -4
  27. package/dist/src/generators/convert-to-rspack/lib/get-custom-webpack-config.d.ts +1 -2
  28. package/dist/src/generators/convert-to-rspack/lib/get-custom-webpack-config.js +0 -63
  29. package/dist/src/generators/convert-to-rspack/lib/validate-no-module-federation.d.ts +2 -0
  30. package/dist/src/generators/convert-to-rspack/lib/validate-no-module-federation.js +32 -0
  31. package/dist/src/generators/cypress-component-configuration/cypress-component-configuration.js +3 -15
  32. package/dist/src/generators/init/init.js +1 -2
  33. package/dist/src/generators/init/schema.d.ts +0 -2
  34. package/dist/src/generators/library/lib/normalized-schema.d.ts +0 -4
  35. package/dist/src/generators/library/library.js +3 -4
  36. package/dist/src/generators/library/schema.d.ts +0 -5
  37. package/dist/src/generators/library/schema.json +0 -6
  38. package/dist/src/generators/ng-add/migrators/builders/angular-eslint-lint.migrator.js +12 -1
  39. package/dist/src/generators/ng-add/migrators/projects/app.migrator.d.ts +1 -0
  40. package/dist/src/generators/ng-add/migrators/projects/app.migrator.js +22 -0
  41. package/dist/src/generators/ng-add/migrators/projects/e2e.migrator.js +12 -16
  42. package/dist/src/generators/ng-add/utilities/workspace.js +1 -3
  43. package/dist/src/generators/setup-ssr/files/v20+/application-builder/server/__serverFileName__ +15 -1
  44. package/dist/src/generators/setup-ssr/lib/add-dependencies.js +4 -0
  45. package/dist/src/generators/setup-ssr/lib/update-project-config.js +1 -0
  46. package/dist/src/generators/storybook-configuration/lib/generate-storybook-configuration.js +0 -2
  47. package/dist/src/generators/utils/add-jest.d.ts +0 -1
  48. package/dist/src/generators/utils/add-jest.js +0 -2
  49. package/dist/src/generators/utils/add-vitest.d.ts +0 -1
  50. package/dist/src/generators/utils/add-vitest.js +0 -1
  51. package/dist/src/generators/utils/testing.d.ts +4 -4
  52. package/dist/src/generators/utils/testing.js +19 -12
  53. package/dist/src/migrations/update-23-1-0/add-angular-build.js +7 -3
  54. package/dist/src/migrations/update-23-1-0/add-angular-build.md +1 -1
  55. package/dist/src/migrations/update-23-1-0/add-trust-proxy-headers.js +9 -2
  56. package/dist/src/migrations/update-24-0-0/add-ready-when-signal.d.ts +4 -0
  57. package/dist/src/migrations/update-24-0-0/add-ready-when-signal.js +12 -0
  58. package/dist/src/migrations/update-24-0-0/add-ready-when-signal.md +59 -0
  59. package/dist/src/migrations/update-24-0-0/remove-scam-generator-defaults.d.ts +2 -0
  60. package/dist/src/migrations/update-24-0-0/remove-scam-generator-defaults.js +85 -0
  61. package/dist/src/migrations/update-24-0-0/remove-scam-generator-defaults.md +48 -0
  62. package/dist/src/migrations/update-24-0-0/upgrade-to-angular-22-2.d.ts +5 -0
  63. package/dist/src/migrations/update-24-0-0/upgrade-to-angular-22-2.js +332 -0
  64. package/dist/src/migrations/update-24-0-0/upgrade-to-angular-22-2.md +46 -0
  65. package/dist/src/plugins/plugin.js +3 -5
  66. package/dist/src/plugins/utils/dev-server-ready-check.d.ts +17 -0
  67. package/dist/src/plugins/utils/dev-server-ready-check.js +213 -0
  68. package/dist/src/utils/assert-cypress-component-testing-support.js +10 -0
  69. package/dist/src/utils/backward-compatible-versions.js +0 -8
  70. package/dist/src/utils/versions.d.ts +4 -8
  71. package/dist/src/utils/versions.js +5 -9
  72. package/dist/types/nx-angular.d.ts +1 -3
  73. package/executors.json +0 -10
  74. package/generators.json +0 -59
  75. package/migrations.json +109 -0
  76. package/package.json +13 -21
  77. package/dist/.npmignore +0 -2
  78. package/dist/fesm2022/nx-angular-mf.mjs +0 -193
  79. package/dist/fesm2022/nx-angular-mf.mjs.map +0 -1
  80. package/dist/fesm2022/nx-angular.mjs.map +0 -1
  81. package/dist/mf/package.json +0 -4
  82. package/dist/src/builders/utilities/module-federation.d.ts +0 -11
  83. package/dist/src/builders/utilities/module-federation.js +0 -109
  84. package/dist/src/executors/module-federation-dev-server/lib/index.d.ts +0 -2
  85. package/dist/src/executors/module-federation-dev-server/lib/index.js +0 -5
  86. package/dist/src/executors/module-federation-dev-server/lib/normalize-options.d.ts +0 -2
  87. package/dist/src/executors/module-federation-dev-server/lib/normalize-options.js +0 -22
  88. package/dist/src/executors/module-federation-dev-server/lib/start-dev-remotes.d.ts +0 -5
  89. package/dist/src/executors/module-federation-dev-server/lib/start-dev-remotes.js +0 -29
  90. package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.d.ts +0 -4
  91. package/dist/src/executors/module-federation-dev-server/module-federation-dev-server.impl.js +0 -111
  92. package/dist/src/executors/module-federation-dev-server/schema.d.ts +0 -38
  93. package/dist/src/executors/module-federation-dev-server/schema.json +0 -171
  94. package/dist/src/executors/module-federation-ssr-dev-server/lib/normalize-options.d.ts +0 -2
  95. package/dist/src/executors/module-federation-ssr-dev-server/lib/normalize-options.js +0 -20
  96. package/dist/src/executors/module-federation-ssr-dev-server/lib/start-dev-remotes.d.ts +0 -5
  97. package/dist/src/executors/module-federation-ssr-dev-server/lib/start-dev-remotes.js +0 -30
  98. package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.d.ts +0 -4
  99. package/dist/src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl.js +0 -110
  100. package/dist/src/executors/module-federation-ssr-dev-server/schema.d.ts +0 -17
  101. package/dist/src/executors/module-federation-ssr-dev-server/schema.json +0 -124
  102. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.d.ts +0 -4
  103. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.js +0 -36
  104. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.d.ts +0 -5
  105. package/dist/src/generators/convert-to-with-mf/convert-to-with-mf.test-data.js +0 -448
  106. package/dist/src/generators/convert-to-with-mf/lib/check-name-matches.d.ts +0 -2
  107. package/dist/src/generators/convert-to-with-mf/lib/check-name-matches.js +0 -22
  108. package/dist/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.d.ts +0 -2
  109. package/dist/src/generators/convert-to-with-mf/lib/check-shared-npm-packages.js +0 -45
  110. package/dist/src/generators/convert-to-with-mf/lib/get-webpack-config-path.d.ts +0 -2
  111. package/dist/src/generators/convert-to-with-mf/lib/get-webpack-config-path.js +0 -18
  112. package/dist/src/generators/convert-to-with-mf/lib/index.d.ts +0 -6
  113. package/dist/src/generators/convert-to-with-mf/lib/index.js +0 -9
  114. package/dist/src/generators/convert-to-with-mf/lib/is-host-remote-config.d.ts +0 -5
  115. package/dist/src/generators/convert-to-with-mf/lib/is-host-remote-config.js +0 -57
  116. package/dist/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.d.ts +0 -2
  117. package/dist/src/generators/convert-to-with-mf/lib/parse-ast-webpack-config.js +0 -13
  118. package/dist/src/generators/convert-to-with-mf/lib/write-new-webpack-config.d.ts +0 -3
  119. package/dist/src/generators/convert-to-with-mf/lib/write-new-webpack-config.js +0 -50
  120. package/dist/src/generators/convert-to-with-mf/schema.d.ts +0 -4
  121. package/dist/src/generators/convert-to-with-mf/schema.json +0 -33
  122. package/dist/src/generators/federate-module/federate-module.d.ts +0 -4
  123. package/dist/src/generators/federate-module/federate-module.js +0 -49
  124. package/dist/src/generators/federate-module/lib/add-file-to-remote-tsconfig.d.ts +0 -2
  125. package/dist/src/generators/federate-module/lib/add-file-to-remote-tsconfig.js +0 -14
  126. package/dist/src/generators/federate-module/lib/add-path-to-exposes.d.ts +0 -8
  127. package/dist/src/generators/federate-module/lib/add-path-to-exposes.js +0 -77
  128. package/dist/src/generators/federate-module/lib/add-path-to-ts-config.d.ts +0 -8
  129. package/dist/src/generators/federate-module/lib/add-path-to-ts-config.js +0 -11
  130. package/dist/src/generators/federate-module/lib/add-remote.d.ts +0 -7
  131. package/dist/src/generators/federate-module/lib/add-remote.js +0 -42
  132. package/dist/src/generators/federate-module/lib/check-remote-exists.d.ts +0 -2
  133. package/dist/src/generators/federate-module/lib/check-remote-exists.js +0 -21
  134. package/dist/src/generators/federate-module/lib/index.d.ts +0 -4
  135. package/dist/src/generators/federate-module/lib/index.js +0 -7
  136. package/dist/src/generators/federate-module/schema.d.ts +0 -13
  137. package/dist/src/generators/federate-module/schema.json +0 -83
  138. package/dist/src/generators/host/files/common/src/main.server.ts__tmpl__ +0 -78
  139. package/dist/src/generators/host/files/js/webpack.server.config.js__tmpl__ +0 -8
  140. package/dist/src/generators/host/files/ts/webpack.server.config.ts__tmpl__ +0 -9
  141. package/dist/src/generators/host/host.d.ts +0 -4
  142. package/dist/src/generators/host/host.js +0 -133
  143. package/dist/src/generators/host/lib/index.d.ts +0 -2
  144. package/dist/src/generators/host/lib/index.js +0 -5
  145. package/dist/src/generators/host/lib/update-ssr-setup.d.ts +0 -3
  146. package/dist/src/generators/host/lib/update-ssr-setup.js +0 -54
  147. package/dist/src/generators/host/lib/validate-options.d.ts +0 -3
  148. package/dist/src/generators/host/lib/validate-options.js +0 -12
  149. package/dist/src/generators/host/schema.d.ts +0 -36
  150. package/dist/src/generators/host/schema.json +0 -195
  151. package/dist/src/generators/remote/files/base/webpack.server.config.js__tmpl__ +0 -9
  152. package/dist/src/generators/remote/files/base-ts/webpack.server.config.ts__tmpl__ +0 -9
  153. package/dist/src/generators/remote/files/common/src/main.server.ts__tmpl__ +0 -84
  154. package/dist/src/generators/remote/files/standalone/src/bootstrap.server.ts__tmpl__ +0 -12
  155. package/dist/src/generators/remote/lib/find-next-available-port.d.ts +0 -2
  156. package/dist/src/generators/remote/lib/find-next-available-port.js +0 -16
  157. package/dist/src/generators/remote/lib/index.d.ts +0 -3
  158. package/dist/src/generators/remote/lib/index.js +0 -6
  159. package/dist/src/generators/remote/lib/update-ssr-setup.d.ts +0 -9
  160. package/dist/src/generators/remote/lib/update-ssr-setup.js +0 -82
  161. package/dist/src/generators/remote/lib/validate-options.d.ts +0 -3
  162. package/dist/src/generators/remote/lib/validate-options.js +0 -12
  163. package/dist/src/generators/remote/remote.d.ts +0 -4
  164. package/dist/src/generators/remote/remote.js +0 -114
  165. package/dist/src/generators/remote/schema.d.ts +0 -34
  166. package/dist/src/generators/remote/schema.json +0 -184
  167. package/dist/src/generators/scam/lib/convert-component-to-scam.d.ts +0 -3
  168. package/dist/src/generators/scam/lib/convert-component-to-scam.js +0 -41
  169. package/dist/src/generators/scam/lib/index.d.ts +0 -2
  170. package/dist/src/generators/scam/lib/index.js +0 -5
  171. package/dist/src/generators/scam/lib/normalize-options.d.ts +0 -3
  172. package/dist/src/generators/scam/lib/normalize-options.js +0 -34
  173. package/dist/src/generators/scam/scam.d.ts +0 -7
  174. package/dist/src/generators/scam/scam.js +0 -28
  175. package/dist/src/generators/scam/schema.d.ts +0 -30
  176. package/dist/src/generators/scam/schema.json +0 -126
  177. package/dist/src/generators/scam-directive/lib/convert-directive-to-scam.d.ts +0 -3
  178. package/dist/src/generators/scam-directive/lib/convert-directive-to-scam.js +0 -41
  179. package/dist/src/generators/scam-directive/lib/index.d.ts +0 -2
  180. package/dist/src/generators/scam-directive/lib/index.js +0 -5
  181. package/dist/src/generators/scam-directive/lib/normalize-options.d.ts +0 -3
  182. package/dist/src/generators/scam-directive/lib/normalize-options.js +0 -34
  183. package/dist/src/generators/scam-directive/scam-directive.d.ts +0 -7
  184. package/dist/src/generators/scam-directive/scam-directive.js +0 -28
  185. package/dist/src/generators/scam-directive/schema.d.ts +0 -23
  186. package/dist/src/generators/scam-directive/schema.json +0 -89
  187. package/dist/src/generators/scam-pipe/lib/convert-pipe-to-scam.d.ts +0 -3
  188. package/dist/src/generators/scam-pipe/lib/convert-pipe-to-scam.js +0 -41
  189. package/dist/src/generators/scam-pipe/lib/index.d.ts +0 -2
  190. package/dist/src/generators/scam-pipe/lib/index.js +0 -5
  191. package/dist/src/generators/scam-pipe/lib/normalize-options.d.ts +0 -3
  192. package/dist/src/generators/scam-pipe/lib/normalize-options.js +0 -36
  193. package/dist/src/generators/scam-pipe/scam-pipe.d.ts +0 -7
  194. package/dist/src/generators/scam-pipe/scam-pipe.js +0 -28
  195. package/dist/src/generators/scam-pipe/schema.d.ts +0 -21
  196. package/dist/src/generators/scam-pipe/schema.json +0 -67
  197. package/dist/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.d.ts +0 -3
  198. package/dist/src/generators/scam-to-standalone/lib/convert-scam-to-standalone.js +0 -35
  199. package/dist/src/generators/scam-to-standalone/lib/get-component-data-from-ast.d.ts +0 -6
  200. package/dist/src/generators/scam-to-standalone/lib/get-component-data-from-ast.js +0 -15
  201. package/dist/src/generators/scam-to-standalone/lib/get-module-metadata-from-ast.d.ts +0 -9
  202. package/dist/src/generators/scam-to-standalone/lib/get-module-metadata-from-ast.js +0 -51
  203. package/dist/src/generators/scam-to-standalone/lib/get-target-project.d.ts +0 -2
  204. package/dist/src/generators/scam-to-standalone/lib/get-target-project.js +0 -13
  205. package/dist/src/generators/scam-to-standalone/lib/index.d.ts +0 -8
  206. package/dist/src/generators/scam-to-standalone/lib/index.js +0 -11
  207. package/dist/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.d.ts +0 -2
  208. package/dist/src/generators/scam-to-standalone/lib/replace-module-usages-with-component.js +0 -20
  209. package/dist/src/generators/scam-to-standalone/lib/selector-exists-in-ast.d.ts +0 -2
  210. package/dist/src/generators/scam-to-standalone/lib/selector-exists-in-ast.js +0 -7
  211. package/dist/src/generators/scam-to-standalone/lib/verify-is-inline-scam.d.ts +0 -2
  212. package/dist/src/generators/scam-to-standalone/lib/verify-is-inline-scam.js +0 -10
  213. package/dist/src/generators/scam-to-standalone/lib/verify-module-is-scam.d.ts +0 -1
  214. package/dist/src/generators/scam-to-standalone/lib/verify-module-is-scam.js +0 -11
  215. package/dist/src/generators/scam-to-standalone/scam-to-standalone.d.ts +0 -7
  216. package/dist/src/generators/scam-to-standalone/scam-to-standalone.js +0 -31
  217. package/dist/src/generators/scam-to-standalone/schema.d.ts +0 -5
  218. package/dist/src/generators/scam-to-standalone/schema.json +0 -32
  219. package/dist/src/generators/setup-mf/files/entry-module-files/__entryModuleFileName__.ts__tmpl__ +0 -18
  220. package/dist/src/generators/setup-mf/files/entry-module-files/entry.routes.ts__tmpl__ +0 -4
  221. package/dist/src/generators/setup-mf/files/entry-module-files/entry__componentFileSuffix__.ts__tmpl__ +0 -10
  222. package/dist/src/generators/setup-mf/files/host-files/__appFileName__.spec.ts__tmpl__ +0 -42
  223. package/dist/src/generators/setup-mf/files/standalone-entry-component-files/entry.routes.ts__tmpl__ +0 -4
  224. package/dist/src/generators/setup-mf/files/standalone-entry-component-files/entry__componentFileSuffix__.ts__tmpl__ +0 -11
  225. package/dist/src/generators/setup-mf/files/ts-webpack/module-federation.config.ts__tmpl__ +0 -27
  226. package/dist/src/generators/setup-mf/files/ts-webpack/tsconfig.lint.json__tmpl__ +0 -12
  227. package/dist/src/generators/setup-mf/files/ts-webpack/webpack.config.ts__tmpl__ +0 -9
  228. package/dist/src/generators/setup-mf/files/ts-webpack/webpack.prod.config.ts__tmpl__ +0 -21
  229. package/dist/src/generators/setup-mf/files/webpack/module-federation.config.js__tmpl__ +0 -23
  230. package/dist/src/generators/setup-mf/files/webpack/webpack.config.js__tmpl__ +0 -9
  231. package/dist/src/generators/setup-mf/files/webpack/webpack.prod.config.js__tmpl__ +0 -21
  232. package/dist/src/generators/setup-mf/lib/add-cypress-workaround.d.ts +0 -3
  233. package/dist/src/generators/setup-mf/lib/add-cypress-workaround.js +0 -52
  234. package/dist/src/generators/setup-mf/lib/add-remote-entry.d.ts +0 -3
  235. package/dist/src/generators/setup-mf/lib/add-remote-entry.js +0 -27
  236. package/dist/src/generators/setup-mf/lib/add-remote-to-host.d.ts +0 -9
  237. package/dist/src/generators/setup-mf/lib/add-remote-to-host.js +0 -127
  238. package/dist/src/generators/setup-mf/lib/change-build-target.d.ts +0 -3
  239. package/dist/src/generators/setup-mf/lib/change-build-target.js +0 -24
  240. package/dist/src/generators/setup-mf/lib/fix-bootstrap.d.ts +0 -3
  241. package/dist/src/generators/setup-mf/lib/fix-bootstrap.js +0 -40
  242. package/dist/src/generators/setup-mf/lib/generate-config.d.ts +0 -6
  243. package/dist/src/generators/setup-mf/lib/generate-config.js +0 -32
  244. package/dist/src/generators/setup-mf/lib/get-remotes-with-ports.d.ts +0 -6
  245. package/dist/src/generators/setup-mf/lib/get-remotes-with-ports.js +0 -20
  246. package/dist/src/generators/setup-mf/lib/index.d.ts +0 -15
  247. package/dist/src/generators/setup-mf/lib/index.js +0 -18
  248. package/dist/src/generators/setup-mf/lib/move-angular-plugin-to-dependencies.d.ts +0 -2
  249. package/dist/src/generators/setup-mf/lib/move-angular-plugin-to-dependencies.js +0 -15
  250. package/dist/src/generators/setup-mf/lib/normalize-options.d.ts +0 -3
  251. package/dist/src/generators/setup-mf/lib/normalize-options.js +0 -26
  252. package/dist/src/generators/setup-mf/lib/remove-dead-code-from-remote.d.ts +0 -3
  253. package/dist/src/generators/setup-mf/lib/remove-dead-code-from-remote.js +0 -61
  254. package/dist/src/generators/setup-mf/lib/setup-host-if-dynamic.d.ts +0 -3
  255. package/dist/src/generators/setup-mf/lib/setup-host-if-dynamic.js +0 -20
  256. package/dist/src/generators/setup-mf/lib/setup-serve-target.d.ts +0 -3
  257. package/dist/src/generators/setup-mf/lib/setup-serve-target.js +0 -39
  258. package/dist/src/generators/setup-mf/lib/setup-tspath-for-remote.d.ts +0 -3
  259. package/dist/src/generators/setup-mf/lib/setup-tspath-for-remote.js +0 -15
  260. package/dist/src/generators/setup-mf/lib/update-host-app-routes.d.ts +0 -3
  261. package/dist/src/generators/setup-mf/lib/update-host-app-routes.js +0 -39
  262. package/dist/src/generators/setup-mf/lib/update-tsconfig.d.ts +0 -3
  263. package/dist/src/generators/setup-mf/lib/update-tsconfig.js +0 -18
  264. package/dist/src/generators/setup-mf/schema.d.ts +0 -35
  265. package/dist/src/generators/setup-mf/schema.json +0 -99
  266. package/dist/src/generators/setup-mf/setup-mf.d.ts +0 -4
  267. package/dist/src/generators/setup-mf/setup-mf.js +0 -90
  268. package/dist/src/generators/utils/add-mf-env-to-inputs.d.ts +0 -2
  269. package/dist/src/generators/utils/add-mf-env-to-inputs.js +0 -36
  270. package/dist/src/generators/utils/assert-mf-utils.d.ts +0 -1
  271. package/dist/src/generators/utils/assert-mf-utils.js +0 -8
  272. package/dist/src/generators/utils/export-scam.d.ts +0 -11
  273. package/dist/src/generators/utils/export-scam.js +0 -35
  274. package/dist/src/utils/get-mf-projects.d.ts +0 -4
  275. package/dist/src/utils/get-mf-projects.js +0 -31
  276. package/dist/src/utils/module-federation-deprecation.d.ts +0 -4
  277. package/dist/src/utils/module-federation-deprecation.js +0 -29
  278. package/dist/types/nx-angular-mf.d.ts +0 -72
  279. package/dist/types/nx-angular-mf.d.ts.map +0 -1
  280. package/dist/types/nx-angular.d.ts.map +0 -1
@@ -1,11 +1,9 @@
1
1
  export * from './src/builders/webpack-browser/webpack-browser.impl';
2
2
  export * from './src/builders/webpack-server/webpack-server.impl';
3
- export * from './src/executors/module-federation-dev-server/module-federation-dev-server.impl';
4
3
  export * from './src/executors/delegate-build/delegate-build.impl';
5
4
  export * from './src/executors/ng-packagr-lite/ng-packagr-lite.impl';
6
5
  export * from './src/executors/package/package.impl';
7
6
  export * from './src/executors/browser-esbuild/browser-esbuild.impl';
8
7
  export * from './src/executors/application/application.impl';
9
8
  export * from './src/executors/extract-i18n/extract-i18n.impl';
10
- export * from './src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl';
11
9
  export { executeDevServerBuilder } from './src/builders/dev-server/dev-server.impl';
package/dist/executors.js CHANGED
@@ -4,13 +4,11 @@ exports.executeDevServerBuilder = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  tslib_1.__exportStar(require("./src/builders/webpack-browser/webpack-browser.impl"), exports);
6
6
  tslib_1.__exportStar(require("./src/builders/webpack-server/webpack-server.impl"), exports);
7
- tslib_1.__exportStar(require("./src/executors/module-federation-dev-server/module-federation-dev-server.impl"), exports);
8
7
  tslib_1.__exportStar(require("./src/executors/delegate-build/delegate-build.impl"), exports);
9
8
  tslib_1.__exportStar(require("./src/executors/ng-packagr-lite/ng-packagr-lite.impl"), exports);
10
9
  tslib_1.__exportStar(require("./src/executors/package/package.impl"), exports);
11
10
  tslib_1.__exportStar(require("./src/executors/browser-esbuild/browser-esbuild.impl"), exports);
12
11
  tslib_1.__exportStar(require("./src/executors/application/application.impl"), exports);
13
12
  tslib_1.__exportStar(require("./src/executors/extract-i18n/extract-i18n.impl"), exports);
14
- tslib_1.__exportStar(require("./src/executors/module-federation-ssr-dev-server/module-federation-ssr-dev-server.impl"), exports);
15
13
  var dev_server_impl_1 = require("./src/builders/dev-server/dev-server.impl");
16
14
  Object.defineProperty(exports, "executeDevServerBuilder", { enumerable: true, get: function () { return dev_server_impl_1.executeDevServerBuilder; } });
@@ -1,4 +0,0 @@
1
- /**
2
- * Generated bundle index. Do not edit.
3
- */
4
- //# sourceMappingURL=nx-angular.mjs.map
@@ -3,20 +3,12 @@ export * from './src/generators/application/application';
3
3
  export * from './src/generators/component-story/component-story';
4
4
  export * from './src/generators/component/component';
5
5
  export * from './src/generators/directive/directive';
6
- export * from './src/generators/federate-module/federate-module';
7
- export * from './src/generators/host/host';
8
6
  export * from './src/generators/init/init';
9
7
  export * from './src/generators/library-secondary-entry-point/library-secondary-entry-point';
10
8
  export * from './src/generators/library/library';
11
9
  export * from './src/generators/ngrx-feature-store/ngrx-feature-store';
12
10
  export * from './src/generators/ngrx-root-store/ngrx-root-store';
13
11
  export * from './src/generators/pipe/pipe';
14
- export * from './src/generators/remote/remote';
15
- export * from './src/generators/scam-directive/scam-directive';
16
- export * from './src/generators/scam-pipe/scam-pipe';
17
- export * from './src/generators/scam-to-standalone/scam-to-standalone';
18
- export * from './src/generators/scam/scam';
19
- export * from './src/generators/setup-mf/setup-mf';
20
12
  export * from './src/generators/setup-ssr/setup-ssr';
21
13
  export * from './src/generators/stories/stories';
22
14
  export * from './src/generators/storybook-configuration/storybook-configuration';
@@ -7,20 +7,12 @@ tslib_1.__exportStar(require("./src/generators/application/application"), export
7
7
  tslib_1.__exportStar(require("./src/generators/component-story/component-story"), exports);
8
8
  tslib_1.__exportStar(require("./src/generators/component/component"), exports);
9
9
  tslib_1.__exportStar(require("./src/generators/directive/directive"), exports);
10
- tslib_1.__exportStar(require("./src/generators/federate-module/federate-module"), exports);
11
- tslib_1.__exportStar(require("./src/generators/host/host"), exports);
12
10
  tslib_1.__exportStar(require("./src/generators/init/init"), exports);
13
11
  tslib_1.__exportStar(require("./src/generators/library-secondary-entry-point/library-secondary-entry-point"), exports);
14
12
  tslib_1.__exportStar(require("./src/generators/library/library"), exports);
15
13
  tslib_1.__exportStar(require("./src/generators/ngrx-feature-store/ngrx-feature-store"), exports);
16
14
  tslib_1.__exportStar(require("./src/generators/ngrx-root-store/ngrx-root-store"), exports);
17
15
  tslib_1.__exportStar(require("./src/generators/pipe/pipe"), exports);
18
- tslib_1.__exportStar(require("./src/generators/remote/remote"), exports);
19
- tslib_1.__exportStar(require("./src/generators/scam-directive/scam-directive"), exports);
20
- tslib_1.__exportStar(require("./src/generators/scam-pipe/scam-pipe"), exports);
21
- tslib_1.__exportStar(require("./src/generators/scam-to-standalone/scam-to-standalone"), exports);
22
- tslib_1.__exportStar(require("./src/generators/scam/scam"), exports);
23
- tslib_1.__exportStar(require("./src/generators/setup-mf/setup-mf"), exports);
24
16
  tslib_1.__exportStar(require("./src/generators/setup-ssr/setup-ssr"), exports);
25
17
  tslib_1.__exportStar(require("./src/generators/stories/stories"), exports);
26
18
  tslib_1.__exportStar(require("./src/generators/storybook-configuration/storybook-configuration"), exports);
@@ -0,0 +1 @@
1
+ export declare function waitForDevServer(workspaceConfigPath: string): Promise<void>;
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.waitForDevServer = waitForDevServer;
4
+ const dev_server_ready_check_1 = require("./src/plugins/utils/dev-server-ready-check");
5
+ async function waitForDevServer(workspaceConfigPath) {
6
+ await (0, dev_server_ready_check_1.waitForAngularDevServer)(workspaceConfigPath);
7
+ process.exit(0);
8
+ }
@@ -522,8 +522,7 @@
522
522
  },
523
523
  "preloadInitial": {
524
524
  "type": "boolean",
525
- "default": true,
526
- "description": "Generates 'preload', 'modulepreload', and 'preconnect' link elements for initial application files and resources."
525
+ "description": "Generates 'preload', 'modulepreload', and 'preconnect' link elements for initial application files and resources. Defaults to false when a service worker is enabled; otherwise true. _Note: defaulting to false when a service worker is enabled only applies in Angular versions >= 22.2.0. Earlier versions default to true._"
527
526
  }
528
527
  },
529
528
  "required": ["input"]
@@ -12,8 +12,10 @@ exports.writeBundlesTransform = void 0;
12
12
  exports.removeSourceMappingUrl = removeSourceMappingUrl;
13
13
  exports.remapDeclarationMapSources = remapDeclarationMapSources;
14
14
  exports.normalizeEsm2022Path = normalizeEsm2022Path;
15
+ const tslib_1 = require("tslib");
15
16
  const transform_1 = require("ng-packagr/src/lib/graph/transform");
16
17
  const nodes_1 = require("ng-packagr/src/lib/ng-package/nodes");
18
+ const ngPackagrNodes = tslib_1.__importStar(require("ng-packagr/src/lib/ng-package/nodes"));
17
19
  const package_1 = require("ng-packagr/src/lib/ng-package/package");
18
20
  const path_1 = require("ng-packagr/src/lib/utils/path");
19
21
  const promises_1 = require("node:fs/promises");
@@ -29,9 +31,15 @@ async function shouldWriteFile(filePath, newContent) {
29
31
  return true;
30
32
  }
31
33
  }
34
+ // ng-packagr 22.2.0 to 22.2.3 build entry points in parallel and export this
35
+ // to find the one a graph is scoped to. 22.2.4 reverted that:
36
+ // https://github.com/ng-packagr/ng-packagr/issues/3451
37
+ const { getActiveEntryPoint } = ngPackagrNodes;
32
38
  const writeBundlesTransform = (_options) => {
33
39
  return (0, transform_1.transformFromPromise)(async (graph) => {
34
- const entryPointNode = graph.find((0, nodes_1.isEntryPointInProgress)());
40
+ const entryPointNode = getActiveEntryPoint
41
+ ? getActiveEntryPoint(graph)
42
+ : graph.find((0, nodes_1.isEntryPointInProgress)());
35
43
  if (!entryPointNode) {
36
44
  return;
37
45
  }
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "runnerConfig": {
24
24
  "type": ["string", "boolean"],
25
- "description": "Specifies the configuration file for the selected test runner. If a string is provided, it will be used as the path to the configuration file. If `true`, the builder will search for a default configuration file (e.g., `vitest.config.ts` or `karma.conf.js`). If `false`, no external configuration file will be used.\\nFor Vitest, this enables advanced options and the use of custom plugins. Please note that while the file is loaded, the Angular team does not provide direct support for its specific contents or any third-party plugins used within it.",
25
+ "description": "Specifies the configuration file for the selected test runner. If a string is provided, it will be used as the path to the configuration file. If `true`, the builder will search for a default configuration file (e.g., `vitest-base.config.mts` or `karma.conf.js`). If `false`, no external configuration file will be used.\\nFor Vitest, this enables advanced options and the use of custom plugins. Please note that while the file is loaded, the Angular team does not provide direct support for its specific contents or any third-party plugins used within it.",
26
26
  "default": false
27
27
  },
28
28
  "browsers": {
@@ -46,6 +46,11 @@
46
46
  "type": "boolean",
47
47
  "description": "Enables isolation for test execution. When true, Vitest runs tests in separate threads or processes. This option is only available for the Vitest runner. Defaults to false to align with the Karma/Jasmine experience. _Note: this is only supported in Angular versions >= 22.0.0_."
48
48
  },
49
+ "splitting": {
50
+ "type": "boolean",
51
+ "description": "Enables code splitting for test execution. When enabled, shared code between test files is split into separate chunks. Issues with live ESM bindings in Node.js environments (such as uninitialized exports or mocking failures) can be resolved by disabling splitting. This option is only available for the Vitest runner. Defaults to `true`. _Note: this is only supported in Angular versions >= 22.2.0_.",
52
+ "x-deprecated": "No longer needed with Vitest 5."
53
+ },
49
54
  "quiet": {
50
55
  "type": "boolean",
51
56
  "description": "Suppresses the verbose build summary and stats table on each rebuild. Defaults to `true` locally and `false` in CI environments. _Note: this is only supported in Angular versions >= 22.0.0_."
@@ -47,6 +47,11 @@ function validateOptions(options) {
47
47
  throw new Error(`The "quiet" option requires Angular version 22.0.0 or greater. You are currently using version ${angularVersion}.`);
48
48
  }
49
49
  }
50
+ if ((0, semver_1.lt)(angularVersion, '22.2.0')) {
51
+ if (options.splitting !== undefined) {
52
+ throw new Error(`The "splitting" option requires Angular version 22.2.0 or greater. You are currently using version ${angularVersion}.`);
53
+ }
54
+ }
50
55
  }
51
56
  /**
52
57
  * The Angular CLI unit-test builder only accepts the `@angular/build:application`
@@ -13,6 +13,7 @@ const devkit_1 = require("@nx/devkit");
13
13
  const browserslist_1 = tslib_1.__importDefault(require("browserslist"));
14
14
  const component_stylesheets_1 = require("ng-packagr/src/lib/styles/component-stylesheets");
15
15
  const postcss_configuration_1 = require("ng-packagr/src/lib/styles/postcss-configuration");
16
+ const semver_1 = require("semver");
16
17
  const ng_packagr_version_1 = require("./ng-packagr-version");
17
18
  var CssUrl;
18
19
  (function (CssUrl) {
@@ -20,7 +21,13 @@ var CssUrl;
20
21
  CssUrl["none"] = "none";
21
22
  })(CssUrl || (exports.CssUrl = CssUrl = {}));
22
23
  function getStylesheetProcessor() {
23
- const { major: ngPackagrMajorVersion } = (0, ng_packagr_version_1.getNgPackagrVersionInfo)();
24
+ const { major: ngPackagrMajorVersion, version: ngPackagrVersion } = (0, ng_packagr_version_1.getNgPackagrVersionInfo)();
25
+ // ng-packagr >= 22.2 resolves the style config once per package, older
26
+ // versions resolve it for each entry point
27
+ const resolvePerPackage = !(0, semver_1.lt)(ngPackagrVersion, '22.2.0');
28
+ // ng-packagr calls this factory once per build, so a later build in the
29
+ // same process reads config changes
30
+ const styleConfigCache = new Map();
24
31
  class StylesheetProcessor extends component_stylesheets_1.ComponentStylesheetBundler {
25
32
  constructor(projectBasePath, basePath, cssUrl, includePaths, sass, cacheDirectory, watch) {
26
33
  if (ngPackagrMajorVersion === 22) {
@@ -34,21 +41,17 @@ function getStylesheetProcessor() {
34
41
  path: require.resolve('ng-packagr/.browserslistrc'),
35
42
  });
36
43
  }
37
- const browserslistData = (0, browserslist_1.default)(undefined, { path: basePath });
38
- let searchDirs = (0, postcss_configuration_1.generateSearchDirectories)([projectBasePath]);
39
- const postcssConfiguration = (0, postcss_configuration_1.loadPostcssConfiguration)(searchDirs);
40
- // (nx-specific): we support loading the TailwindCSS config from the root of the workspace
41
- searchDirs = (0, postcss_configuration_1.generateSearchDirectories)([projectBasePath, devkit_1.workspaceRoot]);
44
+ const { postcssConfiguration, tailwindConfiguration, target } = resolvePerPackage
45
+ ? getPackageStyleConfig(styleConfigCache, projectBasePath)
46
+ : resolveStyleConfig(projectBasePath, basePath);
42
47
  super({
43
48
  cacheDirectory: cacheDirectory,
44
49
  postcssConfiguration: postcssConfiguration,
45
- tailwindConfiguration: postcssConfiguration
46
- ? undefined
47
- : (0, postcss_configuration_1.getTailwindConfig)(searchDirs, projectBasePath),
50
+ tailwindConfiguration: tailwindConfiguration,
48
51
  sass: sass,
49
52
  workspaceRoot: projectBasePath,
50
53
  cssUrl: cssUrl,
51
- target: transformSupportedBrowsersToTargets(browserslistData),
54
+ target: target,
52
55
  includePaths: includePaths,
53
56
  }, 'css', watch);
54
57
  this.projectBasePath = projectBasePath;
@@ -65,6 +68,28 @@ function getStylesheetProcessor() {
65
68
  }
66
69
  return StylesheetProcessor;
67
70
  }
71
+ function getPackageStyleConfig(styleConfigCache, projectBasePath) {
72
+ let config = styleConfigCache.get(projectBasePath);
73
+ if (!config) {
74
+ config = resolveStyleConfig(projectBasePath, projectBasePath);
75
+ styleConfigCache.set(projectBasePath, config);
76
+ }
77
+ return config;
78
+ }
79
+ function resolveStyleConfig(projectBasePath, browserslistPath) {
80
+ const browserslistData = (0, browserslist_1.default)(undefined, { path: browserslistPath });
81
+ let searchDirs = (0, postcss_configuration_1.generateSearchDirectories)([projectBasePath]);
82
+ const postcssConfiguration = (0, postcss_configuration_1.loadPostcssConfiguration)(searchDirs);
83
+ // (nx-specific): we support loading the TailwindCSS config from the root of the workspace
84
+ searchDirs = (0, postcss_configuration_1.generateSearchDirectories)([projectBasePath, devkit_1.workspaceRoot]);
85
+ return {
86
+ postcssConfiguration,
87
+ tailwindConfiguration: postcssConfiguration
88
+ ? undefined
89
+ : (0, postcss_configuration_1.getTailwindConfig)(searchDirs, projectBasePath),
90
+ target: transformSupportedBrowsersToTargets(browserslistData),
91
+ };
92
+ }
68
93
  function transformSupportedBrowsersToTargets(supportedBrowsers) {
69
94
  const transformed = [];
70
95
  // https://esbuild.github.io/api/#target
@@ -24,10 +24,8 @@ async function addLintingGenerator(tree, options) {
24
24
  (0, devkit_1.joinPathFragments)(options.projectRoot, 'tsconfig.app.json'),
25
25
  ],
26
26
  unitTestRunner: options.unitTestRunner,
27
- enableTypedLinting: (0, internal_3.isTypedLintingEnabled)(options),
27
+ enableTypedLinting: options.enableTypedLinting,
28
28
  rootProject: rootProject,
29
- addPlugin: options.addPlugin ?? false,
30
- addExplicitTargets: true,
31
29
  skipPackageJson: options.skipPackageJson,
32
30
  }));
33
31
  // The angular-eslint presets, selector rules and dependency install below have
@@ -6,12 +6,7 @@ export interface AddLintingGeneratorSchema {
6
6
  projectRoot: string;
7
7
  prefix: string;
8
8
  enableTypedLinting?: boolean;
9
- /**
10
- * @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
11
- */
12
- setParserOptionsProject?: boolean;
13
9
  skipFormat?: boolean;
14
10
  skipPackageJson?: boolean;
15
11
  unitTestRunner?: string;
16
- addPlugin?: boolean;
17
12
  }
@@ -38,12 +38,6 @@
38
38
  "description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
39
39
  "default": false
40
40
  },
41
- "setParserOptionsProject": {
42
- "type": "boolean",
43
- "description": "Deprecated alias for `enableTypedLinting`.",
44
- "default": false,
45
- "x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
46
- },
47
41
  "skipFormat": {
48
42
  "type": "boolean",
49
43
  "description": "Skip formatting files.",
@@ -21,7 +21,7 @@ async function applicationGenerator(tree, schema) {
21
21
  if (isRspack) {
22
22
  schema.bundler = 'webpack';
23
23
  }
24
- const options = await (0, lib_1.normalizeOptions)(tree, schema, isRspack);
24
+ const options = await (0, lib_1.normalizeOptions)(tree, schema);
25
25
  const rootOffset = (0, devkit_1.offsetFromRoot)(options.appProjectRoot);
26
26
  await (0, js_1.initGenerator)(tree, {
27
27
  ...options,
@@ -32,7 +32,6 @@ async function applicationGenerator(tree, schema) {
32
32
  await (0, init_1.angularInitGenerator)(tree, {
33
33
  ...options,
34
34
  skipFormat: true,
35
- addPlugin: options.addPlugin,
36
35
  });
37
36
  if (!options.skipPackageJson) {
38
37
  (0, ensure_angular_dependencies_1.ensureAngularDependencies)(tree, options.zoneless);
@@ -3,13 +3,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addE2e = addE2e;
4
4
  const devkit_1 = require("@nx/devkit");
5
5
  const internal_1 = require("@nx/devkit/internal");
6
- const internal_2 = require("@nx/eslint/internal");
7
6
  const versions_1 = require("../../../utils/versions");
8
7
  async function addE2e(tree, options) {
9
- // since e2e are separate projects, default to adding plugins
10
- const nxJson = (0, devkit_1.readNxJson)(tree);
11
- const addPlugin = nxJson['useInferencePlugins'] !== false &&
12
- process.env.NX_ADD_PLUGINS !== 'false';
13
8
  const e2eWebServerInfo = getAngularE2EWebServerInfo(tree, options.name, options.port);
14
9
  if (options.e2eTestRunner === 'cypress') {
15
10
  const { configurationGenerator } = (0, devkit_1.ensurePackage)('@nx/cypress', versions_1.nxVersion);
@@ -36,7 +31,6 @@ async function addE2e(tree, options) {
36
31
  ciWebServerCommand: e2eWebServerInfo.e2eCiWebServerCommand,
37
32
  ciBaseUrl: e2eWebServerInfo.e2eCiBaseUrl,
38
33
  rootProject: options.rootProject,
39
- addPlugin,
40
34
  });
41
35
  }
42
36
  else if (options.e2eTestRunner === 'playwright') {
@@ -55,11 +49,12 @@ async function addE2e(tree, options) {
55
49
  directory: 'src',
56
50
  js: false,
57
51
  linter: options.linter,
58
- enableTypedLinting: (0, internal_2.isTypedLintingEnabled)(options),
52
+ enableTypedLinting: options.enableTypedLinting,
59
53
  webServerCommand: e2eWebServerInfo.e2eWebServerCommand,
60
54
  webServerAddress: e2eWebServerInfo.e2eWebServerAddress,
55
+ ciWebServerCommand: e2eWebServerInfo.e2eCiWebServerCommand,
56
+ ciWebServerAddress: e2eWebServerInfo.e2eCiBaseUrl,
61
57
  rootProject: options.rootProject,
62
- addPlugin,
63
58
  });
64
59
  }
65
60
  return e2eWebServerInfo.e2ePort;
@@ -2,7 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.addLinting = addLinting;
4
4
  const tslib_1 = require("tslib");
5
- const internal_1 = require("@nx/eslint/internal");
6
5
  const add_linting_1 = tslib_1.__importDefault(require("../../add-linting/add-linting"));
7
6
  async function addLinting(host, options) {
8
7
  if (options.linter === 'none') {
@@ -13,10 +12,9 @@ async function addLinting(host, options) {
13
12
  projectName: options.name,
14
13
  projectRoot: options.appProjectRoot,
15
14
  prefix: options.prefix,
16
- enableTypedLinting: (0, internal_1.isTypedLintingEnabled)(options),
15
+ enableTypedLinting: options.enableTypedLinting,
17
16
  skipPackageJson: options.skipPackageJson,
18
17
  unitTestRunner: options.unitTestRunner,
19
18
  skipFormat: true,
20
- addPlugin: options.addPlugin,
21
19
  });
22
20
  }
@@ -14,6 +14,8 @@ function addFileServerTarget(tree, options, targetName, e2ePort) {
14
14
  const projectConfig = (0, devkit_1.readProjectConfiguration)(tree, options.name);
15
15
  projectConfig.targets[targetName] = {
16
16
  continuous: true,
17
+ readyWhen: { signal: true },
18
+ dependsOn: ['build'],
17
19
  executor: '@nx/web:file-server',
18
20
  options: {
19
21
  buildTarget: `${options.name}:build`,
@@ -12,7 +12,6 @@ async function addUnitTestRunner(host, options) {
12
12
  projectRoot: options.appProjectRoot,
13
13
  skipPackageJson: options.skipPackageJson,
14
14
  strict: options.strict,
15
- addPlugin: options.addPlugin,
16
15
  runtimeTsconfigFileName: 'tsconfig.app.json',
17
16
  zoneless: options.zoneless,
18
17
  });
@@ -30,7 +29,6 @@ async function addUnitTestRunner(host, options) {
30
29
  skipFormat: options.skipFormat,
31
30
  skipPackageJson: options.skipPackageJson,
32
31
  strict: options.strict,
33
- addPlugin: options.addPlugin,
34
32
  zoneless: options.zoneless,
35
33
  });
36
34
  default:
@@ -80,6 +80,7 @@ function createProjectForEsbuild(tree, options) {
80
80
  },
81
81
  serve: {
82
82
  continuous: true,
83
+ readyWhen: { signal: true },
83
84
  executor: '@angular/build:dev-server',
84
85
  options: options.port ? { port: options.port } : undefined,
85
86
  configurations: {
@@ -173,6 +174,7 @@ function createProjectForWebpack(tree, options) {
173
174
  },
174
175
  serve: {
175
176
  continuous: true,
177
+ readyWhen: { signal: true },
176
178
  executor: '@angular-devkit/build-angular:dev-server',
177
179
  options: options.port ? { port: options.port } : undefined,
178
180
  configurations: {
@@ -1,4 +1,4 @@
1
1
  import { type Tree } from '@nx/devkit';
2
2
  import type { Schema } from '../schema';
3
3
  import type { NormalizedSchema } from './normalized-schema';
4
- export declare function normalizeOptions(host: Tree, options: Partial<Schema>, isRspack?: boolean): Promise<NormalizedSchema>;
4
+ export declare function normalizeOptions(host: Tree, options: Partial<Schema>): Promise<NormalizedSchema>;
@@ -6,18 +6,13 @@ const internal_1 = require("@nx/devkit/internal");
6
6
  const internal_2 = require("@nx/js/internal");
7
7
  const test_runners_1 = require("../../../utils/test-runners");
8
8
  const version_utils_1 = require("../../utils/version-utils");
9
- function arePluginsExplicitlyDisabled(host) {
10
- const { useInferencePlugins } = (0, devkit_1.readNxJson)(host);
11
- const addPluginEnvVar = process.env.NX_ADD_PLUGINS;
12
- return useInferencePlugins === false || addPluginEnvVar === 'false';
13
- }
14
9
  function validateBundler(bundler) {
15
10
  if (['esbuild', 'webpack', 'rspack'].includes(bundler)) {
16
11
  return bundler;
17
12
  }
18
13
  throw new Error(`Invalid bundler: ${bundler}. Please use one of the following: 'esbuild', 'webpack', 'rspack'.`);
19
14
  }
20
- async function normalizeOptions(host, options, isRspack) {
15
+ async function normalizeOptions(host, options) {
21
16
  await (0, internal_1.ensureRootProjectName)(options, 'application');
22
17
  const { projectName: appProjectName, projectRoot: appProjectRoot } = await (0, internal_1.determineProjectNameAndRootOptions)(host, {
23
18
  name: options.name,
@@ -32,7 +27,6 @@ async function normalizeOptions(host, options, isRspack) {
32
27
  ? options.tags.split(',').map((s) => s.trim())
33
28
  : [];
34
29
  const bundler = validateBundler(options.bundler ?? 'esbuild');
35
- const addPlugin = options.addPlugin ?? (!arePluginsExplicitlyDisabled(host) && isRspack);
36
30
  const { major: angularMajorVersion } = (0, version_utils_1.getInstalledAngularVersionInfo)(host);
37
31
  const zonelessDefaultValue = angularMajorVersion >= 21 ? true : false;
38
32
  const unitTestRunner = options.unitTestRunner ??
@@ -43,7 +37,6 @@ async function normalizeOptions(host, options, isRspack) {
43
37
  : test_runners_1.UnitTestRunner.Jest);
44
38
  // Set defaults and then overwrite with user options
45
39
  return {
46
- addPlugin,
47
40
  style: 'css',
48
41
  routing: true,
49
42
  inlineStyle: false,
@@ -21,10 +21,6 @@ export interface Schema {
21
21
  strict?: boolean;
22
22
  port?: number;
23
23
  enableTypedLinting?: boolean;
24
- /**
25
- * @deprecated Use `enableTypedLinting` instead. This option will be removed in Nx v24.
26
- */
27
- setParserOptionsProject?: boolean;
28
24
  skipPackageJson?: boolean;
29
25
  standalone?: boolean;
30
26
  rootProject?: boolean;
@@ -32,7 +28,6 @@ export interface Schema {
32
28
  bundler?: 'webpack' | 'esbuild' | 'rspack';
33
29
  ssr?: boolean;
34
30
  nxCloudToken?: string;
35
- addPlugin?: boolean;
36
31
  zoneless?: boolean;
37
32
  formatter?: 'prettier' | 'oxfmt' | 'none';
38
33
  }
@@ -130,19 +130,13 @@
130
130
  },
131
131
  "port": {
132
132
  "type": "number",
133
- "description": "The port at which the remote application should be served."
133
+ "description": "The port at which the application should be served."
134
134
  },
135
135
  "enableTypedLinting": {
136
136
  "type": "boolean",
137
137
  "description": "Whether to enable typed linting. For flat configs, this configures the recommended `parserOptions.projectService` and `tsconfigRootDir`. For legacy `.eslintrc` configs, this configures `parserOptions.project`. We do not enable this by default for lint performance reasons.",
138
138
  "default": false
139
139
  },
140
- "setParserOptionsProject": {
141
- "type": "boolean",
142
- "description": "Deprecated alias for `enableTypedLinting`.",
143
- "default": false,
144
- "x-deprecated": "Use `enableTypedLinting` instead. This option will be removed in Nx v24."
145
- },
146
140
  "standalone": {
147
141
  "description": "Generate an application that is setup to use standalone components.",
148
142
  "type": "boolean",
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.convertToRspack = convertToRspack;
4
4
  const internal_1 = require("@nx/devkit/internal");
5
5
  const devkit_1 = require("@nx/devkit");
6
+ const node_util_1 = require("node:util");
6
7
  const path_1 = require("path");
7
8
  const posix_1 = require("path/posix");
8
9
  const assert_supported_angular_version_1 = require("../../utils/assert-supported-angular-version");
@@ -13,6 +14,7 @@ const create_config_1 = require("./lib/create-config");
13
14
  const get_custom_webpack_config_1 = require("./lib/get-custom-webpack-config");
14
15
  const merge_server_tsconfig_1 = require("./lib/merge-server-tsconfig");
15
16
  const update_tsconfig_1 = require("./lib/update-tsconfig");
17
+ const validate_no_module_federation_1 = require("./lib/validate-no-module-federation");
16
18
  const validate_supported_executor_1 = require("./lib/validate-supported-executor");
17
19
  const SUPPORTED_EXECUTORS = [
18
20
  '@angular-devkit/build-angular:browser',
@@ -23,7 +25,6 @@ const SUPPORTED_EXECUTORS = [
23
25
  '@nx/angular:webpack-browser',
24
26
  '@nx/angular:webpack-server',
25
27
  '@nx/angular:dev-server',
26
- '@nx/angular:module-federation-dev-server',
27
28
  ];
28
29
  const RENAMED_OPTIONS = {
29
30
  main: 'browser',
@@ -251,6 +252,7 @@ async function convertToRspack(tree, schema) {
251
252
  const targetsToRemove = [];
252
253
  let customWebpackConfigPath;
253
254
  (0, validate_supported_executor_1.validateSupportedBuildExecutor)(Object.values(project.targets));
255
+ (0, validate_no_module_federation_1.validateNoModuleFederation)(tree, project);
254
256
  let projectServePort = DEFAULT_PORT;
255
257
  const projectServeConfigurationOptions = {};
256
258
  for (const [targetName, target] of Object.entries(project.targets)) {
@@ -284,8 +286,7 @@ async function convertToRspack(tree, schema) {
284
286
  targetsToRemove.push(targetName);
285
287
  }
286
288
  else if (target.executor === '@angular-devkit/build-angular:dev-server' ||
287
- target.executor === '@nx/angular:dev-server' ||
288
- target.executor === '@nx/angular:module-federation-dev-server') {
289
+ target.executor === '@nx/angular:dev-server') {
289
290
  createConfigOptions.devServer = {};
290
291
  if (target.options) {
291
292
  handleDevServerTargetOptions(tree, target.options, createConfigOptions.devServer, project.root);
@@ -356,7 +357,6 @@ async function convertToRspack(tree, schema) {
356
357
  // ensure plugin is registered
357
358
  const { rspackInitGenerator } = (0, devkit_1.ensurePackage)('@nx/rspack', versions_1.nxVersion);
358
359
  await rspackInitGenerator(tree, {
359
- addPlugin: true,
360
360
  framework: 'angular',
361
361
  });
362
362
  // find the inferred target names
@@ -491,6 +491,11 @@ async function convertToRspack(tree, schema) {
491
491
  if (serveTarget.config.continuous) {
492
492
  delete serveTarget.config.continuous;
493
493
  }
494
+ // Nx writes it for the dev server builders, and it would override the
495
+ // readyWhen inferred for the Rspack serve target
496
+ if ((0, node_util_1.isDeepStrictEqual)(serveTarget.config.readyWhen, { signal: true })) {
497
+ delete serveTarget.config.readyWhen;
498
+ }
494
499
  if (serveTarget.config.syncGenerators?.length === 1 &&
495
500
  serveTarget.config.syncGenerators[0] === '@nx/js:typescript-sync') {
496
501
  delete serveTarget.config.syncGenerators;
@@ -1,6 +1,5 @@
1
- import { Tree } from '@nx/devkit';
1
+ import type { Tree } from '@nx/devkit';
2
2
  export declare function getCustomWebpackConfig(tree: Tree, projectRoot: string, pathToCustomWebpackConfig: string): Promise<{
3
3
  isWebpackConfigFunction: boolean;
4
4
  normalizedPathToCustomWebpackConfig: string;
5
5
  }>;
6
- export declare function convertWebpackConfigToUseNxModuleFederationPlugin(webpackConfigContents: string): string;