nx 19.5.0-canary.20240711-2c4c2ae → 19.5.0-canary.20240713-6f50d9f

Sign up to get free protection for your applications and to get access to all the features.
Files changed (302) 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.js +3 -3
  215. package/src/project-graph/plugins/isolation/index.js +1 -2
  216. package/src/project-graph/plugins/isolation/messaging.d.ts +0 -2
  217. package/src/project-graph/plugins/isolation/messaging.js +4 -5
  218. package/src/project-graph/plugins/isolation/plugin-pool.js +1 -2
  219. package/src/project-graph/plugins/loader.js +7 -7
  220. package/src/project-graph/plugins/utils.js +4 -5
  221. package/src/project-graph/project-graph-builder.js +2 -2
  222. package/src/project-graph/project-graph.js +7 -8
  223. package/src/project-graph/utils/build-all-workspace-files.js +1 -2
  224. package/src/project-graph/utils/find-project-for-path.js +4 -5
  225. package/src/project-graph/utils/implicit-project-dependencies.js +1 -2
  226. package/src/project-graph/utils/normalize-project-nodes.js +2 -3
  227. package/src/project-graph/utils/project-configuration-utils.js +27 -13
  228. package/src/project-graph/utils/retrieve-workspace-files.js +6 -7
  229. package/src/tasks-runner/create-task-graph.js +4 -3
  230. package/src/tasks-runner/forked-process-task-runner.d.ts +0 -1
  231. package/src/tasks-runner/init-tasks-runner.js +1 -2
  232. package/src/tasks-runner/life-cycles/dynamic-run-many-terminal-output-life-cycle.js +1 -2
  233. package/src/tasks-runner/life-cycles/dynamic-run-one-terminal-output-life-cycle.js +1 -2
  234. package/src/tasks-runner/life-cycles/formatting-utils.js +2 -3
  235. package/src/tasks-runner/life-cycles/pretty-time.js +1 -2
  236. package/src/tasks-runner/life-cycles/view-logs-utils.js +1 -2
  237. package/src/tasks-runner/pseudo-ipc.d.ts +0 -1
  238. package/src/tasks-runner/pseudo-terminal.d.ts +0 -1
  239. package/src/tasks-runner/pseudo-terminal.js +2 -2
  240. package/src/tasks-runner/run-command.js +4 -5
  241. package/src/tasks-runner/task-env.d.ts +0 -1
  242. package/src/tasks-runner/task-env.js +5 -6
  243. package/src/tasks-runner/task-graph-utils.js +2 -3
  244. package/src/tasks-runner/tasks-schedule.d.ts +1 -0
  245. package/src/tasks-runner/tasks-schedule.js +28 -4
  246. package/src/tasks-runner/utils.js +27 -27
  247. package/src/utils/ab-testing.js +2 -2
  248. package/src/utils/all-file-data.js +1 -2
  249. package/src/utils/assert-workspace-validity.js +1 -2
  250. package/src/utils/async-iterator.js +2 -3
  251. package/src/utils/cache-directory.js +2 -2
  252. package/src/utils/child-process.d.ts +0 -1
  253. package/src/utils/child-process.js +3 -3
  254. package/src/utils/chunkify.js +1 -2
  255. package/src/utils/code-frames.js +1 -2
  256. package/src/utils/collapse-expanded-outputs.js +1 -2
  257. package/src/utils/command-line-utils.js +5 -6
  258. package/src/utils/consume-messages-from-socket.js +1 -2
  259. package/src/utils/default-base.js +1 -2
  260. package/src/utils/dotenv.js +1 -2
  261. package/src/utils/exit-codes.d.ts +0 -1
  262. package/src/utils/exit-codes.js +1 -2
  263. package/src/utils/fileutils.d.ts +0 -1
  264. package/src/utils/fileutils.js +9 -10
  265. package/src/utils/find-matching-projects.d.ts +0 -4
  266. package/src/utils/find-matching-projects.js +5 -8
  267. package/src/utils/find-workspace-root.js +1 -2
  268. package/src/utils/get-package-name-from-import-path.js +1 -2
  269. package/src/utils/git-utils.js +4 -5
  270. package/src/utils/globs.d.ts +2 -0
  271. package/src/utils/globs.js +12 -2
  272. package/src/utils/ignore.js +4 -4
  273. package/src/utils/installation-directory.js +2 -3
  274. package/src/utils/is-ci.js +1 -2
  275. package/src/utils/json-diff.js +5 -5
  276. package/src/utils/json.js +3 -3
  277. package/src/utils/logger.js +2 -2
  278. package/src/utils/nx-cloud-utils.js +3 -4
  279. package/src/utils/nx-plugin.deprecated.js +1 -2
  280. package/src/utils/object-sort.js +1 -2
  281. package/src/utils/package-json.js +8 -9
  282. package/src/utils/package-manager.js +13 -14
  283. package/src/utils/params.js +14 -14
  284. package/src/utils/path.js +3 -4
  285. package/src/utils/plugins/community-plugins.js +1 -2
  286. package/src/utils/plugins/core-plugins.js +2 -3
  287. package/src/utils/plugins/installed-plugins.js +3 -4
  288. package/src/utils/plugins/local-plugins.js +2 -3
  289. package/src/utils/plugins/plugin-capabilities.js +2 -3
  290. package/src/utils/plugins/shared.js +1 -2
  291. package/src/utils/print-help.js +1 -2
  292. package/src/utils/project-graph-utils.js +4 -5
  293. package/src/utils/serializable-error.js +1 -2
  294. package/src/utils/serialize-overrides-into-command-line.js +1 -2
  295. package/src/utils/serialize-target.js +1 -2
  296. package/src/utils/split-target.js +2 -3
  297. package/src/utils/strip-indents.js +1 -2
  298. package/src/utils/task-history.js +3 -3
  299. package/src/utils/update-nxw.js +1 -2
  300. package/src/utils/workspace-configuration-check.js +1 -2
  301. package/src/utils/workspace-context.js +10 -11
  302. package/src/utils/workspace-root.js +3 -3
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findProjectsNpmDependencies = exports.createPackageJson = void 0;
3
+ exports.createPackageJson = createPackageJson;
4
+ exports.findProjectsNpmDependencies = findProjectsNpmDependencies;
4
5
  const fileutils_1 = require("../../../utils/fileutils");
