nx 19.5.0-beta.0 → 19.5.0-beta.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (306) hide show
  1. package/bin/init-local.js +2 -3
  2. package/package.json +12 -12
  3. package/schemas/project-schema.json +26 -0
  4. package/src/adapter/angular-json.js +6 -6
  5. package/src/adapter/decorate-cli.js +1 -2
  6. package/src/adapter/ngcli-adapter.js +8 -8
  7. package/src/adapter/rxjs-for-await.js +5 -5
  8. package/src/command-line/add/add.js +2 -2
  9. package/src/command-line/affected/affected.js +2 -3
  10. package/src/command-line/connect/connect-to-nx-cloud.js +5 -6
  11. package/src/command-line/connect/view-logs.js +1 -2
  12. package/src/command-line/daemon/daemon.js +1 -2
  13. package/src/command-line/exec/exec.js +1 -2
  14. package/src/command-line/format/format.js +1 -2
  15. package/src/command-line/generate/generate.js +4 -5
  16. package/src/command-line/generate/generator-utils.js +2 -3
  17. package/src/command-line/graph/command-object.js +2 -2
  18. package/src/command-line/graph/graph.js +2 -3
  19. package/src/command-line/init/implementation/add-nx-to-monorepo.js +1 -2
  20. package/src/command-line/init/implementation/add-nx-to-nest.js +1 -2
  21. package/src/command-line/init/implementation/add-nx-to-npm-repo.js +1 -2
  22. package/src/command-line/init/implementation/angular/index.js +1 -2
  23. package/src/command-line/init/implementation/angular/integrated-workspace.js +1 -2
  24. package/src/command-line/init/implementation/angular/legacy-angular-versions.js +1 -2
  25. package/src/command-line/init/implementation/angular/standalone-workspace.js +1 -2
  26. package/src/command-line/init/implementation/dot-nx/add-nx-scripts.d.ts +1 -1
  27. package/src/command-line/init/implementation/dot-nx/add-nx-scripts.js +7 -7
  28. package/src/command-line/init/implementation/react/add-craco-commands-to-package-scripts.js +1 -2
  29. package/src/command-line/init/implementation/react/add-vite-commands-to-package-scripts.js +1 -2
  30. package/src/command-line/init/implementation/react/check-for-custom-webpack-setup.js +1 -2
  31. package/src/command-line/init/implementation/react/check-for-uncommitted-changes.js +1 -2
  32. package/src/command-line/init/implementation/react/clean-up-files.js +1 -2
  33. package/src/command-line/init/implementation/react/index.js +1 -2
  34. package/src/command-line/init/implementation/react/read-name-from-package-json.js +1 -2
  35. package/src/command-line/init/implementation/react/rename-js-to-jsx.js +1 -2
  36. package/src/command-line/init/implementation/react/tsconfig-setup.js +1 -2
  37. package/src/command-line/init/implementation/react/write-craco-config.js +1 -2
  38. package/src/command-line/init/implementation/react/write-vite-config.js +1 -2
  39. package/src/command-line/init/implementation/react/write-vite-index-html.js +1 -2
  40. package/src/command-line/init/implementation/utils.js +10 -11
  41. package/src/command-line/init/init-v1.js +1 -2
  42. package/src/command-line/init/init-v2.js +1 -2
  43. package/src/command-line/list/list.js +1 -2
  44. package/src/command-line/migrate/migrate.d.ts +1 -1
  45. package/src/command-line/migrate/migrate.js +5 -5
  46. package/src/command-line/new/new.js +1 -2
  47. package/src/command-line/release/changelog.js +3 -3
  48. package/src/command-line/release/config/config.js +3 -3
  49. package/src/command-line/release/config/filter-release-groups.js +1 -2
  50. package/src/command-line/release/config/version-plans.js +3 -4
  51. package/src/command-line/release/plan.js +2 -2
  52. package/src/command-line/release/publish.js +2 -2
  53. package/src/command-line/release/release.js +2 -2
  54. package/src/command-line/release/utils/batch-projects-by-generator-config.js +1 -2
  55. package/src/command-line/release/utils/exec-command.js +1 -2
  56. package/src/command-line/release/utils/git.js +11 -12
  57. package/src/command-line/release/utils/github.js +5 -6
  58. package/src/command-line/release/utils/launch-editor.js +1 -2
  59. package/src/command-line/release/utils/markdown.js +1 -2
  60. package/src/command-line/release/utils/print-changes.d.ts +0 -1
  61. package/src/command-line/release/utils/print-changes.js +2 -3
  62. package/src/command-line/release/utils/resolve-changelog-renderer.js +1 -2
  63. package/src/command-line/release/utils/resolve-nx-json-error-message.js +1 -2
  64. package/src/command-line/release/utils/resolve-semver-specifier.js +2 -3
  65. package/src/command-line/release/utils/semver.js +4 -5
  66. package/src/command-line/release/utils/shared.js +6 -6
  67. package/src/command-line/release/version.js +2 -2
  68. package/src/command-line/repair/repair.js +1 -2
  69. package/src/command-line/report/report.js +27 -19
  70. package/src/command-line/reset/reset.js +1 -2
  71. package/src/command-line/run/executor-utils.js +2 -3
  72. package/src/command-line/run/run-one.js +1 -2
  73. package/src/command-line/run/run.js +5 -6
  74. package/src/command-line/run-many/run-many.js +2 -3
  75. package/src/command-line/show/project.js +1 -2
  76. package/src/command-line/show/projects.js +1 -2
  77. package/src/command-line/watch/watch.js +2 -2
  78. package/src/command-line/yargs-utils/documentation.js +1 -2
  79. package/src/command-line/yargs-utils/shared-options.js +12 -13
  80. package/src/commands-runner/create-command-graph.js +1 -2
  81. package/src/commands-runner/get-command-projects.js +1 -2
  82. package/src/config/calculate-default-project-name.js +2 -3
  83. package/src/config/configuration.js +2 -2
  84. package/src/config/nx-json.js +2 -3
  85. package/src/config/project-graph.js +3 -3
  86. package/src/config/schema-utils.js +3 -4
  87. package/src/config/task-graph.d.ts +4 -0
  88. package/src/config/to-project-name.js +1 -2
  89. package/src/config/workspace-json-project-json.d.ts +5 -0
  90. package/src/core/graph/main.js +1 -1
  91. package/src/daemon/cache.js +6 -6
  92. package/src/daemon/client/client.d.ts +0 -2
  93. package/src/daemon/client/client.js +2 -2
  94. package/src/daemon/client/daemon-socket-messenger.d.ts +0 -1
  95. package/src/daemon/client/generate-help-output.js +1 -2
  96. package/src/daemon/is-on-daemon.js +1 -2
  97. package/src/daemon/message-types/get-context-file-data.js +2 -2
  98. package/src/daemon/message-types/get-files-in-directory.js +2 -2
  99. package/src/daemon/message-types/get-nx-workspace-files.js +2 -2
  100. package/src/daemon/message-types/glob.js +2 -2
  101. package/src/daemon/message-types/hash-glob.js +2 -2
  102. package/src/daemon/message-types/task-history.js +3 -3
  103. package/src/daemon/message-types/update-context-files.js +2 -2
  104. package/src/daemon/server/file-watching/changed-projects.js +1 -2
  105. package/src/daemon/server/file-watching/file-watcher-sockets.d.ts +0 -1
  106. package/src/daemon/server/file-watching/file-watcher-sockets.js +4 -4
  107. package/src/daemon/server/handle-context-file-data.js +1 -2
  108. package/src/daemon/server/handle-get-files-in-directory.js +1 -2
  109. package/src/daemon/server/handle-get-task-history.js +1 -2
  110. package/src/daemon/server/handle-glob.js +1 -2
  111. package/src/daemon/server/handle-hash-glob.js +1 -2
  112. package/src/daemon/server/handle-hash-tasks.js +1 -2
  113. package/src/daemon/server/handle-nx-workspace-files.js +1 -2
  114. package/src/daemon/server/handle-outputs-tracking.js +2 -3
  115. package/src/daemon/server/handle-process-in-background.js +1 -2
  116. package/src/daemon/server/handle-request-project-graph.js +1 -2
  117. package/src/daemon/server/handle-request-shutdown.d.ts +0 -1
  118. package/src/daemon/server/handle-request-shutdown.js +1 -2
  119. package/src/daemon/server/handle-write-task-runs-to-history.js +1 -2
  120. package/src/daemon/server/outputs-tracking.js +7 -8
  121. package/src/daemon/server/plugins.js +2 -3
  122. package/src/daemon/server/project-graph-incremental-recomputation.js +3 -3
  123. package/src/daemon/server/server.d.ts +0 -1
  124. package/src/daemon/server/server.js +2 -3
  125. package/src/daemon/server/shutdown-utils.d.ts +0 -1
  126. package/src/daemon/server/shutdown-utils.js +9 -9
  127. package/src/daemon/server/watcher.d.ts +0 -1
  128. package/src/daemon/server/watcher.js +3 -4
  129. package/src/daemon/socket-utils.js +3 -3
  130. package/src/daemon/tmp-dir.js +6 -6
  131. package/src/executors/noop/noop.impl.js +1 -1
  132. package/src/executors/run-commands/run-commands.impl.js +3 -3
  133. package/src/executors/run-script/run-script.impl.js +1 -1
  134. package/src/executors/utils/convert-nx-executor.js +1 -2
  135. package/src/generators/internal-utils/format-changed-files-with-prettier-if-available.js +1 -2
  136. package/src/generators/testing-utils/create-tree-with-empty-workspace.d.ts +1 -1
  137. package/src/generators/testing-utils/create-tree-with-empty-workspace.js +2 -3
  138. package/src/generators/testing-utils/create-tree.js +1 -2
  139. package/src/generators/tree.d.ts +0 -2
  140. package/src/generators/tree.js +3 -3
  141. package/src/generators/utils/glob.js +2 -3
  142. package/src/generators/utils/json.js +3 -4
  143. package/src/generators/utils/nx-json.js +2 -3
  144. package/src/generators/utils/project-configuration.js +7 -7
  145. package/src/hasher/create-task-hasher.js +1 -2
  146. package/src/hasher/file-hasher.js +2 -3
  147. package/src/hasher/hash-task.d.ts +0 -1
  148. package/src/hasher/hash-task.js +2 -3
  149. package/src/hasher/native-task-hasher-impl.d.ts +0 -1
  150. package/src/hasher/node-task-hasher-impl.d.ts +0 -1
  151. package/src/hasher/task-hasher.d.ts +0 -1
  152. package/src/hasher/task-hasher.js +10 -10
  153. package/src/migrations/update-15-0-0/migrate-to-inputs.js +1 -1
  154. package/src/migrations/update-15-0-0/prefix-outputs.js +1 -1
  155. package/src/migrations/update-16-0-0/remove-nrwl-cli.js +1 -1
  156. package/src/migrations/update-16-0-0/update-depends-on-to-tokens.js +1 -1
  157. package/src/migrations/update-16-0-0/update-nx-cloud-runner.js +1 -1
  158. package/src/migrations/update-16-2-0/remove-run-commands-output-path.js +1 -1
  159. package/src/migrations/update-16-8-0/escape-dollar-sign-env-variables.js +1 -1
  160. package/src/migrations/update-16-9-0/remove-project-name-and-root-format.js +1 -1
  161. package/src/migrations/update-17-0-0/move-cache-directory.js +1 -1
  162. package/src/migrations/update-17-0-0/rm-default-collection-npm-scope.js +1 -1
  163. package/src/migrations/update-17-0-0/use-minimal-config-for-tasks-runner-options.js +1 -1
  164. package/src/migrations/update-17-2-0/move-default-base.js +1 -1
  165. package/src/migrations/update-17-3-0/nx-release-path.js +2 -3
  166. package/src/migrations/update-17-3-0/update-nxw.js +1 -1
  167. package/src/migrations/update-18-0-0/disable-crystal-for-existing-workspaces.js +1 -1
  168. package/src/migrations/update-19-2-0/move-workspace-data-directory.js +3 -4
  169. package/src/migrations/update-19-2-4/set-project-name.js +1 -1
  170. package/src/native/assert-supported-platform.js +1 -2
  171. package/src/native/index.d.ts +1 -0
  172. package/src/native/native-file-cache-location.js +1 -2
  173. package/src/native/nx.wasm32-wasi.wasm +0 -0
  174. package/src/native/transform-objects.js +2 -2
  175. package/src/nx-cloud/debug-logger.js +1 -2
  176. package/src/nx-cloud/generators/connect-to-nx-cloud/connect-to-nx-cloud.js +1 -2
  177. package/src/nx-cloud/resolution-helpers.js +1 -2
  178. package/src/nx-cloud/update-manager.js +2 -2
  179. package/src/nx-cloud/utilities/axios.js +1 -2
  180. package/src/nx-cloud/utilities/get-cloud-options.js +1 -2
  181. package/src/nx-cloud/utilities/url-shorten.js +8 -9
  182. package/src/plugins/js/hasher/hasher.js +1 -2
  183. package/src/plugins/js/lock-file/lock-file.js +6 -6
  184. package/src/plugins/js/lock-file/npm-parser.js +3 -4
  185. package/src/plugins/js/lock-file/pnpm-parser.js +3 -4
  186. package/src/plugins/js/lock-file/project-graph-pruning.js +1 -2
  187. package/src/plugins/js/lock-file/utils/package-json.js +2 -3
  188. package/src/plugins/js/lock-file/utils/pnpm-normalizer.js +5 -6
  189. package/src/plugins/js/lock-file/yarn-parser.js +3 -4
  190. package/src/plugins/js/package-json/create-package-json.js +2 -3
  191. package/src/plugins/js/project-graph/build-dependencies/build-dependencies.js +1 -2
  192. package/src/plugins/js/project-graph/build-dependencies/explicit-package-json-dependencies.js +1 -2
  193. package/src/plugins/js/project-graph/build-dependencies/explicit-project-dependencies.js +1 -2
  194. package/src/plugins/js/project-graph/build-dependencies/strip-source-code.js +1 -2
  195. package/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +2 -2
  196. package/src/plugins/js/project-graph/build-nodes/build-npm-package-nodes.js +1 -2
  197. package/src/plugins/js/utils/config.js +1 -2
  198. package/src/plugins/js/utils/register.d.ts +1 -0
  199. package/src/plugins/js/utils/register.js +7 -8
  200. package/src/plugins/js/utils/resolve-relative-to-dir.js +1 -2
  201. package/src/plugins/js/utils/typescript.js +5 -6
  202. package/src/plugins/js/versions.d.ts +1 -1
  203. package/src/plugins/js/versions.js +1 -1
  204. package/src/plugins/package-json-workspaces/create-nodes.js +5 -5
  205. package/src/plugins/project-json/build-nodes/project-json.js +3 -3
  206. package/src/project-graph/affected/affected-project-graph.js +1 -2
  207. package/src/project-graph/build-project-graph.js +3 -4
  208. package/src/project-graph/error-types.js +11 -11
  209. package/src/project-graph/file-map-utils.js +4 -5
  210. package/src/project-graph/file-utils.d.ts +1 -1
  211. package/src/project-graph/file-utils.js +7 -7
  212. package/src/project-graph/nx-deps-cache.js +8 -8
  213. package/src/project-graph/operators.js +5 -5
  214. package/src/project-graph/plugins/internal-api.d.ts +1 -1
  215. package/src/project-graph/plugins/internal-api.js +13 -9
  216. package/src/project-graph/plugins/isolation/index.js +1 -2
  217. package/src/project-graph/plugins/isolation/messaging.d.ts +1 -3
  218. package/src/project-graph/plugins/isolation/messaging.js +4 -5
  219. package/src/project-graph/plugins/isolation/plugin-pool.js +1 -2
  220. package/src/project-graph/plugins/isolation/plugin-worker.js +6 -2
  221. package/src/project-graph/plugins/loader.js +7 -7
  222. package/src/project-graph/plugins/utils.js +4 -5
  223. package/src/project-graph/project-graph-builder.js +2 -2
  224. package/src/project-graph/project-graph.js +7 -8
  225. package/src/project-graph/utils/build-all-workspace-files.js +1 -2
  226. package/src/project-graph/utils/find-project-for-path.js +4 -5
  227. package/src/project-graph/utils/implicit-project-dependencies.js +1 -2
  228. package/src/project-graph/utils/normalize-project-nodes.js +2 -3
  229. package/src/project-graph/utils/project-configuration-utils.js +30 -14
  230. package/src/project-graph/utils/retrieve-workspace-files.js +6 -7
  231. package/src/tasks-runner/create-task-graph.d.ts +2 -1
  232. package/src/tasks-runner/create-task-graph.js +18 -33
  233. package/src/tasks-runner/forked-process-task-runner.d.ts +0 -1
  234. package/src/tasks-runner/init-tasks-runner.js +1 -2
  235. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +1 -2
  236. package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +1 -2
  237. package/src/tasks-runner/life-cycles/formatting-utils.js +2 -3
  238. package/src/tasks-runner/life-cycles/pretty-time.js +1 -2
  239. package/src/tasks-runner/life-cycles/view-logs-utils.js +1 -2
  240. package/src/tasks-runner/pseudo-ipc.d.ts +0 -1
  241. package/src/tasks-runner/pseudo-terminal.d.ts +0 -1
  242. package/src/tasks-runner/pseudo-terminal.js +2 -2
  243. package/src/tasks-runner/run-command.js +4 -5
  244. package/src/tasks-runner/task-env.d.ts +0 -1
  245. package/src/tasks-runner/task-env.js +5 -6
  246. package/src/tasks-runner/task-graph-utils.js +2 -3
  247. package/src/tasks-runner/task-orchestrator.js +8 -0
  248. package/src/tasks-runner/tasks-schedule.d.ts +1 -0
  249. package/src/tasks-runner/tasks-schedule.js +28 -4
  250. package/src/tasks-runner/utils.d.ts +15 -2
  251. package/src/tasks-runner/utils.js +107 -43
  252. package/src/utils/ab-testing.js +2 -2
  253. package/src/utils/all-file-data.js +1 -2
  254. package/src/utils/assert-workspace-validity.js +1 -2
  255. package/src/utils/async-iterator.js +2 -3
  256. package/src/utils/cache-directory.js +2 -2
  257. package/src/utils/child-process.d.ts +0 -1
  258. package/src/utils/child-process.js +3 -3
  259. package/src/utils/chunkify.js +1 -2
  260. package/src/utils/code-frames.js +1 -2
  261. package/src/utils/collapse-expanded-outputs.js +1 -2
  262. package/src/utils/command-line-utils.js +5 -6
  263. package/src/utils/consume-messages-from-socket.js +1 -2
  264. package/src/utils/default-base.js +1 -2
  265. package/src/utils/dotenv.js +1 -2
  266. package/src/utils/exit-codes.d.ts +0 -1
  267. package/src/utils/exit-codes.js +1 -2
  268. package/src/utils/fileutils.d.ts +0 -1
  269. package/src/utils/fileutils.js +9 -10
  270. package/src/utils/find-matching-projects.js +5 -5
  271. package/src/utils/find-workspace-root.js +1 -2
  272. package/src/utils/get-package-name-from-import-path.js +1 -2
  273. package/src/utils/git-utils.js +4 -5
  274. package/src/utils/globs.d.ts +2 -0
  275. package/src/utils/globs.js +12 -2
  276. package/src/utils/ignore.js +4 -4
  277. package/src/utils/installation-directory.js +2 -3
  278. package/src/utils/is-ci.js +1 -2
  279. package/src/utils/json-diff.js +5 -5
  280. package/src/utils/json.js +3 -3
  281. package/src/utils/logger.js +2 -2
  282. package/src/utils/nx-cloud-utils.js +3 -4
  283. package/src/utils/nx-plugin.deprecated.js +1 -2
  284. package/src/utils/object-sort.js +1 -2
  285. package/src/utils/package-json.js +8 -9
  286. package/src/utils/package-manager.js +13 -14
  287. package/src/utils/params.js +14 -14
  288. package/src/utils/path.js +3 -4
  289. package/src/utils/plugins/community-plugins.js +1 -2
  290. package/src/utils/plugins/core-plugins.js +2 -3
  291. package/src/utils/plugins/installed-plugins.js +3 -4
  292. package/src/utils/plugins/local-plugins.js +2 -3
  293. package/src/utils/plugins/plugin-capabilities.js +2 -3
  294. package/src/utils/plugins/shared.js +1 -2
  295. package/src/utils/print-help.js +1 -2
  296. package/src/utils/project-graph-utils.js +4 -5
  297. package/src/utils/serializable-error.js +7 -2
  298. package/src/utils/serialize-overrides-into-command-line.js +1 -2
  299. package/src/utils/serialize-target.js +1 -2
  300. package/src/utils/split-target.js +2 -3
  301. package/src/utils/strip-indents.js +1 -2
  302. package/src/utils/task-history.js +3 -3
  303. package/src/utils/update-nxw.js +1 -2
  304. package/src/utils/workspace-configuration-check.js +1 -2
  305. package/src/utils/workspace-context.js +10 -11
  306. package/src/utils/workspace-root.js +3 -3
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = escapeDollarSignEnvVariables;
3
4
  const logger_1 = require("../../utils/logger");
