nx 21.0.0-beta.1 → 21.0.0-beta.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (250) hide show
  1. package/.eslintrc.json +5 -1
  2. package/migrations.json +15 -35
  3. package/package.json +12 -12
  4. package/release/index.d.ts +1 -1
  5. package/release/index.js +2 -1
  6. package/schemas/nx-schema.json +187 -35
  7. package/schemas/project-schema.json +5 -0
  8. package/src/adapter/angular-json.js +11 -0
  9. package/src/adapter/compat.d.ts +1 -1
  10. package/src/adapter/compat.js +3 -0
  11. package/src/command-line/add/add.js +6 -16
  12. package/src/command-line/affected/command-object.js +6 -6
  13. package/src/command-line/examples.js +0 -4
  14. package/src/command-line/exec/command-object.js +1 -1
  15. package/src/command-line/generate/generator-utils.js +8 -3
  16. package/src/command-line/import/import.js +1 -1
  17. package/src/command-line/init/command-object.js +18 -6
  18. package/src/command-line/init/configure-plugins.d.ts +6 -7
  19. package/src/command-line/init/configure-plugins.js +52 -38
  20. package/src/command-line/init/implementation/add-nx-to-turborepo.d.ts +4 -0
  21. package/src/command-line/init/implementation/add-nx-to-turborepo.js +49 -0
  22. package/src/command-line/init/implementation/check-compatible-with-plugins.js +7 -1
  23. package/src/command-line/init/implementation/deduce-default-base.d.ts +1 -0
  24. package/src/command-line/init/implementation/deduce-default-base.js +53 -0
  25. package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +6 -4
  26. package/src/command-line/init/implementation/react/index.d.ts +1 -1
  27. package/src/command-line/init/implementation/react/index.js +32 -185
  28. package/src/command-line/init/implementation/react/write-vite-config.js +19 -3
  29. package/src/command-line/init/implementation/utils.d.ts +6 -2
  30. package/src/command-line/init/implementation/utils.js +110 -45
  31. package/src/command-line/init/init-v1.js +1 -1
  32. package/src/command-line/init/init-v2.d.ts +1 -0
  33. package/src/command-line/init/init-v2.js +70 -39
  34. package/src/command-line/migrate/migrate-ui-api.d.ts +58 -0
  35. package/src/command-line/migrate/migrate-ui-api.js +227 -0
  36. package/src/command-line/migrate/migrate.d.ts +23 -4
  37. package/src/command-line/migrate/migrate.js +138 -86
  38. package/src/command-line/nx-commands.js +19 -5
  39. package/src/command-line/register/command-object.d.ts +6 -0
  40. package/src/command-line/{activate-powerpack → register}/command-object.js +9 -9
  41. package/src/command-line/register/register.d.ts +2 -0
  42. package/src/command-line/register/register.js +9 -0
  43. package/src/command-line/release/changelog.js +18 -15
  44. package/src/command-line/release/command-object.d.ts +8 -0
  45. package/src/command-line/release/command-object.js +9 -0
  46. package/src/command-line/release/config/config.d.ts +8 -7
  47. package/src/command-line/release/config/config.js +139 -45
  48. package/src/command-line/release/config/use-legacy-versioning.d.ts +2 -0
  49. package/src/command-line/release/config/use-legacy-versioning.js +9 -0
  50. package/src/command-line/release/index.d.ts +4 -0
  51. package/src/command-line/release/index.js +6 -1
  52. package/src/command-line/release/plan-check.js +6 -3
  53. package/src/command-line/release/plan.js +7 -3
  54. package/src/command-line/release/publish.js +7 -3
  55. package/src/command-line/release/release.js +8 -3
  56. package/src/command-line/release/utils/batch-projects-by-generator-config.js +6 -3
  57. package/src/command-line/release/utils/git.d.ts +3 -2
  58. package/src/command-line/release/utils/git.js +65 -9
  59. package/src/command-line/release/utils/github.js +3 -1
  60. package/src/command-line/release/utils/resolve-semver-specifier.d.ts +2 -1
  61. package/src/command-line/release/utils/resolve-semver-specifier.js +2 -1
  62. package/src/command-line/release/utils/semver.d.ts +8 -0
  63. package/src/command-line/release/utils/semver.js +8 -0
  64. package/src/command-line/release/utils/shared-legacy.d.ts +25 -0
  65. package/src/command-line/release/utils/shared-legacy.js +2 -0
  66. package/src/command-line/release/utils/shared.d.ts +11 -17
  67. package/src/command-line/release/version/derive-specifier-from-conventional-commits.d.ts +7 -0
  68. package/src/command-line/release/version/derive-specifier-from-conventional-commits.js +47 -0
  69. package/src/command-line/release/version/deriver-specifier-from-version-plans.d.ts +8 -0
  70. package/src/command-line/release/version/deriver-specifier-from-version-plans.js +59 -0
  71. package/src/command-line/release/version/project-logger.d.ts +8 -0
  72. package/src/command-line/release/version/project-logger.js +45 -0
  73. package/src/command-line/release/version/release-group-processor.d.ts +252 -0
  74. package/src/command-line/release/version/release-group-processor.js +1057 -0
  75. package/src/command-line/release/version/resolve-current-version.d.ts +32 -0
  76. package/src/command-line/release/version/resolve-current-version.js +241 -0
  77. package/src/command-line/release/version/test-utils.d.ts +93 -0
  78. package/src/command-line/release/version/test-utils.js +415 -0
  79. package/src/command-line/release/version/topological-sort.d.ts +9 -0
  80. package/src/command-line/release/version/topological-sort.js +41 -0
  81. package/src/command-line/release/version/version-actions.d.ts +171 -0
  82. package/src/command-line/release/version/version-actions.js +195 -0
  83. package/src/command-line/release/version-legacy.d.ts +46 -0
  84. package/src/command-line/release/version-legacy.js +453 -0
  85. package/src/command-line/release/version.d.ts +0 -40
  86. package/src/command-line/release/version.js +84 -262
  87. package/src/command-line/repair/repair.js +8 -3
  88. package/src/command-line/report/report.d.ts +7 -3
  89. package/src/command-line/report/report.js +52 -18
  90. package/src/command-line/run/command-object.js +2 -2
  91. package/src/command-line/run/executor-utils.d.ts +6 -1
  92. package/src/command-line/run/executor-utils.js +10 -1
  93. package/src/command-line/run/run.js +2 -2
  94. package/src/command-line/run-many/command-object.js +2 -2
  95. package/src/command-line/yargs-utils/shared-options.d.ts +4 -0
  96. package/src/command-line/yargs-utils/shared-options.js +20 -0
  97. package/src/config/misc-interfaces.d.ts +20 -2
  98. package/src/config/nx-json.d.ts +158 -18
  99. package/src/config/project-graph.d.ts +4 -2
  100. package/src/config/project-graph.js +8 -0
  101. package/src/config/workspace-json-project-json.d.ts +2 -2
  102. package/src/core/graph/main.js +1 -1
  103. package/src/core/graph/runtime.js +1 -1
  104. package/src/core/graph/styles.css +2 -2
  105. package/src/core/graph/styles.js +1 -1
  106. package/src/daemon/client/client.d.ts +2 -0
  107. package/src/daemon/client/client.js +15 -0
  108. package/src/daemon/message-types/glob.d.ts +7 -0
  109. package/src/daemon/message-types/glob.js +9 -1
  110. package/src/daemon/message-types/hash-glob.d.ts +6 -0
  111. package/src/daemon/message-types/hash-glob.js +9 -1
  112. package/src/daemon/server/handle-glob.d.ts +1 -0
  113. package/src/daemon/server/handle-glob.js +8 -0
  114. package/src/daemon/server/handle-hash-glob.d.ts +1 -0
  115. package/src/daemon/server/handle-hash-glob.js +8 -0
  116. package/src/daemon/server/logger.js +2 -1
  117. package/src/daemon/server/server.js +7 -0
  118. package/src/devkit-exports.d.ts +1 -1
  119. package/src/devkit-internals.d.ts +3 -2
  120. package/src/devkit-internals.js +5 -1
  121. package/src/executors/run-commands/run-commands.impl.d.ts +2 -5
  122. package/src/executors/run-commands/run-commands.impl.js +14 -42
  123. package/src/executors/run-commands/running-tasks.d.ts +9 -4
  124. package/src/executors/run-commands/running-tasks.js +103 -30
  125. package/src/executors/run-script/run-script.impl.js +4 -3
  126. package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +8 -0
  127. package/src/generators/testing-utils/create-tree.js +5 -1
  128. package/src/migrations/update-21-0-0/release-version-config-changes.d.ts +2 -0
  129. package/src/migrations/update-21-0-0/release-version-config-changes.js +111 -0
  130. package/src/migrations/update-21-0-0/remove-custom-tasks-runner.d.ts +2 -0
  131. package/src/migrations/update-21-0-0/remove-custom-tasks-runner.js +38 -0
  132. package/src/migrations/{update-18-0-0/disable-crystal-for-existing-workspaces.js → update-21-0-0/remove-legacy-cache.js} +10 -4
  133. package/src/native/index.d.ts +98 -19
  134. package/src/native/index.js +16 -2
  135. package/src/native/native-bindings.js +7 -0
  136. package/src/native/nx.wasi-browser.js +20 -19
  137. package/src/native/nx.wasi.cjs +20 -19
  138. package/src/native/nx.wasm32-wasi.wasm +0 -0
  139. package/src/nx-cloud/nx-cloud-tasks-runner-shell.js +3 -3
  140. package/src/plugins/js/index.d.ts +2 -1
  141. package/src/plugins/js/index.js +8 -1
  142. package/src/plugins/js/lock-file/lock-file.js +28 -13
  143. package/src/plugins/js/lock-file/utils/package-json.d.ts +1 -1
  144. package/src/plugins/js/lock-file/utils/package-json.js +8 -6
  145. package/src/plugins/js/lock-file/utils/pnpm-normalizer.js +3 -3
  146. package/src/plugins/js/lock-file/yarn-parser.js +85 -39
  147. package/src/plugins/js/project-graph/affected/lock-file-changes.js +1 -0
  148. package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +1 -1
  149. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.d.ts +10 -1
  150. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +59 -6
  151. package/src/plugins/js/utils/packages.js +22 -3
  152. package/src/plugins/js/utils/register.js +1 -0
  153. package/src/plugins/js/utils/typescript.js +3 -3
  154. package/src/plugins/package-json/create-nodes.d.ts +1 -1
  155. package/src/plugins/package-json/create-nodes.js +4 -2
  156. package/src/project-graph/affected/locators/project-glob-changes.js +2 -2
  157. package/src/project-graph/error-types.js +32 -2
  158. package/src/project-graph/file-utils.d.ts +1 -10
  159. package/src/project-graph/file-utils.js +2 -77
  160. package/src/project-graph/plugins/get-plugins.js +2 -1
  161. package/src/project-graph/plugins/in-process-loader.js +1 -1
  162. package/src/project-graph/plugins/isolation/plugin-worker.js +12 -6
  163. package/src/project-graph/plugins/loaded-nx-plugin.d.ts +2 -1
  164. package/src/project-graph/plugins/loaded-nx-plugin.js +1 -5
  165. package/src/project-graph/plugins/public-api.d.ts +1 -1
  166. package/src/project-graph/plugins/utils.d.ts +2 -2
  167. package/src/project-graph/plugins/utils.js +2 -2
  168. package/src/project-graph/project-graph.js +1 -1
  169. package/src/project-graph/utils/project-configuration-utils.d.ts +3 -3
  170. package/src/project-graph/utils/project-configuration-utils.js +54 -21
  171. package/src/project-graph/utils/retrieve-workspace-files.d.ts +1 -1
  172. package/src/project-graph/utils/retrieve-workspace-files.js +14 -18
  173. package/src/tasks-runner/batch/batch-messages.d.ts +2 -0
  174. package/src/tasks-runner/batch/run-batch.js +4 -5
  175. package/src/tasks-runner/cache.d.ts +21 -8
  176. package/src/tasks-runner/cache.js +106 -38
  177. package/src/tasks-runner/create-task-graph.d.ts +0 -1
  178. package/src/tasks-runner/create-task-graph.js +11 -11
  179. package/src/tasks-runner/default-tasks-runner.js +5 -14
  180. package/src/tasks-runner/forked-process-task-runner.d.ts +8 -3
  181. package/src/tasks-runner/forked-process-task-runner.js +59 -46
  182. package/src/tasks-runner/init-tasks-runner.d.ts +15 -1
  183. package/src/tasks-runner/init-tasks-runner.js +62 -2
  184. package/src/tasks-runner/is-tui-enabled.d.ts +2 -0
  185. package/src/tasks-runner/is-tui-enabled.js +64 -0
  186. package/src/tasks-runner/life-cycle.d.ts +14 -3
  187. package/src/tasks-runner/life-cycle.js +37 -2
  188. package/src/tasks-runner/life-cycles/task-history-life-cycle-old.d.ts +2 -0
  189. package/src/tasks-runner/life-cycles/task-history-life-cycle-old.js +15 -7
  190. package/src/tasks-runner/life-cycles/task-history-life-cycle.d.ts +5 -0
  191. package/src/tasks-runner/life-cycles/task-history-life-cycle.js +35 -5
  192. package/src/tasks-runner/life-cycles/tui-summary-life-cycle.d.ts +18 -0
  193. package/src/tasks-runner/life-cycles/tui-summary-life-cycle.js +230 -0
  194. package/src/tasks-runner/pseudo-terminal.d.ts +11 -7
  195. package/src/tasks-runner/pseudo-terminal.js +47 -35
  196. package/src/tasks-runner/run-command.d.ts +4 -1
  197. package/src/tasks-runner/run-command.js +219 -63
  198. package/src/tasks-runner/running-tasks/node-child-process.js +4 -11
  199. package/src/tasks-runner/running-tasks/running-task.d.ts +3 -0
  200. package/src/tasks-runner/running-tasks/shared-running-task.d.ts +14 -0
  201. package/src/tasks-runner/running-tasks/shared-running-task.js +30 -0
  202. package/src/tasks-runner/task-env.d.ts +1 -4
  203. package/src/tasks-runner/task-env.js +2 -0
  204. package/src/tasks-runner/task-graph-utils.d.ts +3 -0
  205. package/src/tasks-runner/task-graph-utils.js +31 -2
  206. package/src/tasks-runner/task-orchestrator.d.ts +26 -10
  207. package/src/tasks-runner/task-orchestrator.js +221 -57
  208. package/src/tasks-runner/tasks-runner.d.ts +1 -0
  209. package/src/tasks-runner/tasks-schedule.d.ts +1 -0
  210. package/src/tasks-runner/tasks-schedule.js +9 -0
  211. package/src/tasks-runner/utils.d.ts +2 -2
  212. package/src/tasks-runner/utils.js +18 -12
  213. package/src/utils/child-process.d.ts +4 -0
  214. package/src/utils/child-process.js +23 -30
  215. package/src/utils/command-line-utils.d.ts +1 -1
  216. package/src/utils/find-matching-projects.js +2 -2
  217. package/src/utils/git-utils.d.ts +1 -1
  218. package/src/utils/git-utils.js +8 -3
  219. package/src/utils/handle-errors.js +15 -0
  220. package/src/utils/is-ci.js +4 -1
  221. package/src/utils/is-using-prettier.d.ts +3 -0
  222. package/src/utils/is-using-prettier.js +62 -0
  223. package/src/utils/nx-key.d.ts +7 -0
  224. package/src/utils/nx-key.js +52 -0
  225. package/src/utils/package-json.d.ts +1 -1
  226. package/src/utils/package-json.js +16 -2
  227. package/src/utils/package-manager.js +2 -2
  228. package/src/utils/path.js +1 -1
  229. package/src/utils/require-nx-key.d.ts +1 -0
  230. package/src/utils/require-nx-key.js +22 -0
  231. package/src/utils/workspace-context.d.ts +2 -0
  232. package/src/utils/workspace-context.js +16 -0
  233. package/src/command-line/activate-powerpack/activate-powerpack.d.ts +0 -2
  234. package/src/command-line/activate-powerpack/activate-powerpack.js +0 -34
  235. package/src/command-line/activate-powerpack/command-object.d.ts +0 -6
  236. package/src/command-line/init/implementation/react/write-craco-config.d.ts +0 -1
  237. package/src/command-line/init/implementation/react/write-craco-config.js +0 -61
  238. package/src/migrations/update-17-0-0/move-cache-directory.d.ts +0 -2
  239. package/src/migrations/update-17-0-0/move-cache-directory.js +0 -35
  240. package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +0 -72
  241. package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.d.ts +0 -2
  242. package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +0 -122
  243. package/src/migrations/update-17-2-0/move-default-base.d.ts +0 -5
  244. package/src/migrations/update-17-2-0/move-default-base.js +0 -21
  245. package/src/migrations/update-17-3-0/nx-release-path.d.ts +0 -3
  246. package/src/migrations/update-17-3-0/nx-release-path.js +0 -47
  247. package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.d.ts +0 -2
  248. package/src/utils/powerpack.d.ts +0 -5
  249. package/src/utils/powerpack.js +0 -33
  250. /package/src/migrations/{update-17-0-0/rm-default-collection-npm-scope.d.ts → update-21-0-0/remove-legacy-cache.d.ts} +0 -0
