@ohos-ports/nx 23.3.0-beta.2 → 24.0.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/README.md +3 -6
  2. package/dist/bin/nx.js +2 -2
  3. package/dist/bin/post-install.js +5 -3
  4. package/dist/nx-cloud-internals.d.ts +1 -0
  5. package/dist/nx-cloud-internals.js +7 -1
  6. package/dist/src/adapter/ngcli-adapter.js +2 -2
  7. package/dist/src/ai/clone-ai-config-repo.js +49 -12
  8. package/dist/src/command-line/add/add.d.ts +2 -0
  9. package/dist/src/command-line/add/add.js +23 -5
  10. package/dist/src/command-line/affected/affected.js +2 -2
  11. package/dist/src/command-line/configure-ai-agents/configure-ai-agents.js +0 -12
  12. package/dist/src/command-line/graph/graph.js +38 -10
  13. package/dist/src/command-line/init/command-object.js +0 -12
  14. package/dist/src/command-line/init/implementation/add-nx-to-nest.js +21 -62
  15. package/dist/src/command-line/init/init-v2.js +0 -2
  16. package/dist/src/command-line/migrate/agentic/close-agent-session.d.ts +1 -1
  17. package/dist/src/command-line/migrate/agentic/close-agent-session.js +4 -3
  18. package/dist/src/command-line/migrate/agentic/definitions.d.ts +1 -3
  19. package/dist/src/command-line/migrate/agentic/definitions.js +5 -97
  20. package/dist/src/command-line/migrate/agentic/handoff-gitignore.d.ts +7 -45
  21. package/dist/src/command-line/migrate/agentic/handoff-gitignore.js +9 -51
  22. package/dist/src/command-line/migrate/agentic/handoff.d.ts +1 -43
  23. package/dist/src/command-line/migrate/agentic/handoff.js +3 -119
  24. package/dist/src/command-line/migrate/agentic/instruction-files.d.ts +0 -21
  25. package/dist/src/command-line/migrate/agentic/instruction-files.js +6 -27
  26. package/dist/src/command-line/migrate/agentic/master/run-master-session.d.ts +19 -1
  27. package/dist/src/command-line/migrate/agentic/master/run-master-session.js +88 -49
  28. package/dist/src/command-line/migrate/agentic/master/spawn-master.d.ts +1 -0
  29. package/dist/src/command-line/migrate/agentic/master/spawn-master.js +86 -24
  30. package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.d.ts +2 -2
  31. package/dist/src/command-line/migrate/agentic/print-dropped-agent-context.js +2 -2
  32. package/dist/src/command-line/migrate/agentic/prompts/fragments.d.ts +1 -12
  33. package/dist/src/command-line/migrate/agentic/prompts/fragments.js +8 -17
  34. package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.d.ts +0 -15
  35. package/dist/src/command-line/migrate/agentic/prompts/shared-rendering.js +3 -100
  36. package/dist/src/command-line/migrate/agentic/select.d.ts +12 -6
  37. package/dist/src/command-line/migrate/agentic/select.js +38 -8
  38. package/dist/src/command-line/migrate/agentic/types.d.ts +9 -68
  39. package/dist/src/command-line/migrate/agentic/types.js +6 -8
  40. package/dist/src/command-line/migrate/command-object.js +6 -10
  41. package/dist/src/command-line/migrate/execute-migration.d.ts +6 -6
  42. package/dist/src/command-line/migrate/execute-migration.js +25 -15
  43. package/dist/src/command-line/migrate/migrate-analytics.d.ts +18 -1
  44. package/dist/src/command-line/migrate/migrate-analytics.js +38 -0
  45. package/dist/src/command-line/migrate/migrate-commits.d.ts +29 -17
  46. package/dist/src/command-line/migrate/migrate-commits.js +86 -32
  47. package/dist/src/command-line/migrate/migrate-config.d.ts +6 -6
  48. package/dist/src/command-line/migrate/migrate-config.js +12 -6
  49. package/dist/src/command-line/migrate/migrate-output.d.ts +1 -6
  50. package/dist/src/command-line/migrate/migrate-output.js +1 -10
  51. package/dist/src/command-line/migrate/migrate.d.ts +6 -30
  52. package/dist/src/command-line/migrate/migrate.js +257 -255
  53. package/dist/src/command-line/migrate/resolve-package-version.d.ts +2 -4
  54. package/dist/src/command-line/migrate/resolve-package-version.js +2 -35
  55. package/dist/src/command-line/migrate/run/agent-output.d.ts +2 -0
  56. package/dist/src/command-line/migrate/run/agent-output.js +9 -0
  57. package/dist/src/command-line/migrate/run/broker.d.ts +14 -5
  58. package/dist/src/command-line/migrate/run/broker.js +69 -21
  59. package/dist/src/command-line/migrate/run/clean-retry.js +4 -2
  60. package/dist/src/command-line/migrate/run/existing-run-report.d.ts +1 -1
  61. package/dist/src/command-line/migrate/run/existing-run-report.js +7 -5
  62. package/dist/src/command-line/migrate/run/give-up.d.ts +4 -3
  63. package/dist/src/command-line/migrate/run/give-up.js +8 -5
  64. package/dist/src/command-line/migrate/run/index.d.ts +7 -5
  65. package/dist/src/command-line/migrate/run/index.js +16 -1
  66. package/dist/src/command-line/migrate/run/issues.js +7 -2
  67. package/dist/src/command-line/migrate/run/orchestrator.d.ts +61 -4
  68. package/dist/src/command-line/migrate/run/orchestrator.js +397 -133
  69. package/dist/src/command-line/migrate/run/run-state.d.ts +17 -1
  70. package/dist/src/command-line/migrate/run/run-state.js +41 -2
  71. package/dist/src/command-line/migrate/run/runbook.d.ts +1 -0
  72. package/dist/src/command-line/migrate/run/runbook.js +115 -18
  73. package/dist/src/command-line/migrate/run/state-lock.d.ts +29 -4
  74. package/dist/src/command-line/migrate/run/state-lock.js +102 -10
  75. package/dist/src/command-line/migrate/run/state-machine.js +4 -1
  76. package/dist/src/command-line/migrate/run/util.d.ts +7 -2
  77. package/dist/src/command-line/migrate/run/util.js +30 -3
  78. package/dist/src/command-line/migrate/run/worker.d.ts +1 -1
  79. package/dist/src/command-line/migrate/run/worker.js +252 -250
  80. package/dist/src/command-line/migrate/sort-migrations.d.ts +1 -7
  81. package/dist/src/command-line/migrate/sort-migrations.js +1 -12
  82. package/dist/src/command-line/nx-cloud/connect/connect-to-nx-cloud.js +17 -12
  83. package/dist/src/command-line/release/changelog.js +9 -6
  84. package/dist/src/command-line/release/config/config.d.ts +1 -0
  85. package/dist/src/command-line/release/config/config.js +48 -9
  86. package/dist/src/command-line/release/release.js +2 -2
  87. package/dist/src/command-line/release/utils/git.js +8 -7
  88. package/dist/src/command-line/release/utils/interpolate-release-config.d.ts +6 -0
  89. package/dist/src/command-line/release/utils/interpolate-release-config.js +39 -0
  90. package/dist/src/command-line/release/utils/release-graph.d.ts +5 -0
  91. package/dist/src/command-line/release/utils/release-graph.js +1 -0
  92. package/dist/src/command-line/release/utils/remote-release-clients/github.js +5 -6
  93. package/dist/src/command-line/release/utils/remote-release-clients/gitlab.js +5 -6
  94. package/dist/src/command-line/release/utils/resolve-changelog-renderer.js +2 -2
  95. package/dist/src/command-line/release/utils/shared.js +10 -10
  96. package/dist/src/command-line/release/utils/version-plan-utils.d.ts +3 -12
  97. package/dist/src/command-line/release/utils/version-plan-utils.js +33 -55
  98. package/dist/src/command-line/release/version/version-actions.js +2 -1
  99. package/dist/src/command-line/release/version.js +5 -2
  100. package/dist/src/command-line/reset/reset.js +58 -62
  101. package/dist/src/command-line/run/executor-utils.js +1 -0
  102. package/dist/src/command-line/run/run-one.d.ts +20 -1
  103. package/dist/src/command-line/run/run-one.js +153 -5
  104. package/dist/src/command-line/run/run.js +2 -1
  105. package/dist/src/command-line/show/projects.js +5 -3
  106. package/dist/src/command-line/show/show-target/info.d.ts +10 -1
  107. package/dist/src/command-line/show/show-target/info.js +100 -15
  108. package/dist/src/command-line/show/show-target/inputs.js +10 -2
  109. package/dist/src/command-line/show/show-target/utils.js +1 -0
  110. package/dist/src/command-line/watch/command-object.js +3 -22
  111. package/dist/src/command-line/watch/watch.d.ts +0 -7
  112. package/dist/src/command-line/watch/watch.js +1 -1
  113. package/dist/src/command-line/yargs-utils/shared-options.js +1 -1
  114. package/dist/src/config/misc-interfaces.d.ts +18 -0
  115. package/dist/src/config/nx-json.d.ts +22 -11
  116. package/dist/src/config/task-graph.d.ts +1 -1
  117. package/dist/src/config/workspace-json-project-json.d.ts +88 -0
  118. package/dist/src/core/graph/main.js +1 -1
  119. package/dist/src/core/graph/runtime.js +1 -1
  120. package/dist/src/core/graph/styles.css +1 -1
  121. package/dist/src/core/graph/styles.js +1 -1
  122. package/dist/src/daemon/client/client.d.ts +15 -0
  123. package/dist/src/daemon/client/client.js +181 -71
  124. package/dist/src/daemon/client/daemon-socket-messenger.d.ts +1 -1
  125. package/dist/src/daemon/client/daemon-socket-messenger.js +2 -2
  126. package/dist/src/daemon/server/client-socket-context.js +1 -1
  127. package/dist/src/daemon/server/handle-process-in-background.js +21 -9
  128. package/dist/src/daemon/server/handle-select-affected-tasks.d.ts +2 -1
  129. package/dist/src/daemon/server/handle-select-affected-tasks.js +21 -13
  130. package/dist/src/daemon/server/native-js-loader.d.ts +1 -0
  131. package/dist/src/daemon/server/native-js-loader.js +21 -0
  132. package/dist/src/daemon/server/project-graph-incremental-recomputation.js +4 -8
  133. package/dist/src/daemon/server/server.d.ts +2 -1
  134. package/dist/src/daemon/server/server.js +17 -4
  135. package/dist/src/daemon/server/shutdown-utils.js +0 -3
  136. package/dist/src/daemon/server/start.d.ts +1 -0
  137. package/dist/src/daemon/server/start.js +2 -0
  138. package/dist/src/daemon/socket-utils.d.ts +11 -9
  139. package/dist/src/daemon/socket-utils.js +31 -61
  140. package/dist/src/daemon/tmp-dir.d.ts +19 -14
  141. package/dist/src/daemon/tmp-dir.js +142 -354
  142. package/dist/src/devkit-exports.d.ts +9 -1
  143. package/dist/src/devkit-exports.js +12 -1
  144. package/dist/src/devkit-internals.d.ts +6 -5
  145. package/dist/src/devkit-internals.js +13 -4
  146. package/dist/src/executors/run-commands/run-commands.impl.d.ts +4 -2
  147. package/dist/src/executors/run-commands/run-commands.impl.js +53 -27
  148. package/dist/src/executors/run-commands/running-tasks.d.ts +13 -4
  149. package/dist/src/executors/run-commands/running-tasks.js +148 -95
  150. package/dist/src/executors/run-commands/schema.json +1 -1
  151. package/dist/src/hasher/check-task-files.js +5 -8
  152. package/dist/src/hasher/file-hasher.js +9 -7
  153. package/dist/src/hasher/hash-task.js +4 -0
  154. package/dist/src/hasher/native-task-hasher-impl.js +3 -1
  155. package/dist/src/hasher/task-hasher.d.ts +2 -0
  156. package/dist/src/hasher/task-hasher.js +4 -1
  157. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.d.ts +1 -2
  158. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.js +6 -11
  159. package/dist/src/migrations/update-23-2-0/set-cache-on-executor-target-defaults.md +2 -2
  160. package/dist/src/migrations/update-24-0-0/enable-legacy-affected.d.ts +4 -0
  161. package/dist/src/migrations/update-24-0-0/enable-legacy-affected.js +15 -0
  162. package/dist/src/migrations/update-24-0-0/enable-legacy-affected.md +30 -0
  163. package/dist/src/migrations/update-24-0-0/find-custom-hashers.d.ts +3 -0
  164. package/dist/src/migrations/update-24-0-0/find-custom-hashers.js +100 -0
  165. package/dist/src/migrations/update-24-0-0/find-custom-hashers.md +63 -0
  166. package/dist/src/migrations/update-24-0-0/move-custom-hashers-to-inputs.md +146 -0
  167. package/dist/src/migrations/update-24-0-0/rename-ultracache-ignore-options.d.ts +3 -0
  168. package/dist/src/migrations/update-24-0-0/rename-ultracache-ignore-options.js +130 -0
  169. package/dist/src/migrations/update-24-0-0/rename-ultracache-ignore-options.md +62 -0
  170. package/dist/src/native/assert-supported-platform.js +1 -1
  171. package/dist/src/native/index.d.ts +238 -18
  172. package/dist/src/native/index.js +6 -1
  173. package/dist/src/native/native-bindings.js +15 -6
  174. package/dist/src/native/nx.openharmony-arm64.node +0 -0
  175. package/dist/src/native/nx.wasi-browser.js +1 -0
  176. package/dist/src/native/nx.wasi.cjs +1 -0
  177. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  178. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  179. package/dist/src/nx-cloud/update-manager.d.ts +14 -0
  180. package/dist/src/nx-cloud/update-manager.js +237 -50
  181. package/dist/src/plugins/js/lock-file/pnpm-parser.js +3 -4
  182. package/dist/src/plugins/js/lock-file/pruned-output.d.ts +2 -2
  183. package/dist/src/plugins/js/lock-file/pruned-output.js +4 -4
  184. package/dist/src/plugins/js/utils/register.js +9 -4
  185. package/dist/src/project-graph/affected/affected-tasks.d.ts +9 -6
  186. package/dist/src/project-graph/affected/affected-tasks.js +31 -7
  187. package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +7 -0
  188. package/dist/src/project-graph/plugins/loaded-nx-plugin.js +49 -6
  189. package/dist/src/project-graph/utils/project-configuration/target-merging.js +1 -1
  190. package/dist/src/project-graph/utils/project-configuration/target-normalization.js +12 -133
  191. package/dist/src/project-graph/utils/project-configuration-utils.js +2 -2
  192. package/dist/src/project-graph/utils/retrieve-workspace-files.js +27 -6
  193. package/dist/src/tasks-runner/create-task-graph.d.ts +8 -7
  194. package/dist/src/tasks-runner/create-task-graph.js +50 -27
  195. package/dist/src/tasks-runner/default-tasks-runner.js +1 -1
  196. package/dist/src/tasks-runner/init-tasks-runner.js +116 -59
  197. package/dist/src/tasks-runner/life-cycle.d.ts +4 -1
  198. package/dist/src/tasks-runner/life-cycle.js +7 -0
  199. package/dist/src/tasks-runner/life-cycles/performance-analysis.d.ts +5 -2
  200. package/dist/src/tasks-runner/life-cycles/performance-analysis.js +13 -7
  201. package/dist/src/tasks-runner/life-cycles/performance-life-cycle.d.ts +4 -3
  202. package/dist/src/tasks-runner/life-cycles/performance-life-cycle.js +9 -2
  203. package/dist/src/tasks-runner/life-cycles/static-run-many-terminal-output-life-cycle.js +5 -2
  204. package/dist/src/tasks-runner/life-cycles/static-run-one-terminal-output-life-cycle.js +4 -1
  205. package/dist/src/tasks-runner/life-cycles/summary-terminal-output-life-cycle.js +5 -1
  206. package/dist/src/tasks-runner/pseudo-ipc.d.ts +1 -0
  207. package/dist/src/tasks-runner/pseudo-ipc.js +4 -0
  208. package/dist/src/tasks-runner/pseudo-terminal.d.ts +1 -1
  209. package/dist/src/tasks-runner/pseudo-terminal.js +2 -2
  210. package/dist/src/tasks-runner/readiness/executor-ready-signal.d.ts +7 -0
  211. package/dist/src/tasks-runner/readiness/executor-ready-signal.js +43 -0
  212. package/dist/src/tasks-runner/readiness/probes.d.ts +14 -0
  213. package/dist/src/tasks-runner/readiness/probes.js +101 -0
  214. package/dist/src/tasks-runner/readiness/ready-signal-server.d.ts +18 -0
  215. package/dist/src/tasks-runner/readiness/ready-signal-server.js +72 -0
  216. package/dist/src/tasks-runner/readiness/ready-signal.d.ts +33 -0
  217. package/dist/src/tasks-runner/readiness/ready-signal.js +92 -0
  218. package/dist/src/tasks-runner/readiness/ready-when.d.ts +84 -0
  219. package/dist/src/tasks-runner/readiness/ready-when.js +371 -0
  220. package/dist/src/tasks-runner/readiness/startup-host.d.ts +1 -0
  221. package/dist/src/tasks-runner/readiness/startup-host.js +32 -0
  222. package/dist/src/tasks-runner/run-command.d.ts +6 -2
  223. package/dist/src/tasks-runner/run-command.js +21 -31
  224. package/dist/src/tasks-runner/run-outcome.d.ts +16 -0
  225. package/dist/src/tasks-runner/run-outcome.js +39 -0
  226. package/dist/src/tasks-runner/running-tasks/batch-process.js +6 -0
  227. package/dist/src/tasks-runner/running-tasks/node-child-process.js +5 -4
  228. package/dist/src/tasks-runner/running-tasks/running-task.d.ts +1 -1
  229. package/dist/src/tasks-runner/task-env.d.ts +10 -0
  230. package/dist/src/tasks-runner/task-env.js +37 -5
  231. package/dist/src/tasks-runner/task-graph-utils.d.ts +9 -6
  232. package/dist/src/tasks-runner/task-graph-utils.js +17 -12
  233. package/dist/src/tasks-runner/task-orchestrator.d.ts +62 -18
  234. package/dist/src/tasks-runner/task-orchestrator.js +750 -150
  235. package/dist/src/tasks-runner/tasks-runner.d.ts +1 -1
  236. package/dist/src/tasks-runner/tasks-schedule.d.ts +18 -1
  237. package/dist/src/tasks-runner/tasks-schedule.js +63 -6
  238. package/dist/src/tasks-runner/tokens.d.ts +54 -0
  239. package/dist/src/tasks-runner/tokens.js +161 -0
  240. package/dist/src/tasks-runner/utils.d.ts +35 -6
  241. package/dist/src/tasks-runner/utils.js +149 -68
  242. package/dist/src/ultracache/ci-status.d.ts +24 -0
  243. package/dist/src/ultracache/ci-status.js +87 -0
  244. package/dist/src/ultracache/config.d.ts +3 -3
  245. package/dist/src/ultracache/config.js +4 -4
  246. package/dist/src/ultracache/fetch.d.ts +2 -0
  247. package/dist/src/ultracache/fetch.js +1 -0
  248. package/dist/src/ultracache/overrides.js +4 -0
  249. package/dist/src/utils/acknowledge-build-scripts.d.ts +34 -1
  250. package/dist/src/utils/acknowledge-build-scripts.js +171 -32
  251. package/dist/src/utils/child-process.js +2 -1
  252. package/dist/src/utils/find-matching-projects.js +9 -6
  253. package/dist/src/utils/git-utils.d.ts +12 -5
  254. package/dist/src/utils/git-utils.js +69 -11
  255. package/dist/src/utils/long-running-target.d.ts +1 -3
  256. package/dist/src/utils/long-running-target.js +1 -3
  257. package/dist/src/utils/output.d.ts +4 -3
  258. package/dist/src/utils/output.js +4 -3
  259. package/dist/src/utils/owned-private-dir.d.ts +1 -17
  260. package/dist/src/utils/owned-private-dir.js +10 -62
  261. package/dist/src/utils/package-manager.d.ts +8 -0
  262. package/dist/src/utils/package-manager.js +65 -8
  263. package/dist/src/utils/perf-hooks.d.ts +1 -0
  264. package/dist/src/utils/plugins/core-plugins.js +5 -1
  265. package/dist/src/utils/progress-topics.d.ts +1 -0
  266. package/dist/src/utils/progress-topics.js +1 -0
  267. package/dist/src/utils/safe-spawn.js +1 -5
  268. package/dist/src/utils/shell-quoting.d.ts +8 -1
  269. package/dist/src/utils/shell-quoting.js +12 -1
  270. package/dist/src/utils/spawn-without-terminal.d.ts +27 -0
  271. package/dist/src/utils/spawn-without-terminal.js +110 -0
  272. package/dist/src/utils/string-similarity.d.ts +38 -0
  273. package/dist/src/utils/string-similarity.js +108 -0
  274. package/migrations.json +20 -6
  275. package/package.json +15 -24
  276. package/schemas/migrations-schema.json +11 -0
  277. package/schemas/nx-schema.json +133 -11
  278. package/schemas/project-schema.json +114 -4
  279. package/dist/src/command-line/migrate/agentic/prompts/generic-validation.d.ts +0 -56
  280. package/dist/src/command-line/migrate/agentic/prompts/generic-validation.js +0 -67
  281. package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.d.ts +0 -49
  282. package/dist/src/command-line/migrate/agentic/prompts/hybrid-prompt-migration.js +0 -53
  283. package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.d.ts +0 -26
  284. package/dist/src/command-line/migrate/agentic/prompts/prompt-migration.js +0 -27
  285. package/dist/src/command-line/migrate/agentic/prompts/system-prompt.d.ts +0 -70
  286. package/dist/src/command-line/migrate/agentic/prompts/system-prompt.js +0 -113
  287. package/dist/src/command-line/migrate/agentic/run-step.d.ts +0 -68
  288. package/dist/src/command-line/migrate/agentic/run-step.js +0 -148
  289. package/dist/src/command-line/migrate/agentic/runner.d.ts +0 -21
  290. package/dist/src/command-line/migrate/agentic/runner.js +0 -262
  291. package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.d.ts +0 -9
  292. package/dist/src/migrations/update-23-0-0/consolidate-release-tag-config.js +0 -18
  293. package/dist/src/tasks-runner/legacy-depends-on-warning.d.ts +0 -18
  294. package/dist/src/tasks-runner/legacy-depends-on-warning.js +0 -109