4
5
  const project_configuration_1 = require("../../generators/utils/project-configuration");
5
6
  /**
@@ -30,7 +31,6 @@ function escapeDollarSignEnvVariables(tree) {
30
31
  parseEnvFile(tree, envFile);
31
32
  }
32
33
  }
33
- exports.default = escapeDollarSignEnvVariables;
34
34
  /**
35
35
  * This function parse the env file and escape dollar sign
36
36
  * @param tree
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = removeProjectNameAndRootFormat;
3
4
  const json_1 = require("../../generators/utils/json");
4
5
  const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
5
6
  async function removeProjectNameAndRootFormat(tree) {
@@ -18,4 +19,3 @@ async function removeProjectNameAndRootFormat(tree) {
18
19
  });
19
20
  await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
20
21
  }
21
- exports.default = removeProjectNameAndRootFormat;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = moveCacheDirectory;
3
4
  const ignore_1 = require("ignore");
4
5
  function moveCacheDirectory(tree) {
5
6
  // If nx.json doesn't exist the repo can't utilize
@@ -19,7 +20,6 @@ function moveCacheDirectory(tree) {
19
20
  }
20
21
  }
21
22
  }
22
- exports.default = moveCacheDirectory;
23
23
  function updateGitIgnore(tree) {
24
24
  const gitignore = tree.exists('.gitignore')
25
25
  ? tree.read('.gitignore', 'utf-8')
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
3
4
  const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
4
5
  const nx_json_1 = require("../../generators/utils/nx-json");
5
6
  const json_1 = require("../../generators/utils/json");
@@ -19,7 +20,6 @@ async function update(tree) {
19
20
  (0, nx_json_1.updateNxJson)(tree, nxJson);
20
21
  await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
21
22
  }
22
- exports.default = update;
23
23
  function warnNpmScopeHasChanged(tree, nxJson) {
24
24
  const originalScope = nxJson['npmScope'];
25
25
  // There was no original scope
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = migrate;
3
4
  const json_1 = require("../../generators/utils/json");
4
5
  const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
5
6
  const nx_json_1 = require("../../generators/utils/nx-json");
@@ -73,7 +74,6 @@ async function migrate(tree) {
73
74
  });
74
75
  await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
75
76
  }
76
- exports.default = migrate;
77
77
  async function isNxCloudClientSupported(nxJson) {
78
78
  const nxCloudOptions = (0, run_command_1.getRunnerOptions)('default', nxJson, {}, true);
79
79
  // Non enterprise workspaces support the Nx Cloud Client
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = update;
3
4
  /* eslint-disable @typescript-eslint/no-unused-vars */
