nx 23.2.0-beta.1 → 23.2.0-beta.11

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 (369) hide show
  1. package/README.md +2 -2
  2. package/dist/bin/init-local.js +3 -5
  3. package/dist/bin/nx.js +2 -0
  4. package/dist/release/changelog-renderer/index.js +4 -5
  5. package/dist/release/index.d.ts +1 -1
  6. package/dist/src/adapter/ngcli-adapter.js +60 -1
  7. package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.js +35 -15
  8. package/dist/src/analytics/analytics.d.ts +6 -0
  9. package/dist/src/analytics/analytics.js +16 -10
  10. package/dist/src/analytics/index.d.ts +1 -1
  11. package/dist/src/analytics/index.js +2 -1
  12. package/dist/src/command-line/add/add.js +5 -0
  13. package/dist/src/command-line/affected/affected.js +1 -0
  14. package/dist/src/command-line/completion/command-object.js +7 -12
  15. package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +19 -25
  16. package/dist/src/command-line/format/format.js +84 -101
  17. package/dist/src/command-line/generate/generate.js +35 -35
  18. package/dist/src/command-line/graph/graph.d.ts +1 -0
  19. package/dist/src/command-line/graph/graph.js +15 -6
  20. package/dist/src/command-line/import/import.js +30 -40
  21. package/dist/src/command-line/init/ai-agent-prompts.js +5 -11
  22. package/dist/src/command-line/init/command-object.js +4 -2
  23. package/dist/src/command-line/init/configure-plugins.js +4 -1
  24. package/dist/src/command-line/init/implementation/add-nx-to-monorepo.js +12 -32
  25. package/dist/src/command-line/init/implementation/add-nx-to-nest.js +17 -21
  26. package/dist/src/command-line/init/implementation/add-nx-to-npm-repo.js +8 -21
  27. package/dist/src/command-line/init/implementation/add-nx-to-turborepo.js +3 -17
  28. package/dist/src/command-line/init/implementation/angular/index.js +10 -15
  29. package/dist/src/command-line/init/implementation/angular/integrated-workspace.js +2 -5
  30. package/dist/src/command-line/init/implementation/angular/legacy-angular-versions.js +5 -0
  31. package/dist/src/command-line/init/implementation/angular/standalone-workspace.js +8 -2
  32. package/dist/src/command-line/init/implementation/check-compatible-with-plugins.js +2 -0
  33. package/dist/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +9 -1
  34. package/dist/src/command-line/init/implementation/format.d.ts +18 -0
  35. package/dist/src/command-line/init/implementation/format.js +114 -0
  36. package/dist/src/command-line/init/implementation/utils.js +8 -0
  37. package/dist/src/command-line/init/init-v1.js +15 -18
  38. package/dist/src/command-line/init/init-v2.js +40 -57
  39. package/dist/src/command-line/migrate/agentic/definitions.js +36 -9
  40. package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +37 -22
  41. package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +30 -39
  42. package/dist/src/command-line/migrate/agentic/handoff.d.ts +7 -7
  43. package/dist/src/command-line/migrate/agentic/handoff.js +13 -10
  44. package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +7 -12
  45. package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +7 -0
  46. package/dist/src/command-line/migrate/agentic/run-step.d.ts +10 -0
  47. package/dist/src/command-line/migrate/agentic/run-step.js +1 -0
  48. package/dist/src/command-line/migrate/agentic/runner.js +24 -24
  49. package/dist/src/command-line/migrate/agentic/select.d.ts +10 -2
  50. package/dist/src/command-line/migrate/agentic/select.js +30 -32
  51. package/dist/src/command-line/migrate/agentic/types.d.ts +33 -3
  52. package/dist/src/command-line/migrate/agentic/types.js +35 -0
  53. package/dist/src/command-line/migrate/command-object.d.ts +6 -0
  54. package/dist/src/command-line/migrate/command-object.js +19 -1
  55. package/dist/src/command-line/migrate/execute-migration.d.ts +28 -9
  56. package/dist/src/command-line/migrate/execute-migration.js +112 -27
  57. package/dist/src/command-line/migrate/migrate-analytics.d.ts +35 -0
  58. package/dist/src/command-line/migrate/migrate-analytics.js +64 -0
  59. package/dist/src/command-line/migrate/migrate-commits.d.ts +38 -8
  60. package/dist/src/command-line/migrate/migrate-commits.js +130 -15
  61. package/dist/src/command-line/migrate/migrate-config.d.ts +13 -12
  62. package/dist/src/command-line/migrate/migrate-config.js +22 -14
  63. package/dist/src/command-line/migrate/migrate-output.d.ts +45 -7
  64. package/dist/src/command-line/migrate/migrate-output.js +52 -8
  65. package/dist/src/command-line/migrate/migrate-ui-api.d.ts +2 -1
  66. package/dist/src/command-line/migrate/migrate-ui-api.js +16 -7
  67. package/dist/src/command-line/migrate/migrate.d.ts +28 -68
  68. package/dist/src/command-line/migrate/migrate.js +657 -293
  69. package/dist/src/command-line/migrate/migration-shape.d.ts +8 -0
  70. package/dist/src/command-line/migrate/multi-major.js +7 -10
  71. package/dist/src/command-line/migrate/resolve-package-version.js +4 -8
  72. package/dist/src/command-line/migrate/run/agent-output.d.ts +20 -0
  73. package/dist/src/command-line/migrate/run/agent-output.js +65 -0
  74. package/dist/src/command-line/migrate/run/index.d.ts +9 -0
  75. package/dist/src/command-line/migrate/run/index.js +23 -0
  76. package/dist/src/command-line/migrate/run/orchestrator.d.ts +20 -0
  77. package/dist/src/command-line/migrate/run/orchestrator.js +1200 -0
  78. package/dist/src/command-line/migrate/run/run-id.d.ts +16 -0
  79. package/dist/src/command-line/migrate/run/run-id.js +56 -0
  80. package/dist/src/command-line/migrate/run/run-state.d.ts +157 -0
  81. package/dist/src/command-line/migrate/run/run-state.js +438 -0
  82. package/dist/src/command-line/migrate/run/state-lock.d.ts +25 -0
  83. package/dist/src/command-line/migrate/run/state-lock.js +76 -0
  84. package/dist/src/command-line/migrate/run/state-machine.d.ts +84 -0
  85. package/dist/src/command-line/migrate/run/state-machine.js +315 -0
  86. package/dist/src/command-line/migrate/run/util.d.ts +59 -0
  87. package/dist/src/command-line/migrate/run/util.js +148 -0
  88. package/dist/src/command-line/migrate/run/worker.d.ts +16 -0
  89. package/dist/src/command-line/migrate/run/worker.js +682 -0
  90. package/dist/src/command-line/migrate/run-migration-process.js +6 -5
  91. package/dist/src/command-line/migrate/safe-prompt.d.ts +14 -26
  92. package/dist/src/command-line/migrate/safe-prompt.js +32 -43
  93. package/dist/src/command-line/migrate/sort-migrations.d.ts +16 -0
  94. package/dist/src/command-line/migrate/sort-migrations.js +32 -0
  95. package/dist/src/command-line/migrate/step-actions.d.ts +5 -0
  96. package/dist/src/command-line/migrate/step-actions.js +12 -0
  97. package/dist/src/command-line/migrate/text.d.ts +18 -0
  98. package/dist/src/command-line/migrate/text.js +26 -0
  99. package/dist/src/command-line/migrate/version-skew-guard.d.ts +60 -0
  100. package/dist/src/command-line/migrate/version-skew-guard.js +175 -0
  101. package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +17 -21
  102. package/dist/src/command-line/nx-cloud/connect/view-logs.js +2 -0
  103. package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.d.ts +2 -0
  104. package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.js +16 -0
  105. package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.d.ts +4 -0
  106. package/dist/src/command-line/nx-cloud/start-nx-agents/start-nx-agents.js +13 -0
  107. package/dist/src/command-line/nx-commands.js +26 -24
  108. package/dist/src/command-line/release/changelog.js +11 -17
  109. package/dist/src/command-line/release/index.d.ts +1 -1
  110. package/dist/src/command-line/release/plan.js +15 -28
  111. package/dist/src/command-line/release/publish.js +5 -0
  112. package/dist/src/command-line/release/release.js +6 -17
  113. package/dist/src/command-line/release/utils/git.js +1 -1
  114. package/dist/src/command-line/release/utils/release-graph.d.ts +18 -0
  115. package/dist/src/command-line/release/utils/release-graph.js +81 -21
  116. package/dist/src/command-line/release/utils/remote-release-clients/github.js +17 -23
  117. package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +14 -23
  118. package/dist/src/command-line/release/utils/resolve-semver-specifier.js +19 -41
  119. package/dist/src/command-line/release/version/release-group-processor.d.ts +24 -0
  120. package/dist/src/command-line/release/version/release-group-processor.js +80 -6
  121. package/dist/src/command-line/release/version/resolve-current-version.js +7 -10
  122. package/dist/src/command-line/release/version/version-actions.d.ts +27 -2
  123. package/dist/src/command-line/release/version/version-actions.js +9 -1
  124. package/dist/src/command-line/release/version.js +10 -6
  125. package/dist/src/command-line/reset/reset.js +6 -1
  126. package/dist/src/command-line/run/run-one.js +1 -0
  127. package/dist/src/command-line/run-many/run-many.js +1 -0
  128. package/dist/src/command-line/show/show-target/inputs.js +50 -153
  129. package/dist/src/command-line/show/show-target/outputs.js +48 -173
  130. package/dist/src/command-line/show/show-target/utils.d.ts +28 -0
  131. package/dist/src/command-line/show/show-target/utils.js +83 -3
  132. package/dist/src/command-line/watch/watch.js +13 -0
  133. package/dist/src/command-line/yargs-utils/shared-options.d.ts +2 -2
  134. package/dist/src/command-line/yargs-utils/shared-options.js +3 -1
  135. package/dist/src/config/misc-interfaces.d.ts +19 -7
  136. package/dist/src/config/nx-json.d.ts +4 -2
  137. package/dist/src/core/graph/main.js +1 -1
  138. package/dist/src/core/graph/styles.js +1 -1
  139. package/dist/src/daemon/client/client.d.ts +52 -1
  140. package/dist/src/daemon/client/client.js +160 -36
  141. package/dist/src/daemon/client/daemon-environment.d.ts +17 -0
  142. package/dist/src/daemon/client/daemon-environment.js +110 -2
  143. package/dist/src/daemon/client/daemon-socket-messenger.js +4 -0
  144. package/dist/src/daemon/message-types/daemon-message.d.ts +32 -0
  145. package/dist/src/daemon/message-types/daemon-message.js +25 -0
  146. package/dist/src/daemon/server/file-watching/file-watcher-sockets.d.ts +5 -0
  147. package/dist/src/daemon/server/file-watching/file-watcher-sockets.js +16 -0
  148. package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +1 -1
  149. package/dist/src/daemon/server/latest-nx.js +5 -2
  150. package/dist/src/daemon/server/server.js +31 -4
  151. package/dist/src/daemon/server/shutdown-utils.d.ts +5 -0
  152. package/dist/src/daemon/server/shutdown-utils.js +11 -4
  153. package/dist/src/daemon/socket-utils.d.ts +1 -0
  154. package/dist/src/daemon/socket-utils.js +24 -3
  155. package/dist/src/daemon/tmp-dir.d.ts +43 -3
  156. package/dist/src/daemon/tmp-dir.js +437 -15
  157. package/dist/src/devkit-internals.d.ts +106 -8
  158. package/dist/src/devkit-internals.js +225 -7
  159. package/dist/src/executors/run-commands/running-tasks.js +46 -29
  160. package/dist/src/generators/internal-utils/format-changed-files.d.ts +24 -0
  161. package/dist/src/generators/internal-utils/format-changed-files.js +163 -0
  162. package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +15 -0
  163. package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.js +21 -3
  164. package/dist/src/generators/tree.d.ts +4 -2
  165. package/dist/src/hasher/check-task-files.d.ts +86 -0
  166. package/dist/src/hasher/check-task-files.js +378 -0
  167. package/dist/src/migrations/update-15-0-0/prefix-outputs.js +2 -2
  168. package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.js +2 -2
  169. package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +2 -2
  170. package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.js +2 -2
  171. package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.js +2 -2
  172. package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +2 -2
  173. package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +2 -2
  174. package/dist/src/migrations/update-17-2-0/move-default-base.js +2 -2
  175. package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +2 -2
  176. package/dist/src/migrations/update-19-2-4/set-project-name.js +2 -2
  177. package/dist/src/migrations/update-20-0-0/move-use-daemon-process.js +2 -2
  178. package/dist/src/migrations/update-20-0-1/use-legacy-cache.js +2 -2
  179. package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.js +2 -2
  180. package/dist/src/migrations/update-21-0-0/release-version-config-changes.js +2 -2
  181. package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.js +2 -2
  182. package/dist/src/migrations/update-21-0-0/remove-legacy-cache.js +2 -2
  183. package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.js +2 -2
  184. package/dist/src/migrations/update-22-0-0/release-version-config-changes.js +2 -2
  185. package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.js +2 -2
  186. package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.js +2 -2
  187. package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.js +2 -2
  188. package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.js +2 -2
  189. package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.js +2 -2
  190. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.d.ts +12 -0
  191. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.js +250 -0
  192. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.md +50 -0
  193. package/dist/src/native/index.d.ts +37 -4
  194. package/dist/src/native/index.js +71 -28
  195. package/dist/src/native/native-bindings.js +3 -0
  196. package/dist/src/native/native-file-cache-location.d.ts +17 -1
  197. package/dist/src/native/native-file-cache-location.js +86 -12
  198. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  199. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  200. package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +3 -3
  201. package/dist/src/nx-cloud/utilities/get-cloud-options.js +5 -2
  202. package/dist/src/nx-cloud/utilities/onboarding.js +5 -2
  203. package/dist/src/nx-cloud/utilities/url-shorten.d.ts +1 -4
  204. package/dist/src/nx-cloud/utilities/url-shorten.js +9 -8
  205. package/dist/src/plugins/js/lock-file/bun-parser.js +43 -10
  206. package/dist/src/plugins/js/lock-file/lock-file.d.ts +46 -4
  207. package/dist/src/plugins/js/lock-file/lock-file.js +192 -15
  208. package/dist/src/plugins/js/lock-file/pnpm-parser.js +420 -64
  209. package/dist/src/plugins/js/lock-file/project-graph-pruning.d.ts +25 -1
  210. package/dist/src/plugins/js/lock-file/project-graph-pruning.js +92 -12
  211. package/dist/src/plugins/js/lock-file/pruned-output.d.ts +330 -0
  212. package/dist/src/plugins/js/lock-file/pruned-output.js +1441 -0
  213. package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +1 -0
  214. package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +9 -5
  215. package/dist/src/plugins/js/project-graph/affected/npm-packages.js +51 -20
  216. package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +14 -4
  217. package/dist/src/project-graph/affected/affected-project-graph-models.d.ts +1 -1
  218. package/dist/src/project-graph/affected/affected-project-graph.d.ts +1 -1
  219. package/dist/src/project-graph/affected/affected-project-graph.js +2 -2
  220. package/dist/src/project-graph/affected/locators/project-glob-changes.js +5 -2
  221. package/dist/src/project-graph/build-project-graph.js +7 -1
  222. package/dist/src/project-graph/error-types.d.ts +12 -1
  223. package/dist/src/project-graph/error-types.js +27 -2
  224. package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +1 -0
  225. package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +18 -1
  226. package/dist/src/project-graph/plugins/isolation/messaging.d.ts +16 -3
  227. package/dist/src/project-graph/plugins/isolation/messaging.js +3 -0
  228. package/dist/src/project-graph/plugins/isolation/plugin-worker.js +58 -8
  229. package/dist/src/project-graph/plugins/loaded-nx-plugin.js +1 -0
  230. package/dist/src/project-graph/project-graph.js +23 -0
  231. package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts +1 -0
  232. package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.js +16 -2
  233. package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +12 -8
  234. package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +30 -21
  235. package/dist/src/project-graph/utils/project-configuration/source-maps.d.ts +12 -5
  236. package/dist/src/project-graph/utils/project-configuration/source-maps.js +21 -7
  237. package/dist/src/project-graph/utils/project-configuration/target-defaults.d.ts +1 -1
  238. package/dist/src/project-graph/utils/project-configuration/target-defaults.js +26 -27
  239. package/dist/src/project-graph/utils/project-configuration/target-merging.js +50 -8
  240. package/dist/src/project-graph/utils/project-configuration/target-normalization.js +149 -6
  241. package/dist/src/project-graph/utils/project-configuration/utils.d.ts +15 -0
  242. package/dist/src/project-graph/utils/project-configuration/utils.js +42 -6
  243. package/dist/src/project-graph/utils/project-configuration-utils.d.ts +15 -12
  244. package/dist/src/project-graph/utils/project-configuration-utils.js +79 -99
  245. package/dist/src/tasks-runner/is-tui-enabled.js +3 -1
  246. package/dist/src/tasks-runner/life-cycle.d.ts +2 -2
  247. package/dist/src/tasks-runner/life-cycle.js +2 -2
  248. package/dist/src/tasks-runner/life-cycles/performance-report.d.ts +12 -0
  249. package/dist/src/tasks-runner/life-cycles/performance-report.js +62 -3
  250. package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +26 -1
  251. package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +99 -5
  252. package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +26 -0
  253. package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +113 -17
  254. package/dist/src/tasks-runner/pseudo-terminal.d.ts +17 -3
  255. package/dist/src/tasks-runner/pseudo-terminal.js +22 -10
  256. package/dist/src/tasks-runner/run-command.js +28 -35
  257. package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +55 -0
  258. package/dist/src/tasks-runner/running-tasks/batch-process.js +161 -8
  259. package/dist/src/tasks-runner/task-env.d.ts +9 -0
  260. package/dist/src/tasks-runner/task-env.js +31 -4
  261. package/dist/src/tasks-runner/task-orchestrator.d.ts +72 -1
  262. package/dist/src/tasks-runner/task-orchestrator.js +182 -18
  263. package/dist/src/tasks-runner/utils.js +2 -6
  264. package/dist/src/utils/acknowledge-build-scripts.js +7 -5
  265. package/dist/src/utils/analytics-enabled.d.ts +7 -0
  266. package/dist/src/utils/analytics-enabled.js +11 -0
  267. package/dist/src/utils/analytics-prompt.d.ts +0 -6
  268. package/dist/src/utils/analytics-prompt.js +4 -58
  269. package/dist/src/utils/assert-workspace-validity.js +7 -2
  270. package/dist/src/utils/catalog/bun-manager-utils.d.ts +8 -0
  271. package/dist/src/utils/catalog/bun-manager-utils.js +174 -0
  272. package/dist/src/utils/catalog/bun-manager.d.ts +28 -0
  273. package/dist/src/utils/catalog/bun-manager.js +130 -0
  274. package/dist/src/utils/catalog/index.d.ts +1 -1
  275. package/dist/src/utils/catalog/index.js +1 -1
  276. package/dist/src/utils/catalog/manager-factory.js +3 -0
  277. package/dist/src/utils/catalog/manager-utils.d.ts +8 -1
  278. package/dist/src/utils/catalog/manager-utils.js +9 -4
  279. package/dist/src/utils/catalog/manager.d.ts +13 -1
  280. package/dist/src/utils/catalog/manager.js +30 -0
  281. package/dist/src/utils/catalog/pnpm-manager.d.ts +2 -1
  282. package/dist/src/utils/catalog/pnpm-manager.js +3 -0
  283. package/dist/src/utils/catalog/types.d.ts +4 -0
  284. package/dist/src/utils/catalog/yarn-manager.d.ts +6 -2
  285. package/dist/src/utils/catalog/yarn-manager.js +23 -32
  286. package/dist/src/utils/child-process.d.ts +31 -1
  287. package/dist/src/utils/child-process.js +103 -0
  288. package/dist/src/utils/chunkify.d.ts +7 -1
  289. package/dist/src/utils/chunkify.js +10 -3
  290. package/dist/src/utils/exit-codes.d.ts +9 -0
  291. package/dist/src/utils/exit-codes.js +19 -0
  292. package/dist/src/utils/fileutils.d.ts +5 -0
  293. package/dist/src/utils/fileutils.js +7 -2
  294. package/dist/src/utils/formatters/index.d.ts +13 -0
  295. package/dist/src/utils/formatters/index.js +74 -0
  296. package/dist/src/utils/formatters/oxfmt.d.ts +32 -0
  297. package/dist/src/utils/formatters/oxfmt.js +764 -0
  298. package/dist/src/utils/formatters/prettier.d.ts +26 -0
  299. package/dist/src/utils/formatters/prettier.js +201 -0
  300. package/dist/src/utils/formatters/shared.d.ts +5 -0
  301. package/dist/src/utils/formatters/shared.js +8 -0
  302. package/dist/src/utils/git-utils.d.ts +48 -2
  303. package/dist/src/utils/git-utils.js +220 -14
  304. package/dist/src/utils/git-worktrees.d.ts +30 -0
  305. package/dist/src/utils/git-worktrees.js +212 -0
  306. package/dist/src/utils/has-nx-js-plugin.d.ts +1 -1
  307. package/dist/src/utils/has-nx-js-plugin.js +1 -1
  308. package/dist/src/utils/ignore.d.ts +170 -1
  309. package/dist/src/utils/ignore.js +263 -11
  310. package/dist/src/utils/kill-child-on-host-exit.d.ts +7 -0
  311. package/dist/src/utils/kill-child-on-host-exit.js +42 -0
  312. package/dist/src/utils/long-running-target.d.ts +10 -0
  313. package/dist/src/utils/long-running-target.js +19 -0
  314. package/dist/src/utils/min-release-age/behavior/bun.js +7 -11
  315. package/dist/src/utils/min-release-age/behavior/npm.js +5 -2
  316. package/dist/src/utils/min-release-age/packument.js +1 -1
  317. package/dist/src/utils/nx-console-prompt.js +3 -6
  318. package/dist/src/utils/nx-tmp-dir.d.ts +18 -0
  319. package/dist/src/utils/nx-tmp-dir.js +40 -0
  320. package/dist/src/utils/output.d.ts +153 -0
  321. package/dist/src/utils/output.js +289 -5
  322. package/dist/src/utils/owned-private-dir.d.ts +132 -0
  323. package/dist/src/utils/owned-private-dir.js +323 -0
  324. package/dist/src/utils/package-json.d.ts +2 -0
  325. package/dist/src/utils/package-json.js +11 -7
  326. package/dist/src/utils/package-manager-config/bunfig.d.ts +14 -0
  327. package/dist/src/utils/package-manager-config/bunfig.js +49 -0
  328. package/dist/src/utils/package-manager-config/npmrc.d.ts +23 -0
  329. package/dist/src/utils/package-manager-config/npmrc.js +124 -0
  330. package/dist/src/utils/package-manager-config/pnpm-config.d.ts +17 -0
  331. package/dist/src/utils/package-manager-config/pnpm-config.js +60 -0
  332. package/dist/src/utils/package-manager.d.ts +23 -2
  333. package/dist/src/utils/package-manager.js +262 -42
  334. package/dist/src/utils/params.d.ts +7 -1
  335. package/dist/src/utils/params.js +64 -6
  336. package/dist/src/utils/plugins/core-plugins.js +4 -0
  337. package/dist/src/utils/prompt-helpers.d.ts +53 -0
  338. package/dist/src/utils/prompt-helpers.js +111 -0
  339. package/dist/src/utils/provenance.js +6 -14
  340. package/dist/src/utils/registry-config/bun.d.ts +2 -0
  341. package/dist/src/utils/registry-config/bun.js +257 -0
  342. package/dist/src/utils/registry-config/index.d.ts +13 -0
  343. package/dist/src/utils/registry-config/index.js +102 -0
  344. package/dist/src/utils/registry-config/pnpm.d.ts +2 -0
  345. package/dist/src/utils/registry-config/pnpm.js +1551 -0
  346. package/dist/src/utils/registry-config/utils.d.ts +195 -0
  347. package/dist/src/utils/registry-config/utils.js +496 -0
  348. package/dist/src/utils/registry-config/yarn-berry.d.ts +2 -0
  349. package/dist/src/utils/registry-config/yarn-berry.js +612 -0
  350. package/dist/src/utils/registry-config/yarn-classic.d.ts +2 -0
  351. package/dist/src/utils/registry-config/yarn-classic.js +1001 -0
  352. package/dist/src/utils/safe-spawn.d.ts +24 -0
  353. package/dist/src/utils/safe-spawn.js +104 -0
  354. package/dist/src/utils/shell-quoting.d.ts +15 -0
  355. package/dist/src/utils/shell-quoting.js +35 -0
  356. package/dist/src/utils/wait-for-socket-connection.d.ts +11 -0
  357. package/dist/src/utils/wait-for-socket-connection.js +14 -8
  358. package/dist/src/utils/workspace-id.d.ts +20 -0
  359. package/dist/src/utils/workspace-id.js +54 -0
  360. package/dist/src/utils/write-formatted-json-file.d.ts +3 -2
  361. package/dist/src/utils/write-formatted-json-file.js +5 -4
  362. package/migrations.json +6 -0
  363. package/package.json +29 -19
  364. package/dist/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts +0 -19
  365. package/dist/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +0 -81
  366. package/dist/src/utils/is-using-prettier.d.ts +0 -3
  367. package/dist/src/utils/is-using-prettier.js +0 -62
  368. package/dist/src/utils/min-release-age/npmrc.d.ts +0 -15
  369. package/dist/src/utils/min-release-age/npmrc.js +0 -45