package/.eslintrc.json CHANGED
@@ -131,8 +131,12 @@
131
131
  "@nx/nx-win32-arm64-msvc",
132
132
  "@nx/nx-freebsd-x64",
133
133
  "@nx/powerpack-license",
134
+ "@nx/key",
134
135
  // Powerpack plugin conditionally available dynamically at runtime
135
- "@nx/powerpack-conformance"
136
+ "@nx/powerpack-conformance",
137
+ "@nx/conformance",
138
+ // Only used in test-utils at the time of writing
139
+ "@ltd/j-toml"
136
140
  ]
137
141
  }
138
142
  ]
package/migrations.json CHANGED
@@ -1,40 +1,5 @@
1
1
  {
2
2
  "generators": {
3
- "17.0.0-move-cache-directory": {
4
- "cli": "nx",
5
- "version": "17.0.0-beta.1",
6
- "description": "Updates the default cache directory to .nx/cache",
7
- "implementation": "./src/migrations/update-17-0-0/move-cache-directory"
8
- },
9
- "17.0.0-use-minimal-config-for-tasks-runner-options": {
10
- "cli": "nx",
11
- "version": "17.0.0-beta.3",
12
- "description": "Use minimal config for tasksRunnerOptions",
13
- "implementation": "./src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options"
14
- },
15
- "rm-default-collection-npm-scope": {
16
- "version": "17.0.0-rc.1",
17
- "description": "Migration for v17.0.0-rc.1",
18
- "implementation": "./src/migrations/update-17-0-0/rm-default-collection-npm-scope"
19
- },
20
- "17.3.0-update-nx-wrapper": {
21
- "cli": "nx",
22
- "version": "17.3.0-beta.6",
23
- "description": "Updates the nx wrapper.",
24
- "implementation": "./src/migrations/update-17-3-0/update-nxw"
25
- },
26
- "18.0.0-disable-adding-plugins-for-existing-workspaces": {
27
- "cli": "nx",
28
- "version": "18.0.0-beta.2",
29
- "description": "Updates nx.json to disabled adding plugins when generating projects in an existing Nx workspace",
30
- "implementation": "./src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces",
31
- "x-repair-skip": true
32
- },
33
- "move-default-base-to-nx-json-root": {
34
- "version": "18.1.0-beta.3",
35
- "description": "Moves affected.defaultBase to defaultBase in `nx.json`",
36
- "implementation": "./src/migrations/update-17-2-0/move-default-base"
37
- },
38
3
  "19-2-0-move-graph-cache-directory": {
39
4
  "cli": "nx",
40
5
  "version": "19.2.0-beta.2",
@@ -63,6 +28,21 @@
63
28
  "description": "Set `useLegacyCache` to true for migrating workspaces",
64
29
  "implementation": "./src/migrations/update-20-0-1/use-legacy-cache",
65
30
  "x-repair-skip": true
31
+ },
32
+ "release-version-config-changes": {
33
+ "version": "21.0.0-beta.1",
34
+ "description": "Updates release version config based on the breaking changes in Nx v21",
35
+ "implementation": "./src/migrations/update-21-0-0/release-version-config-changes"
36
+ },
37
+ "remove-legacy-cache": {
38
+ "version": "21.0.0-beta.8",
39
+ "description": "Removes the legacy cache configuration from nx.json",
40
+ "implementation": "./src/migrations/update-21-0-0/remove-legacy-cache"
41
+ },
42
+ "remove-custom-tasks-runner": {
43
+ "version": "21.0.0-beta.8",
44
+ "description": "Removes the legacy cache configuration from nx.json",
45
+ "implementation": "./src/migrations/update-21-0-0/remove-custom-tasks-runner"
66
46
  }
67
47
  }
68
48
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "21.0.0-beta.1",
3
+ "version": "21.0.0-beta.11",
4
4
  "private": false,
5
5
  "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
6
6
  "repository": {
@@ -38,7 +38,7 @@
38
38
  "@yarnpkg/lockfile": "^1.1.0",
39
39
  "@yarnpkg/parsers": "3.0.2",
40
40
  "@zkochan/js-yaml": "0.0.7",
41
- "axios": "^1.7.4",
41
+ "axios": "^1.8.3",
42
42
  "chalk": "^4.1.0",
43
43
  "cli-cursor": "3.1.0",
44
44
  "cli-spinners": "2.6.1",
@@ -83,16 +83,16 @@
83
83
  }
84
84
  },