4
5
  const nx_json_1 = require("../../generators/utils/nx-json");
5
6
  const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
@@ -18,4 +19,3 @@ async function update(host) {
18
19
  }
19
20
  await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(host);
20
21
  }
21
- exports.default = update;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.visitNotIgnoredFiles = void 0;
3
+ exports.default = nxReleasePath;
4
+ exports.visitNotIgnoredFiles = visitNotIgnoredFiles;
4
5
  const node_path_1 = require("node:path");
5
6
  const ignore_1 = require("../../utils/ignore");
6
7
  function nxReleasePath(tree) {
@@ -20,7 +21,6 @@ function nxReleasePath(tree) {
20
21
  }
21
22
  });
22
23
  }
23
- exports.default = nxReleasePath;
24
24
  // Adapted from devkit
25
25
  function visitNotIgnoredFiles(tree, dirPath = tree.root, visitor) {
26
26
  const ig = (0, ignore_1.getIgnoreObject)();
@@ -41,7 +41,6 @@ function visitNotIgnoredFiles(tree, dirPath = tree.root, visitor) {
41
41
  }
42
42
  }
43
43
  }
44
- exports.visitNotIgnoredFiles = visitNotIgnoredFiles;
45
44
  // Copied from devkit
46
45
  function normalizePathRelativeToRoot(path, root) {
47
46
  return (0, node_path_1.relative)(root, (0, node_path_1.join)(root, path)).split(node_path_1.sep).join('/');
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = default_1;
3
4
  const update_nxw_1 = require("../../utils/update-nxw");
4
5
  async function default_1(tree) {
5
6
  (0, update_nxw_1.updateNxw)(tree);
6
7
  }
7
- exports.default = default_1;
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = migrate;
3
4
  const nx_json_1 = require("../../generators/utils/nx-json");
4
5
  function migrate(tree) {
5
6
  const nxJson = (0, nx_json_1.readNxJson)(tree);
6
7
  nxJson.useInferencePlugins = false;
7
8
  (0, nx_json_1.updateNxJson)(tree, nxJson);
8
9
  }
9
- exports.default = migrate;
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateGitIgnore = exports.updatePrettierIgnore = void 0;
3
+ exports.default = moveGraphCacheDirectory;
4
+ exports.updatePrettierIgnore = updatePrettierIgnore;
5
+ exports.updateGitIgnore = updateGitIgnore;
4
6
  async function moveGraphCacheDirectory(tree) {
5
7
  updateGitIgnore(tree);
6
8
  updatePrettierIgnore(tree);
7
9
  }
8
- exports.default = moveGraphCacheDirectory;
9
10
  function updatePrettierIgnore(tree) {
10
11
  if (tree.exists('.prettierignore')) {
11
12
  const ignored = tree.read('.prettierignore', 'utf-8');
@@ -14,7 +15,6 @@ function updatePrettierIgnore(tree) {
14
15
  }
15
16
  }
16
17
  }
17
- exports.updatePrettierIgnore = updatePrettierIgnore;
18
18
  function updateGitIgnore(tree) {
19
19
  const gitignore = tree.read('.gitignore', 'utf-8');
20
20
  if (!gitignore) {
@@ -31,4 +31,3 @@ function updateGitIgnore(tree) {
31
31
  const updatedGitignore = gitignore.replace('.nx/cache', ['.nx/cache', '.nx/workspace-data'].join('\n'));
32
32
  tree.write('.gitignore', updatedGitignore);
33
33
  }
34
- exports.updateGitIgnore = updateGitIgnore;
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.default = setProjectName;
3
4
  const to_project_name_1 = require("../../config/to-project-name");
4
5
  const format_changed_files_with_prettier_if_available_1 = require("../../generators/internal-utils/format-changed-files-with-prettier-if-available");
5
6
  const json_1 = require("../../generators/utils/json");
@@ -31,4 +32,3 @@ async function setProjectName(tree) {
31
32
  }
32
33
  await (0, format_changed_files_with_prettier_if_available_1.formatChangedFilesWithPrettierIfAvailable)(tree);
33
34
  }
34
- exports.default = setProjectName;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.assertSupportedPlatform = void 0;
3
+ exports.assertSupportedPlatform = assertSupportedPlatform;
4
4
  const output_1 = require("../utils/output");
5
5
  function assertSupportedPlatform() {
6
6
  try {
@@ -36,4 +36,3 @@ function assertSupportedPlatform() {
36
36
  process.exit(1);
37
37
  }
38
38
  }
39
- exports.assertSupportedPlatform = assertSupportedPlatform;
@@ -185,6 +185,7 @@ export interface Target {
185
185
  outputs?: Array<string>
186
186
  options?: string
187
187
  configurations?: string
188
+ parallelism?: boolean
188
189
  }
189
190
 
190
191
  export interface Task {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getNativeFileCacheLocation = void 0;
3
+ exports.getNativeFileCacheLocation = getNativeFileCacheLocation;
4
4
  const os_1 = require("os");
5
5
  const path_1 = require("path");
6
6
  const crypto_1 = require("crypto");
@@ -20,4 +20,3 @@ function getNativeFileCacheLocation() {
20
20
  return (0, path_1.join)((0, os_1.tmpdir)(), `nx-native-file-cache-${hash.digest('hex').substring(0, 7)}`);
21
21
  }
22
22
  }
23
- exports.getNativeFileCacheLocation = getNativeFileCacheLocation;
Binary file
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.transformProjectGraphForRust = void 0;
3
+ exports.transformProjectGraphForRust = transformProjectGraphForRust;
4
4
  function transformProjectGraphForRust(graph) {
5
5
  const dependencies = {};
6
6
  const nodes = {};
@@ -14,6 +14,7 @@ function transformProjectGraphForRust(graph) {
14
14
  outputs: targetConfig.outputs,
15
15
  options: JSON.stringify(targetConfig.options),
16
16
  configurations: JSON.stringify(targetConfig.configurations),
17
+ parallelism: targetConfig.parallelism,
17
18
  };
18
19
  }
19
20
  nodes[projectName] = {
@@ -48,4 +49,3 @@ function transformProjectGraphForRust(graph) {
48
49
  dependencies,
49
50
  };
50
51
  }
51
- exports.transformProjectGraphForRust = transformProjectGraphForRust;
@@ -1,9 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.debugLog = void 0;
3
+ exports.debugLog = debugLog;
4
4
  function debugLog(...args) {
5
5
  if (process.env['NX_VERBOSE_LOGGING'] === 'true') {
6
6
  console.log('[NX CLOUD]', ...args);
7
7
  }
8
8
  }
9
- exports.debugLog = debugLog;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.connectToNxCloud = void 0;
3
+ exports.connectToNxCloud = connectToNxCloud;
4
4
  const child_process_1 = require("child_process");
5
5
  const output_1 = require("../../../utils/output");
6
6
  const json_1 = require("../../../generators/utils/json");
@@ -149,7 +149,6 @@ async function connectToNxCloud(tree, schema) {
149
149
  return async () => await printSuccessMessage(responseFromCreateNxCloudWorkspace?.url ?? apiUrl, responseFromCreateNxCloudWorkspace?.token, schema.installationSource, usesGithub, schema.directory);
150
150
  }
151
151
  }
152
- exports.connectToNxCloud = connectToNxCloud;
153
152
  function sleep(ms) {
154
153
  return new Promise((resolve) => setTimeout(resolve, ms));
155
154
  }
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findAncestorNodeModules = void 0;
3
+ exports.findAncestorNodeModules = findAncestorNodeModules;
4
4
  const fs_1 = require("fs");
5
5
  const path_1 = require("path");
6
6
  function findAncestorNodeModules(startPath, collector) {
@@ -17,4 +17,3 @@ function findAncestorNodeModules(startPath, collector) {
17
17
  }
18
18
  return collector;
19
19
  }
20
- exports.findAncestorNodeModules = findAncestorNodeModules;
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.verifyOrUpdateNxCloudClient = exports.NxCloudClientUnavailableError = exports.NxCloudEnterpriseOutdatedError = void 0;
3
+ exports.NxCloudClientUnavailableError = exports.NxCloudEnterpriseOutdatedError = void 0;
4
+ exports.verifyOrUpdateNxCloudClient = verifyOrUpdateNxCloudClient;
4
5
  const fs_1 = require("fs");
5
6
  const zlib_1 = require("zlib");
6
7
  const path_1 = require("path");
@@ -82,7 +83,6 @@ async function verifyOrUpdateNxCloudClient(options) {
82
83
  nxCloudClient: require(currentBundle.fullPath),
83
84
  };
84
85
  }
85
- exports.verifyOrUpdateNxCloudClient = verifyOrUpdateNxCloudClient;
86
86
  const runnerBundleInstallDirectory = (0, path_1.join)(cache_directory_1.cacheDir, 'cloud');
87
87
  function getLatestInstalledRunnerBundle() {
88
88
  if (!(0, fs_1.existsSync)(runnerBundleInstallDirectory)) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createApiAxiosInstance = void 0;
3
+ exports.createApiAxiosInstance = createApiAxiosInstance;
4
4
  const path_1 = require("path");
5
5
  const environment_1 = require("./environment");
6
6
  const axios = require('axios');
@@ -21,4 +21,3 @@ function createApiAxiosInstance(options) {
21
21
  headers: { authorization: accessToken },
22
22
  }));
