nx 23.2.0-beta.0 → 23.2.0-beta.10

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 (374) hide show
  1. package/dist/bin/init-local.js +3 -5
  2. package/dist/bin/nx.js +3 -1
  3. package/dist/release/changelog-renderer/index.js +4 -5
  4. package/dist/release/index.d.ts +1 -1
  5. package/dist/src/adapter/ngcli-adapter.js +60 -1
  6. package/dist/src/ai/set-up-ai-agents/set-up-ai-agents.js +35 -15
  7. package/dist/src/analytics/analytics.d.ts +6 -0
  8. package/dist/src/analytics/analytics.js +16 -10
  9. package/dist/src/analytics/index.d.ts +1 -1
  10. package/dist/src/analytics/index.js +2 -1
  11. package/dist/src/command-line/add/add.js +5 -0
  12. package/dist/src/command-line/affected/affected.js +1 -0
  13. package/dist/src/command-line/completion/command-object.js +7 -12
  14. package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +19 -25
  15. package/dist/src/command-line/format/format.js +84 -101
  16. package/dist/src/command-line/generate/generate.js +35 -35
  17. package/dist/src/command-line/graph/graph.d.ts +1 -0
  18. package/dist/src/command-line/graph/graph.js +15 -6
  19. package/dist/src/command-line/import/import.js +30 -40
  20. package/dist/src/command-line/init/ai-agent-prompts.d.ts +1 -1
  21. package/dist/src/command-line/init/ai-agent-prompts.js +12 -17
  22. package/dist/src/command-line/init/command-object.js +14 -4
  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 +91 -0
  56. package/dist/src/command-line/migrate/execute-migration.js +474 -0
  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 +33 -19
  67. package/dist/src/command-line/migrate/migrate.d.ts +29 -113
  68. package/dist/src/command-line/migrate/migrate.js +666 -664
  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 +20 -2
  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/utils/shared.d.ts +2 -2
  120. package/dist/src/command-line/release/version/release-group-processor.d.ts +24 -0
  121. package/dist/src/command-line/release/version/release-group-processor.js +80 -6
  122. package/dist/src/command-line/release/version/resolve-current-version.js +7 -10
  123. package/dist/src/command-line/release/version/version-actions.d.ts +27 -2
  124. package/dist/src/command-line/release/version/version-actions.js +9 -1
  125. package/dist/src/command-line/release/version.js +10 -6
  126. package/dist/src/command-line/reset/reset.js +6 -1
  127. package/dist/src/command-line/run/run-one.js +1 -0
  128. package/dist/src/command-line/run-many/run-many.js +1 -0
  129. package/dist/src/command-line/show/show-target/inputs.js +50 -153
  130. package/dist/src/command-line/show/show-target/outputs.js +48 -173
  131. package/dist/src/command-line/show/show-target/utils.d.ts +28 -0
  132. package/dist/src/command-line/show/show-target/utils.js +83 -3
  133. package/dist/src/command-line/watch/watch.js +13 -0
  134. package/dist/src/command-line/yargs-utils/shared-options.d.ts +2 -2
  135. package/dist/src/command-line/yargs-utils/shared-options.js +3 -1
  136. package/dist/src/commands-runner/create-command-graph.js +5 -0
  137. package/dist/src/config/misc-interfaces.d.ts +19 -7
  138. package/dist/src/config/nx-json.d.ts +5 -3
  139. package/dist/src/core/graph/main.js +1 -1
  140. package/dist/src/core/graph/styles.js +1 -1
  141. package/dist/src/daemon/client/client.d.ts +52 -1
  142. package/dist/src/daemon/client/client.js +160 -36
  143. package/dist/src/daemon/client/daemon-environment.d.ts +17 -0
  144. package/dist/src/daemon/client/daemon-environment.js +110 -2
  145. package/dist/src/daemon/client/daemon-socket-messenger.js +4 -0
  146. package/dist/src/daemon/message-types/daemon-message.d.ts +32 -0
  147. package/dist/src/daemon/message-types/daemon-message.js +25 -0
  148. package/dist/src/daemon/server/file-watching/file-watcher-sockets.d.ts +5 -0
  149. package/dist/src/daemon/server/file-watching/file-watcher-sockets.js +16 -0
  150. package/dist/src/daemon/server/handle-tasks-execution-hooks.d.ts +1 -1
  151. package/dist/src/daemon/server/latest-nx.js +5 -2
  152. package/dist/src/daemon/server/server.js +31 -4
  153. package/dist/src/daemon/server/shutdown-utils.d.ts +5 -0
  154. package/dist/src/daemon/server/shutdown-utils.js +11 -4
  155. package/dist/src/daemon/socket-utils.d.ts +1 -0
  156. package/dist/src/daemon/socket-utils.js +24 -3
  157. package/dist/src/daemon/tmp-dir.d.ts +43 -3
  158. package/dist/src/daemon/tmp-dir.js +437 -15
  159. package/dist/src/devkit-internals.d.ts +105 -8
  160. package/dist/src/devkit-internals.js +223 -7
  161. package/dist/src/executors/run-commands/running-tasks.js +46 -29
  162. package/dist/src/generators/internal-utils/format-changed-files.d.ts +24 -0
  163. package/dist/src/generators/internal-utils/format-changed-files.js +163 -0
  164. package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +15 -0
  165. package/dist/src/generators/testing-utils/create-tree-with-empty-workspace.js +21 -3
  166. package/dist/src/generators/tree.d.ts +4 -2
  167. package/dist/src/generators/utils/nx-json.js +13 -3
  168. package/dist/src/hasher/check-task-files.d.ts +86 -0
  169. package/dist/src/hasher/check-task-files.js +378 -0
  170. package/dist/src/migrations/update-15-0-0/prefix-outputs.js +2 -2
  171. package/dist/src/migrations/update-16-0-0/remove-nrwl-cli.js +2 -2
  172. package/dist/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +2 -2
  173. package/dist/src/migrations/update-16-0-0/update-nx-cloud-runner.js +2 -2
  174. package/dist/src/migrations/update-16-2-0/remove-run-commands-output-path.js +2 -2
  175. package/dist/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +2 -2
  176. package/dist/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +2 -2
  177. package/dist/src/migrations/update-17-2-0/move-default-base.js +2 -2
  178. package/dist/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +2 -2
  179. package/dist/src/migrations/update-19-2-4/set-project-name.js +2 -2
  180. package/dist/src/migrations/update-20-0-0/move-use-daemon-process.js +2 -2
  181. package/dist/src/migrations/update-20-0-1/use-legacy-cache.js +2 -2
  182. package/dist/src/migrations/update-21-0-0/release-changelog-config-changes.js +2 -2
  183. package/dist/src/migrations/update-21-0-0/release-version-config-changes.js +2 -2
  184. package/dist/src/migrations/update-21-0-0/remove-custom-tasks-runner.js +2 -2
  185. package/dist/src/migrations/update-21-0-0/remove-legacy-cache.js +2 -2
  186. package/dist/src/migrations/update-22-0-0/consolidate-release-tag-config.js +2 -2
  187. package/dist/src/migrations/update-22-0-0/release-version-config-changes.js +2 -2
  188. package/dist/src/migrations/update-22-2-0/add-self-healing-to-gitignore.js +2 -2
  189. package/dist/src/migrations/update-22-6-0/add-claude-settings-local-to-git-ignore.js +2 -2
  190. package/dist/src/migrations/update-22-6-0/add-claude-worktrees-to-git-ignore.js +2 -2
  191. package/dist/src/migrations/update-22-7-0/add-polygraph-to-git-ignore.js +2 -2
  192. package/dist/src/migrations/update-23-0-0/add-migrate-runs-to-git-ignore.js +2 -2
  193. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.d.ts +12 -0
  194. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.js +250 -0
  195. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.md +50 -0
  196. package/dist/src/native/index.d.ts +37 -4
  197. package/dist/src/native/index.js +71 -28
  198. package/dist/src/native/native-bindings.js +3 -0
  199. package/dist/src/native/native-file-cache-location.d.ts +17 -1
  200. package/dist/src/native/native-file-cache-location.js +86 -12
  201. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  202. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  203. package/dist/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +3 -3
  204. package/dist/src/nx-cloud/utilities/get-cloud-options.js +5 -2
  205. package/dist/src/nx-cloud/utilities/onboarding.js +5 -2
  206. package/dist/src/nx-cloud/utilities/url-shorten.d.ts +1 -4
  207. package/dist/src/nx-cloud/utilities/url-shorten.js +9 -8
  208. package/dist/src/plugins/js/lock-file/bun-parser.js +43 -10
  209. package/dist/src/plugins/js/lock-file/lock-file.d.ts +46 -4
  210. package/dist/src/plugins/js/lock-file/lock-file.js +192 -15
  211. package/dist/src/plugins/js/lock-file/pnpm-parser.js +420 -64
  212. package/dist/src/plugins/js/lock-file/project-graph-pruning.d.ts +25 -1
  213. package/dist/src/plugins/js/lock-file/project-graph-pruning.js +92 -12
  214. package/dist/src/plugins/js/lock-file/pruned-output.d.ts +330 -0
  215. package/dist/src/plugins/js/lock-file/pruned-output.js +1441 -0
  216. package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +1 -0
  217. package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +9 -5
  218. package/dist/src/plugins/js/project-graph/affected/npm-packages.js +51 -20
  219. package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +14 -4
  220. package/dist/src/project-graph/affected/affected-project-graph-models.d.ts +1 -1
  221. package/dist/src/project-graph/affected/affected-project-graph.d.ts +1 -1
  222. package/dist/src/project-graph/affected/affected-project-graph.js +2 -2
  223. package/dist/src/project-graph/affected/locators/project-glob-changes.js +5 -2
  224. package/dist/src/project-graph/build-project-graph.js +7 -1
  225. package/dist/src/project-graph/error-types.d.ts +12 -1
  226. package/dist/src/project-graph/error-types.js +27 -2
  227. package/dist/src/project-graph/file-utils.js +6 -1
  228. package/dist/src/project-graph/plugins/isolation/isolated-plugin.d.ts +1 -0
  229. package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +18 -1
  230. package/dist/src/project-graph/plugins/isolation/messaging.d.ts +16 -3
  231. package/dist/src/project-graph/plugins/isolation/messaging.js +3 -0
  232. package/dist/src/project-graph/plugins/isolation/plugin-worker.js +58 -8
  233. package/dist/src/project-graph/plugins/loaded-nx-plugin.js +1 -0
  234. package/dist/src/project-graph/project-graph.js +23 -0
  235. package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.d.ts +1 -0
  236. package/dist/src/project-graph/utils/project-configuration/name-substitution-manager.js +16 -2
  237. package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.d.ts +12 -8
  238. package/dist/src/project-graph/utils/project-configuration/project-nodes-manager.js +30 -21
  239. package/dist/src/project-graph/utils/project-configuration/source-maps.d.ts +12 -5
  240. package/dist/src/project-graph/utils/project-configuration/source-maps.js +21 -7
  241. package/dist/src/project-graph/utils/project-configuration/target-defaults.d.ts +1 -1
  242. package/dist/src/project-graph/utils/project-configuration/target-defaults.js +26 -27
  243. package/dist/src/project-graph/utils/project-configuration/target-merging.js +50 -8
  244. package/dist/src/project-graph/utils/project-configuration/target-normalization.js +149 -6
  245. package/dist/src/project-graph/utils/project-configuration/utils.d.ts +15 -0
  246. package/dist/src/project-graph/utils/project-configuration/utils.js +42 -6
  247. package/dist/src/project-graph/utils/project-configuration-utils.d.ts +15 -12
  248. package/dist/src/project-graph/utils/project-configuration-utils.js +79 -99
  249. package/dist/src/tasks-runner/is-tui-enabled.js +3 -1
  250. package/dist/src/tasks-runner/life-cycle.d.ts +2 -2
  251. package/dist/src/tasks-runner/life-cycle.js +2 -2
  252. package/dist/src/tasks-runner/life-cycles/performance-analysis.d.ts +9 -4
  253. package/dist/src/tasks-runner/life-cycles/performance-life-cycle.js +5 -4
  254. package/dist/src/tasks-runner/life-cycles/performance-report.d.ts +28 -8
  255. package/dist/src/tasks-runner/life-cycles/performance-report.js +117 -30
  256. package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.d.ts +26 -1
  257. package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +99 -5
  258. package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.d.ts +26 -0
  259. package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +113 -17
  260. package/dist/src/tasks-runner/pseudo-terminal.d.ts +17 -3
  261. package/dist/src/tasks-runner/pseudo-terminal.js +22 -10
  262. package/dist/src/tasks-runner/run-command.js +28 -35
  263. package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +55 -0
  264. package/dist/src/tasks-runner/running-tasks/batch-process.js +161 -8
  265. package/dist/src/tasks-runner/task-env.d.ts +9 -0
  266. package/dist/src/tasks-runner/task-env.js +31 -4
  267. package/dist/src/tasks-runner/task-orchestrator.d.ts +72 -1
  268. package/dist/src/tasks-runner/task-orchestrator.js +182 -18
  269. package/dist/src/tasks-runner/utils.js +2 -6
  270. package/dist/src/utils/acknowledge-build-scripts.js +7 -5
  271. package/dist/src/utils/analytics-enabled.d.ts +7 -0
  272. package/dist/src/utils/analytics-enabled.js +11 -0
  273. package/dist/src/utils/analytics-prompt.d.ts +0 -6
  274. package/dist/src/utils/analytics-prompt.js +4 -58
  275. package/dist/src/utils/assert-workspace-validity.js +7 -2
  276. package/dist/src/utils/catalog/bun-manager-utils.d.ts +8 -0
  277. package/dist/src/utils/catalog/bun-manager-utils.js +174 -0
  278. package/dist/src/utils/catalog/bun-manager.d.ts +28 -0
  279. package/dist/src/utils/catalog/bun-manager.js +130 -0
  280. package/dist/src/utils/catalog/index.d.ts +1 -1
  281. package/dist/src/utils/catalog/index.js +1 -1
  282. package/dist/src/utils/catalog/manager-factory.js +3 -0
  283. package/dist/src/utils/catalog/manager-utils.d.ts +8 -1
  284. package/dist/src/utils/catalog/manager-utils.js +9 -4
  285. package/dist/src/utils/catalog/manager.d.ts +13 -1
  286. package/dist/src/utils/catalog/manager.js +30 -0
  287. package/dist/src/utils/catalog/pnpm-manager.d.ts +2 -1
  288. package/dist/src/utils/catalog/pnpm-manager.js +3 -0
  289. package/dist/src/utils/catalog/types.d.ts +4 -0
  290. package/dist/src/utils/catalog/yarn-manager.d.ts +6 -2
  291. package/dist/src/utils/catalog/yarn-manager.js +23 -32
  292. package/dist/src/utils/child-process.d.ts +31 -1
  293. package/dist/src/utils/child-process.js +103 -0
  294. package/dist/src/utils/chunkify.d.ts +7 -1
  295. package/dist/src/utils/chunkify.js +10 -3
  296. package/dist/src/utils/command-line-utils.js +30 -20
  297. package/dist/src/utils/exit-codes.d.ts +9 -0
  298. package/dist/src/utils/exit-codes.js +19 -0
  299. package/dist/src/utils/fileutils.d.ts +5 -0
  300. package/dist/src/utils/fileutils.js +7 -2
  301. package/dist/src/utils/formatters/index.d.ts +13 -0
  302. package/dist/src/utils/formatters/index.js +74 -0
  303. package/dist/src/utils/formatters/oxfmt.d.ts +32 -0
  304. package/dist/src/utils/formatters/oxfmt.js +764 -0
  305. package/dist/src/utils/formatters/prettier.d.ts +26 -0
  306. package/dist/src/utils/formatters/prettier.js +201 -0
  307. package/dist/src/utils/formatters/shared.d.ts +5 -0
  308. package/dist/src/utils/formatters/shared.js +8 -0
  309. package/dist/src/utils/git-revision.d.ts +12 -0
  310. package/dist/src/utils/git-revision.js +25 -0
  311. package/dist/src/utils/git-utils.d.ts +48 -2
  312. package/dist/src/utils/git-utils.js +220 -14
  313. package/dist/src/utils/git-worktrees.d.ts +30 -0
  314. package/dist/src/utils/git-worktrees.js +212 -0
  315. package/dist/src/utils/ignore.d.ts +170 -1
  316. package/dist/src/utils/ignore.js +263 -11
  317. package/dist/src/utils/long-running-target.d.ts +10 -0
  318. package/dist/src/utils/long-running-target.js +19 -0
  319. package/dist/src/utils/min-release-age/behavior/bun.js +7 -11
  320. package/dist/src/utils/min-release-age/behavior/npm.js +5 -2
  321. package/dist/src/utils/min-release-age/packument.js +1 -1
  322. package/dist/src/utils/nx-console-prompt.js +3 -6
  323. package/dist/src/utils/nx-tmp-dir.d.ts +18 -0
  324. package/dist/src/utils/nx-tmp-dir.js +40 -0
  325. package/dist/src/utils/output.d.ts +153 -0
  326. package/dist/src/utils/output.js +289 -5
  327. package/dist/src/utils/owned-private-dir.d.ts +132 -0
  328. package/dist/src/utils/owned-private-dir.js +323 -0
  329. package/dist/src/utils/package-json.d.ts +2 -0
  330. package/dist/src/utils/package-json.js +11 -7
  331. package/dist/src/utils/package-manager-config/bunfig.d.ts +14 -0
  332. package/dist/src/utils/package-manager-config/bunfig.js +49 -0
  333. package/dist/src/utils/package-manager-config/npmrc.d.ts +23 -0
  334. package/dist/src/utils/package-manager-config/npmrc.js +124 -0
  335. package/dist/src/utils/package-manager-config/pnpm-config.d.ts +17 -0
  336. package/dist/src/utils/package-manager-config/pnpm-config.js +60 -0
  337. package/dist/src/utils/package-manager.d.ts +23 -2
  338. package/dist/src/utils/package-manager.js +268 -44
  339. package/dist/src/utils/params.d.ts +7 -1
  340. package/dist/src/utils/params.js +64 -6
  341. package/dist/src/utils/plugins/core-plugins.js +4 -0
  342. package/dist/src/utils/prompt-helpers.d.ts +53 -0
  343. package/dist/src/utils/prompt-helpers.js +111 -0
  344. package/dist/src/utils/provenance.js +6 -14
  345. package/dist/src/utils/registry-config/bun.d.ts +2 -0
  346. package/dist/src/utils/registry-config/bun.js +257 -0
  347. package/dist/src/utils/registry-config/index.d.ts +13 -0
  348. package/dist/src/utils/registry-config/index.js +102 -0
  349. package/dist/src/utils/registry-config/pnpm.d.ts +2 -0
  350. package/dist/src/utils/registry-config/pnpm.js +1551 -0
  351. package/dist/src/utils/registry-config/utils.d.ts +195 -0
  352. package/dist/src/utils/registry-config/utils.js +496 -0
  353. package/dist/src/utils/registry-config/yarn-berry.d.ts +2 -0
  354. package/dist/src/utils/registry-config/yarn-berry.js +612 -0
  355. package/dist/src/utils/registry-config/yarn-classic.d.ts +2 -0
  356. package/dist/src/utils/registry-config/yarn-classic.js +1001 -0
  357. package/dist/src/utils/safe-spawn.d.ts +24 -0
  358. package/dist/src/utils/safe-spawn.js +104 -0
  359. package/dist/src/utils/shell-quoting.d.ts +15 -0
  360. package/dist/src/utils/shell-quoting.js +35 -0
  361. package/dist/src/utils/wait-for-socket-connection.d.ts +11 -0
  362. package/dist/src/utils/wait-for-socket-connection.js +14 -8
  363. package/dist/src/utils/workspace-id.d.ts +20 -0
  364. package/dist/src/utils/workspace-id.js +54 -0
  365. package/dist/src/utils/write-formatted-json-file.d.ts +3 -2
  366. package/dist/src/utils/write-formatted-json-file.js +5 -4
  367. package/migrations.json +6 -0
  368. package/package.json +29 -19
  369. package/dist/src/generators/internal-utils/format-changed-files-with-prettier-if-available.d.ts +0 -19
  370. package/dist/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +0 -81
  371. package/dist/src/utils/is-using-prettier.d.ts +0 -3
  372. package/dist/src/utils/is-using-prettier.js +0 -62
  373. package/dist/src/utils/min-release-age/npmrc.d.ts +0 -15
  374. package/dist/src/utils/min-release-age/npmrc.js +0 -45