85
85
  "optionalDependencies": {
86
- "@nx/nx-darwin-arm64": "21.0.0-beta.1",
87
- "@nx/nx-darwin-x64": "21.0.0-beta.1",
88
- "@nx/nx-freebsd-x64": "21.0.0-beta.1",
89
- "@nx/nx-linux-arm-gnueabihf": "21.0.0-beta.1",
90
- "@nx/nx-linux-arm64-gnu": "21.0.0-beta.1",
91
- "@nx/nx-linux-arm64-musl": "21.0.0-beta.1",
92
- "@nx/nx-linux-x64-gnu": "21.0.0-beta.1",
93
- "@nx/nx-linux-x64-musl": "21.0.0-beta.1",
94
- "@nx/nx-win32-arm64-msvc": "21.0.0-beta.1",
95
- "@nx/nx-win32-x64-msvc": "21.0.0-beta.1"
86
+ "@nx/nx-darwin-arm64": "21.0.0-beta.11",
87
+ "@nx/nx-darwin-x64": "21.0.0-beta.11",
88
+ "@nx/nx-freebsd-x64": "21.0.0-beta.11",
89
+ "@nx/nx-linux-arm-gnueabihf": "21.0.0-beta.11",
90
+ "@nx/nx-linux-arm64-gnu": "21.0.0-beta.11",
91
+ "@nx/nx-linux-arm64-musl": "21.0.0-beta.11",
92
+ "@nx/nx-linux-x64-gnu": "21.0.0-beta.11",
93
+ "@nx/nx-linux-x64-musl": "21.0.0-beta.11",
94
+ "@nx/nx-win32-arm64-msvc": "21.0.0-beta.11",
95
+ "@nx/nx-win32-x64-msvc": "21.0.0-beta.11"
96
96
  },