23
23
  }
24
- exports.createApiAxiosInstance = createApiAxiosInstance;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getCloudOptions = void 0;
3
+ exports.getCloudOptions = getCloudOptions;
4
4
  const nx_json_1 = require("../../config/nx-json");
5
5
  const run_command_1 = require("../../tasks-runner/run-command");
6
6
  function getCloudOptions() {
@@ -8,4 +8,3 @@ function getCloudOptions() {
8
8
  // TODO: The default is not always cloud? But it's not handled at the moment
9
9
  return (0, run_command_1.getRunnerOptions)('default', nxJson, {}, true);
10
10
  }
11
- exports.getCloudOptions = getCloudOptions;
@@ -1,6 +1,13 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.compareCleanCloudVersions = exports.versionIsValid = exports.removeVersionModifier = exports.getNxCloudVersion = exports.getURLifShortenFailed = exports.removeTrailingSlash = exports.repoUsesGithub = exports.shortenedCloudUrl = void 0;
3
+ exports.shortenedCloudUrl = shortenedCloudUrl;
4
+ exports.repoUsesGithub = repoUsesGithub;
5
+ exports.removeTrailingSlash = removeTrailingSlash;
6
+ exports.getURLifShortenFailed = getURLifShortenFailed;
7
+ exports.getNxCloudVersion = getNxCloudVersion;
8
+ exports.removeVersionModifier = removeVersionModifier;
9
+ exports.versionIsValid = versionIsValid;
10
+ exports.compareCleanCloudVersions = compareCleanCloudVersions;
4
11
  const devkit_exports_1 = require("../../devkit-exports");
5
12
  const git_utils_1 = require("../../utils/git-utils");
6
13
  async function shortenedCloudUrl(installationSource, accessToken, usesGithub) {
@@ -37,7 +44,6 @@ async function shortenedCloudUrl(installationSource, accessToken, usesGithub) {
37
44
  return getURLifShortenFailed(usesGithub, githubSlug, apiUrl, source, accessToken);
38
45
  }
39
46
  }
40
- exports.shortenedCloudUrl = shortenedCloudUrl;
41
47
  async function repoUsesGithub(github) {
42
48
  const githubSlug = (0, git_utils_1.getGithubSlugOrNull)();
43
49
  const apiUrl = removeTrailingSlash(process.env.NX_CLOUD_API || process.env.NRWL_API || `https://cloud.nx.app`);
@@ -47,11 +53,9 @@ async function repoUsesGithub(github) {
47
53
  apiUrl.includes('eu.nx.app') ||
48
54
  installationSupportsGitHub));
49
55
  }