@@ -0,0 +1,378 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.checkFilesAreInputs = checkFilesAreInputs;
4
+ exports.checkFilesAreOutputs = checkFilesAreOutputs;
5
+ exports.getTaskRawInputs = getTaskRawInputs;
6
+ exports.getTaskOutputs = getTaskOutputs;
7
+ exports._resetContextForTesting = _resetContextForTesting;
8
+ const path_1 = require("path");
9
+ const nx_json_1 = require("../config/nx-json");
10
+ const native_1 = require("../native");
11
+ const project_graph_1 = require("../project-graph/project-graph");
12
+ const create_task_graph_1 = require("../tasks-runner/create-task-graph");
13
+ const utils_1 = require("../tasks-runner/utils");
14
+ const path_2 = require("../utils/path");
15
+ const project_graph_utils_1 = require("../utils/project-graph-utils");
16
+ const split_target_1 = require("../utils/split-target");
17
+ const workspace_root_1 = require("../utils/workspace-root");
18
+ const hash_plan_inspector_1 = require("./hash-plan-inspector");
19
+ const task_hasher_1 = require("./task-hasher");
20
+ let cachedContext = null;
21
+ function getContext(seed) {
22
+ // Only a fulfilled context is cached — caching a rejected promise would
23
+ // poison the resolver for the rest of the process after one transient failure.
24
+ return (cachedContext ??= loadContext(seed).catch((e) => {
25
+ cachedContext = null;
26
+ throw e;
27
+ }));
28
+ }
29
+ async function loadContext(seed) {
30
+ const projectGraph = seed?.projectGraph ?? (await (0, project_graph_1.createProjectGraphAsync)());
31
+ const nxJson = seed?.nxJson ?? (0, nx_json_1.readNxJson)(workspace_root_1.workspaceRoot) ?? {};
32
+ let inspector = null;
33
+ const getInspector = () =>
34
+ // As with the context itself, a rejection is not cached.
35
+ (inspector ??= initInspector(projectGraph, nxJson).catch((e) => {
36
+ inspector = null;
37
+ throw e;
38
+ }));
39
+ return { projectGraph, nxJson, getInspector };
40
+ }
41
+ async function initInspector(projectGraph, nxJson) {
42
+ const inspector = new hash_plan_inspector_1.HashPlanInspector(projectGraph, workspace_root_1.workspaceRoot, nxJson);
43
+ await inspector.init();
44
+ return inspector;
45
+ }
46
+ const identityCache = new Map();
47
+ const hashInputsCache = new Map();
48
+ const outputsCache = new Map();
49
+ const taskGraphCache = new Map();
50
+ const depsOutputsCache = new Map();
51
+ // ── Internal resolution helpers ──────────────────────────────────────────────
52
+ function resolveIdentity(taskId, projectGraph) {
53
+ const cached = identityCache.get(taskId);
54
+ if (cached)
55
+ return cached;
56
+ const [project, target, configuration] = (0, split_target_1.splitTarget)(taskId, projectGraph);
57
+ if (!project || !target) {
58
+ throw new Error(`Invalid taskId "${taskId}" — expected "project:target[:configuration]"`);
59
+ }
60
+ const projectNode = projectGraph.nodes[project];
61
+ if (!projectNode) {
62
+ throw new Error(`Invalid taskId "${taskId}" — project "${project}" does not exist in the project graph.`);
63
+ }
64
+ const targetConfig = projectNode.data?.targets?.[target];
65
+ if (!targetConfig) {
66
+ throw new Error(`Invalid taskId "${taskId}" — project "${project}" has no target "${target}".`);
67
+ }
68
+ // Substituting defaultConfiguration for a configuration that does not exist
69
+ // would answer confidently about a *different* task — and configurations
70
+ // routinely change `outputPath`, so the answer could be wrong in either
71
+ // direction. `nx run` errors here; so do we.
72
+ if (configuration &&
73
+ !(0, project_graph_utils_1.projectHasTargetAndConfiguration)(projectNode, target, configuration)) {
74
+ const available = Object.keys(targetConfig.configurations ?? {});
75
+ throw new Error(`Invalid taskId "${taskId}" — target "${target}" of project "${project}" has no configuration "${configuration}".` +
76
+ (available.length
77
+ ? ` Available configurations: ${available.join(', ')}.`
78
+ : ' It has no configurations.'));
79
+ }
80
+ const effectiveConfiguration = configuration ?? targetConfig.defaultConfiguration;
81
+ const identity = {
82
+ project,
83
+ target,
84
+ configuration: effectiveConfiguration,
85
+ canonicalTaskId: (0, utils_1.createTaskId)(project, target, effectiveConfiguration),
86
+ projectNode,
87
+ };
88
+ identityCache.set(taskId, identity);
89
+ return identity;
90
+ }
91
+ async function getRawInputs(taskId, { projectGraph, getInspector }) {
92
+ if (hashInputsCache.has(taskId)) {
93
+ return hashInputsCache.get(taskId) ?? null;
94
+ }
95
+ const { project, target, configuration, canonicalTaskId } = resolveIdentity(taskId, projectGraph);
96
+ const inspector = await getInspector();
97
+ // `null` means "this task is absent from the hash plan" — any other failure
98
+ // is a real error and propagates to the caller.
99
+ const planResult = inspector.inspectTaskInputs({
100
+ project,
101
+ target,
102
+ configuration,
103
+ });
104
+ const result = planResult[canonicalTaskId] ?? null;
105
+ hashInputsCache.set(taskId, result);
106
+ return result;
107
+ }
108
+ function getOutputs(taskId, projectGraph) {
109
+ const cached = outputsCache.get(taskId);
110
+ if (cached !== undefined)
111
+ return cached;
112
+ const { project, target, configuration, projectNode } = resolveIdentity(taskId, projectGraph);
113
+ const outputs = (0, utils_1.getOutputsForTargetAndConfiguration)({ project, target, configuration }, {}, projectNode).map(path_2.normalizePath);
114
+ outputsCache.set(taskId, outputs);
115
+ return outputs;
116
+ }
117
+ /**
118
+ * Configured outputs that `getOutputsForTargetAndConfiguration` dropped because
119
+ * an `{options.x}` token had no value to interpolate. The resolver discards them
120
+ * silently, so they have to be recovered from the target configuration.
121
+ */
122
+ function getUnresolvedOutputs(taskId, projectGraph) {
123
+ const { target, configuration, projectNode } = resolveIdentity(taskId, projectGraph);
124
+ const targetConfig = projectNode.data.targets[target];
125
+ const options = {
126
+ ...targetConfig.options,
127
+ ...(configuration
128
+ ? targetConfig.configurations?.[configuration]
129
+ : undefined),
130
+ };
131
+ return (targetConfig.outputs ?? []).filter((output) => [...output.matchAll(/\{options\.([^}]+)\}/g)].some(([, key]) => {
132
+ const value = key.split('.').reduce((acc, k) => acc?.[k], options);
133
+ return value === undefined;
134
+ }));
135
+ }
136
+ function getTaskGraph(taskId, projectGraph) {
137
+ const cached = taskGraphCache.get(taskId);
138
+ if (cached)
139
+ return cached;
140
+ const { project, target, configuration } = resolveIdentity(taskId, projectGraph);
141
+ const taskGraph = (0, create_task_graph_1.createTaskGraph)(projectGraph, {}, [project], [target], configuration, {}, false);
142
+ taskGraphCache.set(taskId, taskGraph);
143
+ return taskGraph;
144
+ }
145
+ function getDepsOutputs(taskId, { projectGraph, nxJson }) {
146
+ if (depsOutputsCache.has(taskId))
147
+ return depsOutputsCache.get(taskId);
148
+ const { project, target } = resolveIdentity(taskId, projectGraph);
149
+ const result = (0, task_hasher_1.getInputs)({ target: { project, target } }, projectGraph, nxJson)
150
+ .depsOutputs ?? [];
151
+ depsOutputsCache.set(taskId, result);
152
+ return result;
153
+ }
154
+ function collectUpstreamTaskIds(taskGraph, rootTaskId, transitive) {
155
+ const direct = taskGraph.dependencies[rootTaskId] ?? [];
156
+ if (!transitive)
157
+ return [...direct];
158
+ const collected = new Set();
159
+ const walk = (id) => {
160
+ for (const dep of taskGraph.dependencies[id] ?? []) {
161
+ if (collected.has(dep))
162
+ continue;
163
+ collected.add(dep);
164
+ walk(dep);
165
+ }
166
+ };
167
+ walk(rootTaskId);
168
+ return [...collected];
169
+ }
170
+ /**
171
+ * Matches a single path against a task's whole output pattern list using the
172
+ * native glob engine (`globset`) that the task runner's expand_outputs also
173
+ * builds on: non-glob patterns match themselves and anything nested under them,
174
+ * and negated (`!`-prefixed) patterns act as exclusions over the full set.
175
+ */
176
+ function isOutput(taskId, path, projectGraph) {
177
+ const patterns = getOutputs(taskId, projectGraph);
178
+ return (0, native_1.matchOutputPaths)(patterns, [(0, path_2.normalizePath)(path)])[0];
179
+ }
180
+ function matchesDependentTaskOutputs(taskId, path, ctx) {
181
+ const normalized = (0, path_2.normalizePath)(path);
182
+ const depsOutputs = getDepsOutputs(taskId, ctx);
183
+ if (depsOutputs.length === 0)
184
+ return false;
185
+ const taskGraph = getTaskGraph(taskId, ctx.projectGraph);
186
+ const { canonicalTaskId } = resolveIdentity(taskId, ctx.projectGraph);
187
+ if (!taskGraph.tasks[canonicalTaskId])
188
+ return false;
189
+ for (const { dependentTasksOutputFiles, transitive } of depsOutputs) {
190
+ const glob = (0, path_2.normalizePath)(dependentTasksOutputFiles);
191
+ if (!(0, native_1.matchGlobPaths)([glob], [normalized])[0])
192
+ continue;
193
+ const upstreamIds = collectUpstreamTaskIds(taskGraph, canonicalTaskId, !!transitive);
194
+ for (const upstreamId of upstreamIds) {
195
+ if (isOutput(upstreamId, normalized, ctx.projectGraph))
196
+ return true;
197
+ }
198
+ }
199
+ return false;
200
+ }
201
+ /**
202
+ * Coerces a caller-supplied path to the workspace-relative, forward-slashed
203
+ * form the hash plan and output patterns are expressed in. A path outside the
204
+ * workspace stays outside (`../…`) and simply matches nothing — it cannot be a
205
+ * declared input or output, so "unmatched" is the true answer rather than an
206
+ * error.
207
+ */
208
+ function toWorkspaceRelativePath(candidatePath) {
209
+ // Backslash separators must be split *before* anchoring: on POSIX a backslash
210
+ // is an ordinary filename character, so `dep\..\..` would ride through
211
+ // join/relative as one opaque segment and only become a live `..` traversal
212
+ // after the swap. Swapped directly rather than via normalizePath, which also
213
+ // strips a Windows drive letter: isAbsolute accepts the drive-less form too,
214
+ // but relative() then resolves it against the cwd's drive, so a path on
215
+ // another drive (`D:\…`) could be relativized to *inside* the workspace — a
216
+ // Windows-only fail-open no POSIX test can catch.
217
+ const forwardSlashed = candidatePath.replace(/\\/g, '/');
218
+ // Anchoring a relative path to the workspace root before relativizing it back
219
+ // resolves any `..` segments. Left in, they would traverse *through* a pattern
220
+ // that globset had already matched — `dist/libs/dep/../../../secrets.env`
221
+ // matching an output of `dist/libs/dep`.
222
+ const absolute = (0, path_1.isAbsolute)(forwardSlashed)
223
+ ? forwardSlashed
224
+ : (0, path_1.join)(workspace_root_1.workspaceRoot, forwardSlashed);
225
+ return (0, path_2.normalizePath)((0, path_1.relative)(workspace_root_1.workspaceRoot, absolute));
226
+ }
227
+ /**
228
+ * The task's hash inputs, or an error. A task missing from its own hash plan is
229
+ * a failure to *determine* the inputs — reporting every file as unmatched would
230
+ * tell a sandbox-violation consumer that all of them are illegal.
231
+ */
232
+ async function requireRawInputs(taskId, ctx) {
233
+ const raw = await getRawInputs(taskId, ctx);
234
+ if (!raw) {
235
+ throw new Error(`Could not determine the inputs of task "${taskId}" — it is not present in its own hash plan.`);
236
+ }
237
+ return raw;
238
+ }
239
+ function classifyInput(taskId, candidate, raw, ctx) {
240
+ // `environment`, `runtime` and `external` hold names rather than paths, so
241
+ // they are matched against the value exactly as the caller supplied it.
242
+ if (raw.environment.includes(candidate.value))
243
+ return 'environment';
244
+ if (raw.runtime.includes(candidate.value))
245
+ return 'runtime';
246
+ if (raw.external.includes(candidate.value))
247
+ return 'external';
248
+ const path = toWorkspaceRelativePath(candidate.path);
249
+ if (raw.files.includes(path))
250
+ return 'files';
251
+ if (raw.depOutputs.includes(path))
252
+ return 'depOutputs';
253
+ return matchesDependentTaskOutputs(taskId, path, ctx)
254
+ ? 'dependentTasksOutputFiles'
255
+ : null;
256
+ }
257
+ /**
258
+ * Check which values are legitimate inputs for the given task. A value matches
259
+ * when it is:
260
+ * - a declared environment variable, runtime input, or external dependency;
261
+ * - a file in the task's declared input file list;
262
+ * - a file in the task's materialized `depOutputs` (upstream has run);
263
+ * - a file matching a `dependentTasksOutputFiles` glob declared on the task
264
+ * that lies inside the declared outputs of an upstream task in the task
265
+ * graph (static — works even when upstream tasks have not yet run).
266
+ *
267
+ * `categories` records the rule each matched value satisfied. Paths may be
268
+ * workspace-relative or absolute; absolute ones are relativized against the
269
+ * workspace root, and a path outside the workspace simply matches nothing. A
270
+ * caller resolving paths against a cwd passes an {@link InputCandidate} so that
271
+ * names are still matched verbatim.
272
+ */
273
+ async function checkFilesAreInputs(taskId, files) {
274
+ const ctx = await getContext();
275
+ // Resolve the task and its hash plan eagerly, so an unknown task or an
276
+ // undeterminable plan errors even when the file list is empty — rather than
277
+ // being reported as "none of these files are inputs".
278
+ resolveIdentity(taskId, ctx.projectGraph);
279
+ const raw = await requireRawInputs(taskId, ctx);
280
+ const matched = [];
281
+ const unmatched = [];
282
+ const categories = new Map();
283
+ // Results are keyed by value, so a value given two path forms could land in
284
+ // both matched and unmatched at once. Exact duplicates are collapsed instead.
285
+ const seenPaths = new Map();
286
+ for (const file of files) {
287
+ const candidate = typeof file === 'string' ? { value: file, path: file } : file;
288
+ const seenPath = seenPaths.get(candidate.value);
289
+ if (seenPath !== undefined) {
290
+ if (seenPath !== candidate.path) {
291
+ throw new Error(`Value "${candidate.value}" was given conflicting path forms "${seenPath}" and "${candidate.path}".`);
292
+ }
293
+ continue;
294
+ }
295
+ seenPaths.set(candidate.value, candidate.path);
296
+ const category = classifyInput(taskId, candidate, raw, ctx);
297
+ if (category) {
298
+ matched.push(candidate.value);
299
+ categories.set(candidate.value, category);
300
+ }
301
+ else {
302
+ unmatched.push(candidate.value);
303
+ }
304
+ }
305
+ return { matched, unmatched, categories };
306
+ }
307
+ /**
308
+ * Check which files match the output globs declared for the given task.
309
+ * Uses the same path-matching logic as the task runner (directory containment
310
+ * + glob matching through the native `globset` engine), including negated
311
+ * (`!`-prefixed) patterns acting as exclusions over the whole pattern set.
312
+ *
313
+ * Paths may be workspace-relative or absolute; absolute ones are relativized
314
+ * against the workspace root. An output pattern whose `{options.*}` token has no
315
+ * value resolves to nothing — exactly as the task runner drops it — so a file it
316
+ * would have covered is reported `unmatched`, like any other non-output.
317
+ *
318
+ * That last case makes `unmatched` two answers in one: "not an output" and
319
+ * "the outputs could not be determined". A consumer judging sandbox violations
320
+ * cannot tell them apart, and would call the second one illegal. `getTaskOutputs`
321
+ * already computes the `unresolved` list this would need; surfacing it here is
322
+ * deliberately deferred until a consumer's contract asks for the distinction.
323
+ */
324
+ async function checkFilesAreOutputs(taskId, files) {
325
+ const ctx = await getContext();
326
+ // Validate taskId eagerly so callers always get an error for an unknown or
327
+ // malformed task, even when the file list is empty.
328
+ resolveIdentity(taskId, ctx.projectGraph);
329
+ const patterns = getOutputs(taskId, ctx.projectGraph);
330
+ const results = (0, native_1.matchOutputPaths)(patterns, files.map(toWorkspaceRelativePath));
331
+ const matched = [];
332
+ const unmatched = [];
333
+ files.forEach((file, i) => {
334
+ if (results[i]) {
335
+ matched.push(file);
336
+ }
337
+ else {
338
+ unmatched.push(file);
339
+ }
340
+ });
341
+ return { matched, unmatched };
342
+ }
343
+ // ── Renderer helpers (used by `nx show target`) ──────────────────────────────
344
+ /**
345
+ * Returns the full hash inputs for a task (files + runtime + env + depOutputs
346
+ * + external). Used internally by the `nx show target --inputs` renderer.
347
+ */
348
+ async function getTaskRawInputs(taskId, seed) {
349
+ const ctx = await getContext(seed);
350
+ return getRawInputs(taskId, ctx);
351
+ }
352
+ /**
353
+ * Returns the outputs declared for a task, resolved against its effective
354
+ * configuration. Used internally by the `nx show target --outputs` renderer.
355
+ */
356
+ async function getTaskOutputs(taskId, seed) {
357
+ const ctx = await getContext(seed);
358
+ const resolved = getOutputs(taskId, ctx.projectGraph);
359
+ return {
360
+ resolved,
361
+ expanded: (0, native_1.expandOutputs)(workspace_root_1.workspaceRoot, resolved),
362
+ unresolved: getUnresolvedOutputs(taskId, ctx.projectGraph),
363
+ };
364
+ }
365
+ // ── Test utilities ───────────────────────────────────────────────────────────
366
+ /**
367
+ * Resets all module-level caches. Call this in `beforeEach` when testing so
368
+ * each test gets a fresh context load. Not part of the public API.
369
+ * @internal
370
+ */
371
+ function _resetContextForTesting() {
372
+ cachedContext = null;
373
+ identityCache.clear();
374
+ hashInputsCache.clear();
375
+ outputsCache.clear();
376
+ taskGraphCache.clear();
377
+ depsOutputsCache.clear();
378
+ }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = default_1;
4
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
4
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
5
5
  const project_configuration_1 = require("../../generators/utils/project-configuration");