97
97
  "nx-migrations": {
98
98
  "migrations": "./migrations.json",
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * @public Programmatic API for nx release
3
3
  */
4
- export { ReleaseClient, release, releaseChangelog, releasePublish, releaseVersion, } from '../src/command-line/release';
4
+ export { ReleaseClient, release, releaseChangelog, releasePublish, releaseVersion, VersionActions, AfterAllProjectsVersioned, } from '../src/command-line/release';
package/release/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.releaseVersion = exports.releasePublish = exports.releaseChangelog = exports.release = exports.ReleaseClient = void 0;
3
+ exports.VersionActions = exports.releaseVersion = exports.releasePublish = exports.releaseChangelog = exports.release = exports.ReleaseClient = void 0;
4
4
  /**
5
5
  * @public Programmatic API for nx release
6
6
  */
@@ -10,3 +10,4 @@ Object.defineProperty(exports, "release", { enumerable: true, get: function () {
10
10
  Object.defineProperty(exports, "releaseChangelog", { enumerable: true, get: function () { return release_1.releaseChangelog; } });
11
11
  Object.defineProperty(exports, "releasePublish", { enumerable: true, get: function () { return release_1.releasePublish; } });
12
12
  Object.defineProperty(exports, "releaseVersion", { enumerable: true, get: function () { return release_1.releaseVersion; } });
13
+ Object.defineProperty(exports, "VersionActions", { enumerable: true, get: function () { return release_1.VersionActions; } });
@@ -21,6 +21,10 @@
21
21
  "additionalProperties": false,
22
22
  "deprecated": "Use `defaultBase` instead. Support for setting `defaultBase` in `affected` will be removed in Nx 20."
23
23
  },
24
+ "extends": {
25
+ "type": "string",
26
+ "description": "Specifies the base config to extend."
27
+ },
24
28
  "defaultBase": {
25
29
  "type": "string",
26
30
  "description": "Default --base used by affected logic."
@@ -73,6 +77,23 @@
73
77
  "$ref": "#/definitions/plugins"
74
78
  }
75
79
  },
80
+ "tui": {
81
+ "type": "object",
82
+ "description": "Settings for the Nx Terminal User Interface (TUI)",
83
+ "properties": {
84
+ "enabled": {
85
+ "type": "boolean",
86
+ "description": "Whether to enable the Terminal UI whenever possible (based on the current environment and terminal).",
87
+ "default": true
88
+ },
89
+ "autoExit": {
90
+ "oneOf": [{ "type": "boolean" }, { "type": "number" }],
91
+ "description": "Whether to exit the TUI automatically after all tasks finish. If set to `true`, the TUI will exit immediately. If set to `false` the TUI will not automatically exit. If set to a number, an interruptible countdown popup will be shown for that many seconds before the TUI exits.",
92
+ "default": 3
93
+ }
94
+ },
95
+ "additionalProperties": false
96
+ },
76
97
  "defaultProject": {
77
98
  "type": "string",
78
99
  "description": "Default project. When project isn't provided, the default project will be used."
@@ -169,7 +190,22 @@
169
190
  ]
170
191
  },
171
192
  "releaseTagPattern": {
172
- "type": "string"
193
+ "type": "string",
194
+ "description": "Optionally override the git/release tag pattern to use for this group."
195
+ },
196
+ "releaseTagPatternCheckAllBranchesWhen": {
197
+ "oneOf": [
198
+ {
199
+ "type": "boolean"
200
+ },
201
+ {
202
+ "type": "array",
203
+ "items": {
204
+ "type": "string"
205
+ }
206
+ }
207
+ ],
208
+ "description": "By default, we will try and resolve the latest match for the releaseTagPattern from the current branch, falling back to all branches if no match is found on the current branch. Setting this to true will cause us to ALWAYS check all branches for the latest match. Setting it to false will cause us to ONLY check the current branch for the latest match. Setting it to an array of strings will cause us to check all branches WHEN the current branch is one of the strings in the array. Glob patterns are supported."
173
209
  },
174
210
  "versionPlans": {
175
211
  "oneOf": [
@@ -243,7 +279,22 @@
243
279
  ]
244
280
  },
245
281
  "releaseTagPattern": {
246
- "type": "string"
282
+ "type": "string",
283
+ "description": "Optionally override the git/release tag pattern to use. This field is the source of truth for changelog generation and release tagging, as well as for conventional commits parsing. It supports interpolating the version as {version} and (if releasing independently or forcing project level version control system releases) the project name as {projectName} within the string. The default releaseTagPattern for fixed/unified releases is: \"v{version}\". The default releaseTagPattern for independent releases at the project level is: \"{projectName}@{version}\""
284
+ },
285
+ "releaseTagPatternCheckAllBranchesWhen": {
286
+ "oneOf": [
287
+ {
288
+ "type": "boolean"
289
+ },
290
+ {
291
+ "type": "array",
292
+ "items": {
293
+ "type": "string"
294
+ }
295
+ }
296
+ ],
297
+ "description": "By default, we will try and resolve the latest match for the releaseTagPattern from the current branch, falling back to all branches if no match is found on the current branch. Setting this to true will cause us to ALWAYS check all branches for the latest match. Setting it to false will cause us to ONLY check the current branch for the latest match. Setting it to an array of strings will cause us to check all branches WHEN the current branch is one of the strings in the array. Glob patterns are supported."
247
298
  }
248
299
  }
