nx 24.0.4 → 24.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/dist/bin/nx.js +2 -8
  2. package/dist/bin/workspace-env.d.ts +7 -0
  3. package/dist/bin/workspace-env.js +20 -0
  4. package/dist/src/command-line/affected/affected.js +1 -0
  5. package/dist/src/command-line/migrate/migrate.js +23 -7
  6. package/dist/src/command-line/migrate/prompt-files.d.ts +4 -2
  7. package/dist/src/command-line/migrate/prompt-files.js +26 -5
  8. package/dist/src/command-line/nx-cloud/start-nx-agents/command-object.js +1 -1
  9. package/dist/src/command-line/release/changelog.js +15 -12
  10. package/dist/src/command-line/reset/reset.js +13 -1
  11. package/dist/src/daemon/client/client.js +8 -7
  12. package/dist/src/daemon/client/daemon-environment.d.ts +43 -11
  13. package/dist/src/daemon/client/daemon-environment.js +139 -8
  14. package/dist/src/daemon/server/handle-client-env.d.ts +11 -1
  15. package/dist/src/daemon/server/handle-client-env.js +96 -5
  16. package/dist/src/daemon/server/handle-configure-ai-agents.js +2 -1
  17. package/dist/src/daemon/server/latest-nx.js +2 -1
  18. package/dist/src/daemon/server/server.js +1 -1
  19. package/dist/src/daemon/socket-utils.d.ts +9 -1
  20. package/dist/src/daemon/socket-utils.js +25 -0
  21. package/dist/src/executors/run-commands/running-tasks.d.ts +1 -0
  22. package/dist/src/executors/run-commands/running-tasks.js +69 -17
  23. package/dist/src/executors/run-script/run-script.impl.js +11 -3
  24. package/dist/src/native/index.d.ts +1 -1
  25. package/dist/src/native/index.js +31 -3
  26. package/dist/src/native/native-file-cache-location.js +10 -4
  27. package/dist/src/native/nx.wasm32-wasi.debug.wasm +0 -0
  28. package/dist/src/native/nx.wasm32-wasi.wasm +0 -0
  29. package/dist/src/native/transform-objects.js +5 -1
  30. package/dist/src/nx-cloud/update-manager.d.ts +6 -1
  31. package/dist/src/nx-cloud/update-manager.js +39 -12
  32. package/dist/src/plugins/js/lock-file/pnpm-parser.js +22 -34
  33. package/dist/src/plugins/js/lock-file/project-graph-pruning.d.ts +7 -0
  34. package/dist/src/plugins/js/lock-file/project-graph-pruning.js +31 -5
  35. package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.d.ts +1 -1
  36. package/dist/src/plugins/js/lock-file/utils/pnpm-normalizer.js +6 -5
  37. package/dist/src/plugins/js/package-json/create-package-json.d.ts +1 -1
  38. package/dist/src/plugins/js/package-json/create-package-json.js +53 -16
  39. package/dist/src/plugins/js/project-graph/build-dependencies/target-project-locator.js +7 -1
  40. package/dist/src/project-graph/affected/affected-tasks.js +29 -1
  41. package/dist/src/project-graph/plugins/get-plugins.d.ts +2 -0
  42. package/dist/src/project-graph/plugins/get-plugins.js +17 -2
  43. package/dist/src/project-graph/plugins/isolation/isolated-plugin.js +4 -2
  44. package/dist/src/tasks-runner/fork.js +4 -2
  45. package/dist/src/tasks-runner/run-command.d.ts +4 -1
  46. package/dist/src/tasks-runner/run-command.js +6 -4
  47. package/dist/src/tasks-runner/running-tasks/batch-process.d.ts +3 -2
  48. package/dist/src/tasks-runner/running-tasks/batch-process.js +7 -3
  49. package/dist/src/tasks-runner/task-orchestrator.d.ts +1 -0
  50. package/dist/src/tasks-runner/task-orchestrator.js +12 -3
  51. package/dist/src/tasks-runner/tasks-runner.d.ts +5 -0
  52. package/dist/src/ultracache/overrides.d.ts +1 -1
  53. package/dist/src/ultracache/overrides.js +1 -1
  54. package/dist/src/ultracache/report.d.ts +1 -1
  55. package/dist/src/ultracache/report.js +4 -1
  56. package/dist/src/utils/cache-directory.d.ts +3 -0
  57. package/dist/src/utils/cache-directory.js +105 -25
  58. package/dist/src/utils/child-process.d.ts +8 -1
  59. package/dist/src/utils/child-process.js +24 -0
  60. package/dist/src/utils/compile-cache.d.ts +6 -8
  61. package/dist/src/utils/compile-cache.js +23 -16
  62. package/dist/src/utils/min-release-age/packument.d.ts +2 -1
  63. package/dist/src/utils/min-release-age/packument.js +5 -3
  64. package/dist/src/utils/nx-tmp-dir.d.ts +14 -2
  65. package/dist/src/utils/nx-tmp-dir.js +26 -2
  66. package/dist/src/utils/owned-private-dir.d.ts +22 -0
  67. package/dist/src/utils/owned-private-dir.js +148 -0
  68. package/dist/src/utils/package-json.d.ts +8 -1
  69. package/dist/src/utils/package-json.js +77 -34
  70. package/dist/src/utils/package-manager.d.ts +25 -0
  71. package/dist/src/utils/package-manager.js +244 -9
  72. package/dist/src/utils/path.d.ts +4 -0
  73. package/dist/src/utils/path.js +8 -0
  74. package/dist/src/utils/redact-url-credentials.js +3 -2
  75. package/dist/src/utils/wait-for-socket-connection.d.ts +2 -0
  76. package/dist/src/utils/wait-for-socket-connection.js +3 -3
  77. package/package.json +11 -11
  78. package/schemas/migrations-schema.json +1 -1