6
6
  const nx_json_1 = require("../../generators/utils/nx-json");
7
7
  const path_1 = require("path");
@@ -50,5 +50,5 @@ async function default_1(tree) {
50
50
  }
51
51
  (0, nx_json_1.updateNxJson)(tree, nxJson);
52
52
  }
53
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
53
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
54
54
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = default_1;
4
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
4
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
5
5
  const json_1 = require("../../generators/utils/json");
6
6
  async function default_1(tree) {
7
7
  (0, json_1.updateJson)(tree, 'package.json', (json) => {
@@ -12,5 +12,5 @@ async function default_1(tree) {
12
12
  }
13
13
  return json;
14
14
  });
15
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
15
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
16
16
  }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = default_1;
4
4
  const project_configuration_1 = require("../../generators/utils/project-configuration");
5
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
5
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
6
6
  const target_defaults_1 = require("../utils/target-defaults");
7
7
  async function default_1(tree) {
8
8
  updateDependsOnAndInputsInsideNxJson(tree);
@@ -20,7 +20,7 @@ async function default_1(tree) {
20
20
  (0, project_configuration_1.updateProjectConfiguration)(tree, projectName, projectConfiguration);
21
21
  }
22
22
  }
23
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
23
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
24
24
  }
25
25
  function updateDependsOnAndInputsInsideNxJson(tree) {
26
26
  const nxJson = (0, project_configuration_1.readNxJson)(tree);
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = default_1;
4
4
  const project_configuration_1 = require("../../generators/utils/project-configuration");
5
5
  const json_1 = require("../../generators/utils/json");
6
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
6
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
7
7
  async function default_1(tree) {
8
8
  (0, json_1.updateJson)(tree, 'package.json', (json) => {
9
9
  if (json.dependencies && json.dependencies['@nrwl/nx-cloud']) {
@@ -25,5 +25,5 @@ async function default_1(tree) {
25
25
  }
26
26
  }
27
27
  (0, project_configuration_1.updateNxJson)(tree, nxJson);
28
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
28
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
29
29
  }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = removeRunCommandsOutputPath;
4
4
  const path_1 = require("../../utils/path");
5
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
5
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
6
6
  const json_1 = require("../../generators/utils/json");
7
7
  const project_configuration_1 = require("../../generators/utils/project-configuration");
8
8
  const target_defaults_1 = require("../utils/target-defaults");
@@ -29,7 +29,7 @@ async function removeRunCommandsOutputPath(tree) {
29
29
  return json;
30
30
  });
31
31
  }
32
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
32
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
33
33
  }