249
300
  },
@@ -492,6 +543,11 @@
492
543
  "type": "object"
493
544
  }
494
545
  },
546
+ "continuous": {
547
+ "type": "boolean",
548
+ "default": false,
549
+ "description": "Whether this target runs continuously until stopped"
550
+ },
495
551
  "parallelism": {
496
552
  "type": "boolean",
497
553
  "default": true,
@@ -650,50 +706,146 @@
650
706
  },
651
707
  "NxReleaseVersionConfiguration": {
652
708
  "type": "object",
653
- "properties": {
654
- "conventionalCommits": {
655
- "type": "boolean",
656
- "description": "Shorthand for enabling the current version of projects to be resolved from git tags, and the next version to be determined by analyzing commit messages according to the Conventional Commits specification.",
657
- "default": false
658
- },
659
- "generator": {
660
- "type": "string"
661
- },
662
- "generatorOptions": {
663
- "type": "object",
664
- "additionalProperties": true
665
- },
666
- "git": {
667
- "$ref": "#/definitions/NxReleaseGitConfiguration"
668
- },
669
- "preVersionCommand": {
670
- "type": "string",
671
- "description": "A command to run after validation of nx release configuration, but before versioning begins. Useful for preparing build artifacts. If --dry-run is passed, the command is still executed, but with the NX_DRY_RUN environment variable set to 'true'."
709
+ "$comment": "The configuration for versioning is dynamic depending on the value of the useLegacyVersioning property. Through trial and error the best in editor DX seems to come from having the if/else at the top level and explicitly include all possible properties and apply additionalProperties false in each case.",
710
+ "description": "Configuration for the versioning phase of releases.",
711
+ "if": {
712
+ "$comment": "When using the latest versioning implementation a lot of configuration has been able to move directly onto the version property.",
713
+ "properties": {
714
+ "useLegacyVersioning": {
715
+ "const": false
716
+ }
672
717
  }
673
718
  },
674
- "additionalProperties": false
719
+ "then": {
720
+ "additionalProperties": false,
721
+ "properties": {
722
+ "useLegacyVersioning": {
723
+ "type": "boolean",
724
+ "description": "Whether to use the legacy versioning strategy. This value will be true in Nx v20 and false in Nx v21. The legacy versioning implementation will be removed in Nx v22, as will this flag.",
725
+ "default": false
726
+ },
727
+ "conventionalCommits": {
728
+ "type": "boolean",
729
+ "description": "Shorthand for enabling the current version of projects to be resolved from git tags, and the next version to be determined by analyzing commit messages according to the Conventional Commits specification.",
730
+ "default": false
731
+ },
732
+ "git": {
733
+ "$ref": "#/definitions/NxReleaseGitConfiguration"
734
+ },
735
+ "preVersionCommand": {
736
+ "type": "string",
737
+ "description": "A command to run after validation of nx release configuration, but before versioning begins. Useful for preparing build artifacts. If --dry-run is passed, the command is still executed, but with the NX_DRY_RUN environment variable set to 'true'."
738
+ },
739
+ "specifierSource": {
740
+ "type": "string",
741
+ "enum": ["prompt", "conventional-commits", "version-plans"],
742
+ "default": "prompt",
743
+ "description": "The source to use for determining the specifier to use when versioning. 'prompt' is the default and will interactively prompt the user for an explicit/imperative specifier. 'conventional-commits' will attempt determine a specifier from commit messages conforming to the Conventional Commits specification. 'version-plans' will determine the specifier from the version plan files available on disk."
744
+ },
745
+ "manifestRootsToUpdate": {
746
+ "type": "array",
747
+ "items": {
748
+ "type": "string"
749
+ },
750
+ "description": "A list of directories containing manifest files (such as package.json) to apply updates to when versioning. By default, only the project root will be used, but you could customize this to only version a manifest in a dist directory, or even version multiple manifests in different directories, such as both source and dist."
751
+ },
752
+ "currentVersionResolver": {
753
+ "type": "string",
754
+ "enum": ["registry", "disk", "git-tag", "none"],
755
+ "description": "The resolver to use for determining the current version of a project during versioning. This is needed for versioning approaches which involve relatively modifying a current version to arrive at a new version, such as semver bumps like 'patch', 'minor' etc. Using 'none' explicitly declares that the current version is not needed to compute the new version, and should only be used with appropriate version actions implementations that support it."
756
+ },
757
+ "currentVersionResolverMetadata": {
758
+ "type": "object",
759
+ "additionalProperties": true,
760
+ "description": "Metadata to provide to the configured currentVersionResolver to help it in determining the current version. What to pass here is specific to each resolver."
761
+ },
762
+ "fallbackCurrentVersionResolver": {
763
+ "type": "string",
764
+ "enum": ["disk"],
765
+ "description": "The fallback version resolver to use when the configured currentVersionResolver fails to resolve the current version."
766
+ },
767
+ "versionPrefix": {
768
+ "type": "string",
769
+ "enum": ["auto", "", "~", "^", "="],
770
+ "default": "auto",
771
+ "description": "The prefix to use when versioning dependencies. This can be one of the following: auto, '', '~', '^', '=', where auto means the existing prefix will be preserved."
772
+ },
773
+ "deleteVersionPlans": {
774
+ "type": "boolean",
775
+ "description": "Whether to delete the processed version plans file after versioning is complete. This is false by default because the version plans are also needed for changelog generation.",
776
+ "default": false
777
+ },
778
+ "updateDependents": {
779
+ "type": "string",
780
+ "enum": ["never", "auto"],
781
+ "default": "auto",
782
+ "description": "When versioning independent projects, this controls whether to update their dependents (i.e. the things that depend on them). 'never' means no dependents will be updated (unless they happen to be versioned directly as well). 'auto' is the default and will cause dependents to be updated (a patch version bump) when a dependency is versioned."
783
+ },
784
+ "logUnchangedProjects": {
785
+ "type": "boolean",
786
+ "description": "Whether to log projects that have not changed during versioning.",
787
+ "default": true
788
+ },
789
+ "preserveLocalDependencyProtocols": {
790
+ "type": "boolean",
791
+ "description": "Whether to preserve local dependency protocols (e.g. file references, or the `workspace:` protocol in package.json files) of local dependencies when updating them during versioning. This was false by default in legacy versioning, but is true by default now.",
792
+ "default": true
793
+ },
794
+ "versionActions": {
795
+ "type": "string",
796
+ "description": "The path to the version actions implementation to use for releasing all projects by default. This can also be overridden on the release group and project levels.",
797
+ "default": "@nx/js/src/release"
798
+ },
799
+ "versionActionsOptions": {
800
+ "type": "object",
801
+ "description": "The specific options that are defined by each version actions implementation. They will be passed to the version actions implementation when running a release.",
802
+ "additionalProperties": true
803
+ }
804
+ }
805
+ },
806
+ "else": {
807
+ "properties": {
808
+ "useLegacyVersioning": {
809
+ "type": "boolean",
810
+ "description": "Whether to use the legacy versioning strategy. This value was true in Nx v20 and became false in Nx v21. The legacy versioning implementation will be removed in Nx v22, as will this flag.",
811
+ "default": false
812
+ },
813
+ "conventionalCommits": {
814
+ "type": "boolean",
815
+ "description": "Shorthand for enabling the current version of projects to be resolved from git tags, and the next version to be determined by analyzing commit messages according to the Conventional Commits specification.",
816
+ "default": false
817
+ },
818
+ "git": {
819
+ "$ref": "#/definitions/NxReleaseGitConfiguration"
820
+ },
821
+ "preVersionCommand": {
822
+ "type": "string",
823
+ "description": "A command to run after validation of nx release configuration, but before versioning begins. Useful for preparing build artifacts. If --dry-run is passed, the command is still executed, but with the NX_DRY_RUN environment variable set to 'true'."
824
+ },
825
+ "generator": {
826
+ "type": "string",
827
+ "description": "The generator implementation to use for versioning.",
828
+ "default": "@nx/js:release-version"
829
+ },
830
+ "generatorOptions": {
831
+ "type": "object",
832
+ "description": "These options will be passed to the configured \"release.version.generator\" (which will be \"@nx/js:release-version\" if not set explicitly).",
833
+ "additionalProperties": true
834
+ }
835
+ },
836
+ "additionalProperties": false
837
+ }
675
838
  },
676
839
  "NxReleaseGroupVersionConfiguration": {
677
840
  "type": "object",
841
+ "$comment": "We need to improve this configuration definition to be more precise once legacy versioning is removed. Right now it needs to be left open and runtime validation will ensure correct behavior.",
678
842
  "properties": {
679
- "conventionalCommits": {
680
- "type": "boolean",
681
- "description": "Shorthand for enabling the current version of projects to be resolved from git tags, and the next version to be determined by analyzing commit messages according to the Conventional Commits specification.",
682
- "default": false
683
- },
684
- "generator": {
685
- "type": "string"
686
- },
687
- "generatorOptions": {
688
- "type": "object",
689
- "additionalProperties": true
690
- },
691
843
  "groupPreVersionCommand": {
692
844
  "type": "string",
693
845
  "description": "A command to run after validation of nx release configuration AND after the release.version.preVersionCommand (if any), but before versioning begins for this specific group. Useful for preparing build artifacts for the group. If --dry-run is passed, the command is still executed, but with the NX_DRY_RUN environment variable set to 'true'."
694
846
  }
695
847
  },
696
- "additionalProperties": false
848
+ "additionalProperties": true
697
849
  },
698
850
  "NxReleaseChangelogConfiguration": {
699
851
  "type": "object",
@@ -138,6 +138,11 @@
138
138
  "type": "boolean",
139
139
  "description": "Specifies if the given target should be cacheable"
140
140
  },
141
+ "continuous": {
142
+ "type": "boolean",
143
+ "default": false,
144
+ "description": "Whether this target runs continuously until stopped"
145
+ },
141
146
  "parallelism": {
142
147
  "type": "boolean",
143
148
  "default": true,
@@ -18,6 +18,17 @@ exports.NxAngularJsonPlugin = {
18
18
  projects: readAngularJson(ctx.workspaceRoot),
19
19
  }),
20
20
  ],
21
+ createNodesV2: [
22
+ 'angular.json',
23
+ (f, _, ctx) => [
24
+ [
25
+ 'angular.json',
26
+ {
27
+ projects: readAngularJson(ctx.workspaceRoot),
28
+ },
29
+ ],
30
+ ],
31
+ ],
21
32
  };