5
6
  const object_sort_1 = require("../../../utils/object-sort");
6
7
  const project_graph_1 = require("../../../config/project-graph");
@@ -122,7 +123,6 @@ function createPackageJson(projectName, graph, options = {}, fileMap = null) {
122
123
  }
123
124
  return packageJson;
124
125
  }
125
- exports.createPackageJson = createPackageJson;
126
126
  function findProjectsNpmDependencies(projectNode, graph, target, rootPackageJson, options, fileMap) {
127
127
  if (fileMap == null) {
128
128
  fileMap = (0, nx_deps_cache_1.readFileMapCache)()?.fileMap?.projectFileMap || {};
@@ -152,7 +152,6 @@ function findProjectsNpmDependencies(projectNode, graph, target, rootPackageJson
152
152
  findAllNpmDeps(fileMap, projectNode, graph, npmDeps, seen, ignoredDependencies, dependencyInputs, selfInputs);
153
153
  return npmDeps;
154
154
  }
155
- exports.findProjectsNpmDependencies = findProjectsNpmDependencies;
156
155
  function findAllNpmDeps(projectFileMap, projectNode, graph, npmDeps, seen, ignoredDependencies, dependencyPatterns, rootPatterns) {
157
156
  if (seen.has(projectNode.name))
158
157
  return;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildExplicitDependencies = void 0;
3
+ exports.buildExplicitDependencies = buildExplicitDependencies;
4
4
  const explicit_package_json_dependencies_1 = require("./explicit-package-json-dependencies");
5
5
  const explicit_project_dependencies_1 = require("./explicit-project-dependencies");
6
6
  const target_project_locator_1 = require("./target-project-locator");
@@ -38,7 +38,6 @@ function buildExplicitDependencies(jsPluginConfig, ctx) {
38
38
  }
39
39
  return dependencies;
40
40
  }
41
- exports.buildExplicitDependencies = buildExplicitDependencies;
42
41
  function totalNumberOfFilesToProcess(ctx) {
43
42
  let totalNumOfFilesToProcess = 0;
44
43
  Object.values(ctx.filesToProcess.projectFileMap).forEach((t) => (totalNumOfFilesToProcess += t.length));
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildExplicitPackageJsonDependencies = void 0;
3
+ exports.buildExplicitPackageJsonDependencies = buildExplicitPackageJsonDependencies;
4
4
  const node_path_1 = require("node:path");
5
5
  const project_graph_1 = require("../../../../config/project-graph");
6
6
  const file_utils_1 = require("../../../../project-graph/file-utils");
@@ -22,7 +22,6 @@ function buildExplicitPackageJsonDependencies(ctx, targetProjectLocator) {
22
22
  });
23
23
  return res;
24
24
  }
25
- exports.buildExplicitPackageJsonDependencies = buildExplicitPackageJsonDependencies;
26
25
  function createPackageNameMap(projects) {
27
26
  const res = {};
28
27
  for (let projectName of Object.keys(projects)) {
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildExplicitTypeScriptDependencies = void 0;
3
+ exports.buildExplicitTypeScriptDependencies = buildExplicitTypeScriptDependencies;
4
4
  const path_1 = require("path");
5
5
  const project_graph_1 = require("../../../../config/project-graph");
6
6
  const project_graph_builder_1 = require("../../../../project-graph/project-graph-builder");
@@ -76,7 +76,6 @@ function buildExplicitTypeScriptDependencies(ctx, targetProjectLocator) {
76
76
  }
77
77
  return res;
78
78
  }
79
- exports.buildExplicitTypeScriptDependencies = buildExplicitTypeScriptDependencies;
80
79
  function isVuePluginInstalled() {
81
80
  try {
82
81
  // nx-ignore-next-line
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.stripSourceCode = void 0;
3
+ exports.stripSourceCode = stripSourceCode;
4
4
  let SyntaxKind;
5
5
  /**
6
6
  * @deprecated This is deprecated and will be removed in Nx 20.
@@ -133,7 +133,6 @@ function stripSourceCode(scanner, contents) {
133
133
  }
134
134
  return statements.join('\n');
135
135
  }
136
- exports.stripSourceCode = stripSourceCode;
137
136
  function shouldRescanSlashToken(lastNonTriviaToken) {
138
137
  switch (lastNonTriviaToken) {
139
138
  case SyntaxKind.Identifier:
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TargetProjectLocator = exports.isBuiltinModuleImport = void 0;
3
+ exports.TargetProjectLocator = void 0;
4
+ exports.isBuiltinModuleImport = isBuiltinModuleImport;
4
5
  const node_module_1 = require("node:module");
5
6
  const node_path_1 = require("node:path");
6
7
  const semver_1 = require("semver");
@@ -22,7 +23,6 @@ function isBuiltinModuleImport(importExpr) {
22
23
  const packageName = (0, get_package_name_from_import_path_1.getPackageNameFromImportPath)(importExpr);
23
24
  return builtInModuleSet.has(packageName);
24
25
  }
25
- exports.isBuiltinModuleImport = isBuiltinModuleImport;
26
26
  class TargetProjectLocator {
27
27
  constructor(nodes, externalNodes = {}, npmResolutionCache = defaultNpmResolutionCache) {
28
28
  this.nodes = nodes;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildNpmPackageNodes = void 0;
3
+ exports.buildNpmPackageNodes = buildNpmPackageNodes;
4
4
  const fs_1 = require("fs");
5
5
  const file_hasher_1 = require("../../../../hasher/file-hasher");
6
6
  const path_1 = require("path");
@@ -29,4 +29,3 @@ function buildNpmPackageNodes(builder) {
29
29
  }
30
30
  });
31
31
  }
32
- exports.buildNpmPackageNodes = buildNpmPackageNodes;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.jsPluginConfig = void 0;
3
+ exports.jsPluginConfig = jsPluginConfig;
4
4
  const node_path_1 = require("node:path");
5
5
  const fileutils_1 = require("../../../utils/fileutils");
6
6
  const workspace_root_1 = require("../../../utils/workspace-root");
@@ -66,4 +66,3 @@ function jsPluginConfig(nxJson) {
66
66
  };
67
67
  }
68
68
  }
69
- exports.jsPluginConfig = jsPluginConfig;
@@ -78,6 +78,7 @@ export declare function getTsNodeCompilerOptions(compilerOptions: CompilerOption
78
78
  inlineSourceMap?: any;
79
79
  inlineSources?: any;
80
80
  isolatedModules?: any;
81
+ isolatedDeclarations?: any;
81
82
  jsx?: any;
82
83
  keyofStringsOnly?: any;
83
84
  lib?: any;
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getTsNodeCompilerOptions = exports.registerTsConfigPaths = exports.registerTranspiler = exports.getTranspiler = exports.getTsNodeTranspiler = exports.getSwcTranspiler = exports.registerTsProject = void 0;
3
+ exports.registerTsProject = registerTsProject;
4
+ exports.getSwcTranspiler = getSwcTranspiler;
5
+ exports.getTsNodeTranspiler = getTsNodeTranspiler;
6
+ exports.getTranspiler = getTranspiler;
7
+ exports.registerTranspiler = registerTranspiler;
8
+ exports.registerTsConfigPaths = registerTsConfigPaths;
9
+ exports.getTsNodeCompilerOptions = getTsNodeCompilerOptions;
4
10
  const path_1 = require("path");
5
11
  const logger_1 = require("../../../utils/logger");
6
12
  const swcNodeInstalled = packageIsInstalled('@swc-node/register');
@@ -70,7 +76,6 @@ function registerTsProject(path, configFilename) {
70
76
  }
71
77
  };
72
78
  }
73
- exports.registerTsProject = registerTsProject;
74
79
  function getSwcTranspiler(compilerOptions) {
75
80
  // These are requires to prevent it from registering when it shouldn't
76
81
  const register = require('@swc-node/register/register')
@@ -78,7 +83,6 @@ function getSwcTranspiler(compilerOptions) {
78
83
  const cleanupFn = register(compilerOptions);
79
84
  return typeof cleanupFn === 'function' ? cleanupFn : () => { };
80
85
  }
81
- exports.getSwcTranspiler = getSwcTranspiler;
82
86
  function getTsNodeTranspiler(compilerOptions) {
83
87
  const { register } = require('ts-node');
84
88
  // ts-node doesn't provide a cleanup method
@@ -97,7 +101,6 @@ function getTsNodeTranspiler(compilerOptions) {
97
101
  // Do not cleanup ts-node service since other consumers may need it
98
102
  };
99
103
  }
100
- exports.getTsNodeTranspiler = getTsNodeTranspiler;
101
104
  /**
102
105
  * Given the raw "ts-node" sub-object from a tsconfig, return an object with only the properties
103
106
  * recognized by "ts-node"
@@ -185,7 +188,6 @@ function getTranspiler(compilerOptions, tsConfigRaw) {
185
188
  return currRegistrationEntry.cleanup;
186
189
  }
187
190
  }
188
- exports.getTranspiler = getTranspiler;
189
191
  /**
190
192
  * Register ts-node or swc-node given a set of compiler options.
191
193
  *
@@ -203,7 +205,6 @@ function registerTranspiler(compilerOptions, tsConfigRaw) {
203
205
  }
204
206
  return transpiler();
205
207
  }
206
- exports.registerTranspiler = registerTranspiler;
207
208
  /**
208
209
  * @param tsConfigPath Adds the paths from a tsconfig file into node resolutions
209
210
  * @returns cleanup function
@@ -233,7 +234,6 @@ function registerTsConfigPaths(tsConfigPath) {
233
234
  }
234
235
  throw new Error(`Unable to load ${tsConfigPath}`);
235
236
  }
236
- exports.registerTsConfigPaths = registerTsConfigPaths;
237
237
  function readCompilerOptions(tsConfigPath) {
238
238
  const preferTsNode = process.env.NX_PREFER_TS_NODE === 'true';
239
239
  if (swcNodeInstalled && !preferTsNode) {
@@ -334,4 +334,3 @@ function getTsNodeCompilerOptions(compilerOptions) {
334
334
  }
335
335
  return result;
336
336
  }
337
- exports.getTsNodeCompilerOptions = getTsNodeCompilerOptions;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.resolveRelativeToDir = void 0;
3
+ exports.resolveRelativeToDir = resolveRelativeToDir;
4
4
  /**
5
5
  * NOTE: This function is in its own file because it is not possible to mock
6
6
  * require.resolve directly in jest https://github.com/jestjs/jest/issues/9543
@@ -15,4 +15,3 @@ function resolveRelativeToDir(path, relativeToDir) {
15
15
  return null;
16
16
  }
17
17
  }
18
- exports.resolveRelativeToDir = resolveRelativeToDir;
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.findNodes = exports.getRootTsConfigPath = exports.getRootTsConfigFileName = exports.resolveModuleByImport = exports.readTsConfig = void 0;
3
+ exports.readTsConfig = readTsConfig;
4
+ exports.resolveModuleByImport = resolveModuleByImport;
5
+ exports.getRootTsConfigFileName = getRootTsConfigFileName;
6
+ exports.getRootTsConfigPath = getRootTsConfigPath;
7
+ exports.findNodes = findNodes;
4
8
  const workspace_root_1 = require("../../../utils/workspace-root");
5
9
  const fs_1 = require("fs");
6
10
  const path_1 = require("path");
@@ -13,7 +17,6 @@ function readTsConfig(tsConfigPath) {
13
17
  const readResult = tsModule.readConfigFile(tsConfigPath, tsModule.sys.readFile);
14
18
  return tsModule.parseJsonConfigFileContent(readResult.config, tsModule.sys, (0, path_1.dirname)(tsConfigPath));
15
19
  }
16
- exports.readTsConfig = readTsConfig;
17
20
  function readTsConfigOptions(tsConfigPath) {
18
21
  if (!tsModule) {
19
22
  tsModule = require('typescript');
@@ -46,7 +49,6 @@ function resolveModuleByImport(importExpr, filePath, tsConfigPath) {
46
49
  return resolvedModule.resolvedFileName.replace(`${normalizedAppRoot}/`, '');
47
50
  }
48
51
  }
49
- exports.resolveModuleByImport = resolveModuleByImport;
50
52
  function getCompilerHost(tsConfigPath) {
51
53
  const options = readTsConfigOptions(tsConfigPath);
52
54
  const host = tsModule.createCompilerHost(options, true);
@@ -62,12 +64,10 @@ function getRootTsConfigFileName() {
62
64
  }
63
65
  return null;
64
66
  }
65
- exports.getRootTsConfigFileName = getRootTsConfigFileName;
66
67
  function getRootTsConfigPath() {
67
68
  const tsConfigFileName = getRootTsConfigFileName();
68
69
  return tsConfigFileName ? (0, path_1.join)(workspace_root_1.workspaceRoot, tsConfigFileName) : null;
69
70
  }
70
- exports.getRootTsConfigPath = getRootTsConfigPath;
71
71
  function findNodes(node, kind, max = Infinity) {
72
72
  if (!node || max == 0) {
73
73
  return [];
@@ -95,4 +95,3 @@ function findNodes(node, kind, max = Infinity) {
95
95
  }
96
96
  return arr;
97
97
  }
98
- exports.findNodes = findNodes;
@@ -1 +1 @@
1
- export declare const typescriptVersion = "~5.4.2";
1
+ export declare const typescriptVersion = "~5.5.2";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.typescriptVersion = void 0;
4
- exports.typescriptVersion = '~5.4.2';
4
+ exports.typescriptVersion = '~5.5.2';
@@ -1,6 +1,10 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getGlobPatternsFromPackageManagerWorkspaces = exports.buildProjectConfigurationFromPackageJson = exports.createNodeFromPackageJson = exports.buildPackageJsonWorkspacesMatcher = exports.createNodes = void 0;
3
+ exports.createNodes = void 0;
4
+ exports.buildPackageJsonWorkspacesMatcher = buildPackageJsonWorkspacesMatcher;
5
+ exports.createNodeFromPackageJson = createNodeFromPackageJson;
6
+ exports.buildProjectConfigurationFromPackageJson = buildProjectConfigurationFromPackageJson;
7
+ exports.getGlobPatternsFromPackageManagerWorkspaces = getGlobPatternsFromPackageManagerWorkspaces;
4
8
  const minimatch_1 = require("minimatch");
5
9
  const node_fs_1 = require("node:fs");
6
10
  const node_path_1 = require("node:path");
@@ -49,7 +53,6 @@ function buildPackageJsonWorkspacesMatcher(workspaceRoot, readJson) {
49
53
  */
50
54
  negativePatterns.every((negative) => (0, minimatch_1.minimatch)(p, negative));
51
55
  }
52
- exports.buildPackageJsonWorkspacesMatcher = buildPackageJsonWorkspacesMatcher;
53
56
  function createNodeFromPackageJson(pkgJsonPath, workspaceRoot) {
54
57
  const json = (0, fileutils_1.readJsonFile)((0, node_path_1.join)(workspaceRoot, pkgJsonPath));
55
58
  const project = buildProjectConfigurationFromPackageJson(json, workspaceRoot, pkgJsonPath, (0, nx_json_1.readNxJson)(workspaceRoot));
@@ -59,7 +62,6 @@ function createNodeFromPackageJson(pkgJsonPath, workspaceRoot) {
59
62
  },
60
63
  };
61
64
  }
62
- exports.createNodeFromPackageJson = createNodeFromPackageJson;
63
65
  function buildProjectConfigurationFromPackageJson(packageJson, workspaceRoot, packageJsonPath, nxJson) {
64
66
  const normalizedPath = packageJsonPath.split('\\').join('/');
65
67
  const projectRoot = (0, node_path_1.dirname)(normalizedPath);
@@ -93,7 +95,6 @@ function buildProjectConfigurationFromPackageJson(packageJson, workspaceRoot, pa
93
95
  }
94
96
  return projectConfiguration;
95
97
  }
96
- exports.buildProjectConfigurationFromPackageJson = buildProjectConfigurationFromPackageJson;
97
98
  /**
98
99
  * Get the package.json globs from package manager workspaces
99
100
  */
@@ -138,7 +139,6 @@ function getGlobPatternsFromPackageManagerWorkspaces(root, readJson = (path) =>
138
139
  return [];
139
140
  }
140
141
  }
141
- exports.getGlobPatternsFromPackageManagerWorkspaces = getGlobPatternsFromPackageManagerWorkspaces;
142
142
  function normalizePatterns(patterns) {
143
143
  return patterns.map((pattern) => removeRelativePath(pattern.endsWith('/package.json')
144
144
  ? pattern
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readNameFromPackageJson = exports.buildProjectFromProjectJson = exports.ProjectJsonProjectsPlugin = void 0;
3
+ exports.ProjectJsonProjectsPlugin = void 0;
4
+ exports.buildProjectFromProjectJson = buildProjectFromProjectJson;
5
+ exports.readNameFromPackageJson = readNameFromPackageJson;
4
6
  const node_path_1 = require("node:path");
5
7
  const to_project_name_1 = require("../../../config/to-project-name");
6
8
  const fileutils_1 = require("../../../utils/fileutils");
@@ -29,7 +31,6 @@ function buildProjectFromProjectJson(json, path) {
29
31
  ...rest,
30
32
  };
31
33
  }
32
- exports.buildProjectFromProjectJson = buildProjectFromProjectJson;
33
34
  function readNameFromPackageJson(path) {
34
35
  try {
35
36
  const json = (0, fileutils_1.readJsonFile)(path);
@@ -39,4 +40,3 @@ function readNameFromPackageJson(path) {
39
40
  return undefined;
40
41
  }
41
42
  }
42
- exports.readNameFromPackageJson = readNameFromPackageJson;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.filterAffected = void 0;
3
+ exports.filterAffected = filterAffected;
4
4
  const file_utils_1 = require("../file-utils");
5
5
  const workspace_projects_1 = require("./locators/workspace-projects");
6
6
  const touched_projects_1 = require("../../plugins/js/project-graph/affected/touched-projects");
@@ -26,7 +26,6 @@ async function filterAffected(graph, touchedFiles, nxJson = (0, configuration_1.
26
26
  touchedProjects,
27
27
  });
28
28
  }
29
- exports.filterAffected = filterAffected;
30
29
  // -----------------------------------------------------------------------------
31
30
  function filterAffectedProjects(graph, ctx) {
32
31
  const result = {
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.applyProjectMetadata = exports.buildProjectGraphUsingProjectFileMap = exports.getFileMap = void 0;
3
+ exports.getFileMap = getFileMap;
4
+ exports.buildProjectGraphUsingProjectFileMap = buildProjectGraphUsingProjectFileMap;
5
+ exports.applyProjectMetadata = applyProjectMetadata;
4
6
  const workspace_root_1 = require("../utils/workspace-root");
5
7
  const path_1 = require("path");
6
8
  const perf_hooks_1 = require("perf_hooks");
@@ -39,7 +41,6 @@ function getFileMap() {
39
41
  };
40
42
  }
41
43
  }
42
- exports.getFileMap = getFileMap;
43
44
  async function buildProjectGraphUsingProjectFileMap(projectRootMap, externalNodes, fileMap, allWorkspaceFiles, rustReferences, fileMapCache, plugins, sourceMap) {
44
45
  storedFileMap = fileMap;
45
46
  storedAllWorkspaceFiles = allWorkspaceFiles;
@@ -103,7 +104,6 @@ async function buildProjectGraphUsingProjectFileMap(projectRootMap, externalNode
103
104
  projectFileMapCache,
104
105
  };
105
106
  }
106
- exports.buildProjectGraphUsingProjectFileMap = buildProjectGraphUsingProjectFileMap;
107
107
  function readCombinedDeps() {
108
108
  const installationPackageJsonPath = (0, path_1.join)(workspace_root_1.workspaceRoot, '.nx', 'installation', 'package.json');
109
109
  const installationPackageJson = (0, fs_1.existsSync)(installationPackageJsonPath)
@@ -290,4 +290,3 @@ async function applyProjectMetadata(graph, plugins, context, sourceMap) {
290
290
  }
291
291
  return { errors, graph };
292
292
  }
293
- exports.applyProjectMetadata = applyProjectMetadata;
@@ -1,7 +1,17 @@
1
1
  "use strict";
2
2
  var _ProjectGraphError_errors, _ProjectGraphError_partialProjectGraph, _ProjectGraphError_partialSourceMaps;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.LoadPluginError = exports.DaemonProjectGraphError = exports.isMergeNodesError = exports.isAggregateCreateNodesError = exports.isCreateMetadataError = exports.isAggregateProjectGraphError = exports.AggregateProjectGraphError = exports.ProcessProjectGraphError = exports.isWorkspaceValidityError = exports.WorkspaceValidityError = exports.ProcessDependenciesError = exports.CreateMetadataError = exports.MergeNodesError = exports.AggregateCreateNodesError = exports.isProjectConfigurationsError = exports.ProjectConfigurationsError = exports.isProjectWithNoNameError = exports.ProjectWithNoNameError = exports.isProjectsWithNoNameError = exports.ProjectsWithNoNameError = exports.isMultipleProjectsWithSameNameError = exports.isProjectWithExistingNameError = exports.ProjectWithExistingNameError = exports.MultipleProjectsWithSameNameError = exports.ProjectGraphError = void 0;
4
+ exports.LoadPluginError = exports.DaemonProjectGraphError = exports.AggregateProjectGraphError = exports.ProcessProjectGraphError = exports.WorkspaceValidityError = exports.ProcessDependenciesError = exports.CreateMetadataError = exports.MergeNodesError = exports.AggregateCreateNodesError = exports.ProjectConfigurationsError = exports.ProjectWithNoNameError = exports.ProjectsWithNoNameError = exports.ProjectWithExistingNameError = exports.MultipleProjectsWithSameNameError = exports.ProjectGraphError = void 0;
5
+ exports.isProjectWithExistingNameError = isProjectWithExistingNameError;
6
+ exports.isMultipleProjectsWithSameNameError = isMultipleProjectsWithSameNameError;
7
+ exports.isProjectsWithNoNameError = isProjectsWithNoNameError;
8
+ exports.isProjectWithNoNameError = isProjectWithNoNameError;
9
+ exports.isProjectConfigurationsError = isProjectConfigurationsError;
10
+ exports.isWorkspaceValidityError = isWorkspaceValidityError;
11
+ exports.isAggregateProjectGraphError = isAggregateProjectGraphError;
12
+ exports.isCreateMetadataError = isCreateMetadataError;
13
+ exports.isAggregateCreateNodesError = isAggregateCreateNodesError;
14
+ exports.isMergeNodesError = isMergeNodesError;
5
15
  const tslib_1 = require("tslib");
6
16
  class ProjectGraphError extends Error {
7
17
  constructor(errors, partialProjectGraph, partialSourceMaps) {
@@ -71,14 +81,12 @@ function isProjectWithExistingNameError(e) {
71
81
  'name' in e &&
72
82
  e?.name === ProjectWithExistingNameError.name));
73
83
  }
74
- exports.isProjectWithExistingNameError = isProjectWithExistingNameError;
75
84
  function isMultipleProjectsWithSameNameError(e) {
76
85
  return (e instanceof MultipleProjectsWithSameNameError ||
77
86
  (typeof e === 'object' &&
78
87
  'name' in e &&
79
88
  e?.name === MultipleProjectsWithSameNameError.name));
80
89
  }
81
- exports.isMultipleProjectsWithSameNameError = isMultipleProjectsWithSameNameError;
82
90
  class ProjectsWithNoNameError extends Error {
83
91
  constructor(projectRoots, projects) {
84
92
  super(`The projects in the following directories have no name provided:\n - ${projectRoots.join('\n - ')}`);
@@ -94,7 +102,6 @@ function isProjectsWithNoNameError(e) {
94
102
  'name' in e &&
95
103
  e?.name === ProjectsWithNoNameError.name));
96
104
  }
97
- exports.isProjectsWithNoNameError = isProjectsWithNoNameError;
98
105
  class ProjectWithNoNameError extends Error {
99
106
  constructor(projectRoot) {
100
107
  super(`The project in ${projectRoot} has no name provided.`);
@@ -109,7 +116,6 @@ function isProjectWithNoNameError(e) {
109
116
  'name' in e &&
110
117
  e?.name === ProjectWithNoNameError.name));
111
118
  }
112
- exports.isProjectWithNoNameError = isProjectWithNoNameError;
113
119
  class ProjectConfigurationsError extends Error {
114
120
  constructor(errors, partialProjectConfigurationsResult) {
115
121
  super('Failed to create project configurations');
@@ -125,7 +131,6 @@ function isProjectConfigurationsError(e) {
125
131
  'name' in e &&
126
132
  e?.name === ProjectConfigurationsError.name));
127
133
  }
128
- exports.isProjectConfigurationsError = isProjectConfigurationsError;
129
134
  /**
130
135
  * This error should be thrown when a `createNodesV2` function hits a recoverable error.
131
136
  * It allows Nx to recieve partial results and continue processing for better UX.
@@ -222,7 +227,6 @@ function isWorkspaceValidityError(e) {
222
227
  'name' in e &&
223
228
  e?.name === WorkspaceValidityError.name));
224
229
  }
225
- exports.isWorkspaceValidityError = isWorkspaceValidityError;
226
230
  class ProcessProjectGraphError extends Error {
227
231
  constructor(pluginName, { cause }) {
228
232
  super(`The "${pluginName}" plugin threw an error while processing the project graph:`, {
@@ -249,26 +253,22 @@ function isAggregateProjectGraphError(e) {
249
253
  'name' in e &&
250
254
  e?.name === AggregateProjectGraphError.name));
251
255
  }
252
- exports.isAggregateProjectGraphError = isAggregateProjectGraphError;
253
256
  function isCreateMetadataError(e) {
254
257
  return (e instanceof CreateMetadataError ||
255
258
  (typeof e === 'object' &&
256
259
  'name' in e &&
257
260
  e?.name === CreateMetadataError.name));
258
261
  }
259
- exports.isCreateMetadataError = isCreateMetadataError;
260
262
  function isAggregateCreateNodesError(e) {
261
263
  return (e instanceof AggregateCreateNodesError ||
262
264
  (typeof e === 'object' &&
263
265
  'name' in e &&
264
266
  e?.name === AggregateCreateNodesError.name));
265
267
  }
266
- exports.isAggregateCreateNodesError = isAggregateCreateNodesError;
267
268
  function isMergeNodesError(e) {
268
269
  return (e instanceof MergeNodesError ||
269
270
  (typeof e === 'object' && 'name' in e && e?.name === MergeNodesError.name));
270
271
  }
271
- exports.isMergeNodesError = isMergeNodesError;
272
272
  class DaemonProjectGraphError extends Error {
273
273
  constructor(errors, projectGraph, sourceMaps) {
274
274
  super(`The Daemon Process threw an error while calculating the project graph. Convert this error to a ProjectGraphError to get more information.`);
@@ -1,6 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.updateFileMap = exports.createFileMap = exports.createFileMapUsingProjectGraph = exports.createProjectFileMapUsingProjectGraph = void 0;
3
+ exports.createProjectFileMapUsingProjectGraph = createProjectFileMapUsingProjectGraph;
4
+ exports.createFileMapUsingProjectGraph = createFileMapUsingProjectGraph;
5
+ exports.createFileMap = createFileMap;
6
+ exports.updateFileMap = updateFileMap;
4
7
  const workspace_context_1 = require("../utils/workspace-context");
5
8
  const workspace_root_1 = require("../utils/workspace-root");
6
9
  const project_graph_1 = require("./project-graph");
@@ -9,14 +12,12 @@ const find_project_for_path_1 = require("./utils/find-project-for-path");
9
12
  async function createProjectFileMapUsingProjectGraph(graph) {
10
13
  return (await createFileMapUsingProjectGraph(graph)).fileMap.projectFileMap;
11
14
  }
12
- exports.createProjectFileMapUsingProjectGraph = createProjectFileMapUsingProjectGraph;
13
15
  // TODO: refactor this to pull straight from the rust context instead of creating the file map in JS
14
16
  async function createFileMapUsingProjectGraph(graph) {
15
17
  const configs = (0, project_graph_1.readProjectsConfigurationFromProjectGraph)(graph);
16
18
  let files = await (0, workspace_context_1.getAllFileDataInContext)(workspace_root_1.workspaceRoot);
17
19
  return createFileMap(configs, files);
18
20
  }
19
- exports.createFileMapUsingProjectGraph = createFileMapUsingProjectGraph;
20
21
  function createFileMap(projectsConfigurations, allWorkspaceFiles) {
21
22
  const projectFileMap = {};
22
23
  const projectRootMappings = (0, find_project_for_path_1.createProjectRootMappingsFromProjectConfigurations)(projectsConfigurations.projects);
@@ -44,7 +45,6 @@ function createFileMap(projectsConfigurations, allWorkspaceFiles) {
44
45
  },
45
46
  };
46
47
  }
47
- exports.createFileMap = createFileMap;
48
48
  function updateFileMap(projectsConfigurations, rustReferences, updatedFiles, deletedFiles) {
49
49
  const updates = (0, workspace_context_1.updateProjectFiles)(Object.fromEntries((0, find_project_for_path_1.createProjectRootMappingsFromProjectConfigurations)(projectsConfigurations)), rustReferences, updatedFiles, deletedFiles);
50
50
  return {
@@ -53,4 +53,3 @@ function updateFileMap(projectsConfigurations, rustReferences, updatedFiles, del
53
53
  rustReferences: updates.externalReferences,
54
54
  };
55
55
  }
56
- exports.updateFileMap = updateFileMap;
@@ -15,7 +15,7 @@ export declare class DeletedFileChange implements Change {
15
15
  }
16
16
  export declare function isWholeFileChange(change: Change): change is WholeFileChange;
17
17
  export declare function isDeletedFileChange(change: Change): change is DeletedFileChange;
18
- export declare function calculateFileChanges(files: string[], allWorkspaceFiles: FileData[], nxArgs?: NxArgs, readFileAtRevision?: (f: string, r: void | string) => string, ignore?: any): FileChange[];
18
+ export declare function calculateFileChanges(files: string[], allWorkspaceFiles: FileData[], nxArgs?: NxArgs, readFileAtRevision?: (f: string, r: void | string) => string, ignore?: ReturnType<typeof ignore>): FileChange[];
19
19
  export declare const TEN_MEGABYTES: number;
20
20
  /**
21
21
  * TODO(v20): Remove this function
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.readPackageJson = exports.defaultFileRead = exports.readWorkspaceConfig = exports.TEN_MEGABYTES = exports.calculateFileChanges = exports.isDeletedFileChange = exports.isWholeFileChange = exports.DeletedFileChange = exports.WholeFileChange = void 0;
3
+ exports.TEN_MEGABYTES = exports.DeletedFileChange = exports.WholeFileChange = void 0;
4
+ exports.isWholeFileChange = isWholeFileChange;
5
+ exports.isDeletedFileChange = isDeletedFileChange;
6
+ exports.calculateFileChanges = calculateFileChanges;
7
+ exports.readWorkspaceConfig = readWorkspaceConfig;
8
+ exports.defaultFileRead = defaultFileRead;
9
+ exports.readPackageJson = readPackageJson;
4
10
  const child_process_1 = require("child_process");
5
11
  const fs_1 = require("fs");
6
12
  const path_1 = require("path");
@@ -30,11 +36,9 @@ exports.DeletedFileChange = DeletedFileChange;
30
36
  function isWholeFileChange(change) {
31
37
  return change.type === 'WholeFileChange';
32
38
  }
33
- exports.isWholeFileChange = isWholeFileChange;
34
39
  function isDeletedFileChange(change) {
35
40
  return change.type === 'WholeFileDeleted';
36
41
  }
37
- exports.isDeletedFileChange = isDeletedFileChange;
38
42
  function calculateFileChanges(files, allWorkspaceFiles, nxArgs, readFileAtRevision = defaultReadFileAtRevision, ignore = (0, ignore_1.getIgnoreObject)()) {
39
43
  files = files.filter((f) => !ignore.ignores(f));
40
44
  return files.map((f) => {
@@ -72,7 +76,6 @@ function calculateFileChanges(files, allWorkspaceFiles, nxArgs, readFileAtRevisi
72
76
  };
73
77
  });
74
78
  }
75
- exports.calculateFileChanges = calculateFileChanges;
76
79
  exports.TEN_MEGABYTES = 1024 * 10000;
77
80
  function defaultReadFileAtRevision(file, revision) {
78
81
  try {
@@ -124,11 +127,9 @@ function readWorkspaceConfig(opts) {
124
127
  return configuration;
125
128
  }
126
129
  }
127
- exports.readWorkspaceConfig = readWorkspaceConfig;
128
130
  function defaultFileRead(filePath) {
129
131
  return (0, fs_1.readFileSync)((0, path_1.join)(workspace_root_1.workspaceRoot, filePath), 'utf-8');
130
132
  }
131
- exports.defaultFileRead = defaultFileRead;
132
133
  function readPackageJson() {
133
134
  try {
134
135
  return (0, fileutils_1.readJsonFile)(`${workspace_root_1.workspaceRoot}/package.json`);
@@ -137,7 +138,6 @@ function readPackageJson() {
137
138
  return {}; // if package.json doesn't exist
138
139
  }
139
140
  }
140
- exports.readPackageJson = readPackageJson;
141
141
  /**
142
142
  * TODO(v20): Remove this function.
143
143
  */