34
34
  function updateTargetBlock(target) {
35
35
  let changed = false;
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = update;
4
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
4
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
5
5
  const nx_json_1 = require("../../generators/utils/nx-json");
6
6
  const json_1 = require("../../generators/utils/json");
7
7
  const output_1 = require("../../utils/output");
@@ -18,7 +18,7 @@ async function update(tree) {
18
18
  warnNpmScopeHasChanged(tree, nxJson);
19
19
  delete nxJson['npmScope'];
20
20
  (0, nx_json_1.updateNxJson)(tree, nxJson);
21
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
21
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
22
22
  }
23
23
  function warnNpmScopeHasChanged(tree, nxJson) {
24
24
  const originalScope = nxJson['npmScope'];
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = migrate;
4
4
  const json_1 = require("../../generators/utils/json");
5
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
5
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
6
6
  const nx_json_1 = require("../../generators/utils/nx-json");
7
7
  const update_manager_1 = require("../../nx-cloud/update-manager");
8
8
  const run_command_1 = require("../../tasks-runner/run-command");
@@ -76,7 +76,7 @@ async function migrate(tree) {
76
76
  }
77
77
  return nxJson;
78
78
  });
79
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
79
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
80
80
  }
81
81
  async function isNxCloudClientSupported(nxJson) {
82
82
  const nxCloudOptions = (0, run_command_1.getRunnerOptions)('default', nxJson, {}, true);
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = update;
4
4
  const nx_json_1 = require("../../generators/utils/nx-json");
5
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
5
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
6
6
  /**
7
7
  * Updates existing workspaces to move nx.json's affected.defaultBase to nx.json's base.
8
8
  */
@@ -16,5 +16,5 @@ async function update(host) {
16
16
  }
17
17
  (0, nx_json_1.updateNxJson)(host, nxJson);
18
18
  }