@@ -26,7 +26,7 @@ async function waitForSocketConnection(socketPath, options) {
26
26
  return null;
27
27
  const path = typeof socketPath === 'function' ? socketPath() : socketPath;
28
28
  if (path) {
29
- const result = await tryConnect(path);
29
+ const result = await tryConnect(path, options?.connect ?? net_1.connect);
30
30
  if (result.socket) {
31
31
  return result.socket;
32
32
  }
@@ -41,10 +41,10 @@ async function waitForSocketConnection(socketPath, options) {
41
41
  }
42
42
  return null;
43
43
  }
44
- function tryConnect(socketPath) {
44
+ function tryConnect(socketPath, dial) {
45
45
  return new Promise((resolve) => {
46
46
  try {
47
- const socket = (0, net_1.connect)(socketPath, () => {
47
+ const socket = dial(socketPath, () => {
48
48
  resolve({ socket });
49
49
  });
50
50
  socket.once('error', (error) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "nx",
3
- "version": "24.0.4",
3
+ "version": "24.0.6",
4
4
  "private": false,
5
5
  "type": "commonjs",
6
6
  "description": "The core Nx plugin contains the core functionality of Nx like the project graph, nx commands and task orchestration.",
@@ -150,16 +150,16 @@
150
150
  }
151
151
  },
152
152
  "optionalDependencies": {
153
- "@nx/nx-darwin-arm64": "24.0.4",
154
- "@nx/nx-darwin-x64": "24.0.4",
155
- "@nx/nx-freebsd-x64": "24.0.4",
156
- "@nx/nx-linux-arm-gnueabihf": "24.0.4",
157
- "@nx/nx-linux-arm64-gnu": "24.0.4",
158
- "@nx/nx-linux-arm64-musl": "24.0.4",
159
- "@nx/nx-linux-x64-gnu": "24.0.4",
160
- "@nx/nx-linux-x64-musl": "24.0.4",
161
- "@nx/nx-win32-arm64-msvc": "24.0.4",
162
- "@nx/nx-win32-x64-msvc": "24.0.4"
153
+ "@nx/nx-darwin-arm64": "24.0.6",
154
+ "@nx/nx-darwin-x64": "24.0.6",
155
+ "@nx/nx-freebsd-x64": "24.0.6",
156
+ "@nx/nx-linux-arm-gnueabihf": "24.0.6",
157
+ "@nx/nx-linux-arm64-gnu": "24.0.6",
158
+ "@nx/nx-linux-arm64-musl": "24.0.6",
159
+ "@nx/nx-linux-x64-gnu": "24.0.6",
160
+ "@nx/nx-linux-x64-musl": "24.0.6",
161
+ "@nx/nx-win32-arm64-msvc": "24.0.6",
162
+ "@nx/nx-win32-x64-msvc": "24.0.6"
163
163
  },
164
164
  "nx-migrations": {
165
165
  "migrations": "./migrations.json",
@@ -59,7 +59,7 @@
59
59
  },
60
60
  "prompt": {
61
61
  "type": "string",
62
- "description": "Path to a markdown prompt file with instructions for an AI agent to perform the migration, relative to `migrations.json`. The path must stay within the directory containing `migrations.json` and point at an existing file. The prompt is handed to the agent when migrations are applied with the agentic flow enabled (e.g. `nx migrate --run-migrations --agentic`)."
62
+ "description": "Path to a markdown (`.md`) prompt file with instructions for an AI agent to perform the migration, relative to `migrations.json`. The path must stay within the directory containing `migrations.json` and point at an existing file. The prompt is handed to the agent when migrations are applied with the agentic flow enabled (e.g. `nx migrate --run-migrations --agentic`)."
63
63
  },
64
64
  "schema": {
65
65
  "type": "string",