@@ -8,9 +8,9 @@ This migration copies `cache` onto each executor key that applies to a target wh
8
8
 
9
9
  An executor key applies to every target that resolves through it, so the migration updates a key only when it can establish that caching is right for all of them. It leaves the key unchanged when the key already declares `cache`, when it declares `continuous: true`, when every entry on the key is filtered so none of them always applies, when a target through it is continuous or is a long-running target such as `serve`, `dev`, or `start`, when the executor's own schema marks its targets continuous, or when a target through it has no target name key enabling `cache`. It never updates the `nx:run-commands` or `nx:run-script` keys, because targets written with `command` and targets derived from `package.json` scripts resolve through those keys without naming them.
10
10
 
11
- Where the migration makes no change, Nx still decides at run time, per target rather than per key: a target whose target name key enables `cache`, and whose resolved configuration still leaves `cache` undefined, gets it back and is reported as a deprecated fallback. Because that test is applied to the resolved target rather than to the key, it also covers the cases where a key looks decided but is not for this project — an executor key whose entries are all filtered, or whose only `cache` declaration is filtered out here. It equally covers the targets left behind because a sibling target through the same key does not opt in, and the targets reaching the `nx:run-commands` and `nx:run-script` keys. Three cases get no fallback and no warning. A continuous or long-running target, because caching it is invalid. A target whose resolved configuration already sets `cache`. And a target whose target name key was discarded as incompatible, because its entry named an executor the target does not use — before Nx 23 that target was cacheable, since cacheability was matched on target name alone and the entry's `executor` was never read. Restoring it here would mean setting `cache` with no executor key to point the user at and no migration able to retire the behavior, so it is deliberately left alone. Set `cache` on those targets directly.
11
+ Where the migration makes no change, the targets resolving through that key are not cached. Nx 24 reads `cache` from the key that wins resolution and nothing else, so `cache` on a target name key has no effect once an executor key applies. That leaves the keys the migration skips, the keys whose only `cache` declaration is filtered, the targets passed over because a sibling target through the same key does not opt in, and the targets reaching the `nx:run-commands` and `nx:run-script` keys. Set `cache` on the key those targets resolve through, or on the targets themselves.
12
12
 