19
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(host);
19
+ await (0, format_changed_files_1.formatChangedFiles)(host);
20
20
  }
@@ -2,10 +2,10 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = migrate;
4
4
  const nx_json_1 = require("../../generators/utils/nx-json");
5
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
5
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
6
6
  async function migrate(tree) {
7
7
  const nxJson = (0, nx_json_1.readNxJson)(tree);
8
8
  nxJson.useInferencePlugins = false;
9
9
  (0, nx_json_1.updateNxJson)(tree, nxJson);
10
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
10
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
11
11
  }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = setProjectName;
4
4
  const to_project_name_1 = require("../../config/to-project-name");
5
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
5
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
6
6
  const json_1 = require("../../generators/utils/json");
7
7
  const project_configuration_1 = require("../../generators/utils/project-configuration");
8
8
  async function setProjectName(tree) {
@@ -30,5 +30,5 @@ async function setProjectName(tree) {
30
30
  }
31
31
  }
32
32
  }
33
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
33
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
34
34
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = update;
4
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
4
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
5
5
  const nx_json_1 = require("../../generators/utils/nx-json");
6
6
  async function update(tree) {
7
7
  const nxJson = (0, nx_json_1.readNxJson)(tree);
@@ -21,5 +21,5 @@ async function update(tree) {
21
21
  }
22
22
  (0, nx_json_1.updateNxJson)(tree, nxJson);
23
23
  }