50
- exports.repoUsesGithub = repoUsesGithub;
51
56
  function removeTrailingSlash(apiUrl) {
52
57
  return apiUrl[apiUrl.length - 1] === '/' ? apiUrl.slice(0, -1) : apiUrl;
53
58
  }
54
- exports.removeTrailingSlash = removeTrailingSlash;
55
59
  function getSource(installationSource) {
56
60
  if (installationSource.includes('nx-init')) {
57
61
  return 'nx-init';
@@ -77,7 +81,6 @@ function getURLifShortenFailed(usesGithub, githubSlug, apiUrl, source, accessTok
77
81
  }
78
82
  return `${apiUrl}/setup/connect-workspace/manual?accessToken=${accessToken}&source=${source}`;
79
83
  }
80
- exports.getURLifShortenFailed = getURLifShortenFailed;
81
84
  async function getInstallationSupportsGitHub(apiUrl) {
82
85
  try {
83
86
  const response = await require('axios').get(`${apiUrl}/nx-cloud/system/features`);
@@ -113,19 +116,16 @@ async function getNxCloudVersion(apiUrl) {
113
116
  return null;
114
117
  }
115
118
  }
116
- exports.getNxCloudVersion = getNxCloudVersion;
117
119
  function removeVersionModifier(versionString) {
118
120
  // Cloud version string is in the format of YYMM.DD.BuildNumber-Modifier
119
121
  return versionString.split(/[\.-]/).slice(0, 3).join('.');
120
122
  }
121
- exports.removeVersionModifier = removeVersionModifier;
122
123
  function versionIsValid(version) {
123
124
  // Updated Regex pattern to require YYMM.DD.BuildNumber format
124
125
  // All parts are required, including the BuildNumber.
125
126
  const pattern = /^\d{4}\.\d{2}\.\d+$/;
126
127
  return pattern.test(version);
127
128
  }
128
- exports.versionIsValid = versionIsValid;
129
129
  function compareCleanCloudVersions(version1, version2) {
130
130
  const parseVersion = (version) => {
131
131
  // The format we're using is YYMM.DD.BuildNumber
@@ -149,4 +149,3 @@ function compareCleanCloudVersions(version1, version2) {
149
149
  }
150
150
  return 0;
151
151
  }
152
- exports.compareCleanCloudVersions = compareCleanCloudVersions;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hashTsConfig = void 0;
3
+ exports.hashTsConfig = hashTsConfig;
4
4
  const fileutils_1 = require("../../../utils/fileutils");
5
5
  const typescript_1 = require("../utils/typescript");
6
6
  const find_project_for_path_1 = require("../../../project-graph/utils/find-project-for-path");
@@ -28,7 +28,6 @@ function hashTsConfig(p, projectRootMappings, { selectivelyHashTsConfig }) {
28
28
  return JSON.stringify(tsConfigJson);
29
29
  }
30
30
  }
31
- exports.hashTsConfig = hashTsConfig;
32
31
  function removeOtherProjectsPathRecords(p, tsConfigJson, projectRootMapping) {
33
32
  const { paths, ...compilerOptions } = tsConfigJson.compilerOptions;
34
33
  const filteredPaths = {};
@@ -4,7 +4,12 @@
4
4
  * It encapsulates the package manager specific logic and implementation details.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.createLockFile = exports.getLockFileName = exports.lockFileExists = exports.getLockFileDependencies = exports.getLockFileNodes = exports.LOCKFILES = void 0;
7
+ exports.LOCKFILES = void 0;
8
+ exports.getLockFileNodes = getLockFileNodes;
9
+ exports.getLockFileDependencies = getLockFileDependencies;
10
+ exports.lockFileExists = lockFileExists;
11
+ exports.getLockFileName = getLockFileName;
12
+ exports.createLockFile = createLockFile;
8
13
  const fs_1 = require("fs");
9
14
  const path_1 = require("path");
10
15
  const package_manager_1 = require("../../../utils/package-manager");
@@ -62,7 +67,6 @@ function getLockFileNodes(packageManager, contents, lockFileHash, context) {
62
67
  }
63
68
  throw new Error(`Unknown package manager: ${packageManager}`);
64
69
  }
65
- exports.getLockFileNodes = getLockFileNodes;
66
70
  /**
67
71
  * Parses lock file and maps dependencies and metadata to {@link LockFileGraph}
68
72
  */
@@ -93,7 +97,6 @@ function getLockFileDependencies(packageManager, contents, lockFileHash, context
93
97
  }
94
98
  throw new Error(`Unknown package manager: ${packageManager}`);
95
99
  }
96
- exports.getLockFileDependencies = getLockFileDependencies;
97
100
  function lockFileExists(packageManager) {
98
101
  if (packageManager === 'yarn') {
99
102
  return (0, fs_1.existsSync)(YARN_LOCK_PATH);
@@ -109,7 +112,6 @@ function lockFileExists(packageManager) {
109
112
  }
110
113
  throw new Error(`Unknown package manager ${packageManager} or lock file missing`);
111
114
  }
112
- exports.lockFileExists = lockFileExists;
113
115
  /**
114
116
  * Returns lock file name based on the detected package manager in the root
115
117
  * @param packageManager
@@ -130,7 +132,6 @@ function getLockFileName(packageManager) {
130
132
  }
131
133
  throw new Error(`Unknown package manager: ${packageManager}`);
132
134
  }
133
- exports.getLockFileName = getLockFileName;
134
135
  function getLockFilePath(packageManager) {
135
136
  if (packageManager === 'yarn') {
136
137
  return YARN_LOCK_PATH;
@@ -195,7 +196,6 @@ function createLockFile(packageJson, graph, packageManager = (0, package_manager
195
196
  return content;
196
197
  }
197
198
  }
198
- exports.createLockFile = createLockFile;
199
199
  // generate body lines for error message
200
200
  function errorBodyLines(originalError, additionalInfo = []) {
201
201
  return [
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stringifyNpmLockfile = exports.getNpmLockfileDependencies = exports.getNpmLockfileNodes = void 0;
3
+ exports.getNpmLockfileNodes = getNpmLockfileNodes;
4
+ exports.getNpmLockfileDependencies = getNpmLockfileDependencies;
5
+ exports.stringifyNpmLockfile = stringifyNpmLockfile;
4
6
  const fs_1 = require("fs");
5
7
  const semver_1 = require("semver");
6
8
  const workspace_root_1 = require("../../../utils/workspace-root");
@@ -27,12 +29,10 @@ function getNpmLockfileNodes(lockFileContent, lockFileHash) {
27
29
  // we use key => node map to avoid duplicate work when parsing keys
28
30
  return getNodes(data, keyMap);
29
31
  }
30
- exports.getNpmLockfileNodes = getNpmLockfileNodes;
31
32
  function getNpmLockfileDependencies(lockFileContent, lockFileHash, ctx) {
32
33
  const data = parsePackageLockFile(lockFileContent, lockFileHash);
33
34
  return getDependencies(data, keyMap, ctx);
34
35
  }
35
- exports.getNpmLockfileDependencies = getNpmLockfileDependencies;
36
36
  function getNodes(data, keyMap) {
37
37
  const nodes = new Map();
38
38
  if (data.lockfileVersion > 1) {
@@ -253,7 +253,6 @@ function stringifyNpmLockfile(graph, rootLockFileContent, packageJson) {
253
253
  }
254
254
  return JSON.stringify(output, null, 2);
255
255
  }
256
- exports.stringifyNpmLockfile = stringifyNpmLockfile;
257
256
  function mapV3Snapshots(mappedPackages, packageJson) {
258
257
  const output = {};
259
258
  output[''] = packageJson;
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stringifyPnpmLockfile = exports.getPnpmLockfileDependencies = exports.getPnpmLockfileNodes = void 0;
3
+ exports.getPnpmLockfileNodes = getPnpmLockfileNodes;
4
+ exports.getPnpmLockfileDependencies = getPnpmLockfileDependencies;
5
+ exports.stringifyPnpmLockfile = stringifyPnpmLockfile;
4
6
  const pnpm_normalizer_1 = require("./utils/pnpm-normalizer");
5
7
  const package_json_1 = require("./utils/package-json");
6
8
  const object_sort_1 = require("../../../utils/object-sort");
@@ -29,7 +31,6 @@ function getPnpmLockfileNodes(lockFileContent, lockFileHash) {
29
31
  const isV5 = (0, pnpm_normalizer_1.isV5Syntax)(data);
30
32
  return getNodes(data, keyMap, isV5);
31
33
  }
32
- exports.getPnpmLockfileNodes = getPnpmLockfileNodes;
33
34
  function getPnpmLockfileDependencies(lockFileContent, lockFileHash, ctx) {
34
35
  const data = parsePnpmLockFile(lockFileContent, lockFileHash);
35
36
  if (+data.lockfileVersion.toString() >= 10) {
@@ -38,7 +39,6 @@ function getPnpmLockfileDependencies(lockFileContent, lockFileHash, ctx) {
38
39
  const isV5 = (0, pnpm_normalizer_1.isV5Syntax)(data);
39
40
  return getDependencies(data, keyMap, isV5, ctx);
40
41
  }
41
- exports.getPnpmLockfileDependencies = getPnpmLockfileDependencies;
42
42
  function matchPropValue(record, key, originalPackageName) {
43
43
  if (!record) {
44
44
  return undefined;
@@ -290,7 +290,6 @@ function stringifyPnpmLockfile(graph, rootLockFileContent, packageJson) {
290
290
  };
291
291
  return (0, pnpm_normalizer_1.stringifyToPnpmYaml)(output);
292
292
  }
293
- exports.stringifyPnpmLockfile = stringifyPnpmLockfile;
294
293
  function mapSnapshots(packages, nodes, lockfileVersion) {
295
294
  const result = {};
296
295
  Object.values(nodes).forEach((node) => {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.pruneProjectGraph = void 0;
3
+ exports.pruneProjectGraph = pruneProjectGraph;
4
4
  const semver_1 = require("semver");
5
5
  const project_graph_builder_1 = require("../../../project-graph/project-graph-builder");
6
6
  const operators_1 = require("../../../project-graph/operators");
@@ -17,7 +17,6 @@ function pruneProjectGraph(graph, prunedPackageJson) {
17
17
  rehoistNodes(graph, combinedDependencies, builder);
18
18
  return builder.getUpdatedProjectGraph();
19
19
  }
20
- exports.pruneProjectGraph = pruneProjectGraph;
21
20
  // ensure that dependency ranges from package.json (e.g. ^1.0.0)
22
21
  // are replaced with the actual version based on the available nodes (e.g. 1.0.1)
23
22
  function normalizeDependencies(packageJson, graph) {
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.normalizePackageJson = exports.getHoistedPackageVersion = void 0;
3
+ exports.getHoistedPackageVersion = getHoistedPackageVersion;
4
+ exports.normalizePackageJson = normalizePackageJson;
4
5
  const fs_1 = require("fs");
5
6
  const workspace_root_1 = require("../../../../utils/workspace-root");
6
7
  /**
@@ -14,7 +15,6 @@ function getHoistedPackageVersion(packageName) {
14
15
  }
15
16
  return;
16
17
  }
17
- exports.getHoistedPackageVersion = getHoistedPackageVersion;
18
18
  /**
19
19
  * Strip off non-pruning related fields from package.json
20
20
  */
@@ -31,4 +31,3 @@ function normalizePackageJson(packageJson) {
31
31
  optionalDependencies,
32
32
  };
33
33
  }
34
- exports.normalizePackageJson = normalizePackageJson;
@@ -4,7 +4,11 @@
4
4
  * It will convert inline specifiers to the separate specifiers format and ensure importers are present.
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.stringifyToPnpmYaml = exports.parseAndNormalizePnpmLockfile = exports.loadPnpmHoistedDepsDefinition = exports.usesLeadingDash = exports.isV5Syntax = void 0;
7
+ exports.isV5Syntax = isV5Syntax;
8
+ exports.usesLeadingDash = usesLeadingDash;
9
+ exports.loadPnpmHoistedDepsDefinition = loadPnpmHoistedDepsDefinition;
10
+ exports.parseAndNormalizePnpmLockfile = parseAndNormalizePnpmLockfile;
11
+ exports.stringifyToPnpmYaml = stringifyToPnpmYaml;
8
12
  const fs_1 = require("fs");
9
13
  const semver_1 = require("semver");
10
14
  const workspace_root_1 = require("../../../../utils/workspace-root");
@@ -17,7 +21,6 @@ function isV5Syntax(data) {
17
21
  return true;
18
22
  }
19
23
  }