@@ -1,8 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.BatchProcess = void 0;
4
+ const fs_1 = require("fs");
5
+ const path_1 = require("path");
4
6
  const native_1 = require("../../native");
7
+ const cache_directory_1 = require("../../utils/cache-directory");
5
8
  const exit_codes_1 = require("../../utils/exit-codes");
9
+ const output_1 = require("../../utils/output");
6
10
  const batch_messages_1 = require("../batch/batch-messages");
7
11
  class BatchProcess {
8
12
  constructor(childProcess, executorName) {
@@ -12,6 +16,18 @@ class BatchProcess {
12
16
  this.batchResultsCallbacks = [];
13
17
  this.taskResultsCallbacks = [];
14
18
  this.outputCallbacks = [];
19
+ /**
20
+ * Set once the capture is released. A chunk can still arrive after that —
21
+ * stdout delivers past the exit event — and reopening then would mint a
22
+ * second numbered file that nothing ever cleans up.
23
+ */
24
+ this.capturedOutputDiscarded = false;
25
+ /**
26
+ * Set when writing the capture failed. Distinct from discarded: the bytes
27
+ * already on disk are still the best record of the batch, so the file is kept
28
+ * and rendered, while everything after the failure goes live to the terminal.
29
+ */
30
+ this.capturedOutputFailed = false;
15
31
  this.childProcess.on('message', (message) => {
16
32
  switch (message.type) {
17
33
  case batch_messages_1.BatchMessageType.CompleteTask: {
@@ -47,24 +63,39 @@ class BatchProcess {
47
63
  // Capture stdout output
48
64
  if (this.childProcess.stdout) {
49
65
  this.childProcess.stdout.on('data', (chunk) => {
50
- const output = chunk.toString();
51
- // Maintain current terminal output behavior
52
- process.stdout.write(chunk);
66
+ const text = chunk.toString();
67
+ // When batch output is being folded, the live copy is suppressed to
68
+ // keep each group contiguous; it is retained (see capturedOutputPath)
69
+ // for the renderings that need it. Otherwise, maintain
70
+ // current terminal output behavior. These chunks are forwarded raw and
71
+ // routinely end mid-line, so they go through `output` to keep its line
72
+ // tracking accurate for whatever prints next.
73
+ if ((0, output_1.shouldGroupBatchOutput)()) {
74
+ this.capture(chunk);
75
+ }
76
+ else {
77
+ output_1.output.writeTaskOutputChunk(chunk);
78
+ }
53
79
  // Notify callbacks for TUI
54
80
  for (const cb of this.outputCallbacks) {
55
- cb(output);
81
+ cb(text);
56
82
  }
57
83
  });
58
84
  }
59
85
  // Capture stderr output
60
86
  if (this.childProcess.stderr) {
61
87
  this.childProcess.stderr.on('data', (chunk) => {
62
- const output = chunk.toString();
63
- // Maintain current terminal output behavior
64
- process.stderr.write(chunk);
88
+ const text = chunk.toString();
89
+ if ((0, output_1.shouldGroupBatchOutput)()) {
90
+ this.capture(chunk, process.stderr);
91
+ }
92
+ else {
93
+ // Maintain current terminal output behavior
94
+ output_1.output.writeTaskOutputChunk(chunk, process.stderr);
95
+ }
65
96
  // Notify callbacks for TUI
66
97
  for (const cb of this.outputCallbacks) {
67
- cb(output);
98
+ cb(text);
68
99
  }
69
100
  });
70
101
  }
@@ -81,6 +112,127 @@ class BatchProcess {
81
112
  onOutput(cb) {
82
113
  this.outputCallbacks.push(cb);
83
114
  }
115
+ capture(chunk, stream = process.stdout) {
116
+ // Only a released capture stops recording; a handed-over one keeps
117
+ // appending until the fold is rendered.
118
+ if (this.capturedOutputDiscarded) {
119
+ return;
120
+ }
121
+ if (this.capturedOutputFailed) {
122
+ // Capture is over, but the output is not optional. Everything from here
123
+ // goes straight to the terminal, on the stream it arrived on.
124
+ output_1.output.writeTaskOutputChunk(chunk, stream);
125
+ return;
126
+ }
127
+ // Hoisted so the catch can tell how much of this chunk reached the file: a
128
+ // `writeSync` that fails partway leaves a prefix on disk, and replaying the
129
+ // whole chunk live would print that prefix twice - once now, once when the
130
+ // fold reads the file.
131
+ const bytes = typeof chunk === 'string' ? Buffer.from(chunk) : chunk;
132
+ let written = 0;
133
+ try {
134
+ if (this.capturedOutputFd === undefined) {
135
+ const dir = (0, path_1.join)(cache_directory_1.workspaceDataDirectory, 'batch-outputs');
136
+ (0, fs_1.mkdirSync)(dir, { recursive: true });
137
+ const name = `${this.executorName.replace(/[^a-zA-Z0-9]+/g, '-')}-${process.pid}-${++BatchProcess.capturedOutputCount}.log`;
138
+ const path = (0, path_1.join)(dir, name);
139
+ // Assigned only once the file is actually open, so a path always names
140
+ // an fd rather than a file that failed to open.
141
+ const fd = (0, fs_1.openSync)(path, 'w');
142
+ this.capturedOutputPath = path;
143
+ this.capturedOutputFd = fd;
144
+ }
145
+ // Written synchronously so the file is complete the moment the batch ends,
146
+ // with no flush to sequence against the read that renders the fold.
147
+ while (written < bytes.length) {
148
+ written += (0, fs_1.writeSync)(this.capturedOutputFd, bytes, written);
149
+ }
150
+ }
151
+ catch (e) {
152
+ // This runs inside a stream 'data' handler, where a throw is an uncaught
153
+ // exception rather than something the orchestrator's try can see - so a
154
+ // full disk or a read-only data directory would take down a run that
155
+ // otherwise had nothing wrong with it. The capture is an optimization
156
+ // that the common path discards anyway, so give it up and put the bytes
157
+ // back on the terminal instead of losing both them and the run.
158
+ // Latch on a flag of its own rather than reusing the discard flag: that
159
+ // one makes `capture` return early, which would drop every later chunk
160
+ // on the floor - captured nowhere and printed nowhere.
161
+ this.capturedOutputFailed = true;
162
+ // Close the fd but keep the file. Whatever was written before the failure
163
+ // is still the head of the batch's log, which is where a compiler's first
164
+ // non-cascading errors live; unlinking it here would throw away the most
165
+ // useful bytes precisely when the disk is in trouble.
166
+ this.closeCapturedOutput();
167
+ // Forward only what did not reach the file, and do it before warning.
168
+ // `output.warn` writes to the terminal as well, so if that is the thing
169
+ // failing, the bytes this handler was handed must already be out - losing
170
+ // the warning is survivable, losing task output is what this path exists
171
+ // to prevent.
172
+ const unwritten = bytes.subarray(written);
173
+ if (unwritten.length > 0) {
174
+ output_1.output.writeTaskOutputChunk(unwritten, stream);
175
+ }
176
+ output_1.output.warn({
177
+ title: `Could not capture batch output for ${this.executorName}`,
178
+ bodyLines: [
179
+ e.message,
180
+ 'Streaming the rest of it live instead; the fold holds what was captured first.',
181
+ ],
182
+ });
183
+ }
184
+ }
185
+ /**
186
+ * Path to the file holding everything held back from the live stream under
187
+ * log grouping, or undefined if nothing was captured. Used to render the whole
188
+ * batch as one fold, so output no task claimed is not lost.
189
+ *
190
+ * The file is deliberately left open rather than closed here. A worker's
191
+ * stdout can deliver after its exit event — which is what `getResults()`
192
+ * settles on — and leaving the fd open keeps such a chunk appending to this
193
+ * same file instead of minting a second numbered one that nothing cleans up.
194
+ * The caller reads the file once, synchronously, while rendering the fold, so
195
+ * anything arriving after that read is not shown; writes are unbuffered, so
196
+ * the read always sees a complete prefix of what has arrived by then.
197
+ */
198
+ getCapturedOutputPath() {
199
+ return this.capturedOutputPath;
200
+ }
201
+ /** Releases the capture file. Safe to call more than once. */
202
+ discardCapturedOutput() {
203
+ this.capturedOutputDiscarded = true;
204
+ this.releaseCapturedOutput();
205
+ }
206
+ /**
207
+ * Closes the fd and unlinks the file, leaving no path behind for a caller to
208
+ * read. Tolerates a partially-initialized capture, since it also runs when
209
+ * opening or writing the file is what failed.
210
+ */
211
+ releaseCapturedOutput() {
212
+ this.closeCapturedOutput();
213
+ if (this.capturedOutputPath) {
214
+ try {
215
+ (0, fs_1.rmSync)(this.capturedOutputPath, { force: true });
216
+ }
217
+ catch {
218
+ // `force` covers a missing file but not a locked one: on Windows an fd
219
+ // that failed to close still holds a share lock. This runs from
220
+ // `runBatch`'s finally, where throwing would replace the batch's real
221
+ // result with a cleanup error, so a stale file is the lesser outcome.
222
+ }
223
+ this.capturedOutputPath = undefined;
224
+ }
225
+ }
226
+ /** Closes the fd, keeping the file and its path readable. */
227
+ closeCapturedOutput() {
228
+ if (this.capturedOutputFd !== undefined) {
229
+ try {
230
+ (0, fs_1.closeSync)(this.capturedOutputFd);
231
+ }
232
+ catch { }
233
+ this.capturedOutputFd = undefined;
234
+ }
235
+ }
84
236
  async getResults() {
85
237
  return Promise.race([
86
238
  new Promise((_, rej) => {
@@ -108,3 +260,4 @@ class BatchProcess {
108
260
  }
109
261
  }
110
262
  exports.BatchProcess = BatchProcess;
263
+ BatchProcess.capturedOutputCount = 0;
@@ -1,5 +1,14 @@
1
1
  import { ProjectGraph } from '../config/project-graph';
2
2
  import { Task } from '../config/task-graph';
3
+ /**
4
+ * Resolves the FORCE_COLOR value for forked child processes.
5
+ *
6
+ * When the user sets FORCE_COLOR=0, bin/nx.ts deletes it from process.env
7
+ * (workaround for picocolors treating "0" as truthy) and saves the original
8
+ * value in NX_ORIGINAL_FORCE_COLOR. Without this check, the undefined
9
+ * FORCE_COLOR would default to 'true', re-enabling colors in all children.
10
+ */
11
+ export declare function getForceColorForChild(): string;
3
12
  export declare function getEnvVariablesForBatchProcess(skipNxCache: boolean, captureStderr: boolean): NodeJS.ProcessEnv;
4
13
  export declare function getTaskSpecificEnv(task: Task, graph: ProjectGraph): NodeJS.ProcessEnv;
5
14
  export declare function getEnvVariablesForTask(task: Task, taskSpecificEnv: NodeJS.ProcessEnv, forceColor: string, skipNxCache: boolean, captureStderr: boolean, outputPath: string, streamOutput: boolean): NodeJS.ProcessEnv;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getForceColorForChild = getForceColorForChild;
3
4
  exports.getEnvVariablesForBatchProcess = getEnvVariablesForBatchProcess;
4
5
  exports.getTaskSpecificEnv = getTaskSpecificEnv;
5
6
  exports.getEnvVariablesForTask = getEnvVariablesForTask;
@@ -11,13 +12,33 @@ const dotenv_expand_1 = require("dotenv-expand");
11
12
  const node_path_1 = require("node:path");
12
13
  const workspace_root_1 = require("../utils/workspace-root");
13
14
  const task_env_paths_1 = require("./task-env-paths");
15
+ /**
16
+ * Resolves the FORCE_COLOR value for forked child processes.
17
+ *
18
+ * When the user sets FORCE_COLOR=0, bin/nx.ts deletes it from process.env
19
+ * (workaround for picocolors treating "0" as truthy) and saves the original
20
+ * value in NX_ORIGINAL_FORCE_COLOR. Without this check, the undefined
21
+ * FORCE_COLOR would default to 'true', re-enabling colors in all children.
22
+ */
23
+ function getForceColorForChild() {
24
+ if (process.env.FORCE_COLOR !== undefined) {
25
+ return process.env.FORCE_COLOR;
26
+ }
27
+ if (process.env.NX_ORIGINAL_FORCE_COLOR === '0') {
28
+ return '0';
29
+ }
30
+ return 'true';
31
+ }
14
32
  function getEnvVariablesForBatchProcess(skipNxCache, captureStderr) {
15
- return {
33
+ const res = {
16
34
  // User Process Env Variables override Dotenv Variables
17
35
  ...process.env,
18
36
  // Nx Env Variables overrides everything
19
- ...getNxEnvVariablesForForkedProcess(process.env.FORCE_COLOR === undefined ? 'true' : process.env.FORCE_COLOR, skipNxCache, captureStderr),
37
+ ...getNxEnvVariablesForForkedProcess(getForceColorForChild(), skipNxCache, captureStderr),
20
38
  };
39
+ // NX_ORIGINAL_FORCE_COLOR is an internal signal and should not leak into child processes
40
+ delete res.NX_ORIGINAL_FORCE_COLOR;
41
+ return res;
21
42
  }
22
43
  // The orchestrator now calls this eagerly during the coordinator pre-hash
23
44
  // in addition to processTask (and again in hashBatchTasks), so the same
@@ -58,6 +79,9 @@ function getEnvVariablesForTask(task, taskSpecificEnv, forceColor, skipNxCache,
58
79
  }
59
80
  // we don't reset NX_BASE or NX_HEAD because those are set by the user and should be preserved
60
81
  delete res.NX_SET_CLI;
82
+ // NX_ORIGINAL_FORCE_COLOR is an internal signal used by getForceColorForChild()
83
+ // and should not leak into child processes
84
+ delete res.NX_ORIGINAL_FORCE_COLOR;
61
85
  return res;
62
86
  }
63
87
  function getNxEnvVariablesForForkedProcess(forceColor, skipNxCache, captureStderr, outputPath, streamOutput) {
@@ -142,10 +166,13 @@ function getOwnerTargetForTask(task, graph) {
142
166
  for (const targets of Object.values(project.data.metadata.targetGroups)) {
143
167
  if (targets.includes(task.target.target)) {
144
168
  for (const target of targets) {
145
- if (project.data.targets[target].metadata?.nonAtomizedTarget) {
169
+ // a target group can name a target the project does not define —
170
+ // inference plugins build the group and the targets separately, so
171
+ // the two can disagree. skip the phantom rather than dereferencing it.
172
+ if (project.data.targets[target]?.metadata?.nonAtomizedTarget) {
146
173
  return [
147
174
  target,
148
- project.data.targets[target].metadata?.nonAtomizedTarget,
175
+ project.data.targets[target]?.metadata?.nonAtomizedTarget,
149
176
  ];
150
177
  }
151
178
  }
@@ -35,11 +35,18 @@ export declare class TaskOrchestrator {
35
35
  private reverseTaskDeps;
36
36
  private initializingTaskIds;
37
37
  private processedTasks;
38
+ private cacheMissedHashes;
38
39
  private completedTasks;
39
40
  private waitingForTasks;
40
41
  private pendingDiscreteWorkers;
41
42
  private groups;
42
43
  private continuousTasksStarted;
44
+ /**
45
+ * How many folds each batch id has rendered. A batch that reports a strict
46
+ * subset of its tasks is re-run under the same id, so one id can produce more
47
+ * than one fold and the redirect lines have to point at the right one.
48
+ */
49
+ private batchFoldRenders;
43
50
  private bailed;
44
51
  private resolveStopPromise;
45
52
  private stopRequested;
@@ -100,7 +107,9 @@ export declare class TaskOrchestrator {
100
107
  * The coordinator relies on this running unconditionally (when cache
101
108
  * is enabled): tasks dispatched in step 5 via runTaskDirectly skip
102
109
  * their own cache lookup on the assumption that this has already
103
- * confirmed them as misses. Don't add length-based bails.
110
+ * confirmed them as misses. Excluding cacheMissedHashes preserves that
111
+ * invariant — every dispatched hash was queried exactly once — but
112
+ * don't add other length-based bails.
104
113
  */
105
114
  private resolveCachedTasksBulk;
106
115
  /**
@@ -115,6 +124,68 @@ export declare class TaskOrchestrator {
115
124
  private hashBatchTasks;
116
125
  applyFromCacheOrRunBatch(doNotSkipCache: boolean, batch: Batch, groupId: number): Promise<TaskResult[]>;
117
126
  private runBatch;
127
+ /**
128
+ * Rendering a batch's output must never change the batch's results. A throw
129
+ * from the printer would otherwise land in `runBatch`'s own error handling:
130
+ * on the resolved path it rewrites every task to `failure` with the printer's
131
+ * stack as its output — reporting a green build red to the life cycles and Nx
132
+ * Cloud — and on the crash path it escapes `runBatch`, replacing the built
133
+ * failure results with the printer's error. Both call sites degrade to a
134
+ * warning here instead.
135
+ */
136
+ private renderBatchOutputSafely;
137
+ /**
138
+ * Prints a completed batch's output once, under log grouping. Live forwarding
139
+ * was suppressed while grouping, so this is the only copy — which is why the
140
+ * requested output style has to reach this path rather than stopping at the
141
+ * life cycle.
142
+ *
143
+ * Two things are rendered, and they answer different questions.
144
+ *
145
+ * Every task always renders through the life cycle, exactly as in a non-batch
146
+ * run - failures in full, successes collapsed to a line for run-many, plus the
147
+ * initiating project in full for run-one. That is what attributes output to a
148
+ * task, and it is the only place some of it exists: `@nx/jest` synthesizes
149
+ * each task's `terminalOutput` from an aggregated result and never writes
150
+ * those per-project summaries to the worker's stdio at all.
151
+ *
152
+ * The worker's whole captured log is rendered as a fold above them when the
153
+ * run asked for full output, or when any task failed or was stopped. A
154
+ * diagnostic that explains a failure is routinely one no task claimed:
155
+ * `@nx/maven`'s batch impl writes its exit-code dump and failed-task outputs
156
+ * to the worker's stderr via `console.error`, and the Maven JVM it spawns
157
+ * points slf4j at `System.out` because its own stderr carries the result
158
+ * protocol - two layers, two streams, both captured and neither attributed to
159
+ * a task - and `@nx/gradle` emits configuration-phase errors before the first
160
+ * `> Task :x:y` header tells it which task to attribute to. Both catch their
161
+ * own crash and backfill task results, so the batch resolves and lands here
162
+ * rather than in the caller's failure path.
163
+ *
164
+ * Rendering both duplicates some bytes, deliberately. `@nx/maven` and
165
+ * `@nx/gradle` tee each task's output into the worker's stdio on the way to
166
+ * `terminalOutput`, so a failing task's body appears in the fold and again in
167
+ * its own block. That is bounded on the default style, where successes
168
+ * collapse to a line each and a crashed batch backfills a short
169
+ * `e.toString()` rather than a body, so the case with the largest fold
170
+ * duplicates the least. Under a full-output style it is not bounded: every
171
+ * task prints in full beside a log that already contains it, which is the
172
+ * price of that style asking for everything. What it buys either way is
173
+ * attribution the fold cannot express. The
174
+ * alternative, letting the fold replace per-task rendering, silently dropped
175
+ * `@nx/jest`'s summaries and is what this shape exists to avoid.
176
+ *
177
+ * A batch that never reported results is handled by the caller instead.
178
+ */
179
+ private printGroupedBatchOutput;
180
+ /**
181
+ * Renders a batch's whole output as one fold, plus — unless `redirectLines`
182
+ * is off — a line per task pointing at it. The fold is labelled with the
183
+ * executor and a run-unique id (the same
184
+ * executor can run more than one batch), rather than an arbitrary task. Safe
185
+ * to write to `output` directly: grouping implies GitHub Actions implies a
186
+ * non-TTY, static lifecycle.
187
+ */
188
+ private printBatchFold;
118
189
  /**
119
190
  * Bulk-resolve cache hits for a set of tasks: fetch cached entries,
120
191
  * copy outputs as needed, fire lifecycle, and return the TaskResults