24
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
24
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
25
25
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = update;
4
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
4
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
5
5
  const nx_json_1 = require("../../generators/utils/nx-json");
6
6
  async function update(tree) {
7
7
  const nxJson = (0, nx_json_1.readNxJson)(tree);
@@ -16,5 +16,5 @@ async function update(tree) {
16
16
  nxJson.useLegacyCache = true;
17
17
  }
18
18
  (0, nx_json_1.updateNxJson)(tree, nxJson);
19
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
19
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
20
20
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = update;
4
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
4
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
5
5
  const nx_json_1 = require("../../generators/utils/nx-json");
6
6
  async function update(tree) {
7
7
  const nxJson = (0, nx_json_1.readNxJson)(tree);
@@ -34,5 +34,5 @@ async function update(tree) {
34
34
  }
35
35
  }
36
36
  (0, nx_json_1.updateNxJson)(tree, nxJson);
37
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
37
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
38
38
  }
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = update;
4
4
  const node_path_1 = require("node:path");
5
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
5
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
6
6
  const json_1 = require("../../generators/utils/json");
7
7
  const nx_json_1 = require("../../generators/utils/nx-json");
8
8
  const project_configuration_1 = require("../../generators/utils/project-configuration");
@@ -97,5 +97,5 @@ async function update(tree) {
97
97
  }
98
98
  }
99
99
  (0, nx_json_1.updateNxJson)(tree, nxJson);
100
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
100
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
101
101
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = update;
4
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
4
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
5
5
  const nx_json_1 = require("../../generators/utils/nx-json");
6
6
  function isCustomRunnerPath(modulePath) {
7
7
  return !['nx-cloud', '@nrwl/nx-cloud', 'nx/tasks-runners/default'].includes(modulePath);
@@ -33,6 +33,6 @@ async function update(tree) {
33
33
  delete nxJson.tasksRunnerOptions;
34
34
  }
35
35
  (0, nx_json_1.updateNxJson)(tree, nxJson);
36
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
36
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
37
37
  return nextSteps;
38
38
  }
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = update;
4
- const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
4
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
5
5
  const nx_json_1 = require("../../generators/utils/nx-json");
6
6
  async function update(tree) {
7
7
  const nxJson = (0, nx_json_1.readNxJson)(tree);
@@ -13,5 +13,5 @@ async function update(tree) {
13
13
  delete nxJson.useLegacyCache;
14
14
  }
15
15
  (0, nx_json_1.updateNxJson)(tree, nxJson);
16
- await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
16
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
17
17
  }