20
- exports.isV5Syntax = isV5Syntax;
21
24
  function usesLeadingDash(data) {
22
25
  if (+data.lockfileVersion.toString() >= 9) {
23
26
  false;
@@ -26,7 +29,6 @@ function usesLeadingDash(data) {
26
29
  return true;
27
30
  }
28
31
  }
29
- exports.usesLeadingDash = usesLeadingDash;
30
32
  function loadPnpmHoistedDepsDefinition() {
31
33
  const fullPath = `${workspace_root_1.workspaceRoot}/node_modules/.modules.yaml`;
32
34
  if ((0, fs_1.existsSync)(fullPath)) {
@@ -38,7 +40,6 @@ function loadPnpmHoistedDepsDefinition() {
38
40
  throw new Error(`Could not find ".modules.yaml" at "${fullPath}"`);
39
41
  }
40
42
  }
41
- exports.loadPnpmHoistedDepsDefinition = loadPnpmHoistedDepsDefinition;
42
43
  /**
43
44
  * Parsing and mapping logic from pnpm lockfile `read` function
44
45
  */
@@ -46,7 +47,6 @@ function parseAndNormalizePnpmLockfile(content) {
46
47
  const { load } = require('@zkochan/js-yaml');
47
48
  return convertToLockfileObject(load(content));
48
49
  }
49
- exports.parseAndNormalizePnpmLockfile = parseAndNormalizePnpmLockfile;
50
50
  // https://github.com/pnpm/pnpm/blob/50e37072f42bcca6d393a74bed29f7f0e029805d/lockfile/lockfile-file/src/write.ts#L22
51
51
  const LOCKFILE_YAML_FORMAT = {
52
52
  blankLines: true,
@@ -79,7 +79,6 @@ function stringifyToPnpmYaml(lockfile) {
79
79
  return dump(sortLockfileKeys(normalizeLockfileV6(adaptedLockfile, lockfileVersion >= 6)), LOCKFILE_YAML_PRE9_FORMAT);
80
80
  }
81
81
  }
82
- exports.stringifyToPnpmYaml = stringifyToPnpmYaml;
83
82
  /**
84
83
  * The following code was copied over from pnpm source code and modified to work in this context.
85
84
  */
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stringifyYarnLockfile = exports.getYarnLockfileDependencies = exports.getYarnLockfileNodes = void 0;
3
+ exports.getYarnLockfileNodes = getYarnLockfileNodes;
4
+ exports.getYarnLockfileDependencies = getYarnLockfileDependencies;
5
+ exports.stringifyYarnLockfile = stringifyYarnLockfile;
4
6
  const package_json_1 = require("./utils/package-json");
5
7
  const project_graph_builder_1 = require("../../../project-graph/project-graph-builder");
6
8
  const semver_1 = require("semver");
@@ -29,7 +31,6 @@ function getYarnLockfileNodes(lockFileContent, lockFileHash, packageJson) {
29
31
  const groupedDependencies = groupDependencies(dependencies, isBerry);
30
32
  return getNodes(groupedDependencies, packageJson, keyMap, isBerry);
31
33
  }
32
- exports.getYarnLockfileNodes = getYarnLockfileNodes;
33
34
  function getYarnLockfileDependencies(lockFileContent, lockFileHash, ctx) {
34
35
  const { __metadata, ...dependencies } = parseLockFile(lockFileContent, lockFileHash);
35
36
  const isBerry = !!__metadata;
@@ -37,7 +38,6 @@ function getYarnLockfileDependencies(lockFileContent, lockFileHash, ctx) {
37
38
  const groupedDependencies = groupDependencies(dependencies, isBerry);
38
39
  return getDependencies(groupedDependencies, keyMap, ctx);
39
40
  }
40
- exports.getYarnLockfileDependencies = getYarnLockfileDependencies;
41
41
  function getPackageNameKeyPairs(keys) {
42
42
  const result = new Map();
43
43
  keys.split(', ').forEach((key) => {
@@ -242,7 +242,6 @@ function stringifyYarnLockfile(graph, rootLockFileContent, packageJson) {
242
242
  return stringify((0, object_sort_1.sortObjectByKeys)(snapshots));
243
243
  }
244
244
  }
245
- exports.stringifyYarnLockfile = stringifyYarnLockfile;
246
245
  function groupDependencies(dependencies, isBerry) {
247
246
  if (isBerry) {
248
247
  return dependencies;