13
- Targets are read from each project's `project.json` and from the `nx.targets` block of its `package.json`. Targets inferred by a plugin, and targets derived from `package.json` scripts, are not visible to the migration — the latter is why the `nx:run-script` key is never updated. A key that looks safe here may still serve an inferred target. Set `cache` on the executor key by hand only after checking that no target reaching it is continuous; Nx rejects a target that is both cacheable and continuous. Nx names both keys in a run-time warning. That warning is emitted during project graph construction, so while the daemon is running it goes to `.nx/workspace-data/d/daemon.log` rather than the terminal; CI runs, where the daemon is disabled, print it normally.
13
+ Targets are read from each project's `project.json` and from the `nx.targets` block of its `package.json`. Targets inferred by a plugin, and targets derived from `package.json` scripts, are not visible to the migration — the latter is why the `nx:run-script` key is never updated. A key that looks safe here may still serve an inferred target. Set `cache` on the executor key by hand only after checking that no target reaching it is continuous; Nx rejects a target that is both cacheable and continuous.
14
14
 
15
15
  #### Sample code changes
16
16
 
@@ -0,0 +1,4 @@
1
+ import type { Tree } from '../../generators/tree';
2
+ export default function enableLegacyAffected(tree: Tree): Promise<{
3
+ skipAgentic: boolean;
4
+ }>;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = enableLegacyAffected;
4
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
5
+ const nx_json_1 = require("../../generators/utils/nx-json");
6
+ async function enableLegacyAffected(tree) {
7
+ const nxJson = (0, nx_json_1.readNxJson)(tree);
8
+ if (!nxJson || nxJson.affected?.legacy !== undefined) {
9
+ return { skipAgentic: true };
10
+ }
11
+ nxJson.affected = { ...nxJson.affected, legacy: true };
12
+ (0, nx_json_1.updateNxJson)(tree, nxJson);
13
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
14
+ return { skipAgentic: true };
15
+ }
@@ -0,0 +1,30 @@
1
+ #### Keep legacy `nx affected` selection
2
+
3
+ In Nx 24, `nx affected -t` selects only the tasks whose inputs a change reaches, instead of every task of each affected project.
4
+ This migration sets `affected.legacy` to `true` in `nx.json`, so existing workspaces keep selecting whole projects after upgrading.
5
+
6
+ To switch to task selection, remove the setting or set it to `false`.
7
+ The `NX_LEGACY_AFFECTED` environment variable overrides the setting for a single run: `false` selects tasks and `true` selects projects.
8
+
9
+ The migration skips workspaces that already set `affected.legacy`.
10
+
11
+ #### Sample code changes
12
+
13
+ ##### Before
14
+
15
+ ```json title="nx.json"
16
+ {
17
+ "defaultBase": "main"
18
+ }
19
+ ```
20
+
21
+ ##### After
22
+
23
+ ```json title="nx.json"
24
+ {
25
+ "defaultBase": "main",
26
+ "affected": {
27
+ "legacy": true
28
+ }
29
+ }
30
+ ```
@@ -0,0 +1,3 @@
1
+ import type { MigrationReturnObject } from '../../config/misc-interfaces';
2
+ import type { Tree } from '../../generators/tree';
3
+ export default function findCustomHashers(tree: Tree): Promise<MigrationReturnObject>;
@@ -0,0 +1,100 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = findCustomHashers;
4
+ const glob_1 = require("../../generators/utils/glob");
5
+ const json_1 = require("../../utils/json");
6
+ const path_1 = require("../../utils/path");
7
+ const node_path_1 = require("node:path");
8
+ const DOCS_URL = 'https://nx.dev/docs/kb/local-executors#replace-a-custom-hasher-with-inputs';
9
+ async function findCustomHashers(tree) {
10
+ const hits = new Set();
11
+ const malformed = new Set();
12
+ const unparseable = [];
13
+ const visited = new Set();
14
+ for (const packageJsonPath of await (0, glob_1.globAsync)(tree, ['**/package.json'])) {
15
+ if (packageJsonPath.split('/').includes('node_modules')) {
16
+ continue;
17
+ }
18
+ const content = tree.read(packageJsonPath, 'utf-8');
19
+ if (!content.includes('"executors"') && !content.includes('"builders"')) {
20
+ continue;
21
+ }
22
+ const packageJson = tryParse(content);
23
+ if (!packageJson) {
24
+ unparseable.push(packageJsonPath);
25
+ continue;
26
+ }
27
+ const packageRoot = node_path_1.posix.dirname(packageJsonPath);
28
+ // A nameless local plugin is referenced by its relative path.
29
+ const pluginName = packageJson.name ?? (packageRoot === '.' ? '.' : `./${packageRoot}`);
30
+ for (const field of [packageJson.executors, packageJson.builders]) {
31
+ if (typeof field !== 'string') {
32
+ continue;
33
+ }
34
+ const executorsJsonPath = (0, path_1.joinPathFragments)(packageRoot, field);
35
+ if (visited.has(executorsJsonPath) || !tree.exists(executorsJsonPath)) {
36
+ continue;
37
+ }
38
+ visited.add(executorsJsonPath);
39
+ const executorsJson = tryParse(tree.read(executorsJsonPath, 'utf-8'));
40
+ if (!executorsJson) {
41
+ unparseable.push(executorsJsonPath);
42
+ continue;
43
+ }
44
+ const entries = [];
45
+ for (const map of [executorsJson.executors, executorsJson.builders]) {
46
+ if (map === undefined) {
47
+ continue;
48
+ }
49
+ if (!isPlainObject(map)) {
50
+ unparseable.push(executorsJsonPath);
51
+ break;
52
+ }
53
+ entries.push(...Object.entries(map));
54
+ }
55
+ for (const [name, entry] of entries) {
56
+ if (typeof entry === 'string') {
57
+ continue;
58
+ }
59
+ if (!isPlainObject(entry) || !isValidHasher(entry.hasher)) {
60
+ malformed.add(`Entry "${name}" in "${executorsJsonPath}" is not a valid executor entry. Check it by hand for a "hasher".`);
61
+ continue;
62
+ }
63
+ if (entry.hasher === undefined) {
64
+ continue;
65
+ }
66
+ const hasherPath = (0, path_1.joinPathFragments)(node_path_1.posix.dirname(executorsJsonPath), entry.hasher);
67
+ hits.add(`Executor "${pluginName}:${name}" declares a custom hasher at "${hasherPath}" in "${executorsJsonPath}".`);
68
+ }
69
+ }
70
+ }
71
+ if (hits.size === 0 && malformed.size === 0 && unparseable.length === 0) {
72
+ return { skipAgentic: true };
73
+ }
74
+ const manualNotes = [
75
+ ...malformed,
76
+ ...unparseable.map((path) => `Could not parse "${path}". Check it by hand for executors that declare a "hasher".`),
77
+ ];
78
+ return {
79
+ nextSteps: [
80
+ `Custom hashers are deprecated and will be removed in Nx 25. Replace each one with target inputs, then remove "hasher" from executors.json. See ${DOCS_URL}`,
81
+ ...hits,
82
+ ...manualNotes,
83
+ ],
84
+ agentContext: [...hits, ...manualNotes],
85
+ };
86
+ }
87
+ function isPlainObject(value) {
88
+ return typeof value === 'object' && value !== null && !Array.isArray(value);
89
+ }
90
+ function isValidHasher(hasher) {
91
+ return hasher === undefined || typeof hasher === 'string';
92
+ }
93
+ function tryParse(content) {
94
+ try {
95
+ return (0, json_1.parseJson)(content);
96
+ }
97
+ catch {
98
+ return null;
99
+ }
100
+ }
@@ -0,0 +1,63 @@
1
+ #### Move custom executor hashers to target inputs
2
+
3
+ Custom hashers are deprecated in Nx 24 and will be removed in Nx 25.
4
+ A custom hasher is the `hasher` property of an executor in `executors.json`, pointing at a module that computes the task hash in code.
5
+ Target `inputs` replace them.
6
+
7
+ This migration finds every local plugin in the workspace whose `executors.json` (or `builders.json`) declares a `hasher`.
8
+ It doesn't edit any files.
9
+ When it finds one, it lists the executor, the hasher module, and the `executors.json` file in the migration's next steps.
10
+ It also lists files and executor entries it can't read, so you can check those by hand.
11
+ Under `nx migrate` with an AI agent, the agent reads each hasher and writes `inputs` that hash the same things.
12
+ A target that declares its own `inputs` doesn't inherit them from `targetDefaults`, so the agent checks every target that uses the executor and adds the inputs where they're missing.
13
+ It removes the `hasher` only once every one of those targets is covered.
14
+ If something the hasher hashes can't be expressed as an input, the agent leaves the hasher in place and tells you why.
15
+
16
+ Packages installed in `node_modules` aren't scanned.
17
+ If a third-party plugin you use declares a hasher, Nx warns about it when it hashes one of its tasks.
18
+
19
+ #### Sample code changes
20
+
21
+ Given a local plugin whose `echo` executor hashes the project, its dependencies, and the `API_URL` environment variable:
22
+
23
+ ##### Before
24
+
25
+ ```json title="tools/my-plugin/executors.json"
26
+ {
27
+ "executors": {
28
+ "echo": {
29
+ "implementation": "./src/executors/echo/executor",
30
+ "hasher": "./src/executors/echo/hasher",
31
+ "schema": "./src/executors/echo/schema.json"
32
+ }
33
+ }
34
+ }
35
+ ```
36
+
37
+ ##### After
38
+
39
+ ```json title="nx.json"
40
+ {
41
+ "targetDefaults": {
42
+ "@acme/my-plugin:echo": {
43
+ "inputs": ["default", "^default", { "env": "API_URL" }]
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ ```json title="tools/my-plugin/executors.json"
50
+ {
51
+ "executors": {
52
+ "echo": {
53
+ "implementation": "./src/executors/echo/executor",
54
+ "schema": "./src/executors/echo/schema.json"
55
+ }
56
+ }
57
+ }
58
+ ```
59
+
60
+ #### Reference
61
+
62
+ - [Replace a custom hasher with inputs](https://nx.dev/docs/kb/local-executors#replace-a-custom-hasher-with-inputs)
63
+ - [Inputs reference](https://nx.dev/docs/reference/inputs)
@@ -0,0 +1,146 @@
1
+ # Move custom executor hashers to target inputs
2
+
3
+ Custom hashers (the `hasher` property of an executor in `executors.json`) are
4
+ deprecated in Nx 24 and removed in Nx 25. Each one should become target `inputs`
5
+ that hash the same things, so the targets keep caching correctly once the hasher
6
+ is gone.
7
+
8
+ The generator half of this migration only scans. It edits no files, and it lists
9
+ every executor that declares a hasher in the `impl.agentContext` field of the
10
+ step's `nx_migrate_prompt` block, one line each, with the executor name, the
11
+ hasher path, and the `executors.json` path. Lines starting with
12
+ `Could not parse` name files the scan skipped, and lines starting with `Entry`
13
+ name executor entries it could not read.
14
+
15
+ Do not touch executors that declare no hasher, executors installed from
16
+ `node_modules`, or any other caching configuration.
17
+
18
+ ## First, check whether there is anything to do
19
+
20
+ Confirm this before changing anything. If it fails, make no changes and stop:
21
+
22
+ 1. `impl.agentContext` lists at least one executor that declares a custom
23
+ hasher, or at least one file or entry it could not read. Read each of those
24
+ yourself; if it declares no `hasher`, drop it from the list.
25
+
26
+ ## Step 1: Read what each hasher hashes
27
+
28
+ Open the hasher module named in `impl.agentContext`. Work out every value it
29
+ feeds into the hash it returns:
30
+
31
+ - `context.hasher.hashTask(task, ...)` alone is Nx default hashing.
32
+ - Files it reads, globs it walks, or other projects it hashes.
33
+ - Environment variables it reads.
34
+ - Commands it runs, or data it fetches (a remote API, a registry lookup).
35
+
36
+ ## Step 2: Write equivalent inputs
37
+
38
+ Map each value to an input:
39
+
40
+ | What the hasher hashes | Input |
41
+ | ----------------------------------------------------- | ------------------------------------------------------- |
42
+ | The project and its dependencies (Nx default hashing) | `"default"` and `"^default"` |
43
+ | Files of specific other projects | `{ "input": "default", "projects": ["shared-config"] }` |
44
+ | A subset of the files in the project | `{ "fileset": "{projectRoot}/src/**/*.graphql" }` |
45
+ | A file outside any project | `{ "fileset": "{workspaceRoot}/schema.json" }` |
46
+ | An environment variable | `{ "env": "API_URL" }` |
47
+ | The output of a command, such as a tool version | `{ "runtime": "node --version" }` |
48
+
49
+ If the workspace defines named inputs such as `production`, prefer them over
50
+ `default` where the hasher excluded test files.
51
+
52
+ ### Find every target that uses the executor
53
+
54
+ Write the resolved project graph and list every target whose `executor` is the
55
+ executor name (`"@acme/my-plugin:echo"`):
56
+
57
+ ```shell
58
+ npx nx graph --file=tmp/custom-hashers-graph.json
59
+ ```
60
+
61
+ Each target in `graph.nodes.<project>.data.targets` there is fully resolved: it
62
+ already reflects `targetDefaults` (including filtered array entries), inferred
63
+ targets, and project-level overrides. Record each consuming target's resolved
64
+ `inputs`. Every one of them must end up covered.
65
+
66
+ ### Place the inputs
67
+
68
+ A target that declares its own `inputs` replaces the `inputs` from
69
+ `targetDefaults` rather than merging with them. So a `targetDefaults` edit alone
70
+ does not reach a target that already declares `inputs`.
71
+
72
+ 1. Set the inputs in `nx.json` `targetDefaults` under the executor name. If that
73
+ key already exists, add `inputs` to it, and merge with any `inputs` it already
74
+ declares rather than replacing them. If its value is an array of filtered
75
+ entries, add the inputs to every entry that applies to a consuming target.
76
+ 2. For every consuming target that declares its own `inputs`, add the
77
+ replacement inputs to that target as well, keeping the inputs it already has.
78
+ It is declared in `project.json`, in the `nx.targets` block of
79
+ `package.json`, or by the plugin that infers the target. For an inferred
80
+ target, set `inputs` in `project.json` to the full resolved list plus the
81
+ replacement inputs.
82
+ 3. Write the graph again and confirm that every consuming target's resolved
83
+ `inputs` now contains every replacement input. Fix any that do not.
84
+
85
+ **Before:**
86
+
87
+ ```json
88
+ // tools/my-plugin/executors.json
89
+ {
90
+ "executors": {
91
+ "echo": {
92
+ "implementation": "./src/executors/echo/executor",
93
+ "hasher": "./src/executors/echo/hasher",
94
+ "schema": "./src/executors/echo/schema.json"
95
+ }
96
+ }
97
+ }
98
+ ```
99
+
100
+ **After:**
101
+
102
+ ```json
103
+ // nx.json
104
+ {
105
+ "targetDefaults": {
106
+ "@acme/my-plugin:echo": {
107
+ "inputs": ["default", "^default", { "env": "API_URL" }]
108
+ }
109
+ }
110
+ }
111
+ ```
112
+
113
+ ```json
114
+ // tools/my-plugin/executors.json
115
+ {
116
+ "executors": {
117
+ "echo": {
118
+ "implementation": "./src/executors/echo/executor",
119
+ "schema": "./src/executors/echo/schema.json"
120
+ }
121
+ }
122
+ }
123
+ ```
124
+
125
+ ## Step 3: Remove the hasher only when the inputs cover it
126
+
127
+ Remove `hasher` from `executors.json` and delete the hasher module (and its
128
+ spec) only once the resolved inputs of every consuming target cover everything
129
+ the hasher hashed.
130
+
131
+ If a value has no file, environment variable, or project to point at, such as
132
+ data fetched from a remote service, use a `runtime` input whose command prints
133
+ that value. If no command can reproduce it, leave the hasher in place and tell
134
+ the user which value blocks the move and why.
135
+
136
+ ## Post-Migration Validation
137
+
138
+ 1. `npx nx show target <project>:<target>` for every consuming target found in
139
+ Step 2. Confirm each one lists the replacement inputs. After the hasher is
140
+ removed, `npx nx show target <project>:<target> inputs` also shows the files
141
+ and values those inputs resolve to.
142
+ 2. `npx nx run-many -t <target>` twice for the targets that used the executor.
143
+ The second run should be a cache hit. Change a file the hasher used to hash
144
+ and confirm the next run is a cache miss.
145
+ 3. `npx nx run-many -t build,test,lint -p <plugin project>` if you deleted hasher
146
+ files. Fix failures caused by this migration and re-run until green.
@@ -0,0 +1,3 @@
1
+ import type { MigrationReturnObject } from '../../config/misc-interfaces';
2
+ import type { Tree } from '../../generators/tree';
3
+ export default function update(tree: Tree): Promise<MigrationReturnObject>;
@@ -0,0 +1,130 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
4
+ const format_changed_files_1 = require("../../generators/internal-utils/format-changed-files");
5
+ const project_configuration_1 = require("../../generators/utils/project-configuration");
6
+ const RENAMED_ULTRACACHE_KEYS = new Map([
7
+ ['ignoredReads', 'ignoreReads'],
8
+ ['ignoredWrites', 'ignoreWrites'],
9
+ ]);
10
+ const WORKFLOWS_DIR = '.nx/workflows';
11
+ const CONFIG_EXTENSIONS = ['yaml', 'yml'];
12
+ const OLD_CONFIG_PATH = /(\.nx\/workflows\/)sandboxing-config\.(ya?ml)/g;
13
+ // Matches a block-style key at the start of a line or after a sequence dash,
14
+ // optionally quoted. Comments and values are left alone.
15
+ const OLD_YAML_KEY = /^(\s*(?:-\s+)?)(['"]?)exclude-(reads|writes)\2(\s*:)/gm;
16
+ async function update(tree) {
17
+ const manual = [];
18
+ for (const [name, project] of (0, project_configuration_1.getProjects)(tree)) {
19
+ let changed = false;
20
+ for (const target of Object.values(project.targets ?? {})) {
21
+ changed = renameUltracacheKeys(target) || changed;
22
+ }
23
+ const rewritten = rewriteConfigPaths(project);
24
+ if (changed || rewritten !== project) {
25
+ (0, project_configuration_1.updateProjectConfiguration)(tree, name, rewritten);
26
+ }
27
+ }
28
+ const nxJson = (0, project_configuration_1.readNxJson)(tree);
29
+ if (nxJson) {
30
+ let changed = false;
31
+ for (const value of Object.values(nxJson.targetDefaults ?? {})) {
32
+ for (const entry of targetDefaultEntries(value)) {
33
+ changed = renameUltracacheKeys(entry) || changed;
34
+ }
35
+ }
36
+ const rewritten = rewriteConfigPaths(nxJson);
37
+ if (changed || rewritten !== nxJson) {
38
+ (0, project_configuration_1.updateNxJson)(tree, rewritten);
39
+ }
40
+ }
41
+ manual.push(...renameWorkspaceConfig(tree));
42
+ await (0, format_changed_files_1.formatChangedFiles)(tree);
43
+ if (manual.length === 0) {
44
+ return { skipAgentic: true };
45
+ }
46
+ return { nextSteps: manual, agentContext: manual };
47
+ }
48
+ function targetDefaultEntries(value) {
49
+ return Array.isArray(value) ? value : [value];
50
+ }
51
+ function renameUltracacheKeys(target) {
52
+ const ultracache = target?.ultracache;
53
+ if (!ultracache ||
54
+ typeof ultracache !== 'object' ||
55
+ !Object.keys(ultracache).some((key) => RENAMED_ULTRACACHE_KEYS.has(key))) {
56
+ return false;
57
+ }
58
+ const renamed = {};
59
+ for (const [key, value] of Object.entries(ultracache)) {
60
+ const newKey = RENAMED_ULTRACACHE_KEYS.get(key) ?? key;
61
+ renamed[newKey] = mergePatterns(renamed[newKey], value);
62
+ }
63
+ target.ultracache = renamed;
64
+ return true;
65
+ }
66
+ // A target may already declare the new key beside the old one; keep both sets.
67
+ function mergePatterns(existing, incoming) {
68
+ if (existing === undefined) {
69
+ return incoming;
70
+ }
71
+ if (!Array.isArray(existing) || !Array.isArray(incoming)) {
72
+ return incoming;
73
+ }
74
+ return [...existing, ...incoming.filter((p) => !existing.includes(p))];
75
+ }
76
+ // Returns the same reference when nothing changed.
77
+ function rewriteConfigPaths(value) {
78
+ if (typeof value === 'string') {
79
+ const replaced = value.replace(OLD_CONFIG_PATH, '$1ultracache-config.$2');
80
+ return (replaced === value ? value : replaced);
81
+ }
82
+ if (Array.isArray(value)) {
83
+ const mapped = value.map(rewriteConfigPaths);
84
+ return (mapped.some((v, i) => v !== value[i]) ? mapped : value);
85
+ }
86
+ if (value && typeof value === 'object') {
87
+ let changed = false;
88
+ const mapped = {};
89
+ for (const [key, v] of Object.entries(value)) {
90
+ mapped[key] = rewriteConfigPaths(v);
91
+ changed ||= mapped[key] !== v;
92
+ }
93
+ return (changed ? mapped : value);
94
+ }
95
+ return value;
96
+ }
97
+ function renameWorkspaceConfig(tree) {
98
+ const existingNew = CONFIG_EXTENSIONS.map((ext) => `${WORKFLOWS_DIR}/ultracache-config.${ext}`).filter((path) => tree.exists(path));
99
+ const manual = [];
100
+ for (const ext of CONFIG_EXTENSIONS) {
101
+ const oldPath = `${WORKFLOWS_DIR}/sandboxing-config.${ext}`;
102
+ if (!tree.exists(oldPath)) {
103
+ continue;
104
+ }
105
+ if (existingNew.length > 0) {
106
+ manual.push(`Both "${oldPath}" and "${existingNew[0]}" exist. Nx Cloud reads only "${existingNew[0]}", so merge the patterns from "${oldPath}" into it and delete "${oldPath}".`);
107
+ continue;
108
+ }
109
+ const newPath = `${WORKFLOWS_DIR}/ultracache-config.${ext}`;
110
+ tree.rename(oldPath, newPath);
111
+ existingNew.push(newPath);
112
+ }
113
+ for (const path of existingNew) {
114
+ const content = tree.read(path, 'utf-8') ?? '';
115
+ const updated = content.replace(OLD_YAML_KEY, '$1$2ignore-$3$2$4');
116
+ if (updated !== content) {
117
+ tree.write(path, updated);
118
+ }
119
+ if (hasOldYamlKey(updated)) {
120
+ manual.push(`"${path}" still uses "exclude-reads" or "exclude-writes" in a form the migration could not rewrite. Rename them to "ignore-reads" and "ignore-writes".`);
121
+ }
122
+ }
123
+ return manual;
124
+ }
125
+ function hasOldYamlKey(content) {
126
+ return content
127
+ .split('\n')
128
+ .map((line) => line.replace(/#.*$/, ''))
129
+ .some((line) => /['"]?exclude-(reads|writes)['"]?\s*:/.test(line));
130
+ }
@@ -0,0 +1,62 @@
1
+ #### Rename ultracache ignore options
2
+
3
+ Nx 24 renames the `ultracache` target options `ignoredReads` and `ignoredWrites` to `ignoreReads` and `ignoreWrites`.
4
+ The workspace-wide exclusions file moves from `.nx/workflows/sandboxing-config.yaml` to `.nx/workflows/ultracache-config.yaml`, and its `exclude-reads` and `exclude-writes` keys become `ignore-reads` and `ignore-writes`.
5
+
6
+ This migration renames the options in every target in `project.json` files, in the `nx` block of `package.json` files, and in `targetDefaults` in `nx.json`.
7
+ When a target sets both the old and the new option, it combines their patterns under the new one.
8
+ It renames `.nx/workflows/sandboxing-config.yaml` (or `.yml`) and the keys inside it, including those in `task-exclusions` entries.
9
+ It also updates any `inputs` or `namedInputs` entry that points at the old file.
10
+
11
+ If `.nx/workflows/ultracache-config.yaml` already exists, the migration leaves both files in place and lists them in its next steps so you can merge them by hand.
12
+ It does the same when the file writes those keys in a form it can't rewrite, such as an inline `{ }` map.
13
+
14
+ #### Sample code changes
15
+
16
+ ##### Before
17
+
18
+ ```json title="apps/app/project.json"
19
+ {
20
+ "targets": {
21
+ "build": {
22
+ "ultracache": {
23
+ "ignoredReads": ["tmp/**"],
24
+ "ignoredWrites": ["**/.cache/**"]
25
+ }
26
+ }
27
+ }
28
+ }
29
+ ```
30
+
31
+ ```yaml title=".nx/workflows/sandboxing-config.yaml"
32
+ exclude-reads:
33
+ - 'dist/**'
34
+ task-exclusions:
35
+ - target: lint
36
+ exclude-writes:
37
+ - .eslintcache/**
38
+ ```
39
+
40
+ ##### After
41
+
42
+ ```json title="apps/app/project.json"
43
+ {
44
+ "targets": {
45
+ "build": {
46
+ "ultracache": {
47
+ "ignoreReads": ["tmp/**"],
48
+ "ignoreWrites": ["**/.cache/**"]
49
+ }
50
+ }
51
+ }
52
+ }
53
+ ```
54
+
55
+ ```yaml title=".nx/workflows/ultracache-config.yaml"
56
+ ignore-reads:
57
+ - 'dist/**'
58
+ task-exclusions:
59
+ - target: lint
60
+ ignore-writes:
61
+ - .eslintcache/**
62
+ ```
@@ -12,7 +12,7 @@ function assertSupportedPlatform() {
12
12
  if (process.platform == 'win32' ||
13
13
  process.platform == 'darwin' ||
14
14
  process.platform == 'linux' ||
15
- process.platform == 'freebsd' || process.platform == 'openharmony') {
15
+ process.platform == 'freebsd') {
16
16
  title = 'Missing Platform Dependency';
17
17
  bodyLines = [
18
18
  `The Nx CLI could not find or load the native binary for your supported platform (${process.platform}-${process.arch}).`,