22
33
  exports.default = exports.NxAngularJsonPlugin;
23
34
  function shouldMergeAngularProjects(root, includeProjectsFromAngularJson) {
@@ -1,2 +1,2 @@
1
1
  export declare const allowedProjectExtensions: readonly ["tags", "implicitDependencies", "configFilePath", "$schema", "generators", "namedInputs", "name", "files", "root", "sourceRoot", "projectType", "release", "includedScripts", "metadata"];
2
- export declare const allowedWorkspaceExtensions: readonly ["implicitDependencies", "affected", "defaultBase", "tasksRunnerOptions", "workspaceLayout", "plugins", "targetDefaults", "files", "generators", "namedInputs", "extends", "cli", "pluginsConfig", "defaultProject", "installation", "release", "nxCloudAccessToken", "nxCloudId", "nxCloudUrl", "nxCloudEncryptionKey", "parallel", "cacheDirectory", "useDaemonProcess", "useInferencePlugins", "neverConnectToCloud", "sync", "useLegacyCache"];
2
+ export declare const allowedWorkspaceExtensions: readonly ["$schema", "implicitDependencies", "affected", "defaultBase", "tasksRunnerOptions", "workspaceLayout", "plugins", "targetDefaults", "files", "generators", "namedInputs", "extends", "cli", "pluginsConfig", "defaultProject", "installation", "release", "nxCloudAccessToken", "nxCloudId", "nxCloudUrl", "nxCloudEncryptionKey", "parallel", "cacheDirectory", "useDaemonProcess", "useInferencePlugins", "neverConnectToCloud", "sync", "useLegacyCache", "maxCacheSize", "tui"];
@@ -37,6 +37,7 @@ exports.allowedProjectExtensions = [
37
37
  // There are some props in here (root) that angular already knows about,
38
38
  // but it doesn't hurt to have them in here as well to help static analysis.
39
39
  exports.allowedWorkspaceExtensions = [
40
+ '$schema',
40
41
  'implicitDependencies',
41
42
  'affected',
42
43
  'defaultBase',
@@ -64,6 +65,8 @@ exports.allowedWorkspaceExtensions = [
64
65
  'neverConnectToCloud',
65
66
  'sync',
66
67
  'useLegacyCache',
68
+ 'maxCacheSize',
69
+ 'tui',
67
70
  ];
68
71
  if (!patched) {
69
72
  Module.prototype.require = function () {
@@ -5,7 +5,6 @@ exports.addHandler = addHandler;
5
5
  const child_process_1 = require("child_process");
6
6
  const fs_1 = require("fs");
7
7
  const ora = require("ora");
8
- const yargsParser = require("yargs-parser");
9
8
  const nx_json_1 = require("../../config/nx-json");
10
9
  const child_process_2 = require("../../utils/child-process");
11
10
  const fileutils_1 = require("../../utils/fileutils");
@@ -79,27 +78,18 @@ async function installPackage(pkgName, version, nxJson) {
79
78
  spinner.succeed();
80
79
  }
81
80
  async function initializePlugin(pkgName, options, nxJson) {
82
- const parsedCommandArgs = yargsParser(options.__overrides_unparsed__, {
83
- configuration: {
84
- 'parse-numbers': false,
85
- 'parse-positional-numbers': false,
86
- 'dot-notation': false,
87
- 'camel-case-expansion': false,
88
- },
89
- });
90
- if (exports.coreNxPluginVersions.has(pkgName)) {
91
- parsedCommandArgs.keepExistingVersions = true;
92
- if (options.updatePackageScripts ||
81
+ let updatePackageScripts = false;
82
+ if (exports.coreNxPluginVersions.has(pkgName) &&
83
+ (options.updatePackageScripts ||
93
84
  (options.updatePackageScripts === undefined &&
94
85
  nxJson.useInferencePlugins !== false &&
95
- process.env.NX_ADD_PLUGINS !== 'false')) {
96
- parsedCommandArgs.updatePackageScripts = true;
97
- }
86
+ process.env.NX_ADD_PLUGINS !== 'false'))) {
87
+ updatePackageScripts = true;
98
88
  }
99
89
  const spinner = ora(`Initializing ${pkgName}...`);
100
90
  spinner.start();
101
91
  try {
102
- await (0, configure_plugins_1.installPlugin)(pkgName, workspace_root_1.workspaceRoot, options.verbose, parsedCommandArgs);
92
+ await (0, configure_plugins_1.runPluginInitGenerator)(pkgName, workspace_root_1.workspaceRoot, updatePackageScripts, options.verbose);
103
93
  }
104
94
  catch (e) {
105
95
  spinner.fail();
@@ -1,13 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.yargsAffectedE2ECommand = exports.yargsAffectedLintCommand = exports.yargsAffectedBuildCommand = exports.yargsAffectedTestCommand = exports.yargsAffectedCommand = void 0;
4
+ const handle_errors_1 = require("../../utils/handle-errors");
4
5
  const documentation_1 = require("../yargs-utils/documentation");
5
6
  const shared_options_1 = require("../yargs-utils/shared-options");
6
- const handle_errors_1 = require("../../utils/handle-errors");
7
7
  exports.yargsAffectedCommand = {
8
8
  command: 'affected',
9
9
  describe: 'Run target for affected projects.',
10
- builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withTargetAndConfigurationOption)((0, shared_options_1.withBatch)(yargs)))))
10
+ builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withTuiOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withTargetAndConfigurationOption)((0, shared_options_1.withBatch)(yargs))))))
11
11
  .option('all', {
12
12
  type: 'boolean',
13
13
  deprecated: 'Use `nx run-many` instead',
@@ -27,7 +27,7 @@ exports.yargsAffectedCommand = {
27
27
  exports.yargsAffectedTestCommand = {
28
28
  command: 'affected:test',
29
29
  describe: false,
30
- builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs)))), 'affected'),
30
+ builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withTuiOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs))))), 'affected'),
31
31
  handler: async (args) => {
32
32
  const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
33
33
  return (await Promise.resolve().then(() => require('./affected'))).affected('affected', {
@@ -41,7 +41,7 @@ exports.yargsAffectedTestCommand = {
41
41
  exports.yargsAffectedBuildCommand = {
42
42
  command: 'affected:build',
43
43
  describe: false,
44
- builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs)))), 'affected'),
44
+ builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withTuiOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs))))), 'affected'),
45
45
  handler: async (args) => {
46
46
  const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
47
47
  return (await Promise.resolve().then(() => require('./affected'))).affected('affected', {
@@ -55,7 +55,7 @@ exports.yargsAffectedBuildCommand = {
55
55
  exports.yargsAffectedLintCommand = {
56
56
  command: 'affected:lint',
57
57
  describe: false,
58
- builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs)))), 'affected'),
58
+ builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withTuiOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs))))), 'affected'),
59
59
  handler: async (args) => {
60
60
  const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
61
61
  return (await Promise.resolve().then(() => require('./affected'))).affected('affected', {
@@ -69,7 +69,7 @@ exports.yargsAffectedLintCommand = {
69
69
  exports.yargsAffectedE2ECommand = {
70
70
  command: 'affected:e2e',
71
71
  describe: false,
72
- builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs)))), 'affected'),
72
+ builder: (yargs) => (0, documentation_1.linkToNxDevAndExamples)((0, shared_options_1.withAffectedOptions)((0, shared_options_1.withTuiOptions)((0, shared_options_1.withRunOptions)((0, shared_options_1.withOutputStyleOption)((0, shared_options_1.withConfiguration)(yargs))))), 'affected'),
73
73
  handler: async (args) => {
74
74
  const exitCode = await (0, handle_errors_1.handleErrors)(args.verbose ?? process.env.NX_VERBOSE_LOGGING === 'true', async () => {
75
75
  return (await Promise.resolve().then(() => require('./affected'))).affected('affected', {
@@ -143,10 +143,6 @@ exports.examples = {
143
143
  command: 'graph --focus=todos-feature-main',
144
144
  description: 'Show the graph where every node is either an ancestor or a descendant of todos-feature-main',
145
145
  },
146
- {
147
- command: 'graph --include=project-one,project-two',
148
- description: 'Include project-one and project-two in the project graph',
149
- },
150
146
  {
151
147
  command: 'graph --exclude=project-one,project-two',
152
148
  description: 'Exclude project-one and project-two from the project graph',
@@ -5,7 +5,7 @@ const shared_options_1 = require("../yargs-utils/shared-options");
5
5
  exports.yargsExecCommand = {
6
6
  command: 'exec',
7
7
  describe: 'Executes any command as if it was a target on the project.',
8
- builder: (yargs) => (0, shared_options_1.withRunManyOptions)(yargs),
8
+ builder: (yargs) => (0, shared_options_1.withTuiOptions)((0, shared_options_1.withRunManyOptions)(yargs)),
9
9
  handler: async (args) => {
10
10
  try {
11
11
  await (await Promise.resolve().then(() => require('./exec'))).nxExecCommand((0, shared_options_1.withOverrides)(args));
@@ -6,6 +6,7 @@ const path_1 = require("path");
6
6
  const schema_utils_1 = require("../../config/schema-utils");
7
7
  const fileutils_1 = require("../../utils/fileutils");
8
8
  const plugins_1 = require("../../project-graph/plugins");
9
+ const installation_directory_1 = require("../../utils/installation-directory");
9
10
  function getGeneratorInformation(collectionName, generatorName, root, projects) {
10
11
  try {
11
12
  const { generatorsFilePath, generatorsJson, resolvedCollectionName, normalizedGeneratorName, } = readGeneratorsJson(collectionName, generatorName, root, projects);
@@ -37,18 +38,22 @@ function getGeneratorInformation(collectionName, generatorName, root, projects)
37
38
  };
38
39
  }
39
40
  catch (e) {
40
- throw new Error(`Unable to resolve ${collectionName}:${generatorName}.\n${e.message}`);
41
+ throw new Error(`Unable to resolve ${collectionName}:${generatorName}.\n${process.env.NX_VERBOSE_LOGGING === 'true' ? e.stack : e.message}`);
41
42
  }
42
43
  }
43
44
  function readGeneratorsJson(collectionName, generator, root, projects) {
44
45
  let generatorsFilePath;
45
46
  if (collectionName.endsWith('.json')) {
46
47
  generatorsFilePath = require.resolve(collectionName, {
47
- paths: root ? [root, __dirname] : [__dirname],
48
+ paths: root
49
+ ? [...(0, installation_directory_1.getNxRequirePaths)(root), __dirname]
50
+ : [...(0, installation_directory_1.getNxRequirePaths)(), __dirname],
48
51
  });
49
52
  }
50
53
  else {
51
- const { json: packageJson, path: packageJsonPath } = (0, plugins_1.readPluginPackageJson)(collectionName, projects, root ? [root, __dirname] : [__dirname]);
54
+ const { json: packageJson, path: packageJsonPath } = (0, plugins_1.readPluginPackageJson)(collectionName, projects, root
55
+ ? [...(0, installation_directory_1.getNxRequirePaths)(root), __dirname]
56
+ : [...(0, installation_directory_1.getNxRequirePaths)(), __dirname]);
52
57
  const generatorsFile = packageJson.generators ?? packageJson.schematics;
53
58
  if (!generatorsFile) {
54
59
  throw new Error(`The "${collectionName}" package does not support Nx generators.`);
@@ -287,7 +287,7 @@ async function runPluginsInstall(plugins, pmc, destinationGitClient) {
287
287
  let installed = true;
288
288
  output_1.output.log({ title: 'Installing Plugins' });
289
289
  try {
290
- (0, configure_plugins_1.runPackageManagerInstallPlugins)(workspace_root_1.workspaceRoot, pmc, plugins);
290
+ (0, configure_plugins_1.installPluginPackages)(workspace_root_1.workspaceRoot, pmc, plugins);
291
291
  await destinationGitClient.amendCommit();
292
292
  }
293
293
  catch (e) {